@jsenv/core 39.2.7 → 39.2.9
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 +16 -8
- package/package.json +12 -12
package/dist/jsenv_core.js
CHANGED
|
@@ -1561,11 +1561,12 @@ const setUrlFilename = (url, filename) => {
|
|
|
1561
1561
|
return `${origin}${parentPathname}${filename}${search}${hash}`;
|
|
1562
1562
|
};
|
|
1563
1563
|
|
|
1564
|
-
const
|
|
1564
|
+
const transformUrlPathname = (url, transformer) => {
|
|
1565
1565
|
if (typeof url === "string") {
|
|
1566
1566
|
const urlObject = new URL(url);
|
|
1567
1567
|
const { pathname } = urlObject;
|
|
1568
|
-
|
|
1568
|
+
const pathnameTransformed = transformer(pathname);
|
|
1569
|
+
if (pathnameTransformed === pathname) {
|
|
1569
1570
|
return url;
|
|
1570
1571
|
}
|
|
1571
1572
|
let { origin } = urlObject;
|
|
@@ -1574,15 +1575,18 @@ const ensurePathnameTrailingSlash = (url) => {
|
|
|
1574
1575
|
origin = "file://";
|
|
1575
1576
|
}
|
|
1576
1577
|
const { search, hash } = urlObject;
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1579
|
-
}
|
|
1580
|
-
if (url.pathname.endsWith("/")) {
|
|
1581
|
-
return url;
|
|
1578
|
+
const urlWithPathnameTransformed = `${origin}${pathnameTransformed}${search}${hash}`;
|
|
1579
|
+
return urlWithPathnameTransformed;
|
|
1582
1580
|
}
|
|
1583
|
-
url.pathname
|
|
1581
|
+
const pathnameTransformed = transformer(url.pathname);
|
|
1582
|
+
url.pathname = pathnameTransformed;
|
|
1584
1583
|
return url;
|
|
1585
1584
|
};
|
|
1585
|
+
const ensurePathnameTrailingSlash = (url) => {
|
|
1586
|
+
return transformUrlPathname(url, (pathname) => {
|
|
1587
|
+
return pathname.endsWith("/") ? pathname : `${pathname}/`;
|
|
1588
|
+
});
|
|
1589
|
+
};
|
|
1586
1590
|
|
|
1587
1591
|
const isFileSystemPath$1 = (value) => {
|
|
1588
1592
|
if (typeof value !== "string") {
|
|
@@ -3616,6 +3620,10 @@ const mediaTypeInfos = {
|
|
|
3616
3620
|
extensions: ["js", "cjs", "mjs", "ts", "jsx", "tsx"],
|
|
3617
3621
|
isTextual: true,
|
|
3618
3622
|
},
|
|
3623
|
+
"text/markdown": {
|
|
3624
|
+
extensions: ["md", "mdx"],
|
|
3625
|
+
isTextual: true,
|
|
3626
|
+
},
|
|
3619
3627
|
"text/x-sass": {
|
|
3620
3628
|
extensions: ["sass"],
|
|
3621
3629
|
isTextual: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "39.2.
|
|
3
|
+
"version": "39.2.9",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -66,23 +66,23 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
68
68
|
"@jsenv/abort": "4.3.0",
|
|
69
|
-
"@jsenv/ast": "6.2.
|
|
70
|
-
"@jsenv/filesystem": "4.9.
|
|
69
|
+
"@jsenv/ast": "6.2.7",
|
|
70
|
+
"@jsenv/filesystem": "4.9.4",
|
|
71
71
|
"@jsenv/humanize": "1.2.5",
|
|
72
72
|
"@jsenv/importmap": "1.2.1",
|
|
73
73
|
"@jsenv/integrity": "0.0.2",
|
|
74
|
-
"@jsenv/js-module-fallback": "1.3.
|
|
74
|
+
"@jsenv/js-module-fallback": "1.3.28",
|
|
75
75
|
"@jsenv/node-esm-resolution": "1.0.2",
|
|
76
|
-
"@jsenv/plugin-bundling": "2.7.
|
|
76
|
+
"@jsenv/plugin-bundling": "2.7.1",
|
|
77
77
|
"@jsenv/plugin-minification": "1.5.5",
|
|
78
|
-
"@jsenv/plugin-supervisor": "1.5.
|
|
79
|
-
"@jsenv/plugin-transpilation": "1.4.
|
|
80
|
-
"@jsenv/runtime-compat": "1.3.
|
|
81
|
-
"@jsenv/server": "15.2.
|
|
82
|
-
"@jsenv/sourcemap": "1.2.
|
|
78
|
+
"@jsenv/plugin-supervisor": "1.5.8",
|
|
79
|
+
"@jsenv/plugin-transpilation": "1.4.12",
|
|
80
|
+
"@jsenv/runtime-compat": "1.3.1",
|
|
81
|
+
"@jsenv/server": "15.2.15",
|
|
82
|
+
"@jsenv/sourcemap": "1.2.18",
|
|
83
83
|
"@jsenv/url-meta": "8.4.2",
|
|
84
|
-
"@jsenv/urls": "2.
|
|
85
|
-
"@jsenv/utils": "2.1.
|
|
84
|
+
"@jsenv/urls": "2.4.0",
|
|
85
|
+
"@jsenv/utils": "2.1.2"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@babel/eslint-parser": "7.24.8",
|