@rspack/test-tools 1.7.4 → 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.
|
@@ -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
|
|
13
|
-
if (
|
|
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
|
+
"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.
|
|
68
|
+
"@rspack/core": "1.7.5"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@rspack/core": ">=1.0.0"
|