instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
web-infra-dev__rslib__1369
web-infra-dev/rslib
1,369
defect
1933c3e31e0bd1af85948908f7ceaf9a54ecd625
36510a000b0f53be5ba331a1d2b5933c4d915962
fix: preserve original extension when extension redirection is disabled
## Summary when `redirect.js.extension` set to `false` ### source ```ts export * from './bar.node'; export * from './bar.node.js'; export * from './bar.node.ts'; export * from './bar'; export * from './baz-folder'; export * from './foo.js'; export * from './foo.ts'; ``` ### before ```js export *...
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 294a68da17..f11c637468 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -1448,6 +1448,7 @@ const composeBundlelessExternalConfig = ( return; } const { issuer } = contextInfo...
2
2
0
[{"id": "G0", "claim": "The added comment in packages/core/src/config.ts should read \"the resolver directly generates correct resolvedRequest\" (subject-verb agreement) instead of \"generate\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The r...
null
web-infra-dev__rslib__390
web-infra-dev/rslib
390
defect
8bee0650b4ddf4ac5185969073081dadd05a7ce6
40d912594243a4dcbe9a0d63fd3f6e33874f6d2d
feat(command): support --lib arguments
## Summary Close #382. Support following CLI args for `build` and `inspect`, only build specified lib. Could also be used with `rslib mf dev` in https://github.com/web-infra-dev/rslib/pull/349. ```bash rslib build --lib esm rslib build --lib esm --lib cjs rslib inspect --lib esm rslib inspect --lib esm --l...
diff --git a/packages/core/src/build.ts b/packages/core/src/build.ts index a4894f95b..d689cb65b 100644 --- a/packages/core/src/build.ts +++ b/packages/core/src/build.ts @@ -1,13 +1,18 @@ -import type { RsbuildInstance } from '@rsbuild/core'; +import { type RsbuildInstance, createRsbuild } from '@rsbuild/core'; import ...
3
1
0
[{"id": "G0", "claim": "The environments should be composed inside initRsbuild (config.ts) rather than composing them in the executors of every command.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The --lib option should be declared as a shared option i...
null
web-infra-dev__rslib__436
web-infra-dev/rslib
436
defect
5bbe9e9ddaed4ec70ccc1a45939bc0d90e8809fd
3c1eecebc40fe9d490f6bf1b57e1595ec17d8018
feat: support lib.id
## Summary Close https://github.com/web-infra-dev/rslib/issues/382. Support configure `lib.id` in userland. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or n...
diff --git a/packages/core/src/cli/commands.ts b/packages/core/src/cli/commands.ts index b738f3f6df..07af6cc2db 100644 --- a/packages/core/src/cli/commands.ts +++ b/packages/core/src/cli/commands.ts @@ -52,7 +52,7 @@ export function runCli(): void { buildCommand .option( - '--lib <name>', + '--lib <...
5
4
0
[{"id": "G0", "claim": "The error message for duplicated IDs could be more informative by specifying which IDs are duplicated and suggesting how to resolve the conflict.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The RsbuildConfigWithLibInfo typ...
null
web-infra-dev__rslib__642
web-infra-dev/rslib
642
defect
3564bcbb9061499d5afdfc3bcf0d4f7374da47a3
3c6d3066662b4aef8606cb4a683b186df7a2d74e
fix: handle add and unlink file in bundleless mode
## Summary Previously, the `entry` in bundleless mode is set during the initial build and does not change during the `rslib build --watch` phase. For example, a newly added file will not be monitored, while a file that was included initially will trigger an error (entry module not found) if it is deleted later. I...
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index a4025bab7a..ffa4017019 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -918,76 +918,90 @@ const composeEntryConfig = async ( }; } - // In bundleless mode, resolve glob patterns and convert them to entry...
5
3
0
[{"id": "G0", "claim": "The error message thrown by the new awaitFileChanges helper says 'awaitFileExists failed: ${file}', which misnames the function and reads unclear, and should be reworded.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The f...
null
web-infra-dev__rslib__67
web-infra-dev/rslib
67
defect
cfcc89fe8cd082a726f30fda6de70c38d1afbf99
6ea34f4a29fdac79a9022b91a069e180411e54e1
feat: get tsconfigPath and entryPath from enviroment config
## Summary Get `tsconfigPath` and `entryPath` from enviroment config, no need to fetch from plugin options. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not ...
diff --git a/e2e/cases/dts/__snapshots__/index.test.ts.snap b/e2e/cases/dts/__snapshots__/index.test.ts.snap index b8d7806896..099f93cc97 100644 --- a/e2e/cases/dts/__snapshots__/index.test.ts.snap +++ b/e2e/cases/dts/__snapshots__/index.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snap...
2
2
1
[{"id": "G0", "claim": "Rename the exported type `pluginDtsOptions` to PascalCase `PluginDtsOptions`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The `.replace` regex should also cover the compound extensions .cjsx, .ctsx, .mjsx and .mtsx s...
null
web-infra-dev__rslib__681
web-infra-dev/rslib
681
defect
22efc8d850a5d8d0afb1ba81d948575060e61b89
dba56a7054f5e265432014f99f87ed29b59ba43c
chore: add type check for test files
## Summary Close https://github.com/web-infra-dev/rslib/issues/458. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d21950e4..b04aa3b0b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,9 @@ jobs: - name: Install Dependencies run: pnpm install + - name: Type Check + run: pnpm run type-check + ...
1
1
1
[{"id": "G0", "claim": "The include list in tests/tsconfig.json should cover the integration test files and config — e.g. \"integration/**/**.test.ts\" and \"integration/rslib.config.ts\" — rather than dropping \"integration/**/*.ts\" from type checking.", "category": "testing", "verdict": "supported", "priority": "P1"...
null
web-infra-dev__rslib__685
web-infra-dev/rslib
685
defect
860dba6034b19179f32614cab8f72a19de68f895
2a068d8965a647794a8519ee8789101771afb060
fix: validate entry type
## Summary validate entry type to prevent unexpected behaviour. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index b7a990eb9..67e0d16e4 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -890,7 +890,7 @@ const composeEntryConfig = async ( root: string, cssModulesAuto: CssLoaderOptionsAuto, ): Promise<{ entryConfig: Environ...
1
1
0
[{"id": "G0", "claim": "The source.entry validation error message should end with a pointer to the source configuration docs (suggested as https://lib.rsbuild.dev/config/rsbuild/source#sourceinclude for more details) instead of the vague 'Please check your configuration and ensure it is correctly configured.'", "catego...
null
web-infra-dev__rslib__69
web-infra-dev/rslib
69
defect
89cb72a2c0fd525e8e6750c79463ccf2b1d41e9e
760a9fcccdc95c81234ad415a33d795d6906268c
feat: support dts.abortOnError
## Summary support `dts.abortOnError` option to control whether to exit process when dts build error. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not requir...
diff --git a/e2e/cases/dts/bundle-false/abortOnError.config.ts b/e2e/cases/dts/bundle-false/abortOnError.config.ts new file mode 100644 index 000000000..8d47abb76 --- /dev/null +++ b/e2e/cases/dts/bundle-false/abortOnError.config.ts @@ -0,0 +1,24 @@ +import { generateBundleCjsConfig, generateBundleEsmConfig } from '@e2...
1
1
0
[{"id": "G0", "claim": "The DTS promise results should use a structured object (e.g. `{ status: 'error' | 'success' }`) instead of a `string`, which is easier to extend in the future.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rslib__71
web-infra-dev/rslib
71
defect
b9ae23e6607f888740d0c1983eca8cdb8b6b4c7a
950de4fbbbeb59c9cbfe3a4a65d74521f3f86772
fix: lcp should not be a file path
## Summary Fix #68. Changes overview: 1. fix #68, don't return file path as a LCP. 2. add fs mock by following https://vitest.dev/guide/mocking.html#file-system to facilitate testing with fs/path. 3. add separated vitest config to make sure the `packages/core/__mocks__` could be resovled, or we have to put i...
diff --git a/biome.json b/biome.json index b04f46496..d7893851b 100644 --- a/biome.json +++ b/biome.json @@ -21,6 +21,7 @@ "ignoreUnknown": true }, "formatter": { + "ignore": ["**/.rslib/*"], "indentStyle": "space" }, "javascript": { diff --git a/e2e/cases/bundle-false/index.test.ts b/e2e/cases...
2
2
0
[{"id": "G0", "claim": "Sorting could be done inside `buildAndGetResults` instead of calling `.sort()` at each test call site.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `fs.readFileSync` call should use the `pkgJsonPath` variable instead of re-r...
null
web-infra-dev__rslib__788
web-infra-dev/rslib
788
defect
2820e2819add7420ba2fbb873f30009af61c1191
f0e2b7e635274146d4a5298d87aa9d20797c0ad5
fix: revert dtsEmitPath generate logic to respect `output.distPath.root`
## Summary In https://github.com/web-infra-dev/rslib/pull/780, `outDir` is used to generate dtsEmitPath with a higher priority than `output.distPath.root`. This is an unexpected change, this PR revert it. ## Related Links close: #785 <!--- Provide links of related issues or pages --> ## Checklist <!-...
diff --git a/packages/plugin-dts/src/index.ts b/packages/plugin-dts/src/index.ts index 5a5824b87..349d3bcc7 100644 --- a/packages/plugin-dts/src/index.ts +++ b/packages/plugin-dts/src/index.ts @@ -113,11 +113,10 @@ export const pluginDts = (options: PluginDtsOptions = {}): RsbuildPlugin => ({ const { options: ...
1
1
0
[{"id": "G0", "claim": "Extract the inline dtsEmitPath priority logic in pluginDts into a function and add a unit test for it to prevent accidental modification afterward.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rslib__90
web-infra-dev/rslib
90
defect
fc45a6cbe2024f988ec022d7332549c4ff766125
0f41f81198fe1c70c8113b6e315372341e83cc1b
feat: add js extension for relative import in bundleless mode
## Summary add js extension for relative import in bundleless mode ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/e2e/cases/bundle-false/index.test.ts b/e2e/cases/bundle-false/index.test.ts index 48fb66de6..598ee4f0c 100644 --- a/e2e/cases/bundle-false/index.test.ts +++ b/e2e/cases/bundle-false/index.test.ts @@ -39,3 +39,15 @@ test('single file', async () => { ] `); }); + +test('auto add extension for relativ...
1
1
1
[{"id": "G0", "claim": "The new e2e assertion expects the CJS output to require \"./bar.js\", but if autoExtension is disabled in this fixture the import should resolve to \"./bar.cjs\".", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
web-infra-dev__rslib__959
web-infra-dev/rslib
959
defect
6e821268e3f54fbbc2462364a09f03e6295ea362
46f84c708f7189b170ba8d08b7f4790df7f270a1
fix: preserve worker syntax
## Summary Preserve worker syntax, do not transform to Rspack runtime based output. ## Related Links https://github.com/web-infra-dev/rslib/issues/929 <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [ ] D...
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index bfc5023d3f..7789248558 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -576,6 +576,9 @@ const composeFormatConfig = ({ importMeta: false, importDynamic: false, }, + others: { + worker: f...
2
2
0
[{"id": "G0", "claim": "The new plugin's name string should be renamed from 'rsbuild:format' to 'rsbuild:disable-url-parse' to match the renamed disableUrlParseRsbuildPlugin.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The snapshot entry's na...
null
web-infra-dev__rslib__998
web-infra-dev/rslib
998
defect
c8a4e87336b7f005b7b821604d20e8a60fd2b45b
8a85f5da6c7da82dad43a77e36addab426131593
feat: support `iife` format
## Summary Support `iife` format. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [x] Documentation updated (or not required).
diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 8d79f21b4..a5ee65312 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -7,6 +7,7 @@ import { type RsbuildPlugin, type RsbuildPlugins, type Rspack, + type ToolsConfig, defineConfig as defineRsbuildConfig...
2
2
2
[{"id": "G0", "claim": "The IIFE doc paragraph tells users to configure the global's name with esbuild's \"global name setting\", and should be rewritten to reference rslib/rspack's own configurations.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim":...
null
web-infra-dev__rspack__11859
web-infra-dev/rspack
11,859
defect
dd193801e920883f043fc0279d49644e313fce35
3be49aac1da4b92662b24a27d4cd076a893f34b7
feat: eval simple expression for enum member
## Summary Eval simple expression for enum member <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [x] Documentation updated (or not required).
diff --git a/crates/rspack_binding_api/src/swc.rs b/crates/rspack_binding_api/src/swc.rs index 063cdd93f8e9..6f2b0d8d4e58 100644 --- a/crates/rspack_binding_api/src/swc.rs +++ b/crates/rspack_binding_api/src/swc.rs @@ -62,7 +62,7 @@ fn _transform(source: String, options: String) -> napi::Result<TransformOutput> ...
1
1
1
[{"id": "G0", "claim": "The bitwise NOT branch in evaluate_unary should return the bitwise complement of the number as `EnumMemberValue::Number(!(num as i32) as f64)` instead of arithmetic negation `-num`, which it currently returns for `~`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope"...
null
web-infra-dev__rspack__12167
web-infra-dev/rspack
12,167
defect
d28111759d52a66ce68f71fb73e654aed05221ea
5931a97fb6e9dbf7b7712255c6d457d9e8f31607
fix: should have js entry for importModule assets and rslib
## Summary Should have a js module when using importModule point to assets, otherwise it will get empty result by importModule. RslibPlugin also needs this js module to implements bundleless features. <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ##...
diff --git a/Cargo.lock b/Cargo.lock index cba25291c8ec..02497d7d8633 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4675,10 +4675,13 @@ dependencies = [ name = "rspack_plugin_rslib" version = "0.6.1" dependencies = [ + "async-trait", "rspack_cacheable", "rspack_core", "rspack_error", + "rspack_hash", "rspack_...
3
1
0
[{"id": "G0", "claim": "Returning a reference to the stack-allocated array [SourceType::JavaScript, SourceType::Asset] from source_types creates a dangling reference, and the method should return a static array like ASSET_TYPES instead.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "in...
null
web-infra-dev__rspack__12185
web-infra-dev/rspack
12,185
defect
c891a13a6aa95d50b4f93cf2bc9a2b7b0bc98a8c
e093f2570e41997bfbbca5cdf3e90d7dfd1dc52e
test(native-watcher): init native watcher tests
## Summary <!-- Describe what this PR does and why. --> Initialize native watcher test cases. Port https://github.com/webpack/watchpack/blob/b45446602cb428052d4b7800862d79da41f312bc/test/Watchpack.js#L18 ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with...
diff --git a/Cargo.lock b/Cargo.lock index 4da855d6c632..43f55187a6ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1447,6 +1447,12 @@ dependencies = [ "arrayvec", ] +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059...
4
4
2
[{"id": "G0", "claim": "The readiness mechanism does not actually guarantee the watcher is ready, which could lead to flaky tests, so a more reliable synchronization mechanism (channel signal, callback, or Barrier) should be implemented.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "intro...
null
web-infra-dev__rspack__12659
web-infra-dev/rspack
12,659
defect
86634a079855003c3e837ab7be59b0c53b56c26d
568fa5af19e1b4ad61df5ab7f89384cde8362d08
refactor: use DerfOpt's take/replace assist artifact mutation
## Summary ### Remove Default trait of DerefOption 1. default to Some(T) is not a idomatic way in Rust 2. Prevent DerefOption be mem::take, to make sure artifact is None after token. ### Introduce take/replace paired API to transfer artifact in/out <!-- Describe what this PR does and why. --> ## Related l...
diff --git a/crates/rspack_core/src/compilation/mod.rs b/crates/rspack_core/src/compilation/mod.rs index ef032103b238..30831d36d5d0 100644 --- a/crates/rspack_core/src/compilation/mod.rs +++ b/crates/rspack_core/src/compilation/mod.rs @@ -1641,7 +1641,7 @@ impl Compilation { let mut side_effects_optimize_artifac...
1
1
1
[{"id": "G0", "claim": "Restoring build_module_graph_artifact with swap() after take() panics at runtime because the DerefOption contains None, so the artifact should be wrapped back with DerefOption::new().", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
web-infra-dev__rspack__12685
web-infra-dev/rspack
12,685
defect
2ed157622959cf517c3d63d35448d77ccb182f85
27fc8ad091013044cd39bb6a38adc88ef7e38f26
feat: rspack_cacheable context expose project root
## Summary * Add the `CacheableContext` trait to rspack_cacheable to ensure that the context in serialization and deserialization contains `project_root` fields. ``` rust pub trait CacheableContext: Any { fn project_root(&self) -> Option<&Path>; } pub fn from_bytes<T, C: CacheableContext>(bytes: &[u8], co...
diff --git a/crates/rspack_cacheable/src/context.rs b/crates/rspack_cacheable/src/context.rs index ec9d235ff64c..21dba22c50dd 100644 --- a/crates/rspack_cacheable/src/context.rs +++ b/crates/rspack_cacheable/src/context.rs @@ -1,4 +1,4 @@ -use std::{any::Any, ptr::NonNull}; +use std::{any::Any, path::Path, ptr::NonNull...
1
1
0
[{"id": "G0", "claim": "The `ctx` parameter of the AsConverter trait's serialize/deserialize methods in crates/rspack_cacheable/src/with/as.rs should be named `guard` for consistency with the rest of the codebase.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rspack__12742
web-infra-dev/rspack
12,742
defect
d9915de43e528447ef50c85fa8bff4f84a0fb274
c46a57bfda3a1ec59220d408cdbb86327fd868e5
refactor: move logger into pass and reorg some passes
## Summary move logger into passes and make pass name more align with hook name and make run_pass only contain pass call <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not re...
diff --git a/crates/rspack_core/src/compilation/build_module_graph/mod.rs b/crates/rspack_core/src/compilation/build_module_graph/mod.rs index a7eb0bdcfac5..9afcfecd0800 100644 --- a/crates/rspack_core/src/compilation/build_module_graph/mod.rs +++ b/crates/rspack_core/src/compilation/build_module_graph/mod.rs @@ -3,7 +...
1
1
1
[{"id": "G0", "claim": "Removing the public `build_module_graph` method leaves no public wrapper, so `xtask/benchmark/benches/groups/build_chunk_graph.rs`, which still calls `compiler.compilation.build_module_graph().await`, will fail to compile; re-expose a public method or update the benchmark to use the new pass.", ...
null
web-infra-dev__rspack__12893
web-infra-dev/rspack
12,893
defect
2fadd3a1cd2888befe4713e9ade76d9a8db8b808
843a308266d4401a2cf1f89259eb03fdf0c5c8f1
refactor: enable rule for all crates
## Summary enable clippy rule for all crates(except binding_api crate which has too much dangerous warning, which wil be fixed separately) <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests ...
diff --git a/crates/node_binding/Cargo.toml b/crates/node_binding/Cargo.toml index 5eda2576b96f..021c6f74ff1e 100644 --- a/crates/node_binding/Cargo.toml +++ b/crates/node_binding/Cargo.toml @@ -32,3 +32,6 @@ tracing = { workspace = true } [build-dependencies] rspack_binding_build = { workspace = true } + +[lin...
6
6
0
[{"id": "G0", "claim": "The or-pattern reformatting in the `matches!` blocks of assign_library_plugin.rs creates inconsistent formatting, breaking Rust conventions with awkward line breaks.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The destructuring ...
null
web-infra-dev__rspack__12900
web-infra-dev/rspack
12,900
defect
2fadd3a1cd2888befe4713e9ade76d9a8db8b808
9e2104b3feae94def0d18f911b461808332129f8
feat: support `import.defer()` for statical path
## Summary port https://github.com/webpack/webpack/pull/20064 <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [x] Documentation updated (or not required)...
diff --git a/crates/rspack_core/src/runtime_globals.rs b/crates/rspack_core/src/runtime_globals.rs index 9f49bd966ba1..ae79bc2a99a5 100644 --- a/crates/rspack_core/src/runtime_globals.rs +++ b/crates/rspack_core/src/runtime_globals.rs @@ -288,8 +288,9 @@ define_runtime_globals! { // defer import support const ASY...
2
2
0
[{"id": "G0", "claim": "The new test case's configuration file should be named 'rspack.config.js' instead of 'webpack.config.js' to be consistent with the rest of the rspack test suite.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The added co...
null
web-infra-dev__rspack__12908
web-infra-dev/rspack
12,908
defect
b7bcbce6d6e4a6914d102fd93b8f8d6747ee948c
80449a888c15f9f47768f0422330552d139ec510
fix(rstest): `rstest.importActual` not work when imported from `@rstest/core`
## Summary - fix `rstest.importActual` not works when imported from `@rstest/core` Previously, `rstest.importActual` and `rstest.requireActual` only worked when `rs` or `rstest` were free (global) variables. When imported from `@rstest/core` via ESM (e.g., `import { rstest } from '@rstest/core'`), the `for_name`...
diff --git a/crates/node_binding/napi-binding.d.ts b/crates/node_binding/napi-binding.d.ts index 11490f356732..bae2c475db83 100644 --- a/crates/node_binding/napi-binding.d.ts +++ b/crates/node_binding/napi-binding.d.ts @@ -2800,6 +2800,7 @@ export interface RawRstestPluginOptions { hoistMockModule: boolean manual...
2
2
1
[{"id": "G0", "claim": "The `globals` option is only enforced in the call_member_chain hook, so with `globals: false` other rstest APIs (mock, doMock, importMock, etc.) would still transform global `rs`/`rstest` usage; the same gating should be applied across the other hooks or the option's documented behavior adjusted...
null
web-infra-dev__rspack__13024
web-infra-dev/rspack
13,024
defect
61d205233975a7ebb79f21480319de4ea063a107
9e2de9fb4625bf20060b250097e52a52eec4432e
perf: Cache default context regexp for parser plugins
Summary: - lazily instantiate the shared `^\.\/.*$` regexp so it can be reused without re-parsing in both `require.context` and import meta handling - add `default_context_reg_exp` helper and update parser plugins to use it alongside the existing cleaning utilities - ensure context module dependencies default to the...
diff --git a/crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs b/crates/rspack_plugin_javascript/src/parser_plugin/import_meta_context_dependency_parser_plugin.rs index 925905f3007c..9df3a9b67734 100644 --- a/crates/rspack_plugin_javascript/src/parser_plugin/import_meta_c...
2
1
0
[{"id": "G0", "claim": "The expect message on the newly added shared default context regexp is generic (\"reg failed\") and inconsistent with the other expect(\"reg should success\") messages in the parser plugins, and should be replaced with a clearer, more specific message naming the default context regexp and its pa...
null
web-infra-dev__rspack__13127
web-infra-dev/rspack
13,127
defect
b988aa8771a47572d473b09660aee80c9f39af01
12e6948a1013379e7a5d463a4533dcb79faac175
chore(ci): add bench runner label input in CI
## Summary Use a stable GitHub runner in CI. Due to the bench bin will be built and run in different runners on different paths, so pass the cases dir via an env variable. > Why not use the CLI opt for the cases dir > the main function is generated by `criterion_main!`, the ENV var way is less invasive. <!-- D...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ce499f4b840..271f5f4fd76b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,7 @@ jobs: bench: true prefer_docker: false test-runner: '"ubuntu-22.04"' + bench-runner: '"ubuntu-22.04"' te...
3
3
2
[{"id": "G0", "claim": "Resolving the benchcases directory via std::env::current_dir() plus a relative ../../ path makes the location depend on the process working directory, so in CI where cargo codspeed runs from the repo root it would resolve outside the repo and likely fail; anchor the path to a stable compile-time...
null
web-infra-dev__rspack__13161
web-infra-dev/rspack
13,161
defect
27c8fbf40912506fe8da0f6b3ac310075ab9e494
c0e79619a35a5aec57a60b3c0d35a6a1a2b18cc0
feat(stats): enable stats.colors by default when environment supports
## Summary <!-- Describe what this PR does and why. --> Enable `stats.colors` by default when the environment supports color output (TTY, `FORCE_COLOR`, or when `NO_COLOR` is not set), so that both JavaScript API and CLI users get colored stats without explicit config. Implements [issue #9353](https://github.com/...
diff --git a/Cargo.lock b/Cargo.lock index f854b9f1f37e..e39110f5380d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3560,6 +3560,7 @@ dependencies = [ "rspack_tasks", "rustc-hash", "serde_json", + "supports-color 3.0.2", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 1ac82fd488a4..c6636d80b741 100644 -...
5
5
1
[{"id": "G0", "claim": "The snapshot filtering for env-dependent stats.colors should use a single, more general filter (one regex matching the colors: true|false line) instead of two brittle multi-line string matches.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"i...
null
web-infra-dev__rspack__13234
web-infra-dev/rspack
13,234
defect
a7cbf0e8866a6c4dd954ee4ac1a2324deffc7143
8253ac42345841f5fe87b6b28d55c001432ad4ee
refactor!: use `strictThisContextOnImports` to control ns obj as this
## Summary Before `name` in `module.js` won't be tree shaken (whether `strictThisContextOnImports` enabled or not), this PR changes this: - with `strictThisContextOnImports` disabled, `name` will be tree shaken, generate optimized code - with `strictThisContextOnImports` enabled, `name` will not be tree shaken, ...
diff --git a/crates/rspack_core/src/dependency/mod.rs b/crates/rspack_core/src/dependency/mod.rs index 5dc075ef772e..227545902149 100644 --- a/crates/rspack_core/src/dependency/mod.rs +++ b/crates/rspack_core/src/dependency/mod.rs @@ -54,7 +54,7 @@ pub enum ProcessModuleReferencedExports { pub struct ExportSpec { p...
4
4
1
[{"id": "G0", "claim": "The strictThisContextOnImports option should be documented.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "merge_nested_exports taking exports: &Vec<ExportNameOrSpec> triggers Clippy's ptr_arg lint, which CI treats as an ...
null
web-infra-dev__rspack__13317
web-infra-dev/rspack
13,317
defect
3a5fc54ceb2340ead81a64234809098df9c1d4ed
f3bd8b3022b97498f7bb05b5cf80f16493bf32bf
fix!: remove unconsumed useless `optimization.removeAvailableModules` config option
## Summary - Remove `optimization.removeAvailableModules` configuration option which had no actual effect in rspack - Clean up all related code across Rust core, NAPI bindings, JS config, tests, benchmarks, snapshots, and documentation (EN/ZH) ## Test plan - CI should pass with no regressions since this option was not...
diff --git a/crates/node_binding/napi-binding.d.ts b/crates/node_binding/napi-binding.d.ts index 92e9c5d67157..7ea7a13d4fa4 100644 --- a/crates/node_binding/napi-binding.d.ts +++ b/crates/node_binding/napi-binding.d.ts @@ -2670,7 +2670,6 @@ export interface RawOccurrenceChunkIdsPluginOptions { } export interface Ra...
2
1
1
[{"id": "G0", "claim": "The doc examples should set a non-default value (e.g. `remove_empty_chunks(false)` or another option) because setting `remove_empty_chunks(true)`, which is already the default in `OptimizationOptionsBuilder::build`, does not demonstrate a meaningful customization.", "category": "documentation", ...
null
web-infra-dev__rspack__13381
web-infra-dev/rspack
13,381
defect
f38aa285b33533c165214c42e4f5d011f8438b74
8407830de3b415fe863e01ee37d75f48a49157ca
feat: tree shaking for inlined members access dynamic import
## Summary Support tree shaking for: ```js (await import("./m")).a // a is used ``` <!-- Describe what this PR does and why. --> ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [x] Documentatio...
diff --git a/crates/rspack_plugin_javascript/src/parser_plugin/drive.rs b/crates/rspack_plugin_javascript/src/parser_plugin/drive.rs index e5365aa5f730..fd546f3b78fb 100644 --- a/crates/rspack_plugin_javascript/src/parser_plugin/drive.rs +++ b/crates/rspack_plugin_javascript/src/parser_plugin/drive.rs @@ -683,10 +683,1...
1
1
1
[{"id": "G0", "claim": "The early-return paths for `(await import(...)).a.b` and `(await import(...)).a.b()` handle the import and return without walking the underlying AwaitExpr, so the `top_level_await_expr` hook can be skipped for top-level await at module scope; consider explicitly invoking the top-level-await hook...
null
web-infra-dev__rspack__13400
web-infra-dev/rspack
13,400
defect
84288f48aad4c052c5432f7eb4661aeadb1d4ef1
2b14467d09195015b77515e589b1b055c70122e0
chore: using codspeed bench scan dependencies
## Summary <!-- Describe what this PR does and why. --> Add a new CodSpeed benchmark case using build/three.module.js from the three npm package as the benchmark fixture. ## Related links <!-- Related issues or discussions. --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (...
diff --git a/Cargo.lock b/Cargo.lock index 52880a532c64..41d670a25533 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3690,11 +3690,14 @@ dependencies = [ "rspack_error", "rspack_fs", "rspack_hash", + "rspack_javascript_compiler", + "rspack_plugin_javascript", "rspack_plugin_split_chunks", "rspack_regex", "rsp...
6
2
1
[{"id": "G0", "claim": "Merging this pull request will degrade benchmark performance (3 benchmarks regressed, up to 2.79% on create_chunk_ids), and CodSpeed asks to fix the performance issues or acknowledge them.", "category": "performance", "verdict": "uncertain", "priority": "P1", "scope": "unclear"}, {"id": "G1", "c...
null
web-infra-dev__rspack__13412
web-infra-dev/rspack
13,412
defect
776ba7eb20d145636ddaa9cb3fb7142dce552cd4
77fc8b8bb9cb9734b77ed7fb96125f9c7bfb7414
feat(rstest): support unmockRequire methods
## Summary - add `rs.unmockRequire` and `rs.doUnmockRequire` parser support in `rspack_plugin_rstest` - add `rstest/mock` config-case coverage for `unmockRequire` and `doUnmockRequire` - fix rstest hoist asset processing so multiple hoisted operations on the same request preserve source order ## Details This...
diff --git a/crates/rspack_plugin_rstest/src/parser_plugin.rs b/crates/rspack_plugin_rstest/src/parser_plugin.rs index 169a7e9e7a28..4320cafa3964 100644 --- a/crates/rspack_plugin_rstest/src/parser_plugin.rs +++ b/crates/rspack_plugin_rstest/src/parser_plugin.rs @@ -637,6 +637,16 @@ impl RstestParserPlugin { s...
1
1
1
[{"id": "G0", "claim": "Joining all hoisted blocks for the same request into one string at a single placeholder changes source-order semantics whenever a file interleaves mockRequire/unmockRequire for one module with hoisted calls for another: in 'rs.mockRequire(\"./foo\"); rs.mockRequire(\"./bar\"); rs.unmockRequire(\...
null
web-infra-dev__rspack__13439
web-infra-dev/rspack
13,439
defect
fe84534942107d6abd6ab505dc118b8cdeb4734d
4ca43b01c71d2ccee1032e030ecf04cd2ae3d5ee
fix(rstest): resolve manual mock targets with resolver
## Summary resolve manual mock targets with resolver. Fix the case where a mocked relative request resolves through a directory entry file such as `index.js` / `index.ts`. Before this change, `rs.mock("./common")` would resolve the mock target as `./__mocks__/common`, even when `./common` actually resolved to ...
diff --git a/crates/rspack_plugin_rstest/src/parser_plugin.rs b/crates/rspack_plugin_rstest/src/parser_plugin.rs index 4320cafa3964..77519c496bab 100644 --- a/crates/rspack_plugin_rstest/src/parser_plugin.rs +++ b/crates/rspack_plugin_rstest/src/parser_plugin.rs @@ -1,4 +1,4 @@ -use camino::Utf8PathBuf; +use camino::{U...
3
2
2
[{"id": "G0", "claim": "In projects where `./foo` has both a file candidate and a real `foo/` directory, treating any existing sibling directory as resolved changes the mock path even though the module still resolves to the file, so `rs.mock(\"./foo\")` starts pointing at `./foo/__mocks__/index` instead of the previous...
null
web-infra-dev__rspack__13702
web-infra-dev/rspack
13,702
defect
817208df9c310f6345ba6b14e10173768fd94f58
eb0197d1b47b9193dcf3525c729bd0f7ffcc368f
test(benchmark): add compilation stage benchmark cases
## Summary Add stage-isolated Rust CodSpeed benchmark cases in `xtask/benchmark/benches/groups/compilation_stages.rs` for: - `rust@mangle_exports` - `rust@runtime_requirements` - `rust@create_full_hash` - `rust@create_chunk_assets` - `rust@create_module_assets` - `rust@real_content_hash` This also adds the benchmark...
diff --git a/crates/rspack_core/src/cache/mod.rs b/crates/rspack_core/src/cache/mod.rs index 878c24f3db66..4194a39120b1 100644 --- a/crates/rspack_core/src/cache/mod.rs +++ b/crates/rspack_core/src/cache/mod.rs @@ -7,9 +7,8 @@ use std::{fmt::Debug, sync::Arc}; use rspack_fs::{IntermediateFileSystem, ReadableFileSyst...
7
6
0
[{"id": "G0", "claim": "Merging this PR will degrade performance by 1.05% on the bundle@basic-react-development benchmark (343.7 ms to 347.3 ms), with a further 1.02% regression on create_chunk_hashes, and the regressions should be fixed or acknowledged.", "category": "performance", "verdict": "uncertain", "priority": ...
null
web-infra-dev__rspack__13764
web-infra-dev/rspack
13,764
defect
86caffb7e2dfe8a24a8e4ceb9506602ba660d5a2
553ae601900713f0b9b12417ae094566c333d832
fix(rstest): avoid async wrapper for sync mock factories
## Summary This PR stops hoisted `rs.mock(..., () => ({ ... }))` calls from marking rstest entries as async modules, which removed the unnecessary async wrapper from the generated bundle. It also strengthens the rstest mock case to assert the emitted `bundle1.js` is still hoisted correctly and does not contain asyn...
diff --git a/crates/rspack_plugin_rstest/src/parser_plugin.rs b/crates/rspack_plugin_rstest/src/parser_plugin.rs index fd3422e073f6..73d17d731052 100644 --- a/crates/rspack_plugin_rstest/src/parser_plugin.rs +++ b/crates/rspack_plugin_rstest/src/parser_plugin.rs @@ -65,16 +65,6 @@ pub struct RstestParserPlugin { opt...
3
2
0
[{"id": "G0", "claim": "The removal of the top-level-await marking for hoisted mock factories should be conditional: async `rs.mock` factories still need async-module marking, otherwise an async factory may no longer be sequenced correctly with module evaluation.", "category": "correctness", "verdict": "uncertain", "pr...
null
web-infra-dev__rspack__13775
web-infra-dev/rspack
13,775
defect
c0e1eea1143b10fda3cc0916244610f19153a2c8
2413e93aa2993b2b3d1690ecd48e2ce73be18d4f
fix(rstest): preserve mock hoist positions in cache
## Summary This PR fixes a persistent cache regression in `RstestPlugin` where `rs.mock()` hoists could lose their insertion positions after a cache restore. The hoist metadata now uses cacheable `DependencyRange` values instead of skipped `Span` fields, and this PR adds a `cacheCases` regression test covering an exte...
diff --git a/crates/rspack_plugin_rstest/src/mock_method_dependency.rs b/crates/rspack_plugin_rstest/src/mock_method_dependency.rs index 00bc8537bbf1..d851378f08a1 100644 --- a/crates/rspack_plugin_rstest/src/mock_method_dependency.rs +++ b/crates/rspack_plugin_rstest/src/mock_method_dependency.rs @@ -1,22 +1,17 @@ -us...
2
2
0
[{"id": "G0", "claim": "`new_with_statement_span` (and the `*_span` naming) is misleading now that the function accepts `DependencyRange`; rename it to reflect ranges (e.g. `new_with_statement_range`) and update the call sites.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introdu...
null
web-infra-dev__rspack__13849
web-infra-dev/rspack
13,849
defect
120fea54dec501420d599ed1d94d59c2217acb61
3d8c231619bc1546fd9a95fe64f3723f3f490475
feat(rstest): inject source-module origin into dynamic imports
## Summary Add a `RstestPlugin` option `injectDynamicImportOrigin`. When `module.parser.javascript.importDynamic: false`, non-string-evaluatable `import()` calls are rewritten to `<importFunctionName>(specifier, importAttributes, "<originPath>")` so the rstest runtime can resolve relative specifiers against the source...
diff --git a/crates/node_binding/napi-binding.d.ts b/crates/node_binding/napi-binding.d.ts index 0c2bb2d7d5d7..ff3040789f39 100644 --- a/crates/node_binding/napi-binding.d.ts +++ b/crates/node_binding/napi-binding.d.ts @@ -2919,6 +2919,7 @@ export interface RawRstestPluginOptions { manualMockRoot: string preserve...
2
2
1
[{"id": "G0", "claim": "The doc comment says an `undefined` placeholder is emitted when the `import()` call has no import attributes, but the template actually emits `void 0`; update the comment to match the emitted code.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {...
null
web-infra-dev__rspack__13861
web-infra-dev/rspack
13,861
defect
a82c1196eb53c7e5471fe5e2e79a662bf2846843
92f1bcde72a45053130113ebb9d512517d02bd6b
feat(externals): add modern-module externals type
## Summary - Add `externalsType: "modern-module"` and normalize external rendering by dependency syntax. - Keep static ESM externals as module imports, dynamic import externals as `import()`, and require-style externals as CommonJS. - Choose `node-commonjs` versus `commonjs` for require-style externals based on the no...
diff --git a/crates/rspack/src/builder/mod.rs b/crates/rspack/src/builder/mod.rs index f0e84f857e1e..91514810c455 100644 --- a/crates/rspack/src/builder/mod.rs +++ b/crates/rspack/src/builder/mod.rs @@ -1082,10 +1082,11 @@ impl CompilerOptionsBuilder { // apply externals plugin if let Some(externals) = &mut s...
6
4
1
[{"id": "G0", "claim": "When modern-module externals rely on the new default and a module re-exports named bindings from an external, the ESM-library linker branch that only recognizes raw external types starting with \"module\" can be skipped, so modern-module externals can emit references to unimported names.", "cate...
null
web-infra-dev__rspack__13930
web-infra-dev/rspack
13,930
defect
4cddada65344d255ca5e0eecd7ddf7183de18dae
57f1fca0579383faffc5af5eec940a84ba77f5b9
refactor(rstest): expose injectDynamicImportOrigin.functionName and resolve callee once
## Background Follow-up to #13849. rstest's dynamic-import-origin rewrite hard-coupled its rewrite callee to `output.importFunctionName` and gated itself on `module.parser.javascript.importDynamic === false`. ## Why change - `output.importFunctionName` is a generic rspack output knob (chunk loading uses it too). Con...
diff --git a/crates/node_binding/napi-binding.d.ts b/crates/node_binding/napi-binding.d.ts index 6a308ae67536..d577c049a71f 100644 --- a/crates/node_binding/napi-binding.d.ts +++ b/crates/node_binding/napi-binding.d.ts @@ -2914,6 +2914,10 @@ export interface RawRslibPluginOptions { emitDts?: RawSwcEmitDtsOptions } ...
2
2
1
[{"id": "G0", "claim": "The doc comment on RstestDynamicImportOriginDependencyTemplate says holding function_name on the template avoids cloning identical bytes for every import() call site, but render() still does self.function_name.clone() per dependency replacement, so the comment should be reworded to reflect the r...
null
web-infra-dev__rspack__13936
web-infra-dev/rspack
13,936
defect
5a0506f76e43be1e5bcfffcce8f657841ecc2673
82c8f67a10018625f96ced30d4c4a419e8c28777
perf: reduce parser dependency bookkeeping overhead
## Summary - Optimize inner graph dependency finalization by skipping empty work, building deferred pure-check span lookups only when needed, recording dependency indexes for usage operations, and moving matched import specifier data out of the lookup instead of cloning it. - Change parser tag-data lookup to return ty...
diff --git a/crates/rspack_core/src/dependencies_block.rs b/crates/rspack_core/src/dependencies_block.rs index 30ea1f0cecb7..6f12558a5e9f 100644 --- a/crates/rspack_core/src/dependencies_block.rs +++ b/crates/rspack_core/src/dependencies_block.rs @@ -1,5 +1,5 @@ use std::{ - borrow::Cow, + fmt::Write as _, hash::...
1
1
1
[{"id": "G0", "claim": "Building the ESM resource identifier by concatenating |key=value without escaping makes the encoding non-injective, so attribute maps containing | or = in keys/values can collide and cause unrelated imports to share a ResourceIdentifier; it asks for a collision-free encoding while keeping the pe...
null
web-infra-dev__rspack__13953
web-infra-dev/rspack
13,953
defect
3df6bb6652e6fbf8859277820d113ee2098ba1cc
9ff9620ca9cdab5b89a8a2b8763d6cb7c27652cc
perf: reduce binary size by unifying glob implementation with fast-glob
## Summary replace glob in copy plugin with fast-glob ## Related links following https://github.com/web-infra-dev/rspack/pull/13946 ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/Cargo.lock b/Cargo.lock index 2196578ed63f..b911915b42f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3692,7 +3692,6 @@ dependencies = [ "cow-utils", "derive_more", "futures", - "glob", "heck", "napi", "napi-derive", @@ -3913,6 +3912,7 @@ dependencies = [ "derive_more", "dyn-clone", "eith...
3
3
3
[{"id": "G0", "claim": "The explicit-dot guard in pattern_has_explicit_dot_for only accepts a concrete `.<name>` segment, so patterns with wildcard dot segments such as `**/.*` or `**/.*/index.js` are treated as not explicitly referencing dot files, causing dotfiles to be dropped in find_files_by_glob whenever require_...
null
web-infra-dev__rspack__13971
web-infra-dev/rspack
13,971
defect
34c3ecd81f636079048164a0908ffa791d9eff40
f236558b78a7d3ed3b2cb9e6ff115164e68cb94e
test: split benchmark case entrypoints
## Summary - Split non-stage benchmark registration into per-case entrypoint files under `xtask/benchmark/cases`. - Keep benchmark implementations in `xtask/benchmark/benches/groups` while shortening CodSpeed callgrind profile-part paths for KCachegrind readability. - Cover build graph, module graph API, scan dependen...
diff --git a/xtask/benchmark/benches/benches.rs b/xtask/benchmark/benches/benches.rs index 984a45b3121e..d45baffcd658 100644 --- a/xtask/benchmark/benches/benches.rs +++ b/xtask/benchmark/benches/benches.rs @@ -1,13 +1,13 @@ #![allow(clippy::unwrap_used)] use criterion::{Criterion, criterion_group, criterion_main};...
3
3
1
[{"id": "G0", "claim": "The `benchmark_id` parameter is constrained to `&'static str`, more restrictive than needed for an internal helper; consider loosening it to `&str` or `impl AsRef<str>`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If `prepare_r...
null
web-infra-dev__rspack__13977
web-infra-dev/rspack
13,977
defect
81aa0bb4b01c361fad200da0797e6c9aeb481729
c17954e558f9e9f03457012e25b7a01c85132736
fix(hash): fix base64 digest and hash salt
## Summary - use the `base64` crate for standard base64 and unpadded base64url hash digests, replace non-standard implementation - write hash salt bytes directly when initializing salted hashes - add unit coverage for base64/base64url output and raw-byte salt handling ## Validation - `cargo fmt --package rsp...
diff --git a/Cargo.lock b/Cargo.lock index 1919ad93c988..d3897f2dc7f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4014,6 +4014,7 @@ dependencies = [ name = "rspack_hash" version = "0.100.2" dependencies = [ + "base64-simd 0.8.0", "md4", "rspack_cacheable", "sha2", diff --git a/crates/rspack_hash/Cargo.toml b/...
1
1
1
[{"id": "G0", "claim": "The new #[cfg(test)] unit tests were added to the library target while crates/rspack_hash/Cargo.toml sets [lib] test = false, so cargo test -p rspack_hash neither builds nor runs them and the base64/base64url and raw-salt changes go without the intended regression coverage; enable the lib test h...
null
web-infra-dev__rstest__1041
web-infra-dev/rstest
1,041
defect
a30e8dc6db09a4a8cddf6f1ca645abab81f3dbb1
dc4e2edb158041c499d5258a8327dd33da60fc9c
feat(browser): add providerOptions for browser mode config
## Summary - Add an opaque `browser.providerOptions` field (`Record<string, unknown>`) to browser mode config, allowing users to forward provider-specific options through rstest without the framework interpreting them - Playwright provider reads `providerOptions.launch` (spread into `browserType.launch()`) and `provid...
diff --git a/AGENTS.md b/AGENTS.md index aa5d867e3..4dd7b5ed3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -93,6 +93,7 @@ When validating changes through `examples/` or `e2e/`, remember that package sou - Don't mix CommonJS and ESM in the same module - Don't add heavy dependencies without discussion +- Don't use names...
1
1
1
[{"id": "G0", "claim": "providerOptions.launch is spread before the hard-coded args are set, so user-provided launch.args get overwritten (Chromium gets the hard-coded args array; Firefox/WebKit end up with args: undefined); it asks to merge internal Chromium args with user args and not set args at all for non-Chromium...
null
web-infra-dev__rstest__1060
web-infra-dev/rstest
1,060
defect
a15beab1f8a435f57eddf7f6fda4dc4bbf5d6598
302a86b8fbc4f1b52f0569a991fcb7c6192523b0
feat(core): support composing multiple extends configs
## Summary ### Background `extends` only accepted a single config source, which made it awkward to compose shared presets and adapter output in one Rstest config. ### Implementation - allow `extends` to accept `ExtendConfig`, `ExtendConfigFn`, or an array of mixed entries - resolve array entries independently again...
diff --git a/packages/core/src/cli/init.ts b/packages/core/src/cli/init.ts index 9b30b579d..956bea58b 100644 --- a/packages/core/src/cli/init.ts +++ b/packages/core/src/cli/init.ts @@ -2,7 +2,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs'; import type { LoadConfigOptions } from '@rsbuild/core'; imp...
3
1
1
[{"id": "G0", "claim": "resolveExtendEntry deletes `projects` from the resolved extends config in place, mutating user-provided preset objects (e.g. imported shared configs) and potentially throwing in strict mode when the object is frozen or has a non-configurable `projects` property; it should omit `projects` without...
null
web-infra-dev__rstest__1119
web-infra-dev/rstest
1,119
defect
d59999ae72a542c97e04b1713bbe8e0ef3729e16
998af1d6414aafed8ff38e510b4329e7c8efc8ae
feat(core): add json reporter
## Summary ### Background Rstest had human-readable `md` output and internal `blob` output, but it did not provide a stable machine-facing JSON report for CI tooling or post-processing scripts. ### Implementation - Added a built-in `json` reporter in `@rstest/core` with stable summary, file, test, console log, ...
diff --git a/e2e/reporter/json.test.ts b/e2e/reporter/json.test.ts new file mode 100644 index 000000000..bc7b2472e --- /dev/null +++ b/e2e/reporter/json.test.ts @@ -0,0 +1,88 @@ +import fs from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { describe, expect, ...
1
1
1
[{"id": "G0", "claim": "When no tests are discovered, the JSON reporter still emits \"status\": \"pass\"; it should fail the run in that case, and per fi3ework should respect the `passWithNoTests` config when deciding.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
web-infra-dev__rstest__1139
web-infra-dev/rstest
1,139
defect
8b5af06737f39e1b0f97d35932160880f0251984
89cb11f57505ac34fd89521da25aa4eb76c826e9
feat(core): support summary output in rstest list
## Summary ### Background `rstest list` could not emit summary counts in text mode, and JSON mode had no structured way to include summary metadata. ### Implementation ```bash $ npx rstest list --summary test/index.test.ts > Index > should add two numbers correctly test/index.test.ts > Index > should t...
diff --git a/e2e/list/index.test.ts b/e2e/list/index.test.ts index 2f9c6e0a2..f8b5da3dc 100644 --- a/e2e/list/index.test.ts +++ b/e2e/list/index.test.ts @@ -135,6 +135,63 @@ describe('test list command', () => { `); }); + it('should print summary correctly', async () => { + const { cli, expectExecSuccess ...
1
1
1
[{"id": "G0", "claim": "Add e2e assertions for `rstest list --includeSuites --summary` (text and `--json`) verifying the `Suites` line / `summary.suites`, and, if feasible, a multi-project fixture verifying the `Projects` line / `summary.projects`, since the conditional `projects`/`suites` summary fields were only asse...
null
web-infra-dev__rstest__1145
web-infra-dev/rstest
1,145
defect
885c000aa3909a22a2e078effd7f241985fe57cc
edc19ee485ffd4dd76103f96435aafd10990fa38
feat(core): add dot reporter
## Summary ### Background Rstest shipped several built-in reporters, but it did not provide a compact dot-style terminal reporter for fast local feedback. ### Implementation - Added a built-in `dot` reporter that prints one marker per test case and reuses the existing failing-test summary/footer. - Registered `dot` i...
diff --git a/e2e/reporter/index.test.ts b/e2e/reporter/index.test.ts index 7851bde42..986b03da6 100644 --- a/e2e/reporter/index.test.ts +++ b/e2e/reporter/index.test.ts @@ -59,6 +59,25 @@ describe.concurrent('reporters', () => { expect(cli.stdout).toContain('- basic > c'); }); + it('dot', async ({ onTestFini...
1
1
0
[{"id": "G0", "claim": "The dot reporter's status markers mix letters (F, S, T) with dots (.), which looks inconsistent in height and style; use one character family for all statuses, with the pass marker the vertically centered `·`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
web-infra-dev__rstest__1152
web-infra-dev/rstest
1,152
defect
f5175cce50793801235f4ff54a866b2de524ee40
07d1cbd7bdac32ddf4ac9ddb828cd7617b1b29d4
fix: use web condition names by default in browser-like test environment
## Summary ### Background browser-like test environments were still resolving with node-oriented defaults, which makes browser-field reproduction harder and left this regression without a framework example outside the existing React and Vue samples. ### Implementation - Update the core Rsbuild plugin to default...
diff --git a/examples/svelte-rsbuild/package.json b/examples/svelte-rsbuild/package.json new file mode 100644 index 000000000..ddae8950d --- /dev/null +++ b/examples/svelte-rsbuild/package.json @@ -0,0 +1,21 @@ +{ + "name": "@examples/svelte-rsbuild", + "private": true, + "type": "module", + "scripts": { + "buil...
1
1
0
[{"id": "G0", "claim": "The `development` entry in conditionNames is unnecessary and should be dropped, since we are already in development mode and it will be inherited from `...`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__292
web-infra-dev/rstest
292
defect
9a0125cb5917c108e548c2253466dea4612f8286
3e8a10c9b879c19632acc91de96a1f487998d72f
fix: `Unexpected token 'export'` error in Node.js 18.
## Summary - Skip `module` field in Node.js 18 and below, fix `Unexpected token 'export'` error in Node.js 18. - not external `node_modules/` by default in jsdom(web) test environment. When `import foo from 'foo'`, Rspack resolves to the module in the `module` field, because the `module` field has the highest p...
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cf899b82..ae8de13eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: if: steps.changes.outputs.changed == 'true' uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020...
2
1
1
[{"id": "G0", "claim": "Questions whether supporting Node.js v18 is necessary at all, since it is EOL now.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Unconditionally skipping the `module` field could break packages that legitimately rely on it — e.g....
null
web-infra-dev__rstest__389
web-infra-dev/rstest
389
defect
1334857530f30f35b747c9be821dacaad72abcaf
a023b56d15b9ca31709e4fcdbf5b554012bec1b5
fix: make mock works with async mock factory
## Summary Adaption on runtime code and works with https://github.com/web-infra-dev/rspack/pull/11050. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not requi...
diff --git a/examples/react/package.json b/examples/react/package.json index 445b19270b..c9e8be9533 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -13,7 +13,7 @@ "react-dom": "^19.1.0" }, "devDependencies": { - "@rsbuild/core": "1.4.8", + "@rsbuild/core": "1.4.9", "@...
5
1
0
[{"id": "G0", "claim": "The line assigning the async wrapper is indented inconsistently with the surrounding code block.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The closing brace of the async mock assignment is missing a semicolon, unlike...
null
web-infra-dev__rstest__414
web-infra-dev/rstest
414
defect
1334857530f30f35b747c9be821dacaad72abcaf
7cc2395ee0670695487bdb4004648aa44f77f285
chore: extract rsbuild / rspack config modify into rsbuild plugin
## Summary chore: extract rsbuild / rspack config modify into rsbuild plugin: - `pluginBasic` Plugin: handle core `rsbuild` configurations, including environment setup, output configuration, and optimization settings. This modularizes previously inline configurations. - `pluginExternal` Plugin: manage external dep...
diff --git a/packages/core/src/core/plugins/basic.ts b/packages/core/src/core/plugins/basic.ts new file mode 100644 index 000000000..a069c5d86 --- /dev/null +++ b/packages/core/src/core/plugins/basic.ts @@ -0,0 +1,100 @@ +import type { RsbuildPlugin } from '@rsbuild/core'; +import path from 'pathe'; +import type { Rste...
3
3
0
[{"id": "G0", "claim": "The import path '../..//types' in packages/core/src/core/plugins/external.ts contains a double slash and should be '../../types'.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The import path '../..//types' in packages/core/...
null
web-infra-dev__rstest__494
web-infra-dev/rstest
494
defect
f21ce8172fc31bc791dc70636ca80f9ec78afcac
736c3c239204e44e42e61633033c3f173f8256d4
fix: add `onTestFinished` to testContext
## Summary - fix: add `onTestFinished` to testContext. should use `onTestFinished` hook from the test context when you are running tests concurrently. ```ts describe.concurrent('concurrent suite', () => { test('test 1', async ({ onTestFinished }) => { /* ... */ }); test('test 2', async ({ onTestFinis...
diff --git a/e2e/scripts/index.ts b/e2e/scripts/index.ts index a7b1cb48f..c4486c515 100644 --- a/e2e/scripts/index.ts +++ b/e2e/scripts/index.ts @@ -1,5 +1,6 @@ import fs from 'node:fs'; import path from 'node:path'; +import { onTestFinished } from '@rstest/core'; import stripAnsi from 'strip-ansi'; import type { O...
2
1
1
[{"id": "G0", "claim": "The cleanup callback assumes cli.exec exists and has a kill() method without a null check, which could throw a runtime error; add a check like cli.exec?.kill().", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The onTestFinishe...
null
web-infra-dev__rstest__521
web-infra-dev/rstest
521
defect
6ca6025dbd74ea10e0ab8a8364bf2ecc44a017be
7c249a246123ea39b4864e08d7d2e23c0b946ecd
feat: filter file based on workspace's root
## Summary Filter file based on workspace's root. Previously, when rstest matched test files in projects, it converted the test file to a relative path based on project's root. Therefore, if the project root was `project/core`, `npx rstest core` would not match all test files under `project/core`. This now use...
diff --git a/e2e/projects/filter.test.ts b/e2e/projects/filter.test.ts new file mode 100644 index 000000000..767bf8db2 --- /dev/null +++ b/e2e/projects/filter.test.ts @@ -0,0 +1,28 @@ +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { describe, expect, it } from '@rstest/co...
1
1
0
[{"id": "G0", "claim": "The documentation should be updated to describe the match rule alongside the code change.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
web-infra-dev__rstest__556
web-infra-dev/rstest
556
defect
9b0bb2e48813cef396a6b951658829922d0064e1
30e67a44685cf2bf638d5de26ace6a5e8bf1ae5d
feat: support `coverage.reporters` option
## Summary support `coverage.reporters` option & update default value to `['text', 'html', 'clover', 'json']` <img width="880" height="473" alt="image" src="https://github.com/user-attachments/assets/3c8ebae1-9875-4661-a538-c50d99c25e4b" /> ```ts import { defineConfig } from '@rstest/core'; export default...
diff --git a/e2e/test-coverage/fixtures/rstest.skipFull.config.ts b/e2e/test-coverage/fixtures/rstest.skipFull.config.ts new file mode 100644 index 000000000..cc27e235f --- /dev/null +++ b/e2e/test-coverage/fixtures/rstest.skipFull.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from '@rstest/core'; + +export defaul...
2
1
0
[{"id": "G0", "claim": "The constructor's explicit `this.options = options` assignment is redundant because the parameter is already declared as a private field; remove it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The CoverageProvider type...
null
web-infra-dev__rstest__557
web-infra-dev/rstest
557
defect
56e9bdedff87599517213e748af16a84d7fc84f2
eae349d8fb417e00ddda73276632213996c6904f
feat: support `coverage.reportsDirectory` option
## Summary support `coverage.reportsDirectory` option. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/e2e/projects/coverage.test.ts b/e2e/projects/coverage.test.ts new file mode 100644 index 000000000..928a92369 --- /dev/null +++ b/e2e/projects/coverage.test.ts @@ -0,0 +1,53 @@ +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { describe, expect, it } from '@rst...
1
1
0
[{"id": "G0", "claim": "The repeated non-null assertions on `merged.coverage.reportsDirectory!` hurt readability; store the value in a local variable instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__558
web-infra-dev/rstest
558
defect
d7a086aca43a064887227ada4b8a544af428ce59
0ebd61f3c7bd0484588a97979bbf9f13ba179432
feat: support clean coverage directory before running tests
## Summary support clean coverage directory before running tests. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/e2e/test-coverage/index.test.ts b/e2e/test-coverage/index.test.ts index cbdefa514..22d67f84f 100644 --- a/e2e/test-coverage/index.test.ts +++ b/e2e/test-coverage/index.test.ts @@ -99,10 +99,9 @@ it('coverage-istanbul with custom options', async () => { // text reporter expectLog('% Stmts', logs); -...
1
1
0
[{"id": "G0", "claim": "The type definition references `NormalizedConfig` before it is defined, which the reviewer says creates a circular reference since `NormalizedProjectConfig` uses `NormalizedConfig` but `NormalizedConfig` is defined later in the file.", "category": "correctness", "verdict": "supported", "priority...
null
web-infra-dev__rstest__593
web-infra-dev/rstest
593
defect
1a2eacb8ae1934366eeddad05822c9ddfb68bdf8
4e86e26e977e4265c1efbcde376248ff53d21ec2
feat: `coverage.includes` works in projects
## Summary Scans the included files based on each project's root directory, so the pattern `'/src/**/*.{js,jsx,ts,tsx}'` can match: - `/root/project1/src/index.ts` - `/root/project2/src/index.ts` ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with ...
diff --git a/e2e/projects/coverage.test.ts b/e2e/projects/coverage.test.ts index 9e49c21d4..92078c867 100644 --- a/e2e/projects/coverage.test.ts +++ b/e2e/projects/coverage.test.ts @@ -38,8 +38,31 @@ describe('test projects coverage', () => { ), ).toBeTruthy(); + expect( + logs.find((log) => log.i...
1
1
0
[{"id": "G0", "claim": "The onExit cleanup can be simplified by replacing the per-key delete loop over transformCoverageFns with `Object.assign(transformCoverageFns, {})`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__604
web-infra-dev/rstest
604
defect
9cd14567f45491f8b6080d990562d2bb2d6ecd06
de03f533128e54031f94c37ac179f08f9ba14c3c
fix: update node builtin modules
## Summary Update node builtin modules, missing `_http_common`,`_http_agent`, `_http_client`, etc. https://neos21.github.io/frontend-sandboxes/node-js-builtin-modules/index.html ## Related Links https://github.com/web-infra-dev/rstest/issues/602 <!--- Provide links of related issues or pages --> ## Ch...
diff --git a/e2e/dom/fixtures/test/node.test.ts b/e2e/dom/fixtures/test/node.test.ts new file mode 100644 index 000000000..b5a66c9ba --- /dev/null +++ b/e2e/dom/fixtures/test/node.test.ts @@ -0,0 +1,9 @@ +// @ts-expect-error +import _http_common from 'node:_http_common'; +import { describe, expect, it } from '@rstest/c...
1
1
0
[{"id": "G0", "claim": "The bare `@ts-expect-error` comment in e2e/dom/fixtures/test/node.test.ts should be given a brief explanation of why TypeScript types are unavailable for the private Node module.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__62
web-infra-dev/rstest
62
defect
525a1e1d25f9bad1ba4ffc1c19b8e5b8879c64db
28e5230ad42b48d1b1ac19c387f4ede24c4ec1d7
fix(reporter): print posix file path
## Summary should print posix file path in windows. before: <img width="768" alt="image" src="https://github.com/user-attachments/assets/07ba40a7-30ec-4f52-8ee6-e7750f39ae57" /> after: <img width="715" alt="image" src="https://github.com/user-attachments/assets/2c1d1710-ef9c-4a7e-90e0-4eb8c1292ab5" /> ## ...
diff --git a/packages/core/src/reporter/index.ts b/packages/core/src/reporter/index.ts index b2a4a29d0..bf26e2eb4 100644 --- a/packages/core/src/reporter/index.ts +++ b/packages/core/src/reporter/index.ts @@ -1,4 +1,4 @@ -import { parse, relative } from 'node:path'; +import { parse, relative, sep } from 'node:path'; i...
1
1
0
[{"id": "G0", "claim": "The posix-path splitting logic (dir.split(sep).join('/')) will be used often, so it should be extracted into a util function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__628
web-infra-dev/rstest
628
defect
cff763d0e4a5ff9e0b7296a4187b723cc05bc917
07f84094dd9eb385f6ab25d31879022350197ff3
chore: add hint message for react not defined error
## Summary add hint message for 'React is not defined' error before: <img width="757" height="261" alt="image" src="https://github.com/user-attachments/assets/70c9b35b-51ad-46ed-8a1e-e9c0e37b3e5d" /> after: <img width="994" height="256" alt="image" src="https://github.com/user-attachments/assets/b4d2d7de-96f...
diff --git a/packages/core/src/utils/error.ts b/packages/core/src/utils/error.ts index a1094e6f4..f12806dcf 100644 --- a/packages/core/src/utils/error.ts +++ b/packages/core/src/utils/error.ts @@ -4,6 +4,31 @@ import { type StackFrame, parse as stackTraceParse } from 'stacktrace-parser'; import type { FormattedError, ...
1
1
0
[{"id": "G0", "claim": "The regex pattern `/(.*) is not defined/` is overly greedy and could match unwanted text; use a more specific pattern like `/(\\w+) is not defined/` to match only word characters for variable names.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__63
web-infra-dev/rstest
63
defect
8038a940cbd4cde0b92760e353264700d1b35ca1
d32750081cb8865ccee11bc2927ff6cff2de162a
feat: support basic watch mode
## Summary Support basic watch mode, implement with context dependency. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [x] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/.gitignore b/.gitignore index 8b26ccd789..97f3de4fb6 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ test-temp-* # ignore directory for artifacts produced by tests test-results/ +fixtures-test/ diff --git a/examples/node/package.json b/examples/node/package.json index f45611e6f3..4286643e37 ...
3
3
2
[{"id": "G0", "claim": "The default command should not enter watch mode in CI: watch mode should be turned off automatically in CI, with an escape hatch that still allows watch when testing rstest in its own CI.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ...
null
web-infra-dev__rstest__632
web-infra-dev/rstest
632
defect
68dae3c1355590bea8d59cb5f810523be91b9445
6012fe487ff6ffba0ffcf913dbb02ff9f0dab1dc
feat: support `resolveSnapshotPath` option
## Summary By default, Rstest saves snapshot files in the same directory as the test files, under a `__snapshots__` folder. You can use `resolveSnapshotPath` to customize this behavior and specify a different location for your snapshot files. For example, store snapshots next to test files: ```ts title="rst...
diff --git a/e2e/snapshot/file.test.ts b/e2e/snapshot/file.test.ts index 4349b5700..5a287101a 100644 --- a/e2e/snapshot/file.test.ts +++ b/e2e/snapshot/file.test.ts @@ -29,7 +29,6 @@ describe('test snapshot', () => { }); await expectFile(snapshotFilePath, 3000); - expect(fs.existsSync(snapshotFilePath))....
2
1
0
[{"id": "G0", "claim": "The nested `join` call in the default `resolveSnapshotPath` resolver is unnecessary; the inner `join(dirname(testPath), '__snapshots__')` can be flattened into arguments of the outer `join`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id":...
null
web-infra-dev__rstest__660
web-infra-dev/rstest
660
defect
f83c7efd1cb201cb92c564d4dbd7311cf50e2641
2097ea7e3cf7716b91787d2e416a0cf66f511cf6
fix: should catch `process.kill` error correctly
## Summary should catch `process.kill` error correctly. before: ![img_v3_02ri_0848c59e-11eb-462c-be3d-4f67cbc17b6g](https://github.com/user-attachments/assets/d6158617-e594-4495-b98b-a1c72329dc41) after: ![img_v3_02ri_2a69c1ec-1060-47e8-bd78-8bb22376a81g](https://github.com/user-attachments/assets/2331638a-f...
diff --git a/e2e/runner/test/processKill.test.ts b/e2e/runner/test/processKill.test.ts index b55ae09aa..ed6cb05d6 100644 --- a/e2e/runner/test/processKill.test.ts +++ b/e2e/runner/test/processKill.test.ts @@ -1,13 +1,13 @@ import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { ...
2
2
1
[{"id": "G0", "claim": "The `process.kill` override is missing proper type annotations: `signal` should be typed as `string | number | undefined` and the return type should be `boolean`, to match Node.js's `process.kill` signature.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "int...
null
web-infra-dev__rstest__694
web-infra-dev/rstest
694
defect
5ab28b785abaeede4a8b1d1efb2e039e2274c7b6
425052664c66f02791f2e44d2b28a55da5fc24ec
chore(vscode-extension): update default test file glob pattern
## Summary update default test file glob pattern, only match javascript / typescript test files. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not require...
diff --git a/packages/vscode/package.json b/packages/vscode/package.json index e1db7438a..40266de4a 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -35,8 +35,10 @@ "type": "string" }, "default": [ - "**/*.test.*", - "**/*.spec.*" +...
3
3
2
[{"id": "G0", "claim": "The glob pattern syntax `[c|m]` is incorrect because square brackets treat the pipe as a literal character, so the new default test-file globs match an unintended `|` character and should use brace expansion `{c,m}` instead.", "category": "correctness", "verdict": "supported", "priority": "P1", ...
null
web-infra-dev__rstest__716
web-infra-dev/rstest
716
defect
77f49150e4a5b36c532ff6f40195275a938d57cc
d4ee2890d7bc0befab7e8d8673c507bd1c1db333
chore: support `--bail` without value
## Summary - support `--bail` without value (default `1`) - add test bail tip. <img width="659" height="114" alt="image" src="https://github.com/user-attachments/assets/f8dfd9fc-8c02-40a2-a5f2-d87aa038250c" /> ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Chec...
diff --git a/e2e/bail/index.test.ts b/e2e/bail/index.test.ts index 01e7f4a9c..4fab8ec62 100644 --- a/e2e/bail/index.test.ts +++ b/e2e/bail/index.test.ts @@ -7,7 +7,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); describe('test bail option', () => { - it('should not ru...
2
1
0
[{"id": "G0", "claim": "Converting the boolean with Number(options.bail) is implicit; consider mapping booleans explicitly (true -> 1, false -> 0) and keeping numeric values as-is so the behavior is more explicit and predictable.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "intro...
null
web-infra-dev__rstest__740
web-infra-dev/rstest
740
defect
87cc4f327820fbb68a47a6f94dd34f9b5ae8e40b
fd017dc7b2587f350a229772016c6b3b99afcbb3
fix: should not throw error when undefined module is mocked
## Summary should not throw error when undefined module is mocked. Ignored and treated it as an external CommonJS module. However, if the module is really not found, we will lose code frame information. The below code should be worked: ```ts import { expect, it, rs } from '@rstest/core'; // @ts-expect-error ...
diff --git a/e2e/externals/mocked.test.ts b/e2e/externals/mocked.test.ts new file mode 100644 index 000000000..fee0360b4 --- /dev/null +++ b/e2e/externals/mocked.test.ts @@ -0,0 +1,11 @@ +import { expect, it, rs } from '@rstest/core'; +// @ts-expect-error +import v from 'virtual-module'; + +rs.mock('virtual-module', ()...
1
1
0
[{"id": "G0", "claim": "The comment line uses a Chinese full-width parenthesis \"(\" instead of the standard ASCII \"(\" and should be changed for consistency with the rest of the codebase.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
web-infra-dev__rstest__754
web-infra-dev/rstest
754
defect
c22437240a06fc9d03566e2a1e6703ecbbab25dc
7f5108cda70737fd30080dcb6450b2498b59a96e
feat(vscode): support collect tests from runtime
## Summary depends on #738, #739 1. Added a new configration to control how to collect test cases, ast or runtime 2. Test cases will always be updated from runtime when running test file All test cases in this repo can run in vsocde extension now. <img width="2980" height="2042" alt="image" src="https://gi...
diff --git a/packages/vscode/README.md b/packages/vscode/README.md index dc49bffd1..a456903ce 100644 --- a/packages/vscode/README.md +++ b/packages/vscode/README.md @@ -15,10 +15,11 @@ The extension activates automatically when your workspace contains Rstest config ## Configuration -| Setting ...
8
4
2
[{"id": "G0", "claim": "The new updateFromList method does not set this.didResolve = true, unlike updateFromContents, so the test file may be treated as unresolved, which could lead to inconsistent behavior or redundant parsing.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced...
null
web-infra-dev__rstest__779
web-infra-dev/rstest
779
defect
cae9e6c2ecf0588803ab42c673e1cfb9f970e455
a8dcb3b68d7de55c83cc4f17519a22a3ca262ba9
fix: should rerun all tests when setup file changes
## Summary should rerun all tests when setup file changes. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/packages/core/src/core/listTests.ts b/packages/core/src/core/listTests.ts index 4f05aed20..99d91d30a 100644 --- a/packages/core/src/core/listTests.ts +++ b/packages/core/src/core/listTests.ts @@ -62,6 +62,7 @@ const collectTests = async ({ const { getRsbuildStats, closeServer } = await createRsbuildServ...
2
1
1
[{"id": "G0", "claim": "The new setup file change detection logic in calcEntriesToRerun lacks test coverage; add tests verifying that setup file changes trigger all tests to rerun, that setup file deletions trigger all tests to rerun, that regular test file changes do not trigger setup-related reruns, and that the hash...
null
web-infra-dev__rstest__800
web-infra-dev/rstest
800
defect
4d8e20033fb033b539019f0c347987b7be0c3486
5c2ee5b5d795f949be906da9822bd956f5b05d72
fix: cannot debug or profile child processes
## Summary Some environment variables are required to debug or profile child processes, such as `NODE_OPTIONS` and `DYLD_INSERT_LIBRARIES`. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ...
diff --git a/packages/core/src/pool/index.ts b/packages/core/src/pool/index.ts index b0f0bb037..7db27d26e 100644 --- a/packages/core/src/pool/index.ts +++ b/packages/core/src/pool/index.ts @@ -208,6 +208,7 @@ export const createPool = async ({ NODE_ENV: 'test', // enable diff color by default FORCE...
1
1
1
[{"id": "G0", "claim": "The `...process.env` spread should come before the explicit `NODE_ENV` and `FORCE_COLOR` assignments so that ambient environment values cannot override them.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
web-infra-dev__rstest__816
web-infra-dev/rstest
816
defect
24e90a33a615265f5173645c60753e8ae9f85324
1f2447ec83ee25539055303235b6b88d1cc62f5c
feat: support testEnvironment.options
## Summary Support pass options to the test environment via `testEnvironment.options` configuration. This is useful for configuring `jsdom` or `happy-dom`. For example, you can set the `url` for `jsdom`: ```ts title="rstest.config.ts" import { defineConfig } from '@rstest/core'; export default defineConfig(...
diff --git a/e2e/dom/fixtures/rstest.envOptions.config.ts b/e2e/dom/fixtures/rstest.envOptions.config.ts new file mode 100644 index 000000000..02e4132e8 --- /dev/null +++ b/e2e/dom/fixtures/rstest.envOptions.config.ts @@ -0,0 +1,13 @@ +import { defineConfig, type RstestConfig } from '@rstest/core'; +import rsbuildConfi...
4
3
0
[{"id": "G0", "claim": "The happy-dom documentation URL in the English docs has a typo, starting with 'hhttps' instead of 'https'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The happy-dom call site should use the same `testEnvironment.options ...
null
web-infra-dev__rstest__82
web-infra-dev/rstest
82
defect
62cb7617a549803925f09da6fa0bf0c83a7b50be
47dcbee3c8b478bd4a543031055e80c45b8b65e8
feat: support register async suite
## Summary Support register **async** suite. BTW, If you have some preparations that need to be executed before testing, it is recommended to use `beforeEach` / `beforeAll`. ```ts describe('Test Async Suite', async () => { // do something async... await new Promise<void>((resolve) => { setTime...
diff --git a/packages/core/src/runner/index.ts b/packages/core/src/runner/index.ts index 62bb2ef4a..61cdd668a 100644 --- a/packages/core/src/runner/index.ts +++ b/packages/core/src/runner/index.ts @@ -36,12 +36,8 @@ export function createRunner({ workerState }: { workerState: WorkerState }): { }, runner: { ...
1
1
0
[{"id": "G0", "claim": "The inline sleep logic (await new Promise with setTimeout) could be moved to a shared util, since there are already 4 similar occurrences across the tests.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__830
web-infra-dev/rstest
830
defect
eef54085b7729f677169a1ffb9fa7aef55f56af7
47faca2c7d07ca143655abb649ed59297954d9e5
feat: add new adapter for Rsbuild
## Summary Support extend Rstest configuration from Rsbuild config file via `@rstest/adapter-rsbuild`. ```ts import { defineConfig } from '@rstest/core'; import { withRsbuildConfig } from '@rstest/adapter-rsbuild`'; export default defineConfig({ // Automatically read rsbuild.config.ts and convert to Rstes...
diff --git a/examples/react/package.json b/examples/react/package.json index 418f0aff4..e077a4761 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -15,12 +15,13 @@ "devDependencies": { "@rsbuild/core": "1.7.1", "@rsbuild/plugin-react": "^1.4.2", + "@rstest/adapter-rsbuild": ...
5
4
0
[{"id": "G0", "claim": "The function returned by withRsbuildConfig accepts a userConfig parameter (per ExtendConfigFn) but does not use it; consider implementing decorator version detection like adapter-rslib or renaming the parameter to _userConfig to mark it intentionally unused.", "category": "maintainability", "ver...
null
web-infra-dev__rstest__849
web-infra-dev/rstest
849
defect
31aa530e90022c172ef9e9dd976a7cb04ddaf8d1
6f7e4c4e513b67b5c05bb5fc13f814de146223fd
fix(e2e): stabilize no-isolate runs and harden stack parsing
This PR stabilizes CI e2e runs without changing normal (isolated) behavior. Changes - Avoid crashing while printing stack traces when sourcemap sources are not valid URLs. - Reduce flakiness in ISOLATE=false runs by capping worker concurrency. Files - packages/core/src/utils/error.ts - e2e/rstest.config.ts
diff --git a/scripts/rstest.setup.ts b/scripts/rstest.setup.ts index fbbd58bb5..813a9e40f 100644 --- a/scripts/rstest.setup.ts +++ b/scripts/rstest.setup.ts @@ -2,12 +2,45 @@ import path from 'node:path'; import { expect } from '@rstest/core'; import { createSnapshotSerializer } from 'path-serializer'; -expect.addS...
1
1
0
[{"id": "G0", "claim": "Some Rstest test cases appear unstable on Windows with Node.js 20.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}]
null
web-infra-dev__rstest__859
web-infra-dev/rstest
859
defect
b5b4420d93deeb1bd1d375da724fbbcf4b389d7d
843b6a74894e94bd3515d8b0b5d6d83a7f573a83
fix: running Happy DOM in the global scope
## Summary running Happy DOM in the global scope. ```ts test('should work', () => { expect([1]).toEqual([1]); expect(new TextEncoder().encode('a')).toEqual(new TextEncoder().encode('a')); expect(Uint8Array.from([97])).toEqual(new TextEncoder().encode('a')); }); ``` ## Related Links <!--- Provide l...
diff --git a/e2e/dom/fixtures/test/textEncoder.test.tsx b/e2e/dom/fixtures/test/textEncoder.test.tsx new file mode 100644 index 000000000..c18847535 --- /dev/null +++ b/e2e/dom/fixtures/test/textEncoder.test.tsx @@ -0,0 +1,8 @@ +import { expect, test } from '@rstest/core'; + +// https://github.com/capricorn86/happy-dom...
2
2
0
[{"id": "G0", "claim": "The comment \"running Happy DOM in the global scope\" should be expanded to explain why GlobalWindow is preferred over Window and what problem it solves, mentioning TextEncoder/Uint8Array and the fallback for older happy-dom versions.", "category": "documentation", "verdict": "supported", "prior...
null
web-infra-dev__rstest__861
web-infra-dev/rstest
861
defect
37006c169adbdb82823efa7261c3dd9f59bb78eb
28e91a596e16df418d49e10cb29ba30c83fe1c81
test: use tree-kill to kill e2e child process
## Summary use tree-kill to kill e2e child process. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/e2e/scripts/index.ts b/e2e/scripts/index.ts index 656d13c72..48fc12609 100644 --- a/e2e/scripts/index.ts +++ b/e2e/scripts/index.ts @@ -7,6 +7,7 @@ import type { import stripAnsi from 'strip-ansi'; import type { Options, Result } from 'tinyexec'; import { x } from 'tinyexec'; +import treeKill from 'tree...
1
1
1
[{"id": "G0", "claim": "The overridden kill method always returns true and ignores the return value of execKill() in the fallback branch, so it does not report whether the kill succeeded; Copilot asked to return execKill()'s result (per the suggestion) or otherwise handle treeKill's asynchronous nature to give accurate...
null
web-infra-dev__rstest__878
web-infra-dev/rstest
878
defect
1d5c8b7a8b958837d685724054abc8b9c78dd792
10ca8bd41b3319cc4cb08f08e2cf1bf5934eebe3
docs: add Commonjs interop tips
## Summary Currently, Rstest does not support interoping CommonJS module default exports as named exports. If you encounter issues during usage, you can specify the external type of a dependency as CommonJS through [specifying external type](#specify-external-type). ```ts title="rstest.config.ts" import { def...
diff --git a/e2e/externals/fixtures/interopDefault.test.ts b/e2e/externals/fixtures/interopDefault.test.ts index 13acd9ccb..6fde7728b 100644 --- a/e2e/externals/fixtures/interopDefault.test.ts +++ b/e2e/externals/fixtures/interopDefault.test.ts @@ -1,6 +1,7 @@ import { expect, it } from '@rstest/core'; -import { test ...
1
1
0
[{"id": "G0", "claim": "The example import statement in the docs contains a typo: \"imoprt\" should be \"import\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__886
web-infra-dev/rstest
886
defect
b88d347d0adc386a9c2989f8bd4bc9a6c7fce1f0
07df3ab84eac0cd621c04fefa575eb6949d7c50d
fix(browser): make `provider` field required
## Summary make `provider` field required. ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with an "x" --> - [ ] Tests updated (or not required). - [ ] Documentation updated (or not required).
diff --git a/e2e/browser-mode/fixtures/basic/rstest.config.ts b/e2e/browser-mode/fixtures/basic/rstest.config.ts index 8dac25a66..20c79e345 100644 --- a/e2e/browser-mode/fixtures/basic/rstest.config.ts +++ b/e2e/browser-mode/fixtures/basic/rstest.config.ts @@ -4,6 +4,7 @@ import { BROWSER_PORTS } from '../ports'; expo...
2
2
2
[{"id": "G0", "claim": "The error message thrown by the validation in config.ts ends with a trailing period while the new test expects the same message without one, so the test would not pass as written.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim":...
null
web-infra-dev__rstest__919
web-infra-dev/rstest
919
defect
491c2f383b8b580585c38af089acb3d31eb24635
a248442db43746d2df972a51ea1a4ec500db8b3e
feat(core): support inspector mode for worker pool
## Summary - Enhanced `pluginInspect` to detect `--inspect` flags in `pool.execArgv` - Pass `pool.execArgv` to `pluginInspect` during Rsbuild preparation - Improved debugging support for test workers when running in pool mode ## Related Links <!--- Provide links of related issues or pages --> ## Checklist...
diff --git a/packages/core/src/core/plugins/inspect.ts b/packages/core/src/core/plugins/inspect.ts index d8e3e403d..2a1757d4d 100644 --- a/packages/core/src/core/plugins/inspect.ts +++ b/packages/core/src/core/plugins/inspect.ts @@ -1,10 +1,21 @@ import inspector from 'node:inspector'; import type { RsbuildPlugin } f...
1
1
0
[{"id": "G0", "claim": "The optional chaining on `pool` is unnecessary because `pool` is a required property of `NormalizedConfig`, so `pool?.execArgv` can be removed for clarity and alignment with the types.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-infra-dev__rstest__929
web-infra-dev/rstest
929
defect
da6b94d4658dcc30fcf6fadfae7304d247500a64
03dfe6e2c23bccccdd203c84fa72afd1f406b14e
test(browser-mode): add comprehensive e2e test coverage
## Summary - Add E2E tests for entry override configuration - Add E2E tests for environment variable handling - Add E2E tests for test listing functionality - Add E2E tests for no-tests scenario ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check and mark with ...
diff --git a/e2e/browser-mode/entryOverride.test.ts b/e2e/browser-mode/entryOverride.test.ts new file mode 100644 index 0000000000..4129b371b3 --- /dev/null +++ b/e2e/browser-mode/entryOverride.test.ts @@ -0,0 +1,24 @@ +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { desc...
2
1
1
[{"id": "G0", "claim": "The stdout processing should chain .join('\\n') and store the result in a single variable so the repeated lines.join('\\n') calls in the assertions become cleaner and slightly more performant.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id...
null
web-infra-dev__rstest__952
web-infra-dev/rstest
952
defect
6d412f4a2d987e6bbe6f910040d509fc5e121d8d
2fc07c446328f89d7b9d008de021a37049bb4ef7
perf(browser): add lightweight scheduler page for headless mode
## Summary perf diff (running under examples/browser-react): before ``` hyperfine --warmup 3 --runs 50 "pnpm rstest" Benchmark 1: pnpm rstest Time (mean ± σ): 1.326 s ± 0.044 s [User: 1.444 s, System: 0.392 s] Range (min … max): 1.289 s … 1.580 s 50 runs ``` after ``` hyperfine ...
diff --git a/e2e/browser-mode/basic.test.ts b/e2e/browser-mode/basic.test.ts index cad1ce1d6f..8a19a5239d 100644 --- a/e2e/browser-mode/basic.test.ts +++ b/e2e/browser-mode/basic.test.ts @@ -34,14 +34,16 @@ describe('browser mode - basic', () => { await expectExecSuccess(); expect(cli.stdout).toMatch(/Test ...
5
4
3
[{"id": "G0", "claim": "The reconnect timer invokes `connect()` without handling rejections, so a rejection on websocket open timeout or initial connection error (before any 'close' handler is registered) leaves the scheduler permanently disconnected with no further retry after a transient outage.", "category": "correc...
null
web-infra-dev__rstest__956
web-infra-dev/rstest
956
defect
a1da64820801058ce5beba6d20a689f08e8355a7
3c81424e3637b8d46ad228a1e3e876a5b4957f64
fix(core): include worker stderr in unexpected-exit summary
## Summary supersede https://github.com/web-infra-dev/rstest/pull/949. This PR fixes missing diagnostics when a child worker crashes (for example, rspack panic) under tinypool `child_process` mode. It captures worker `stderr` at the pool layer, binds output to the active task via worker meta messages, and appends...
diff --git a/e2e/worker/fixtures/worker.panic.test.ts b/e2e/worker/fixtures/worker.panic.test.ts new file mode 100644 index 0000000000..94e925773f --- /dev/null +++ b/e2e/worker/fixtures/worker.panic.test.ts @@ -0,0 +1,9 @@ +import { writeSync } from 'node:fs'; +import { describe, it } from '@rstest/core'; + +describe(...
1
1
1
[{"id": "G0", "claim": "Detaching the stderr listener on the child's 'exit' event can lose stderr emitted between 'exit' and 'close' while stdio streams drain, dropping the tail of panic output for crash paths; capture should stay attached until 'close' (or after waitForWorkerClose).", "category": "correctness", "verdi...
null
web-infra-dev__rstest__976
web-infra-dev/rstest
976
defect
4c4e6db7270339bb9f76fc40f26624ed2fa2048b
fb9a72eb30a02d7e61c23c70926e12dbb37b5c7e
fix(browser): align browser reporter lifecycle hooks across run and watch
## Summary fix https://github.com/web-infra-dev/rstest/issues/970. This PR fixes reporter lifecycle inconsistencies in browser mode, especially when running browser-only projects or rerunning in watch mode. It extends the new dispatch pipeline end-to-end so browser runner lifecycle events are forwarded to host re...
diff --git a/e2e/browser-mode/fixtures/ports.ts b/e2e/browser-mode/fixtures/ports.ts index bd5480a119..a08bfb2174 100644 --- a/e2e/browser-mode/fixtures/ports.ts +++ b/e2e/browser-mode/fixtures/ports.ts @@ -18,4 +18,6 @@ export const BROWSER_PORTS = { webkit: 5198, viewport: 5214, 'viewport-preset': 5216, + r...
1
1
1
[{"id": "G0", "claim": "In headed watch mode the rerun block emits onTestRunEnd immediately after rpcManager.reloadTestFile(...), but that RPC only triggers the UI-side iframe reload and returns right away, so reporters are told the run ended while the rerun is still executing, which can produce stale/partial results/t...
null
web-infra-dev__rstest__980
web-infra-dev/rstest
980
defect
5b4fb8651904ca8ccd9eb7c9e7f5ccce8d1f5ffa
431d1af62225766961edea48875990e29c0ab4f3
feat(vscode): add editor diagnostics and clean up failure UI
## Summary | Before | After | |--------|-------| | <img width="940" height="555" alt="image" src="https://github.com/user-attachments/assets/6da2c4d8-7f54-4b19-a1de-0401bbde5e28" /> | <img width="955" height="647" alt="Code 2026-02-26 11 47 28" src="https://github.com/user-attachments/assets/ffef629a-e80b-410...
diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bb4c39aac6..92f9faf607 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,7 +9,7 @@ "background": { "activeOnStart": true, "beginsPattern": "build started...", - "endsPattern": "build complete, watching for changes......
2
2
2
[{"id": "G0", "claim": "RstestDiagnostics stores entries under testItem.id, which is derived from test labels and not globally unique across files/suites, so two failing tests with the same name overwrite each other's diagnostics and clearForTest can clear the wrong file's entries, making the Problems panel inaccurate....
null
web-infra-dev__rstest__981
web-infra-dev/rstest
981
defect
45b5cefb284d77fcdb28feae22bec733dc18652d
8da6d0fc60f11e4748ee2f8759b04c8b17920f51
fix(browser): remove default process shim while keep env stubbing support
## Summary Removes the automatic injection of a `process` object shim in browser mode, eliminating global namespace pollution. Replaces the string-keyed `__RSTEST_ENV__` with a Symbol-based store (`Symbol.for('rstest.env')`) to hold environment variables, while ensuring `rstest.stubEnv()` continues to work seamlessl...
diff --git a/e2e/browser-mode/env.test.ts b/e2e/browser-mode/env.test.ts index 47b31b13dd..7bd6d6d512 100644 --- a/e2e/browser-mode/env.test.ts +++ b/e2e/browser-mode/env.test.ts @@ -7,7 +7,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); describe('browser mode - env', ...
1
1
1
[{"id": "G0", "claim": "Because stubEnv memoizes envTarget and unstubAllEnvs restores through that cached reference, a test that reassigns the env object after the first stub makes later stubEnv/unstubAllEnvs calls mutate the stale object, so restoration silently misses the real runtime env.", "category": "correctness"...
null
web-infra-dev__rstest__982
web-infra-dev/rstest
982
defect
5b4fb8651904ca8ccd9eb7c9e7f5ccce8d1f5ffa
51188dbdb683158ba33e8d0af2cc1d3c5392d542
feat: add `rs.waitFor` and `rs.waitUntil` utilities
## Summary add `rs.waitFor` and `rs.waitUntil` utilities. ``` export interface RstestUtilities { // ... existing methods ... /** * Retry callback until it succeeds (doesn't throw) or timeout is reached. * If timeout is reached, throws the last error from the callback. */ waitFor<T>( c...
diff --git a/e2e/test-api/wait.test.ts b/e2e/test-api/wait.test.ts new file mode 100644 index 000000000..6d825975b --- /dev/null +++ b/e2e/test-api/wait.test.ts @@ -0,0 +1,72 @@ +import { expect, it, rs } from '@rstest/core'; + +it('waitFor retries until callback succeeds', async () => { + let attempts = 0; + + const...
2
2
2
[{"id": "G0", "claim": "waitFor only checks timedOut in the error path, so once the timeout has elapsed a later successful callback still returns and marks the wait as passed, letting tests falsely succeed and allowing one extra callback execution after the timeout.", "category": "correctness", "verdict": "supported", ...
null
web-infra-dev__rstest__991
web-infra-dev/rstest
991
defect
d2fe67932ba6859a58cbaad5cb142b7f3bcad18a
f2049b9103a2ef627d94ebd3762d4f2768a68bbb
fix: wasm load error with dynamic import expression
## Summary fix wasm load error with dynamic import expression. ```ts const wasmUrl = new URL('./factorial.wasm', import.meta.url); const { _Z4facti: AsyncFactorial } = await import(wasmUrl.href); ``` ## Related Links <!--- Provide links of related issues or pages --> ## Checklist <!--- Check an...
diff --git a/e2e/wasm/index.test.ts b/e2e/wasm/index.test.ts index de5d649e2..92fb5c708 100644 --- a/e2e/wasm/index.test.ts +++ b/e2e/wasm/index.test.ts @@ -14,3 +14,12 @@ test('dynamic import WASM', async () => { expect(AsyncFactorial(2)).toBe(2); expect(AsyncFactorial(3)).toBe(6); }); + +test('url load WASM', ...
1
1
1
[{"id": "G0", "claim": "Setting output.assetPrefix to path.join(rootPath, distRootDir) yields an OS-native filesystem path that is not a valid URL prefix, so on Windows the wasm URL-load flow produces specifiers that cannot be resolved back to assetFiles and .wasm imports fail instead of loading from the in-memory asse...
null
web-push-libs__web-push__180
web-push-libs/web-push
180
defect
8a8e900c4c76fd198142f859d135397901edac72
db6a4033347c79d5b42dcdd3af0a48617ba1f626
Moving GCM endpoint over to using web push protocol
This removes the GCM protocol use. It does leave in the Authorization header needed for the GCM API Key though.
diff --git a/index.js b/index.js index 9336ede3..87160f44 100644 --- a/index.js +++ b/index.js @@ -115,8 +115,6 @@ function sendNotification(endpoint, params) { } } - const isGCM = endpoint.indexOf('https://android.googleapis.com/gcm/send') === 0; - var urlParts = url.parse(endpoint); ...
2
1
1
[{"id": "G0", "claim": "In S1, `isGCM` is used at the `if (vapid && !isGCM)` check before the `var isGCM` definition that the change moved below it, so the guard evaluates against an undefined variable.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ...
null
web-push-libs__web-push__220
web-push-libs/web-push
220
defect
251c28d5b1250faed6057b8fd3a23a9109a8a937
da7cd2b2a474aa4b44d0a34562a3ca2c3088c48e
Changing vapid input / output to be base64url encoded string
Fixes #210 and adds some tests to setVapidDetails().
diff --git a/src/vapid-helper.js b/src/vapid-helper.js index edda5c86..204a3ba6 100644 --- a/src/vapid-helper.js +++ b/src/vapid-helper.js @@ -32,8 +32,8 @@ function generateVAPIDKeys() { curve.generateKeys(); return { - publicKey: curve.getPublicKey(), - privateKey: curve.getPrivateKey() + publicKey: ...
1
1
0
[{"id": "G0", "claim": "The vapid input checks should be moved into a separate function in vapid-helper.js and used everywhere, to avoid duplicated code.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-push-libs__web-push__245
web-push-libs/web-push
245
defect
27a114f8825a220ffe634aabc0deebecb9ec7bc4
bddfa25ece7d4996f2834adb93cad00a4c914400
Request details
Fixes #242 cc @marco-c
diff --git a/README.md b/README.md index f938578e..3b73819a 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,131 @@ encryption. - *salt*: A string representing the salt used to encrypt the payload. - *cipherText*: The encrypted payload as a Buffer. +<hr /> + +## getVapidHeaders(audience, subject, publicKey, pr...
4
4
1
[{"id": "G0", "claim": "The getVapidHeaders() section in the README describes the encrypt method's behaviour instead of getVapidHeaders() and should be corrected.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the generateRequestDetails() Retur...
null
web-push-libs__web-push__251
web-push-libs/web-push
251
defect
6bc8082712c7e38b79a6dec4c34bbf0175bc4412
a14a4478ddb8d4e0c7839407d67867d0ef43149b
Adding headers key to options for supporting future headers.
Fix #235 @marco-c or @gauntface do you mind to take a look at my patch, please?
diff --git a/src/web-push-lib.js b/src/web-push-lib.js index c885dcdd..337fe7ea 100644 --- a/src/web-push-lib.js +++ b/src/web-push-lib.js @@ -106,9 +106,11 @@ WebPushLib.prototype.generateRequestDetails = let currentGCMAPIKey = gcmAPIKey; let currentVapidDetails = vapidDetails; let timeToLive = DEFAULT_...
2
1
1
[{"id": "G0", "claim": "The extra-headers check added to test/testSendNotification.js logs with console.log instead of asserting, so there should be an assert there and a test in testSendNotification that actually checks the extra headers are sent.", "category": "testing", "verdict": "supported", "priority": "P1", "sco...
null
web-push-libs__web-push__287
web-push-libs/web-push
287
defect
587c9bc4e3e9e5c434357ce93710b1b441bd1e1a
90217439180511cc3060a665e75ecbb6c0d1850b
Add option to add Custom Expiration
This PR let's the people add Custom Expiration to their vapid headers, but it seems expiration is a completed part and this is just the initial PR, the validation of the expiration can be more complex too. The `validateExpiration` does not check the time for the minimum since minimums can be different in all points ...
diff --git a/src/vapid-helper.js b/src/vapid-helper.js index 8ef7699f..541fa30b 100644 --- a/src/vapid-helper.js +++ b/src/vapid-helper.js @@ -6,6 +6,12 @@ const asn1 = require('asn1.js'); const jws = require('jws'); const url = require('url'); +/** + * DEFAULT_EXPIRATION is set to seconds in 12 hours + */ +const D...
13
11
1
[{"id": "G0", "claim": "The library should consider validating that the expiration is not in the past (or providing leeway for clock skew), as the author suggested `expiration < Date.now()`.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The helper funct...
null
web-push-libs__web-push__309
web-push-libs/web-push
309
defect
1a9398decefd8ed00073e1e04e1d1c26a117d74b
ae7a4988dbd3be87b324a1a6b13472904d513ea5
Support aes128gcm
Fixes #278.
diff --git a/package-lock.json b/package-lock.json index 7654365c..f3d30a48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1196,9 +1196,9 @@ } }, "http_ece": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/http_ece/-/http_ece-0.7.2.tgz", - "integrity": "sha1...
5
4
1
[{"id": "G0", "claim": "getVapidHeaders should be restructured as if/else-if over the content encodings with a final else that throws, instead of building the default headers and overriding them for aes128gcm.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
web-push-libs__web-push__456
web-push-libs/web-push
456
defect
bdaa394d0f41a0e7b8c8470622ab333f322b1c58
1cc49ba44841f10df1a802dc5aae935c798ba632
Allow falsy values for vapidDetails
Closes #445 I added some tests for multiple FCM cases, but I had to fix the vapid validation for that. Please review those changes once. Also should I separate the tests for FCM from current GCM tests?
diff --git a/src/web-push-lib.js b/src/web-push-lib.js index 66d02456..72563378 100644 --- a/src/web-push-lib.js +++ b/src/web-push-lib.js @@ -148,7 +148,8 @@ WebPushLib.prototype.generateRequestDetails = function(subscription, payload, op currentGCMAPIKey = options.gcmAPIKey; } - if (options.vap...
2
2
0
[{"id": "G0", "claim": "Use startsWith instead of indexOf(...) === 0 when checking the endpoint prefix.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The commented-out appServerVapidPublicKey decode line is no longer needed and should be remove...
null
web-push-libs__web-push__490
web-push-libs/web-push
490
defect
53e55c1b78a869897572daef9fc4e200cd2f93ac
e97977532af509a9e46ad43d37bfb17f8001e09d
Add https.agent options
Hello! I'am using web-push to send a lot of push-notifications. We have got more than 3000rps. To make sender service faster, i'am now doing something like this: ``` webPush.setVapidDetails( 'mailto:help@test.com', config.vapid_public_key, config.vapid_private_key ); https.globalAgent = new htt...
diff --git a/README.md b/README.md index 9490f555..df612809 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,8 @@ const options = { '< header name >': '< header value >' }, contentEncoding: '< Encoding type, e.g.: aesgcm or aes128gcm >', - proxy: '< proxy server options >' + proxy: '< proxy server opt...
3
3
1
[{"id": "G0", "claim": "The README's new **agent** bullet should be reworded as suggested (latest docs link, \"the `https.request` method\", \"If the `proxy` options defined, `agent` will be ignored!\").", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim...
null
web-push-libs__web-push__789
web-push-libs/web-push
789
defect
4d2da2db24a6d8626d176276ec6d3bef5b6ac3a2
94c3133822fdc792eb7f5522b0b89743959e6d1d
tighten Vapid subject validation
only accept Vapid subjects with https: or mailto: URL protocols, as per spec Note that I moved to using the WHATWG URL parser, which has been supported in Node since v6 (the min version supported as per `package.json`) since Node says that `url.parse()` is now fully-deprecated. I did local testing all the way down t...
diff --git a/src/vapid-helper.js b/src/vapid-helper.js index 28d346f6..4c6cfe27 100644 --- a/src/vapid-helper.js +++ b/src/vapid-helper.js @@ -4,7 +4,7 @@ const crypto = require('crypto'); const urlBase64 = require('urlsafe-base64'); const asn1 = require('asn1.js'); const jws = require('jws'); -const url = require('...
2
1
1
[{"id": "G0", "claim": "Add tests for localhost mailto: and localhost https: subject URLs as well.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new localhost check may also emit the warning for mailto: subjects.", "category": "correctness", "verdi...
null
web-push-libs__web-push__819
web-push-libs/web-push
819
defect
b8b701219dc89ad51703f9a3f8d524508e44512b
46df5ddc65a2686f60cc27941b0b7653ba370958
Use builtin encoding `base64url`
Node 16+ supports base64url: https://nodejs.org/docs/latest-v16.x/api/buffer.html
diff --git a/src/urlsafe-base64-helper.js b/src/urlsafe-base64-helper.js index 6a7a6c2e..2b6b3f31 100644 --- a/src/urlsafe-base64-helper.js +++ b/src/urlsafe-base64-helper.js @@ -1,32 +1,31 @@ -// Largely ported from https://github.com/RGBboy/urlsafe-base64 - 'use strict'; +/** + * @param {Buffer} buffer + * @return...
1
1
0
[{"id": "G0", "claim": "Could the encode and decode helper functions be removed and `buffer.toString` / `Buffer.from` be used directly at the call sites?", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
web-scrobbler__web-scrobbler__3797
web-scrobbler/web-scrobbler
3,797
defect
4c65da0cb33f7f17a7e51ed680b169380bce557a
a7bb1ab1f2cd6caf1645beb6850d25cc8e928169
Don't fetch edits on unsupported sites
Should reduce memory usage a lot for people with many tabs and many saved edits. EDIT: also checks for frames when allframes is false now, shouldve been added a long time ago
diff --git a/src/core/content/main.ts b/src/core/content/main.ts index 462d140567..38f09cc82b 100644 --- a/src/core/content/main.ts +++ b/src/core/content/main.ts @@ -6,6 +6,8 @@ import start from '@/core/content/starter'; import browser from 'webextension-polyfill'; import scrobbleService from '@/core/object/scrobbl...
2
1
0
[{"id": "G0", "claim": "Remove the leftover debug statement console.log('bbbbb', ...) in fetchConnector.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Consider protecting init() so it is not run again if the storage has already been initialized...
null
web-scrobbler__web-scrobbler__3818
web-scrobbler/web-scrobbler
3,818
defect
da1540b73f16b42b980e2234a853ede67288307a
632af3f4389ef50c2ad36ae9898f9f5b9e1b0317
Move scrobble service calls to service worker
This PR has the potential to cause massive destruction if it is not working correctly. Achieves a few things. First of all, the code now gets around adblockers no problem. Second, this sets us up nicely to add code to avoid requiring users to refresh on every update being applied without risking it resulting in do...
diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 3910524481..37eb58c5a3 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -475,10 +475,6 @@ "message": "Looks like something went wrong while scrobbling the music. Please open the options page and tr...
2
1
0
[{"id": "G0", "claim": "The listener type strings should eventually be replaced by an enum type class mapping these types.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new file src/core/background/scrobble.ts might be more suitably named scrobbler-...
null
web-scrobbler__web-scrobbler__3861
web-scrobbler/web-scrobbler
3,861
defect
fc7b7a212eb8deb157fa3a21b3586c733acf090a
a8cc57bdc18580c623754cd942150180ad70b4dd
Add infobox to inject scrobbling info & state into pages
**Describe the changes you made** Add infobox to display scrobbling state on the page. My motivation is that I dislike notifications, it would also be a good solution for safari where you're apparently not allowed to send notifications. **Additional context** <img width="435" alt="image" src="https://github.com/we...
diff --git a/manifest.config.ts b/manifest.config.ts index c5bb17dc86..1f82507487 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -28,6 +28,10 @@ export const common: Manifest.WebExtensionManifest = { resources: ['connectors/*'], matches: ['<all_urls>'], }, + { + resources: ['icons/*'], + ma...
4
4
4
[{"id": "G0", "claim": "The infoBoxStateDisallowed message and its description wrongly imply scrobbling is disallowed only by an option, when it can also be disallowed for reasons hard-coded into the connector.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "...
null
web-scrobbler__web-scrobbler__4416
web-scrobbler/web-scrobbler
4,416
defect
ed577ecffa2f5d63777aeee2590e52eb115c9f4f
f513b3b2ebe80d824536e6132cab2000d9723daa
Add notification when first scrobbling site with built-in scrobbler
When first playing on a site with built-in scrobbler, a notification is shown to the user to make them aware. Notification shows when a song actually starts playing, not on visit. Notification will show only once per website and then be disabled through new local storage property. Currently only enabled for spotif...
diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 7ef6af040a..17853aa211 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -867,6 +867,14 @@ "message": "Click the notification to connect your accounts.", "description": "Notification text" ...
2
1
0
[{"id": "G0", "claim": "The id parameter of shouldNotifyAboutNativeScrobbler should not be typed string | undefined | null if connector ids are mandatory — narrow the type or introduce one that enforces this.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
web-std__io__60
web-std/io
60
defect
30ad0377a88ebffc3a998616e3b774ce5bcc584a
5fba0c21bf33ce4c8258847a7a638db826501e1d
fix: support application/x-www-form-urlencoded in request.formData()
Closes #57
diff --git a/packages/fetch/src/utils/form-data.js b/packages/fetch/src/utils/form-data.js index 24b89748..a22e315a 100644 --- a/packages/fetch/src/utils/form-data.js +++ b/packages/fetch/src/utils/form-data.js @@ -1,5 +1,6 @@ import {randomBytes} from 'crypto'; import { iterateMultipart } from '@web3-storage/multipa...
1
1
0
[{"id": "G0", "claim": "Import FormData from '../package.js' rather than the external '@web-std/form-data' package.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null