@jsenv/core 27.0.0-alpha.78 → 27.0.0-alpha.80

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.
@@ -29,7 +29,7 @@ html[data-last-interaction="keyboard"] [data-contains-hidden-input] input:focus
29
29
  }
30
30
 
31
31
  ::-moz-focus-inner {
32
- border: none;
32
+ border: 0;
33
33
  }
34
34
  </style>
35
35
  <style>* {
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { parentPort } from "node:worker_threads";
2
2
  import { registerFileLifecycle, readFileSync as readFileSync$1, bufferToEtag, writeFileSync, ensureWindowsDriveLetter, collectFiles, assertAndNormalizeDirectoryUrl, registerDirectoryLifecycle, writeFile, ensureEmptyDirectory, writeDirectory } from "@jsenv/filesystem";
3
3
  import { createDetailedMessage, createLogger, createTaskLog, loggerToLevels, ANSI, msAsDuration, msAsEllapsedTime, byteAsMemoryUsage, UNICODE, createLog, startSpinner, distributePercentages, byteAsFileSize } from "@jsenv/log";
4
- import { urlToRelativeUrl, generateInlineContentUrl, ensurePathnameTrailingSlash, urlIsInsideOf, urlToFilename, urlToExtension, DATA_URL, injectQueryParams, injectQueryParamsIntoSpecifier, fileSystemPathToUrl, urlToFileSystemPath, isFileSystemPath, normalizeUrl, stringifyUrlSite, setUrlFilename, moveUrl, getCallerPosition, resolveUrl, resolveDirectoryUrl, asUrlWithoutSearch, asUrlUntilPathname, urlToBasename } from "@jsenv/urls";
4
+ import { urlToRelativeUrl, generateInlineContentUrl, ensurePathnameTrailingSlash, urlIsInsideOf, urlToFilename, DATA_URL, injectQueryParams, injectQueryParamsIntoSpecifier, fileSystemPathToUrl, urlToFileSystemPath, isFileSystemPath, normalizeUrl, stringifyUrlSite, setUrlFilename, moveUrl, getCallerPosition, resolveUrl, resolveDirectoryUrl, asUrlWithoutSearch, asUrlUntilPathname, urlToBasename, urlToExtension } from "@jsenv/urls";
5
5
  import { initReloadableProcess } from "@jsenv/utils/process_reload/process_reload.js";
6
6
  import { URL_META } from "@jsenv/url-meta";
7
7
  import { parseHtmlString, stringifyHtmlAst, visitHtmlAst, getHtmlNodeAttributeByName, htmlNodePosition, findNode, getHtmlNodeTextNode, removeHtmlNode, setHtmlNodeGeneratedText, removeHtmlNodeAttributeByName, parseScriptNode, injectScriptAsEarlyAsPossible, createHtmlNode, removeHtmlNodeText, assignHtmlNodeAttributes, parseLinkNode } from "@jsenv/utils/html_ast/html_ast.js";
@@ -11,7 +11,7 @@ import { applyPostCss } from "@jsenv/utils/css_ast/apply_post_css.js";
11
11
  import { postCssPluginUrlVisitor } from "@jsenv/utils/css_ast/postcss_plugin_url_visitor.js";
12
12
  import { parseJsUrls } from "@jsenv/utils/js_ast/parse_js_urls.js";
13
13
  import { resolveImport, normalizeImportMap, composeTwoImportMaps } from "@jsenv/importmap";
14
- import { applyNodeEsmResolution, defaultLookupPackageScope, defaultReadPackageJson, readCustomConditionsFromProcessArgs, applyFileSystemMagicResolution } from "@jsenv/node-esm-resolution";
14
+ import { applyNodeEsmResolution, defaultLookupPackageScope, defaultReadPackageJson, readCustomConditionsFromProcessArgs, applyFileSystemMagicResolution, getExtensionsToTry } from "@jsenv/node-esm-resolution";
15
15
  import { statSync, realpathSync, readdirSync, readFileSync, existsSync } from "node:fs";
16
16
  import { pathToFileURL } from "node:url";
17
17
  import { CONTENT_TYPE } from "@jsenv/utils/content_type/content_type.js";
@@ -1066,19 +1066,6 @@ const jsenvPluginFileUrls = ({
1066
1066
  preservesSymlink = true,
1067
1067
  directoryReferenceAllowed = false
1068
1068
  }) => {
1069
- const getExtensionsToTry = (magicExtensions, importer) => {
1070
- const extensionsSet = new Set();
1071
- magicExtensions.forEach(magicExtension => {
1072
- if (magicExtension === "inherit") {
1073
- const importerExtension = urlToExtension(importer);
1074
- extensionsSet.add(importerExtension);
1075
- } else {
1076
- extensionsSet.add(magicExtension);
1077
- }
1078
- });
1079
- return Array.from(extensionsSet.values());
1080
- };
1081
-
1082
1069
  return [{
1083
1070
  name: "jsenv:file_url_resolution",
1084
1071
  appliesDuring: "*",
@@ -2870,7 +2857,7 @@ const jsenvPluginAsJsClassicHtml = ({
2870
2857
  specifierLine: line - 1,
2871
2858
  specifierColumn: column,
2872
2859
  specifier: inlineScriptUrl,
2873
- contentType: "application/javascript",
2860
+ contentType: "text/javascript",
2874
2861
  content: textNode.value
2875
2862
  });
2876
2863
  const [, newUrlInfo] = await getReferenceAsJsClassic(inlineReference, {
@@ -8329,9 +8316,7 @@ const startDevServer = async ({
8329
8316
  devServerAutoreload = typeof process.send !== "function" && !parentPort && !process.env.VSCODE_INSPECTOR_OPTIONS,
8330
8317
  clientFiles = {
8331
8318
  "./src/": true,
8332
- "./src/**/.*/": false,
8333
- // any folder starting with a dot is ignored (includes .git,.jsenv for instance)
8334
- "./src/**/node_modules/": false
8319
+ "./test/": true
8335
8320
  },
8336
8321
  cooldownBetweenFileEvents,
8337
8322
  clientAutoreload = true,
@@ -8348,7 +8333,7 @@ const startDevServer = async ({
8348
8333
  },
8349
8334
  plugins = [],
8350
8335
  urlAnalysis = {},
8351
- htmlSupervisor = false,
8336
+ htmlSupervisor = true,
8352
8337
  nodeEsmResolution,
8353
8338
  fileSystemMagicResolution,
8354
8339
  transpilation,
@@ -11832,10 +11817,7 @@ const build = async ({
11832
11817
  // "filename", "search_param"
11833
11818
  lineBreakNormalization = process.platform === "win32",
11834
11819
  clientFiles = {
11835
- "./src/": true,
11836
- "./src/**/.*/": false,
11837
- // any folder starting with a dot is ignored (includes .git,.jsenv for instance)
11838
- "./src/**/node_modules/": false
11820
+ "./src/": true
11839
11821
  },
11840
11822
  cooldownBetweenFileEvents,
11841
11823
  watch = false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "27.0.0-alpha.78",
3
+ "version": "27.0.0-alpha.80",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -68,32 +68,29 @@
68
68
  "@financial-times/polyfill-useragent-normaliser": "2.0.1",
69
69
  "@jsenv/abort": "4.2.2",
70
70
  "@jsenv/babel-plugins": "1.0.3",
71
- "@jsenv/filesystem": "4.0.8",
71
+ "@jsenv/filesystem": "4.0.9",
72
72
  "@jsenv/importmap": "1.2.0",
73
73
  "@jsenv/integrity": "0.0.1",
74
74
  "@jsenv/log": "2.0.0",
75
- "@jsenv/node-esm-resolution": "0.0.10",
76
- "@jsenv/server": "12.6.3",
75
+ "@jsenv/node-esm-resolution": "0.1.0",
76
+ "@jsenv/server": "12.7.0",
77
77
  "@jsenv/uneval": "1.6.0",
78
- "@jsenv/utils": "1.8.11",
78
+ "@jsenv/utils": "1.9.0",
79
79
  "@jsenv/url-meta": "7.0.0",
80
- "@jsenv/urls": "1.2.4",
80
+ "@jsenv/urls": "1.2.5",
81
81
  "construct-style-sheets-polyfill": "3.1.0",
82
- "cssnano": "5.1.7",
83
- "cssnano-preset-default": "5.2.7",
84
82
  "cuid": "2.1.8",
85
83
  "es-iife": "0.2.2",
86
84
  "html-minifier": "4.0.0",
87
85
  "istanbul-lib-coverage": "3.2.0",
88
- "istanbul-lib-instrument": "5.1.0",
86
+ "istanbul-lib-instrument": "5.2.0",
89
87
  "istanbul-lib-report": "3.0.0",
90
88
  "istanbul-reports": "3.1.4",
91
89
  "pidtree": "0.5.0",
92
90
  "regenerator-runtime": "0.13.9",
93
91
  "strip-ansi": "7.0.1",
94
- "systemjs": "6.12.1",
95
- "terser": "5.12.1",
96
- "v8-to-istanbul": "8.1.1",
92
+ "terser": "5.14.1",
93
+ "v8-to-istanbul": "9.0.0",
97
94
  "wrap-ansi": "8.0.1"
98
95
  },
99
96
  "devDependencies": {
@@ -102,19 +99,18 @@
102
99
  "@jsenv/assert": "2.5.4",
103
100
  "@jsenv/eslint-config": "16.0.9",
104
101
  "@jsenv/file-size-impact": "12.1.13",
105
- "@jsenv/https-local": "1.0.11",
102
+ "@jsenv/https-local": "1.1.0",
106
103
  "@jsenv/importmap-node-module": "5.1.3",
107
104
  "@jsenv/package-workspace": "0.2.1",
108
105
  "@jsenv/performance-impact": "2.2.11",
109
106
  "@jsenv/pwa": "5.0.0",
110
- "eslint": "8.13.0",
107
+ "eslint": "8.17.0",
111
108
  "eslint-plugin-html": "6.2.0",
112
109
  "eslint-plugin-import": "2.26.0",
113
- "eslint-plugin-react": "7.29.4",
114
- "playwright": "1.20.2",
110
+ "eslint-plugin-react": "7.30.0",
111
+ "playwright": "1.22.2",
115
112
  "postcss-import": "14.1.0",
116
- "prettier": "2.6.2",
117
- "redux": "4.1.2",
118
- "rollup": "2.70.1"
113
+ "prettier": "2.7.1",
114
+ "redux": "4.1.2"
119
115
  }
120
116
  }
@@ -116,8 +116,6 @@ export const build = async ({
116
116
 
117
117
  clientFiles = {
118
118
  "./src/": true,
119
- "./src/**/.*/": false, // any folder starting with a dot is ignored (includes .git,.jsenv for instance)
120
- "./src/**/node_modules/": false,
121
119
  },
122
120
  cooldownBetweenFileEvents,
123
121
  watch = false,
@@ -44,8 +44,7 @@ export const startDevServer = async ({
44
44
  !process.env.VSCODE_INSPECTOR_OPTIONS,
45
45
  clientFiles = {
46
46
  "./src/": true,
47
- "./src/**/.*/": false, // any folder starting with a dot is ignored (includes .git,.jsenv for instance)
48
- "./src/**/node_modules/": false,
47
+ "./test/": true,
49
48
  },
50
49
  cooldownBetweenFileEvents,
51
50
  clientAutoreload = true,
@@ -63,7 +62,7 @@ export const startDevServer = async ({
63
62
  },
64
63
  plugins = [],
65
64
  urlAnalysis = {},
66
- htmlSupervisor = false,
65
+ htmlSupervisor = true,
67
66
  nodeEsmResolution,
68
67
  fileSystemMagicResolution,
69
68
  transpilation,
@@ -3,12 +3,14 @@ import { pathToFileURL } from "node:url"
3
3
  import {
4
4
  urlIsInsideOf,
5
5
  urlToRelativeUrl,
6
- urlToExtension,
7
6
  urlToFilename,
8
7
  ensurePathnameTrailingSlash,
9
8
  } from "@jsenv/urls"
10
9
 
11
- import { applyFileSystemMagicResolution } from "@jsenv/node-esm-resolution"
10
+ import {
11
+ applyFileSystemMagicResolution,
12
+ getExtensionsToTry,
13
+ } from "@jsenv/node-esm-resolution"
12
14
  import { CONTENT_TYPE } from "@jsenv/utils/content_type/content_type.js"
13
15
 
14
16
  export const jsenvPluginFileUrls = ({
@@ -17,19 +19,6 @@ export const jsenvPluginFileUrls = ({
17
19
  preservesSymlink = true,
18
20
  directoryReferenceAllowed = false,
19
21
  }) => {
20
- const getExtensionsToTry = (magicExtensions, importer) => {
21
- const extensionsSet = new Set()
22
- magicExtensions.forEach((magicExtension) => {
23
- if (magicExtension === "inherit") {
24
- const importerExtension = urlToExtension(importer)
25
- extensionsSet.add(importerExtension)
26
- } else {
27
- extensionsSet.add(magicExtension)
28
- }
29
- })
30
- return Array.from(extensionsSet.values())
31
- }
32
-
33
22
  return [
34
23
  {
35
24
  name: "jsenv:file_url_resolution",
@@ -190,7 +190,7 @@ export const jsenvPluginAsJsClassicHtml = ({
190
190
  specifierLine: line - 1,
191
191
  specifierColumn: column,
192
192
  specifier: inlineScriptUrl,
193
- contentType: "application/javascript",
193
+ contentType: "text/javascript",
194
194
  content: textNode.value,
195
195
  })
196
196
  const [, newUrlInfo] = await getReferenceAsJsClassic(