@rspack/test-tools 1.1.1 → 1.1.2
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.
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.DefaultsConfigProcessor = void 0;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
7
5
|
const jest_diff_1 = require("jest-diff");
|
|
8
|
-
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
9
6
|
const simple_1 = require("./simple");
|
|
10
7
|
const CURRENT_CWD = process.cwd();
|
|
11
8
|
class RspackTestDiff {
|
|
@@ -43,7 +40,7 @@ class DefaultsConfigProcessor extends simple_1.SimpleTaskProcessor {
|
|
|
43
40
|
async check(env, context) {
|
|
44
41
|
const compiler = this.getCompiler(context);
|
|
45
42
|
const config = DefaultsConfigProcessor.getDefaultConfig(this._defaultsConfigOptions.cwd || CURRENT_CWD, compiler.getOptions());
|
|
46
|
-
const diff = (0,
|
|
43
|
+
const diff = (0, node_util_1.stripVTControlCharacters)((0, jest_diff_1.diff)(this.defaultConfig, config, { expand: false, contextLines: 0 }));
|
|
47
44
|
await this._defaultsConfigOptions.diff(env.expect(new RspackTestDiff(diff)), env.expect(this.defaultConfig));
|
|
48
45
|
}
|
|
49
46
|
async before(context) { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/test-tools",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"path-serializer": "0.1.2",
|
|
52
52
|
"pretty-format": "29.7.0",
|
|
53
53
|
"rimraf": "3.0.2",
|
|
54
|
-
"strip-ansi": "6.0.1",
|
|
55
54
|
"webpack": "^5.94.0",
|
|
56
55
|
"webpack-merge": "5.9.0",
|
|
57
56
|
"webpack-sources": "3.2.3"
|
|
@@ -102,8 +101,8 @@
|
|
|
102
101
|
"terser": "5.36.0",
|
|
103
102
|
"typescript": "^5.6.3",
|
|
104
103
|
"wast-loader": "^1.12.1",
|
|
105
|
-
"@rspack/
|
|
106
|
-
"@rspack/
|
|
104
|
+
"@rspack/core": "1.1.2",
|
|
105
|
+
"@rspack/cli": "1.1.2"
|
|
107
106
|
},
|
|
108
107
|
"peerDependencies": {
|
|
109
108
|
"@rspack/core": ">=1.0.0"
|