@rspack/test-tools 1.7.3 → 1.7.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.
@@ -1,4 +1,5 @@
1
1
  export * from './directory';
2
+ export { normalizePlaceholder } from './expect/placeholder';
2
3
  export * from './is';
3
4
  export * from './parse-modules';
4
5
  export * from './read-config-file';
@@ -14,7 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.normalizePlaceholder = void 0;
17
18
  __exportStar(require("./directory"), exports);
19
+ var placeholder_1 = require("./expect/placeholder");
20
+ Object.defineProperty(exports, "normalizePlaceholder", { enumerable: true, get: function () { return placeholder_1.normalizePlaceholder; } });
18
21
  __exportStar(require("./is"), exports);
19
22
  __exportStar(require("./parse-modules"), exports);
20
23
  __exportStar(require("./read-config-file"), exports);
@@ -9,8 +9,24 @@ module.exports = function copyDiff(src, dest, initial) {
9
9
  for (const filename of files) {
10
10
  const srcFile = path.join(src, filename);
11
11
  const destFile = path.join(dest, filename);
12
- const directory = fs.statSync(srcFile).isDirectory();
13
- if (directory) {
12
+ const stats = fs.lstatSync(srcFile);
13
+ if (stats.isSymbolicLink()) {
14
+ const linkTarget = fs.readlinkSync(srcFile);
15
+ if (fs.existsSync(destFile)) {
16
+ const destStats = fs.lstatSync(destFile);
17
+ if (destStats.isSymbolicLink()) {
18
+ fs.unlinkSync(destFile);
19
+ }
20
+ else if (destStats.isDirectory()) {
21
+ rimrafSync(destFile);
22
+ }
23
+ else {
24
+ fs.unlinkSync(destFile);
25
+ }
26
+ }
27
+ fs.symlinkSync(linkTarget, destFile);
28
+ }
29
+ else if (stats.isDirectory()) {
14
30
  copyDiff(srcFile, destFile, initial);
15
31
  }
16
32
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/test-tools",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "license": "MIT",
5
5
  "description": "Test tools for rspack",
6
6
  "main": "dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "@types/jsdom": "^21.1.7",
66
66
  "typescript": "^5.9.3",
67
67
  "wast-loader": "^1.14.1",
68
- "@rspack/core": "1.7.3"
68
+ "@rspack/core": "1.7.5"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@rspack/core": ">=1.0.0"