@rspack-canary/test-tools 1.5.0-canary-efb61069-20250820113456 → 1.5.2-canary-a37ca022-20250829094525

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.
@@ -19,7 +19,7 @@ const { getSerializers } = require(node_path_1.default.join(node_path_1.default.
19
19
  * Check if 2 strings or buffer are equal
20
20
  */
21
21
  const isEqual = (a, b) => {
22
- // @ts-ignore: TypeScript gives error if we pass string to buffer.equals
22
+ // @ts-expect-error: TypeScript gives error if we pass string to buffer.equals
23
23
  return Buffer.isBuffer(a) ? a.equals(b) : a === b;
24
24
  };
25
25
  /**
@@ -1,6 +1,5 @@
1
1
  export * from "./directory";
2
2
  export * from "./is";
3
- export * from "./legacy/supportsImportFn";
4
3
  export * from "./parse-modules";
5
4
  export * from "./read-config-file";
6
5
  export * from "./update-snapshot";
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./directory"), exports);
18
18
  __exportStar(require("./is"), exports);
19
- __exportStar(require("./legacy/supportsImportFn"), exports);
20
19
  __exportStar(require("./parse-modules"), exports);
21
20
  __exportStar(require("./read-config-file"), exports);
22
21
  __exportStar(require("./update-snapshot"), exports);
@@ -6,7 +6,7 @@ const to_match_file_snapshot_1 = require("./expect/to-match-file-snapshot");
6
6
  const serializers_1 = require("./serializers");
7
7
  expect.extend({
8
8
  // CHANGE: new test matcher for `rspack-test-tools`
9
- // @ts-ignore
9
+ // @ts-expect-error
10
10
  toMatchFileSnapshot: to_match_file_snapshot_1.toMatchFileSnapshot,
11
11
  toBeTypeOf: to_be_typeof_1.toBeTypeOf,
12
12
  toEndWith: to_end_with_1.toEndWith
@@ -101,7 +101,6 @@ class NormalProcessor extends basic_1.BasicProcessor {
101
101
  rules: []
102
102
  },
103
103
  plugins: (compilerOptions?.plugins || [])
104
- // @ts-ignore
105
104
  .concat(testConfig.plugins || [])
106
105
  .concat(function () {
107
106
  this.hooks.compilation.tap("TestCasesTest", compilation => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/test-tools",
3
- "version": "1.5.0-canary-efb61069-20250820113456",
3
+ "version": "1.5.2-canary-a37ca022-20250829094525",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -97,10 +97,10 @@
97
97
  "wast-loader": "^1.14.1",
98
98
  "worker-rspack-loader": "^3.1.2",
99
99
  "exports-loader": "^5.0.0",
100
- "@rspack/core": "npm:@rspack-canary/core@1.5.0-canary-efb61069-20250820113456",
101
- "@rspack/binding-testing": "1.4.1",
102
- "@rspack/test-tools": "npm:@rspack-canary/test-tools@1.5.0-canary-efb61069-20250820113456",
103
- "@rspack/cli": "npm:@rspack-canary/cli@1.5.0-canary-efb61069-20250820113456"
100
+ "@rspack/cli": "npm:@rspack-canary/cli@1.5.2-canary-a37ca022-20250829094525",
101
+ "@rspack/core": "npm:@rspack-canary/core@1.5.2-canary-a37ca022-20250829094525",
102
+ "@rspack/test-tools": "npm:@rspack-canary/test-tools@1.5.2-canary-a37ca022-20250829094525",
103
+ "@rspack/binding-testing": "1.4.1"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@rspack/core": ">=1.0.0"
@@ -1 +0,0 @@
1
- export declare function supportsImportFn(): boolean;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportsImportFn = supportsImportFn;
4
- // @ts-nocheck
5
- const nodeVersion = process.versions.node.split(".").map(Number);
6
- function supportsImportFn() {
7
- // Segmentation fault in vm with --experimental-vm-modules,
8
- // which has not been resolved in node 16 yet.
9
- // https://github.com/nodejs/node/issues/35889
10
- if (nodeVersion[0] > 16) {
11
- return true;
12
- }
13
- return false;
14
- }
15
- ;
@@ -1,2 +0,0 @@
1
- declare function _exports(): boolean;
2
- export = _exports;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- const nodeVersion = process.versions.node.split(".").map(Number);
4
- module.exports = function supportsWorker() {
5
- // Verify that in the current node version new Worker() accepts URL as the first parameter:
6
- // https://nodejs.org/api/worker_threads.html#worker_threads_new_worker_filename_options
7
- if (nodeVersion[0] >= 14) {
8
- return true;
9
- }
10
- if (nodeVersion[0] === 13 && nodeVersion[1] >= 12) {
11
- return true;
12
- }
13
- if (nodeVersion[0] === 12 && nodeVersion[1] >= 17) {
14
- return true;
15
- }
16
- return false;
17
- };