@jsenv/snapshot 2.9.6 → 2.9.7
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/snapshot",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"description": "Snapshot testing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@jsenv/ast": "6.2.16",
|
|
38
38
|
"@jsenv/exception": "1.1.1",
|
|
39
39
|
"@jsenv/humanize": "1.2.8",
|
|
40
|
-
"@jsenv/filesystem": "4.10.
|
|
40
|
+
"@jsenv/filesystem": "4.10.1",
|
|
41
41
|
"@jsenv/terminal-recorder": "1.4.4",
|
|
42
42
|
"@jsenv/urls": "2.5.2",
|
|
43
43
|
"@jsenv/utils": "2.1.2",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
setUrlBasename,
|
|
3
|
+
startsWithWindowsDriveLetter,
|
|
4
|
+
urlIsInsideOf,
|
|
5
|
+
urlToRelativeUrl,
|
|
6
|
+
} from "@jsenv/urls";
|
|
2
7
|
import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
|
|
3
8
|
import { pathToFileURL } from "node:url";
|
|
4
9
|
import { createWellKnown } from "../../filesystem_well_known_values.js";
|
|
@@ -124,7 +129,15 @@ export const filesystemSideEffects = (
|
|
|
124
129
|
// collapse them if they have a shared ancestor
|
|
125
130
|
groupFileSideEffectsPerDirectory(sideEffects, {
|
|
126
131
|
createWriteFileGroupSideEffect: (fileSideEffectArray, commonPath) => {
|
|
127
|
-
let commonUrl
|
|
132
|
+
let commonUrl;
|
|
133
|
+
if (
|
|
134
|
+
process.platform === "win32" &&
|
|
135
|
+
startsWithWindowsDriveLetter(commonPath.slice(1))
|
|
136
|
+
) {
|
|
137
|
+
commonUrl = pathToFileURL(commonPath.slice("/C:".length));
|
|
138
|
+
} else {
|
|
139
|
+
commonUrl = pathToFileURL(commonPath);
|
|
140
|
+
}
|
|
128
141
|
let commonDirectoryUrl;
|
|
129
142
|
if (commonUrl.href.endsWith("/")) {
|
|
130
143
|
commonDirectoryUrl = commonUrl;
|