@jsenv/core 39.3.11 → 39.3.12

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.
@@ -1465,7 +1465,7 @@ const isValidUrl$1 = (url) => {
1465
1465
  // eslint-disable-next-line no-new
1466
1466
  new URL(url);
1467
1467
  return true;
1468
- } catch (e) {
1468
+ } catch {
1469
1469
  return false;
1470
1470
  }
1471
1471
  };
@@ -1826,7 +1826,7 @@ const validateDirectoryUrl = (value) => {
1826
1826
  } else {
1827
1827
  try {
1828
1828
  urlString = String(new URL(value));
1829
- } catch (e) {
1829
+ } catch {
1830
1830
  return {
1831
1831
  valid: false,
1832
1832
  value,
@@ -1834,6 +1834,12 @@ const validateDirectoryUrl = (value) => {
1834
1834
  };
1835
1835
  }
1836
1836
  }
1837
+ } else if (
1838
+ value &&
1839
+ typeof value === "object" &&
1840
+ typeof value.href === "string"
1841
+ ) {
1842
+ value = value.href;
1837
1843
  } else {
1838
1844
  return {
1839
1845
  valid: false,
@@ -1876,7 +1882,7 @@ const validateFileUrl = (value, baseUrl) => {
1876
1882
  } else {
1877
1883
  try {
1878
1884
  urlString = String(new URL(value, baseUrl));
1879
- } catch (e) {
1885
+ } catch {
1880
1886
  return {
1881
1887
  valid: false,
1882
1888
  value,
@@ -1987,7 +1993,7 @@ const baseUrlFallback = fileSystemPathToUrl$1(process.cwd());
1987
1993
  const ensureWindowsDriveLetter = (url, baseUrl) => {
1988
1994
  try {
1989
1995
  url = String(new URL(url));
1990
- } catch (e) {
1996
+ } catch {
1991
1997
  throw new Error(`absolute url expect but got ${url}`);
1992
1998
  }
1993
1999
 
@@ -1997,7 +2003,7 @@ const ensureWindowsDriveLetter = (url, baseUrl) => {
1997
2003
 
1998
2004
  try {
1999
2005
  baseUrl = String(new URL(baseUrl));
2000
- } catch (e) {
2006
+ } catch {
2001
2007
  throw new Error(
2002
2008
  `absolute baseUrl expect but got ${baseUrl} to ensure windows drive letter on ${url}`,
2003
2009
  );
@@ -2847,7 +2853,7 @@ const resolveAssociations = (associations, baseUrl) => {
2847
2853
  let patternResolved;
2848
2854
  try {
2849
2855
  patternResolved = String(new URL(pattern, baseUrl));
2850
- } catch (e) {
2856
+ } catch {
2851
2857
  // it's not really an url, no need to perform url resolution nor encoding
2852
2858
  patternResolved = pattern;
2853
2859
  }
@@ -7826,7 +7832,7 @@ const getMtimeResponse = async ({ headers, sourceStat }) => {
7826
7832
  let cachedModificationDate;
7827
7833
  try {
7828
7834
  cachedModificationDate = new Date(headers["if-modified-since"]);
7829
- } catch (e) {
7835
+ } catch {
7830
7836
  return {
7831
7837
  status: 400,
7832
7838
  statusText: "if-modified-since header is not a valid date",
@@ -7928,7 +7934,7 @@ const asUrlString = (value) => {
7928
7934
  try {
7929
7935
  const urlObject = new URL(value);
7930
7936
  return String(urlObject);
7931
- } catch (e) {
7937
+ } catch {
7932
7938
  return null;
7933
7939
  }
7934
7940
  }
@@ -9606,7 +9612,6 @@ const babelPluginBabelHelpersAsJsenvImports = (
9606
9612
  };
9607
9613
  };
9608
9614
 
9609
- /* eslint-disable camelcase */
9610
9615
  // copied from
9611
9616
  // https://github.com/babel/babel/blob/e498bee10f0123bb208baa228ce6417542a2c3c4/packages/babel-compat-data/data/plugins.json#L1
9612
9617
  // https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json#L1
@@ -17227,7 +17232,7 @@ const isValidUrl = (url) => {
17227
17232
  // eslint-disable-next-line no-new
17228
17233
  new URL(url);
17229
17234
  return true;
17230
- } catch (e) {
17235
+ } catch {
17231
17236
  return false;
17232
17237
  }
17233
17238
  };
@@ -17275,7 +17280,7 @@ const defaultReadPackageJson = (packageUrl) => {
17275
17280
  const string = String(buffer);
17276
17281
  try {
17277
17282
  return JSON.parse(string);
17278
- } catch (e) {
17283
+ } catch {
17279
17284
  throw new Error(`Invalid package configuration`);
17280
17285
  }
17281
17286
  };
@@ -17523,7 +17528,7 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
17523
17528
  type: "absolute_specifier",
17524
17529
  url: urlObject.href,
17525
17530
  };
17526
- } catch (e) {
17531
+ } catch {
17527
17532
  // bare specifier
17528
17533
  const browserFieldResolution = applyBrowserFieldResolution(
17529
17534
  specifier,
@@ -20513,7 +20518,6 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
20513
20518
  extension = extensionMappings[extension] || extension;
20514
20519
  let nameCandidate = `${basename}${extension}`; // reconstruct name in case extension was normalized
20515
20520
  let integer = 1;
20516
- // eslint-disable-next-line no-constant-condition
20517
20521
  while (true) {
20518
20522
  if (!names.includes(nameCandidate)) {
20519
20523
  names.push(nameCandidate);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.3.11",
3
+ "version": "39.3.12",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -43,7 +43,7 @@
43
43
  "./packages/related/cli/*"
44
44
  ],
45
45
  "scripts": {
46
- "eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",
46
+ "eslint": "npx eslint .",
47
47
  "test": "node --conditions=development ./scripts/test/test.mjs",
48
48
  "build": "node --conditions=development ./scripts/build/build.mjs",
49
49
  "workspace:test": "npm run test --workspaces --if-present -- --workspace",
@@ -69,18 +69,18 @@
69
69
  "@financial-times/polyfill-useragent-normaliser": "1.10.2",
70
70
  "@jsenv/abort": "4.3.0",
71
71
  "@jsenv/ast": "6.2.16",
72
- "@jsenv/filesystem": "4.10.1",
72
+ "@jsenv/filesystem": "4.10.2",
73
73
  "@jsenv/humanize": "1.2.8",
74
74
  "@jsenv/importmap": "1.2.1",
75
75
  "@jsenv/integrity": "0.0.2",
76
76
  "@jsenv/js-module-fallback": "1.3.37",
77
- "@jsenv/node-esm-resolution": "1.0.5",
77
+ "@jsenv/node-esm-resolution": "1.0.6",
78
78
  "@jsenv/plugin-bundling": "2.7.7",
79
79
  "@jsenv/plugin-minification": "1.5.5",
80
80
  "@jsenv/plugin-supervisor": "1.5.18",
81
81
  "@jsenv/plugin-transpilation": "1.4.21",
82
82
  "@jsenv/runtime-compat": "1.3.1",
83
- "@jsenv/server": "15.2.19",
83
+ "@jsenv/server": "15.3.0",
84
84
  "@jsenv/sourcemap": "1.2.23",
85
85
  "@jsenv/url-meta": "8.5.1",
86
86
  "@jsenv/urls": "2.5.2",
@@ -91,6 +91,7 @@
91
91
  "@babel/eslint-parser": "7.25.1",
92
92
  "@babel/plugin-syntax-import-attributes": "7.24.7",
93
93
  "@babel/plugin-syntax-optional-chaining-assign": "7.24.7",
94
+ "@eslint/compat": "1.1.1",
94
95
  "@jsenv/assert": "./packages/independent/assert/",
95
96
  "@jsenv/cli": "./packages/related/cli/",
96
97
  "@jsenv/core": "./",
@@ -102,18 +103,14 @@
102
103
  "@jsenv/plugin-as-js-classic": "./packages/related/plugin-as-js-classic/",
103
104
  "@jsenv/snapshot": "./packages/independent/snapshot/",
104
105
  "@jsenv/test": "./packages/related/test/",
105
- "@playwright/browser-chromium": "1.45.3",
106
- "@playwright/browser-firefox": "1.45.3",
107
- "@playwright/browser-webkit": "1.45.3",
106
+ "@playwright/browser-chromium": "1.46.0",
107
+ "@playwright/browser-firefox": "1.46.0",
108
+ "@playwright/browser-webkit": "1.46.0",
108
109
  "babel-plugin-transform-async-to-promises": "0.8.18",
109
- "eslint": "8.56.0",
110
- "eslint-plugin-html": "8.1.1",
111
- "eslint-plugin-import": "2.29.1",
112
- "eslint-plugin-react": "7.35.0",
113
- "eslint-plugin-regexp": "2.6.0",
114
- "marked": "13.0.3",
110
+ "eslint": "9.8.0",
111
+ "marked": "14.0.0",
115
112
  "open": "10.1.0",
116
- "playwright": "1.45.3",
113
+ "playwright": "1.46.0",
117
114
  "prettier": "3.3.3",
118
115
  "prettier-plugin-organize-imports": "4.0.0",
119
116
  "strip-ansi": "7.1.0"
@@ -69,7 +69,6 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
69
69
  extension = extensionMappings[extension] || extension;
70
70
  let nameCandidate = `${basename}${extension}`; // reconstruct name in case extension was normalized
71
71
  let integer = 1;
72
- // eslint-disable-next-line no-constant-condition
73
72
  while (true) {
74
73
  if (!names.includes(nameCandidate)) {
75
74
  names.push(nameCandidate);
@@ -9,7 +9,6 @@ import {
9
9
  urlIsInsideOf,
10
10
  } from "@jsenv/urls";
11
11
  import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
12
-
13
12
  import { jsenvPluginHtmlSyntaxErrorFallback } from "../plugins/html_syntax_error_fallback/jsenv_plugin_html_syntax_error_fallback.js";
14
13
  import { createPluginController } from "../plugins/plugin_controller.js";
15
14
  import {