@jsenv/core 39.5.25 → 39.5.26

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.
Files changed (2) hide show
  1. package/dist/jsenv_core.js +13 -7
  2. package/package.json +16 -16
@@ -1809,14 +1809,20 @@ const urlIsInsideOf = (url, otherUrl) => {
1809
1809
 
1810
1810
  const urlToFileSystemPath = (url) => {
1811
1811
  const urlObject = new URL(url);
1812
- let urlString;
1813
- if (urlObject.hash) {
1814
- const origin =
1815
- urlObject.protocol === "file:" ? "file://" : urlObject.origin;
1816
- urlString = `${origin}${urlObject.pathname}${urlObject.search}%23${urlObject.hash.slice(1)}`;
1817
- } else {
1818
- urlString = urlObject.href;
1812
+ let { origin, pathname, hash } = urlObject;
1813
+ if (urlObject.protocol === "file:") {
1814
+ origin = "file://";
1815
+ }
1816
+ pathname = pathname
1817
+ .split("/")
1818
+ .map((part) => {
1819
+ return part.replace(/%(?![0-9A-F][0-9A-F])/g, "%25");
1820
+ })
1821
+ .join("/");
1822
+ if (hash) {
1823
+ pathname += `%23${encodeURIComponent(hash.slice(1))}`;
1819
1824
  }
1825
+ const urlString = `${origin}${pathname}`;
1820
1826
  const fileSystemPath = fileURLToPath(urlString);
1821
1827
  if (fileSystemPath[fileSystemPath.length - 1] === "/") {
1822
1828
  // remove trailing / so that nodejs path becomes predictable otherwise it logs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.5.25",
3
+ "version": "39.5.26",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -69,29 +69,29 @@
69
69
  "dependencies": {
70
70
  "@financial-times/polyfill-useragent-normaliser": "1.10.2",
71
71
  "@jsenv/abort": "4.3.0",
72
- "@jsenv/ast": "6.3.6",
73
- "@jsenv/filesystem": "4.10.12",
72
+ "@jsenv/ast": "6.3.7",
73
+ "@jsenv/filesystem": "4.10.13",
74
74
  "@jsenv/humanize": "1.2.8",
75
75
  "@jsenv/importmap": "1.2.1",
76
76
  "@jsenv/integrity": "0.0.2",
77
- "@jsenv/js-module-fallback": "1.3.50",
77
+ "@jsenv/js-module-fallback": "1.3.51",
78
78
  "@jsenv/node-esm-resolution": "1.0.6",
79
- "@jsenv/plugin-bundling": "2.7.17",
80
- "@jsenv/plugin-minification": "1.5.10",
81
- "@jsenv/plugin-supervisor": "1.5.29",
82
- "@jsenv/plugin-transpilation": "1.4.85",
79
+ "@jsenv/plugin-bundling": "2.7.19",
80
+ "@jsenv/plugin-minification": "1.5.11",
81
+ "@jsenv/plugin-supervisor": "1.5.30",
82
+ "@jsenv/plugin-transpilation": "1.4.86",
83
83
  "@jsenv/runtime-compat": "1.3.1",
84
84
  "@jsenv/server": "15.3.3",
85
- "@jsenv/sourcemap": "1.2.26",
85
+ "@jsenv/sourcemap": "1.2.27",
86
86
  "@jsenv/url-meta": "8.5.2",
87
- "@jsenv/urls": "2.5.3",
87
+ "@jsenv/urls": "2.5.4",
88
88
  "@jsenv/utils": "2.1.2",
89
89
  "string-width": "7.2.0"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@babel/plugin-syntax-import-attributes": "7.26.0",
93
93
  "@babel/plugin-syntax-optional-chaining-assign": "7.25.9",
94
- "@eslint/compat": "1.2.2",
94
+ "@eslint/compat": "1.2.3",
95
95
  "@jsenv/assert": "workspace:*",
96
96
  "@jsenv/cli": "workspace:*",
97
97
  "@jsenv/core": "./",
@@ -104,13 +104,13 @@
104
104
  "@jsenv/snapshot": "workspace:*",
105
105
  "@jsenv/md-up": "workspace:*",
106
106
  "@jsenv/test": "workspace:*",
107
- "@playwright/browser-chromium": "1.48.2",
108
- "@playwright/browser-firefox": "1.48.2",
109
- "@playwright/browser-webkit": "1.48.2",
107
+ "@playwright/browser-chromium": "1.49.0",
108
+ "@playwright/browser-firefox": "1.49.0",
109
+ "@playwright/browser-webkit": "1.49.0",
110
110
  "babel-plugin-transform-async-to-promises": "0.8.18",
111
- "eslint": "9.14.0",
111
+ "eslint": "9.15.0",
112
112
  "open": "10.1.0",
113
- "playwright": "1.48.2",
113
+ "playwright": "1.49.0",
114
114
  "prettier": "3.3.3",
115
115
  "prettier-plugin-organize-imports": "4.1.0",
116
116
  "strip-ansi": "7.1.0"