@jsenv/filesystem 4.15.3 → 4.15.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/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/filesystem",
|
|
3
|
-
"version": "4.15.
|
|
4
|
-
"license": "MIT",
|
|
3
|
+
"version": "4.15.5",
|
|
5
4
|
"repository": {
|
|
6
5
|
"type": "git",
|
|
7
6
|
"url": "https://github.com/jsenv/core",
|
|
8
7
|
"directory": "packages/tooling/filesystem"
|
|
9
8
|
},
|
|
10
|
-
"
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
9
|
+
"license": "MIT",
|
|
13
10
|
"author": {
|
|
14
11
|
"name": "dmail",
|
|
15
12
|
"email": "dmaillard06@gmail.com"
|
|
16
13
|
},
|
|
14
|
+
"sideEffects": false,
|
|
17
15
|
"type": "module",
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=19.1.0"
|
|
20
|
-
},
|
|
21
|
-
"bin": "./src/cli.mjs",
|
|
22
16
|
"exports": {
|
|
23
17
|
".": {
|
|
24
18
|
"import": "./src/main.js"
|
|
25
19
|
},
|
|
26
20
|
"./*": "./*"
|
|
27
21
|
},
|
|
22
|
+
"bin": "./src/cli.mjs",
|
|
28
23
|
"files": [
|
|
29
24
|
"/src/"
|
|
30
25
|
],
|
|
31
|
-
"sideEffects": false,
|
|
32
26
|
"dependencies": {
|
|
33
|
-
"@jsenv/urls": "2.8.0",
|
|
34
|
-
"@jsenv/url-meta": "8.5.7",
|
|
35
27
|
"@jsenv/abort": "4.3.1",
|
|
28
|
+
"@jsenv/url-meta": "8.5.7",
|
|
29
|
+
"@jsenv/urls": "2.9.0",
|
|
36
30
|
"@jsenv/utils": "2.3.1"
|
|
37
31
|
},
|
|
38
32
|
"devDependencies": {
|
|
39
|
-
"@jsenv/snapshot": "../snapshot",
|
|
40
33
|
"@jsenv/assert": "../assert",
|
|
41
|
-
"@jsenv/filesystem": "./"
|
|
34
|
+
"@jsenv/filesystem": "./",
|
|
35
|
+
"@jsenv/snapshot": "../snapshot"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=19.1.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/copy/copy_entry.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Abort } from "@jsenv/abort";
|
|
|
2
2
|
import {
|
|
3
3
|
ensurePathnameTrailingSlash,
|
|
4
4
|
resolveUrl,
|
|
5
|
-
|
|
5
|
+
urlIsOrIsInsideOf,
|
|
6
6
|
urlToFileSystemPath,
|
|
7
7
|
urlToRelativeUrl,
|
|
8
8
|
} from "@jsenv/urls";
|
|
@@ -114,7 +114,7 @@ export const copyEntry = async ({
|
|
|
114
114
|
let symbolicLinkCopyTarget;
|
|
115
115
|
if (symbolicLinkTargetUrl === fromUrl) {
|
|
116
116
|
symbolicLinkCopyTarget = linkIsRelative ? symbolicLinkTarget : toUrl;
|
|
117
|
-
} else if (
|
|
117
|
+
} else if (urlIsOrIsInsideOf(symbolicLinkTargetUrl, fromUrl)) {
|
|
118
118
|
// symbolic link targets something inside the directory we want to copy
|
|
119
119
|
// reflects it inside the copied directory structure
|
|
120
120
|
const linkCopyTargetRelative = urlToRelativeUrl(
|
|
@@ -2,7 +2,7 @@ import { Abort } from "@jsenv/abort";
|
|
|
2
2
|
import {
|
|
3
3
|
ensurePathnameTrailingSlash,
|
|
4
4
|
resolveUrl,
|
|
5
|
-
|
|
5
|
+
urlIsOrIsInsideOf,
|
|
6
6
|
urlToFileSystemPath,
|
|
7
7
|
urlToRelativeUrl,
|
|
8
8
|
} from "@jsenv/urls";
|
|
@@ -114,7 +114,7 @@ export const copyEntrySync = ({
|
|
|
114
114
|
let symbolicLinkCopyTarget;
|
|
115
115
|
if (symbolicLinkTargetUrl === fromUrl) {
|
|
116
116
|
symbolicLinkCopyTarget = linkIsRelative ? symbolicLinkTarget : toUrl;
|
|
117
|
-
} else if (
|
|
117
|
+
} else if (urlIsOrIsInsideOf(symbolicLinkTargetUrl, fromUrl)) {
|
|
118
118
|
// symbolic link targets something inside the directory we want to copy
|
|
119
119
|
// reflects it inside the copied directory structure
|
|
120
120
|
const linkCopyTargetRelative = urlToRelativeUrl(
|
|
@@ -33,7 +33,10 @@ export const comparePathnames = (leftPathame, rightPathname) => {
|
|
|
33
33
|
const rightPart = rightPartArray[i];
|
|
34
34
|
i++;
|
|
35
35
|
// local comparison comes first
|
|
36
|
-
const comparison = leftPart.localeCompare(rightPart
|
|
36
|
+
const comparison = leftPart.localeCompare(rightPart, undefined, {
|
|
37
|
+
numeric: true,
|
|
38
|
+
sensitivity: "base",
|
|
39
|
+
});
|
|
37
40
|
if (comparison !== 0) {
|
|
38
41
|
return comparison;
|
|
39
42
|
}
|