@rspack/test-tools 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/case/config.js +5 -1
- package/dist/case/new-code-splitting.js +5 -1
- package/dist/processor/builtin.js +5 -0
- package/dist/processor/cache.js +5 -0
- package/dist/processor/defaults.d.ts +1 -0
- package/dist/processor/defaults.js +7 -0
- package/dist/processor/diagnostic.d.ts +1 -0
- package/dist/processor/diagnostic.js +7 -0
- package/dist/processor/hash.js +5 -0
- package/dist/processor/hook.d.ts +1 -0
- package/dist/processor/hook.js +7 -0
- package/dist/processor/normal.d.ts +1 -0
- package/dist/processor/normal.js +7 -0
- package/dist/processor/stats-api.js +5 -0
- package/dist/processor/stats.js +5 -0
- package/dist/processor/treeshaking.js +5 -0
- package/package.json +6 -6
package/dist/case/config.js
CHANGED
|
@@ -24,7 +24,11 @@ const creator = new creator_1.BasicCaseCreator({
|
|
|
24
24
|
name,
|
|
25
25
|
runable: true,
|
|
26
26
|
compilerType: type_1.ECompilerType.Rspack,
|
|
27
|
-
configFiles: [
|
|
27
|
+
configFiles: [
|
|
28
|
+
"rspack.config.cjs",
|
|
29
|
+
"rspack.config.js",
|
|
30
|
+
"webpack.config.js"
|
|
31
|
+
]
|
|
28
32
|
})
|
|
29
33
|
],
|
|
30
34
|
runner: runner_1.MultipleRunnerFactory,
|
|
@@ -30,7 +30,11 @@ const configCreator = new creator_1.BasicCaseCreator({
|
|
|
30
30
|
name,
|
|
31
31
|
runable: true,
|
|
32
32
|
compilerType: type_1.ECompilerType.Rspack,
|
|
33
|
-
configFiles: [
|
|
33
|
+
configFiles: [
|
|
34
|
+
"rspack.config.cjs",
|
|
35
|
+
"rspack.config.js",
|
|
36
|
+
"webpack.config.js"
|
|
37
|
+
]
|
|
34
38
|
});
|
|
35
39
|
return [processor];
|
|
36
40
|
},
|
|
@@ -160,6 +160,11 @@ class BuiltinProcessor extends snapshot_1.SnapshotProcessor {
|
|
|
160
160
|
delete rspackDefaultOptions.builtins;
|
|
161
161
|
defaultOptions = rspackDefaultOptions;
|
|
162
162
|
}
|
|
163
|
+
if (!global.printLogger) {
|
|
164
|
+
defaultOptions.infrastructureLogging = {
|
|
165
|
+
level: "error"
|
|
166
|
+
};
|
|
167
|
+
}
|
|
163
168
|
return defaultOptions;
|
|
164
169
|
}
|
|
165
170
|
}
|
package/dist/processor/cache.js
CHANGED
|
@@ -135,6 +135,11 @@ class CacheProcessor extends basic_1.BasicProcessor {
|
|
|
135
135
|
options.plugins ??= [];
|
|
136
136
|
options.plugins.push(new plugins_1.TestHotUpdatePlugin(this.updateOptions));
|
|
137
137
|
}
|
|
138
|
+
if (!global.printLogger) {
|
|
139
|
+
options.infrastructureLogging = {
|
|
140
|
+
level: "error"
|
|
141
|
+
};
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
145
|
exports.CacheProcessor = CacheProcessor;
|
|
@@ -25,5 +25,6 @@ export declare class DefaultsConfigProcessor<T extends ECompilerType> extends Si
|
|
|
25
25
|
afterAll(context: ITestContext): Promise<void>;
|
|
26
26
|
protected getCompiler(context: ITestContext): import("../type").ITestCompilerManager<T>;
|
|
27
27
|
static getDefaultConfig(cwd: string, config: TCompilerOptions<ECompilerType>): TCompilerOptions<ECompilerType>;
|
|
28
|
+
static overrideOptions<T extends ECompilerType>(options: TCompilerOptions<T>): void;
|
|
28
29
|
}
|
|
29
30
|
export {};
|
|
@@ -61,5 +61,12 @@ class DefaultsConfigProcessor extends simple_1.SimpleTaskProcessor {
|
|
|
61
61
|
process.chdir(CURRENT_CWD);
|
|
62
62
|
return normalizedConfig;
|
|
63
63
|
}
|
|
64
|
+
static overrideOptions(options) {
|
|
65
|
+
if (!global.printLogger) {
|
|
66
|
+
options.infrastructureLogging = {
|
|
67
|
+
level: "error"
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
64
71
|
}
|
|
65
72
|
exports.DefaultsConfigProcessor = DefaultsConfigProcessor;
|
|
@@ -9,4 +9,5 @@ export declare class DiagnosticProcessor<T extends ECompilerType> extends BasicP
|
|
|
9
9
|
constructor(_diagnosticOptions: IDiagnosticProcessorOptions<T>);
|
|
10
10
|
check(env: ITestEnv, context: ITestContext): Promise<void>;
|
|
11
11
|
static defaultOptions<T extends ECompilerType>(context: ITestContext): TCompilerOptions<T>;
|
|
12
|
+
static overrideOptions<T extends ECompilerType>(options: TCompilerOptions<T>): void;
|
|
12
13
|
}
|
|
@@ -62,5 +62,12 @@ class DiagnosticProcessor extends basic_1.BasicProcessor {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
static overrideOptions(options) {
|
|
66
|
+
if (!global.printLogger) {
|
|
67
|
+
options.infrastructureLogging = {
|
|
68
|
+
level: "error"
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
65
72
|
}
|
|
66
73
|
exports.DiagnosticProcessor = DiagnosticProcessor;
|
package/dist/processor/hash.js
CHANGED
|
@@ -53,6 +53,11 @@ class HashProcessor extends multi_1.MultiTaskProcessor {
|
|
|
53
53
|
if (!options.entry) {
|
|
54
54
|
options.entry = "./index.js";
|
|
55
55
|
}
|
|
56
|
+
if (!global.printLogger) {
|
|
57
|
+
options.infrastructureLogging = {
|
|
58
|
+
level: "error"
|
|
59
|
+
};
|
|
60
|
+
}
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
exports.HashProcessor = HashProcessor;
|
package/dist/processor/hook.d.ts
CHANGED
|
@@ -40,4 +40,5 @@ export declare class HookTaskProcessor<T extends ECompilerType> extends Snapshot
|
|
|
40
40
|
compiler(context: ITestContext): Promise<void>;
|
|
41
41
|
check(env: ITestEnv, context: HookCasesContext): Promise<void>;
|
|
42
42
|
static defaultOptions<T extends ECompilerType>(context: ITestContext): TCompilerOptions<T>;
|
|
43
|
+
static overrideOptions<T extends ECompilerType>(options: TCompilerOptions<T>): void;
|
|
43
44
|
}
|
package/dist/processor/hook.js
CHANGED
|
@@ -193,5 +193,12 @@ class HookTaskProcessor extends snapshot_1.SnapshotProcessor {
|
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
+
static overrideOptions(options) {
|
|
197
|
+
if (!global.printLogger) {
|
|
198
|
+
options.infrastructureLogging = {
|
|
199
|
+
level: "error"
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
196
203
|
}
|
|
197
204
|
exports.HookTaskProcessor = HookTaskProcessor;
|
|
@@ -8,4 +8,5 @@ export declare class NormalProcessor<T extends ECompilerType> extends BasicProce
|
|
|
8
8
|
protected _normalOptions: INormalProcessorOptions<T>;
|
|
9
9
|
constructor(_normalOptions: INormalProcessorOptions<T>);
|
|
10
10
|
static defaultOptions<T extends ECompilerType>(this: NormalProcessor<T>, context: ITestContext): TCompilerOptions<T>;
|
|
11
|
+
static overrideOptions<T extends ECompilerType>(options: TCompilerOptions<T>): void;
|
|
11
12
|
}
|
package/dist/processor/normal.js
CHANGED
|
@@ -139,5 +139,12 @@ class NormalProcessor extends basic_1.BasicProcessor {
|
|
|
139
139
|
// }
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
+
static overrideOptions(options) {
|
|
143
|
+
if (!global.printLogger) {
|
|
144
|
+
options.infrastructureLogging = {
|
|
145
|
+
level: "error"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
142
149
|
}
|
|
143
150
|
exports.NormalProcessor = NormalProcessor;
|
|
@@ -14,6 +14,11 @@ class StatsAPIProcessor extends simple_1.SimpleTaskProcessor {
|
|
|
14
14
|
res.experiments.rspackFuture ??= {};
|
|
15
15
|
res.experiments.rspackFuture.bundlerInfo ??= {};
|
|
16
16
|
res.experiments.rspackFuture.bundlerInfo.force ??= false;
|
|
17
|
+
if (!global.printLogger) {
|
|
18
|
+
res.infrastructureLogging = {
|
|
19
|
+
level: "error"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
17
22
|
return res;
|
|
18
23
|
},
|
|
19
24
|
build: _statsAPIOptions.build,
|
package/dist/processor/stats.js
CHANGED
|
@@ -196,6 +196,11 @@ class StatsProcessor extends multi_1.MultiTaskProcessor {
|
|
|
196
196
|
if (options.optimization.minimize === undefined) {
|
|
197
197
|
options.optimization.minimize = false;
|
|
198
198
|
}
|
|
199
|
+
if (!global.printLogger) {
|
|
200
|
+
options.infrastructureLogging = {
|
|
201
|
+
level: "error"
|
|
202
|
+
};
|
|
203
|
+
}
|
|
199
204
|
}
|
|
200
205
|
}
|
|
201
206
|
exports.StatsProcessor = StatsProcessor;
|
|
@@ -20,6 +20,11 @@ class TreeShakingProcessor extends snapshot_1.SnapshotProcessor {
|
|
|
20
20
|
options.optimization.providedExports = true;
|
|
21
21
|
options.optimization.innerGraph = true;
|
|
22
22
|
options.optimization.usedExports = true;
|
|
23
|
+
if (!global.printLogger) {
|
|
24
|
+
options.infrastructureLogging = {
|
|
25
|
+
level: "error"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
serializeEachFile(content) {
|
|
25
30
|
return (0, placeholder_1.normalizePlaceholder)(content);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/test-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@rspack/plugin-preact-refresh": "1.1.2",
|
|
62
|
-
"@rspack/plugin-react-refresh": "^1.
|
|
62
|
+
"@rspack/plugin-react-refresh": "^1.2.0",
|
|
63
63
|
"@swc/helpers": "0.5.15",
|
|
64
64
|
"@swc/plugin-remove-console": "^7.0.0",
|
|
65
65
|
"@types/babel__generator": "7.27.0",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"typescript": "^5.7.3",
|
|
98
98
|
"wast-loader": "^1.14.1",
|
|
99
99
|
"worker-rspack-loader": "^3.1.2",
|
|
100
|
-
"@rspack/
|
|
101
|
-
"@rspack/test-tools": "1.3.
|
|
102
|
-
"@rspack/
|
|
100
|
+
"@rspack/core": "1.3.5",
|
|
101
|
+
"@rspack/test-tools": "1.3.5",
|
|
102
|
+
"@rspack/cli": "1.3.5"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"@rspack/core": ">=1.0.0"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"scripts": {
|
|
108
108
|
"build": "tsc -b ./tsconfig.build.json",
|
|
109
109
|
"dev": "tsc -b -w",
|
|
110
|
-
"test": "pnpm run --stream /^test:.*/",
|
|
110
|
+
"test": "cross-env RUST_BACKTRACE=full pnpm run --stream /^test:.*/",
|
|
111
111
|
"testu": "pnpm run --stream /^test:.*/ -u",
|
|
112
112
|
"test:base": "cross-env node --no-warnings --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --logHeapUsage --colors --config ./jest.config.js --passWithNoTests",
|
|
113
113
|
"test:hot": "cross-env RSPACK_HOT_TEST=true node --no-warnings --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --logHeapUsage --colors --config ./jest.config.hot.js --passWithNoTests",
|