@jsenv/core 39.9.5 → 39.9.6
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/dist/jsenv_core.js
CHANGED
|
@@ -14503,11 +14503,15 @@ const createUrlInfoTransformer = ({
|
|
|
14503
14503
|
if (!generatedUrl.startsWith("file:")) {
|
|
14504
14504
|
return;
|
|
14505
14505
|
}
|
|
14506
|
-
if (
|
|
14507
|
-
|
|
14508
|
-
//
|
|
14509
|
-
|
|
14510
|
-
|
|
14506
|
+
if (urlToPathname$1(generatedUrl).endsWith("/")) {
|
|
14507
|
+
// when users explicitely request a directory
|
|
14508
|
+
// we can't write the content returned by the server in ".jsenv" at that url
|
|
14509
|
+
// because it would try to write a directory
|
|
14510
|
+
// ideally we would decide a filename for this
|
|
14511
|
+
// for now we just don't write anything
|
|
14512
|
+
return;
|
|
14513
|
+
}
|
|
14514
|
+
if (urlInfo.type === "directory") {
|
|
14511
14515
|
// no need to write the directory
|
|
14512
14516
|
return;
|
|
14513
14517
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
generateSourcemapDataUrl,
|
|
5
5
|
SOURCEMAP,
|
|
6
6
|
} from "@jsenv/sourcemap";
|
|
7
|
-
import { isFileSystemPath, urlToRelativeUrl } from "@jsenv/urls";
|
|
7
|
+
import { isFileSystemPath, urlToPathname, urlToRelativeUrl } from "@jsenv/urls";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
9
|
import {
|
|
10
10
|
defineGettersOnPropertiesDerivedFromContent,
|
|
@@ -251,11 +251,15 @@ export const createUrlInfoTransformer = ({
|
|
|
251
251
|
if (!generatedUrl.startsWith("file:")) {
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
|
|
254
|
+
if (urlToPathname(generatedUrl).endsWith("/")) {
|
|
255
|
+
// when users explicitely request a directory
|
|
256
|
+
// we can't write the content returned by the server in ".jsenv" at that url
|
|
257
|
+
// because it would try to write a directory
|
|
258
|
+
// ideally we would decide a filename for this
|
|
259
|
+
// for now we just don't write anything
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
if (urlInfo.type === "directory") {
|
|
259
263
|
// no need to write the directory
|
|
260
264
|
return;
|
|
261
265
|
}
|