@jsenv/core 30.0.2 → 30.0.4

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.
@@ -47,11 +47,12 @@ const resolveAssociations = (associations, baseUrl) => {
47
47
  return associationsResolved;
48
48
  };
49
49
  const normalizeUrlPattern = (urlPattern, baseUrl) => {
50
- // starts with a scheme
51
- if (/^[a-zA-Z]{2,}:/.test(urlPattern)) {
50
+ try {
51
+ return String(new URL(urlPattern, baseUrl));
52
+ } catch (e) {
53
+ // it's not really an url, no need to perform url resolution nor encoding
52
54
  return urlPattern;
53
55
  }
54
- return String(new URL(urlPattern, baseUrl));
55
56
  };
56
57
 
57
58
  const asFlatAssociations = associations => {
package/dist/main.js CHANGED
@@ -1370,7 +1370,7 @@ const collectFiles = async ({
1370
1370
  associations,
1371
1371
  predicate
1372
1372
  }) => {
1373
- const rootDirectoryUrl = decodeURIComponent(assertAndNormalizeDirectoryUrl(directoryUrl));
1373
+ const rootDirectoryUrl = assertAndNormalizeDirectoryUrl(directoryUrl);
1374
1374
  if (typeof predicate !== "function") {
1375
1375
  throw new TypeError(`predicate must be a function, got ${predicate}`);
1376
1376
  }
@@ -1394,7 +1394,7 @@ const collectFiles = async ({
1394
1394
  followLink: false
1395
1395
  });
1396
1396
  if (directoryChildNodeStats.isDirectory()) {
1397
- const subDirectoryUrl = `${decodeURIComponent(directoryChildNodeUrl)}/`;
1397
+ const subDirectoryUrl = `${directoryChildNodeUrl}/`;
1398
1398
  if (!URL_META.urlChildMayMatch({
1399
1399
  url: subDirectoryUrl,
1400
1400
  associations,
@@ -1407,7 +1407,7 @@ const collectFiles = async ({
1407
1407
  }
1408
1408
  if (directoryChildNodeStats.isFile()) {
1409
1409
  const meta = URL_META.applyAssociations({
1410
- url: decodeURIComponent(directoryChildNodeUrl),
1410
+ url: directoryChildNodeUrl,
1411
1411
  associations
1412
1412
  });
1413
1413
  if (!predicate(meta)) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "30.0.2",
3
+ "version": "30.0.4",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -69,16 +69,16 @@
69
69
  "@jsenv/abort": "4.2.4",
70
70
  "@jsenv/ast": "1.4.8",
71
71
  "@jsenv/babel-plugins": "1.1.0",
72
- "@jsenv/plugin-bundling": "1.0.0",
73
- "@jsenv/filesystem": "4.1.7",
72
+ "@jsenv/plugin-bundling": "1.0.2",
73
+ "@jsenv/filesystem": "4.1.9",
74
74
  "@jsenv/importmap": "1.2.1",
75
75
  "@jsenv/integrity": "0.0.1",
76
76
  "@jsenv/log": "3.3.2",
77
77
  "@jsenv/node-esm-resolution": "1.0.1",
78
- "@jsenv/server": "14.1.11",
78
+ "@jsenv/server": "14.1.13",
79
79
  "@jsenv/sourcemap": "1.0.8",
80
80
  "@jsenv/uneval": "1.6.0",
81
- "@jsenv/url-meta": "7.0.0",
81
+ "@jsenv/url-meta": "7.0.2",
82
82
  "@jsenv/urls": "1.2.8",
83
83
  "@jsenv/utils": "2.0.1",
84
84
  "construct-style-sheets-polyfill": "3.1.0",