@jsenv/core 39.2.2 → 39.2.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.
Files changed (36) hide show
  1. package/dist/jsenv_core.js +14088 -14085
  2. package/package.json +14 -12
  3. package/src/build/build.js +4 -4
  4. package/src/build/build_specifier_manager.js +15 -15
  5. package/src/build/build_urls_generator.js +1 -1
  6. package/src/build/start_build_server.js +6 -6
  7. package/src/build/version_mappings_injection.js +2 -2
  8. package/src/dev/start_dev_server.js +9 -9
  9. package/src/helpers/command/command.js +1 -1
  10. package/src/helpers/web_url_converter.js +1 -1
  11. package/src/kitchen/errors.js +1 -1
  12. package/src/kitchen/kitchen.js +11 -11
  13. package/src/kitchen/prepend_content.js +4 -4
  14. package/src/kitchen/url_graph/references.js +3 -3
  15. package/src/kitchen/url_graph/url_graph.js +2 -2
  16. package/src/kitchen/url_graph/url_graph_report.js +1 -1
  17. package/src/kitchen/url_graph/url_info_transformations.js +5 -5
  18. package/src/plugins/autoreload/jsenv_plugin_autoreload.js +1 -1
  19. package/src/plugins/autoreload/jsenv_plugin_autoreload_client.js +1 -1
  20. package/src/plugins/commonjs_globals/jsenv_plugin_commonjs_globals.js +1 -1
  21. package/src/plugins/global_scenarios/jsenv_plugin_global_scenarios.js +1 -1
  22. package/src/plugins/html_syntax_error_fallback/jsenv_plugin_html_syntax_error_fallback.js +2 -2
  23. package/src/plugins/import_meta_hot/html_hot_dependencies.js +1 -1
  24. package/src/plugins/import_meta_hot/jsenv_plugin_import_meta_hot.js +2 -2
  25. package/src/plugins/import_meta_scenarios/jsenv_plugin_import_meta_scenarios.js +1 -1
  26. package/src/plugins/injections/internal/inject_globals.js +1 -1
  27. package/src/plugins/injections/jsenv_plugin_injections.js +1 -1
  28. package/src/plugins/inlining/jsenv_plugin_inlining_into_html.js +6 -6
  29. package/src/plugins/plugins.js +2 -0
  30. package/src/plugins/protocol_file/jsenv_plugin_protocol_file.js +17 -17
  31. package/src/plugins/reference_analysis/html/jsenv_plugin_html_reference_analysis.js +11 -11
  32. package/src/plugins/reference_analysis/js/jsenv_plugin_js_reference_analysis.js +1 -1
  33. package/src/plugins/reference_analysis/jsenv_plugin_reference_analysis.js +4 -4
  34. package/src/plugins/resolution_node_esm/node_esm_resolver.js +2 -2
  35. package/src/plugins/ribbon/jsenv_plugin_ribbon.js +1 -1
  36. package/src/plugins/server_events/jsenv_plugin_server_events_client_injection.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.2.2",
3
+ "version": "39.2.4",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -66,22 +66,22 @@
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.4",
70
- "@jsenv/filesystem": "4.8.1",
71
- "@jsenv/humanize": "1.2.4",
69
+ "@jsenv/ast": "6.2.5",
70
+ "@jsenv/filesystem": "4.9.0",
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.25",
74
+ "@jsenv/js-module-fallback": "1.3.26",
75
75
  "@jsenv/node-esm-resolution": "1.0.2",
76
- "@jsenv/plugin-bundling": "2.6.17",
76
+ "@jsenv/plugin-bundling": "2.6.18",
77
77
  "@jsenv/plugin-minification": "1.5.5",
78
- "@jsenv/plugin-supervisor": "1.5.5",
79
- "@jsenv/plugin-transpilation": "1.4.8",
78
+ "@jsenv/plugin-supervisor": "1.5.6",
79
+ "@jsenv/plugin-transpilation": "1.4.9",
80
80
  "@jsenv/runtime-compat": "1.3.0",
81
- "@jsenv/server": "15.2.13",
82
- "@jsenv/sourcemap": "1.2.15",
81
+ "@jsenv/server": "15.2.14",
82
+ "@jsenv/sourcemap": "1.2.16",
83
83
  "@jsenv/url-meta": "8.4.2",
84
- "@jsenv/urls": "2.3.0",
84
+ "@jsenv/urls": "2.3.1",
85
85
  "@jsenv/utils": "2.1.1"
86
86
  },
87
87
  "devDependencies": {
@@ -111,6 +111,8 @@
111
111
  "marked": "13.0.2",
112
112
  "open": "10.1.0",
113
113
  "playwright": "1.45.2",
114
- "prettier": "3.3.3"
114
+ "prettier": "3.3.3",
115
+ "prettier-plugin-organize-imports": "4.0.0",
116
+ "strip-ansi": "7.1.0"
115
117
  }
116
118
  }
@@ -16,26 +16,26 @@
16
16
  * - injecting urls into service workers
17
17
  */
18
18
 
19
+ import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
20
+ import { parseHtml, stringifyHtmlAst } from "@jsenv/ast";
19
21
  import {
20
22
  assertAndNormalizeDirectoryUrl,
21
23
  ensureEmptyDirectory,
22
24
  writeFileSync,
23
25
  } from "@jsenv/filesystem";
24
- import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
25
26
  import { createLogger, createTaskLog } from "@jsenv/humanize";
26
- import { parseHtml, stringifyHtmlAst } from "@jsenv/ast";
27
27
  import { jsenvPluginBundling } from "@jsenv/plugin-bundling";
28
28
  import { jsenvPluginMinification } from "@jsenv/plugin-minification";
29
29
  import { jsenvPluginJsModuleFallback } from "@jsenv/plugin-transpilation";
30
30
 
31
31
  import { lookupPackageDirectory } from "../helpers/lookup_package_directory.js";
32
32
  import { watchSourceFiles } from "../helpers/watch_source_files.js";
33
- import { GRAPH_VISITOR } from "../kitchen/url_graph/url_graph_visitor.js";
34
33
  import { createKitchen } from "../kitchen/kitchen.js";
35
34
  import { createUrlGraphSummary } from "../kitchen/url_graph/url_graph_report.js";
35
+ import { GRAPH_VISITOR } from "../kitchen/url_graph/url_graph_visitor.js";
36
+ import { jsenvPluginInlining } from "../plugins/inlining/jsenv_plugin_inlining.js";
36
37
  import { getCorePlugins } from "../plugins/plugins.js";
37
38
  import { jsenvPluginReferenceAnalysis } from "../plugins/reference_analysis/jsenv_plugin_reference_analysis.js";
38
- import { jsenvPluginInlining } from "../plugins/inlining/jsenv_plugin_inlining.js";
39
39
  import { jsenvPluginLineBreakNormalization } from "./jsenv_plugin_line_break_normalization.js";
40
40
 
41
41
  import { createBuildSpecifierManager } from "./build_specifier_manager.js";
@@ -1,30 +1,30 @@
1
- import { createHash } from "node:crypto";
2
- import { createDetailedMessage, UNICODE } from "@jsenv/humanize";
1
+ import {
2
+ createHtmlNode,
3
+ findHtmlNode,
4
+ getHtmlNodeAttribute,
5
+ insertHtmlNodeAfter,
6
+ parseHtml,
7
+ removeHtmlNode,
8
+ setHtmlNodeAttributes,
9
+ stringifyHtmlAst,
10
+ visitHtmlNodes,
11
+ } from "@jsenv/ast";
3
12
  import { comparePathnames } from "@jsenv/filesystem";
13
+ import { createDetailedMessage, UNICODE } from "@jsenv/humanize";
4
14
  import { createMagicSource, generateSourcemapFileUrl } from "@jsenv/sourcemap";
5
15
  import {
6
16
  ensurePathnameTrailingSlash,
7
- urlToRelativeUrl,
8
17
  injectQueryParamIntoSpecifierWithoutEncoding,
9
18
  renderUrlOrRelativeUrlFilename,
19
+ urlToRelativeUrl,
10
20
  } from "@jsenv/urls";
11
- import {
12
- parseHtml,
13
- stringifyHtmlAst,
14
- visitHtmlNodes,
15
- getHtmlNodeAttribute,
16
- setHtmlNodeAttributes,
17
- removeHtmlNode,
18
- createHtmlNode,
19
- insertHtmlNodeAfter,
20
- findHtmlNode,
21
- } from "@jsenv/ast";
22
21
  import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
22
+ import { createHash } from "node:crypto";
23
23
 
24
24
  import { escapeRegexpSpecialChars } from "@jsenv/utils/src/string/escape_regexp_special_chars.js";
25
+ import { prependContent } from "../kitchen/prepend_content.js";
25
26
  import { GRAPH_VISITOR } from "../kitchen/url_graph/url_graph_visitor.js";
26
27
  import { isWebWorkerUrlInfo } from "../kitchen/web_workers.js";
27
- import { prependContent } from "../kitchen/prepend_content.js";
28
28
  import { createBuildUrlsGenerator } from "./build_urls_generator.js";
29
29
  import {
30
30
  injectVersionMappingsAsGlobal,
@@ -1,5 +1,5 @@
1
- import { urlToFilename, urlToRelativeUrl } from "@jsenv/urls";
2
1
  import { ANSI } from "@jsenv/humanize";
2
+ import { urlToFilename, urlToRelativeUrl } from "@jsenv/urls";
3
3
 
4
4
  export const createBuildUrlsGenerator = ({
5
5
  logger,
@@ -13,17 +13,17 @@
13
13
  * we want to be in the user shoes and we should not alter build files.
14
14
  */
15
15
 
16
- import { existsSync } from "node:fs";
16
+ import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
17
+ import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem";
18
+ import { createLogger, createTaskLog } from "@jsenv/humanize";
17
19
  import {
18
- jsenvAccessControlAllowedHeaders,
19
- startServer,
20
20
  fetchFileSystem,
21
+ jsenvAccessControlAllowedHeaders,
21
22
  jsenvServiceCORS,
22
23
  jsenvServiceErrorHandler,
24
+ startServer,
23
25
  } from "@jsenv/server";
24
- import { assertAndNormalizeDirectoryUrl } from "@jsenv/filesystem";
25
- import { Abort, raceProcessTeardownEvents } from "@jsenv/abort";
26
- import { createLogger, createTaskLog } from "@jsenv/humanize";
26
+ import { existsSync } from "node:fs";
27
27
 
28
28
  /**
29
29
  * Start a server for build files.
@@ -1,9 +1,9 @@
1
1
  // https://bundlers.tooling.report/hashing/avoid-cascade/
2
2
 
3
3
  import {
4
- parseHtml,
5
- injectHtmlNodeAsEarlyAsPossible,
6
4
  createHtmlNode,
5
+ injectHtmlNodeAsEarlyAsPossible,
6
+ parseHtml,
7
7
  stringifyHtmlAst,
8
8
  } from "@jsenv/ast";
9
9
 
@@ -1,30 +1,30 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { URL_META } from "@jsenv/url-meta";
3
1
  import {
4
2
  assertAndNormalizeDirectoryUrl,
5
3
  bufferToEtag,
6
4
  } from "@jsenv/filesystem";
7
5
  import { createLogger, createTaskLog } from "@jsenv/humanize";
8
- import { urlToRelativeUrl } from "@jsenv/urls";
9
6
  import {
7
+ composeTwoResponses,
10
8
  jsenvAccessControlAllowedHeaders,
11
- startServer,
12
9
  jsenvServiceCORS,
13
10
  jsenvServiceErrorHandler,
14
11
  serveDirectory,
15
- composeTwoResponses,
12
+ startServer,
16
13
  } from "@jsenv/server";
17
14
  import { convertFileSystemErrorToResponseProperties } from "@jsenv/server/src/internal/convertFileSystemErrorToResponseProperties.js";
15
+ import { URL_META } from "@jsenv/url-meta";
16
+ import { urlToRelativeUrl } from "@jsenv/urls";
17
+ import { existsSync, readFileSync } from "node:fs";
18
18
 
19
- import { WEB_URL_CONVERTER } from "../helpers/web_url_converter.js";
20
- import { watchSourceFiles } from "../helpers/watch_source_files.js";
19
+ import { defaultRuntimeCompat } from "../build/build.js";
21
20
  import { createEventEmitter } from "../helpers/event_emitter.js";
22
21
  import { lookupPackageDirectory } from "../helpers/lookup_package_directory.js";
23
- import { createServerEventsDispatcher } from "../plugins/server_events/server_events_dispatcher.js";
24
- import { defaultRuntimeCompat } from "../build/build.js";
22
+ import { watchSourceFiles } from "../helpers/watch_source_files.js";
23
+ import { WEB_URL_CONVERTER } from "../helpers/web_url_converter.js";
25
24
  import { createKitchen } from "../kitchen/kitchen.js";
26
25
  import { getCorePlugins } from "../plugins/plugins.js";
27
26
  import { jsenvPluginServerEventsClientInjection } from "../plugins/server_events/jsenv_plugin_server_events_client_injection.js";
27
+ import { createServerEventsDispatcher } from "../plugins/server_events/server_events_dispatcher.js";
28
28
  import { parseUserAgentHeader } from "./user_agent.js";
29
29
 
30
30
  /**
@@ -1,5 +1,5 @@
1
- import { exec } from "node:child_process";
2
1
  import { createDetailedMessage, createLogger, UNICODE } from "@jsenv/humanize";
2
+ import { exec } from "node:child_process";
3
3
 
4
4
  export const executeCommand = (
5
5
  command,
@@ -1,5 +1,5 @@
1
1
  import { ensureWindowsDriveLetter } from "@jsenv/filesystem";
2
- import { urlIsInsideOf, moveUrl } from "@jsenv/urls";
2
+ import { moveUrl, urlIsInsideOf } from "@jsenv/urls";
3
3
 
4
4
  export const WEB_URL_CONVERTER = {
5
5
  asWebUrl: (fileUrl, webServer) => {
@@ -1,6 +1,6 @@
1
- import { pathToFileURL } from "node:url";
2
1
  import { createDetailedMessage, generateContentFrame } from "@jsenv/humanize";
3
2
  import { stringifyUrlSite } from "@jsenv/urls";
3
+ import { pathToFileURL } from "node:url";
4
4
 
5
5
  export const createResolveUrlError = ({
6
6
  pluginController,
@@ -1,27 +1,27 @@
1
+ import { ensureWindowsDriveLetter } from "@jsenv/filesystem";
2
+ import { ANSI, createDetailedMessage, createLogger } from "@jsenv/humanize";
3
+ import { RUNTIME_COMPAT } from "@jsenv/runtime-compat";
4
+ import { URL_META } from "@jsenv/url-meta";
1
5
  import {
2
- urlIsInsideOf,
3
6
  moveUrl,
4
7
  normalizeUrl,
5
8
  setUrlFilename,
9
+ urlIsInsideOf,
6
10
  } from "@jsenv/urls";
7
- import { URL_META } from "@jsenv/url-meta";
8
- import { ensureWindowsDriveLetter } from "@jsenv/filesystem";
9
- import { createLogger, createDetailedMessage, ANSI } from "@jsenv/humanize";
10
11
  import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
11
- import { RUNTIME_COMPAT } from "@jsenv/runtime-compat";
12
12
 
13
- import { createUrlGraph } from "./url_graph/url_graph.js";
14
- import { urlSpecifierEncoding } from "./url_graph/url_specifier_encoding.js";
15
- import { createPluginController } from "../plugins/plugin_controller.js";
16
13
  import { jsenvPluginHtmlSyntaxErrorFallback } from "../plugins/html_syntax_error_fallback/jsenv_plugin_html_syntax_error_fallback.js";
17
- import { createUrlInfoTransformer } from "./url_graph/url_info_transformations.js";
14
+ import { createPluginController } from "../plugins/plugin_controller.js";
18
15
  import {
19
- createResolveUrlError,
20
16
  createFetchUrlContentError,
21
- createTransformUrlContentError,
22
17
  createFinalizeUrlContentError,
18
+ createResolveUrlError,
19
+ createTransformUrlContentError,
23
20
  } from "./errors.js";
24
21
  import { assertFetchedContentCompliance } from "./fetched_content_compliance.js";
22
+ import { createUrlGraph } from "./url_graph/url_graph.js";
23
+ import { createUrlInfoTransformer } from "./url_graph/url_info_transformations.js";
24
+ import { urlSpecifierEncoding } from "./url_graph/url_specifier_encoding.js";
25
25
 
26
26
  const inlineContentClientFileUrl = new URL(
27
27
  "./client/inline_content.js",
@@ -1,11 +1,11 @@
1
- import { createMagicSource, composeTwoSourcemaps } from "@jsenv/sourcemap";
2
1
  import {
3
- parseHtml,
4
- stringifyHtmlAst,
2
+ applyBabelPlugins,
5
3
  createHtmlNode,
6
4
  injectHtmlNodeAsEarlyAsPossible,
7
- applyBabelPlugins,
5
+ parseHtml,
6
+ stringifyHtmlAst,
8
7
  } from "@jsenv/ast";
8
+ import { composeTwoSourcemaps, createMagicSource } from "@jsenv/sourcemap";
9
9
 
10
10
  export const prependContent = async (
11
11
  urlInfoReceivingCode,
@@ -1,14 +1,14 @@
1
+ import { generateUrlForInlineContent } from "@jsenv/ast";
2
+ import { generateContentFrame } from "@jsenv/humanize";
1
3
  import {
2
4
  getCallerPosition,
3
5
  stringifyUrlSite,
4
6
  urlToBasename,
5
7
  urlToExtension,
6
8
  } from "@jsenv/urls";
7
- import { generateUrlForInlineContent } from "@jsenv/ast";
8
- import { generateContentFrame } from "@jsenv/humanize";
9
9
 
10
- import { isWebWorkerEntryPointReference } from "../web_workers.js";
11
10
  import { prependContent } from "../prepend_content.js";
11
+ import { isWebWorkerEntryPointReference } from "../web_workers.js";
12
12
 
13
13
  let referenceId = 0;
14
14
 
@@ -1,13 +1,13 @@
1
1
  import {
2
- urlToRelativeUrl,
3
2
  asUrlWithoutSearch,
4
3
  injectQueryParamsIntoSpecifier,
4
+ urlToRelativeUrl,
5
5
  } from "@jsenv/urls";
6
6
 
7
7
  import { createEventEmitter } from "../../helpers/event_emitter.js";
8
- import { urlSpecifierEncoding } from "./url_specifier_encoding.js";
9
8
  import { createDependencies } from "./references.js";
10
9
  import { GRAPH_VISITOR } from "./url_graph_visitor.js";
10
+ import { urlSpecifierEncoding } from "./url_specifier_encoding.js";
11
11
 
12
12
  export const createUrlGraph = ({
13
13
  rootDirectoryUrl,
@@ -1,4 +1,4 @@
1
- import { humanizeFileSize, distributePercentages, ANSI } from "@jsenv/humanize";
1
+ import { ANSI, distributePercentages, humanizeFileSize } from "@jsenv/humanize";
2
2
 
3
3
  import { GRAPH_VISITOR } from "./url_graph_visitor.js";
4
4
 
@@ -1,15 +1,15 @@
1
- import { pathToFileURL } from "node:url";
2
1
  import { writeFileSync } from "@jsenv/filesystem";
3
- import { urlToRelativeUrl, isFileSystemPath } from "@jsenv/urls";
4
2
  import {
5
3
  composeTwoSourcemaps,
6
- SOURCEMAP,
7
- generateSourcemapFileUrl,
8
4
  generateSourcemapDataUrl,
5
+ generateSourcemapFileUrl,
6
+ SOURCEMAP,
9
7
  } from "@jsenv/sourcemap";
8
+ import { isFileSystemPath, urlToRelativeUrl } from "@jsenv/urls";
9
+ import { pathToFileURL } from "node:url";
10
10
  import {
11
- defineGettersOnPropertiesDerivedFromOriginalContent,
12
11
  defineGettersOnPropertiesDerivedFromContent,
12
+ defineGettersOnPropertiesDerivedFromOriginalContent,
13
13
  } from "./url_content.js";
14
14
 
15
15
  export const createUrlInfoTransformer = ({
@@ -1,6 +1,6 @@
1
- import { jsenvPluginHotSearchParam } from "./jsenv_plugin_hot_search_param.js";
2
1
  import { jsenvPluginAutoreloadClient } from "./jsenv_plugin_autoreload_client.js";
3
2
  import { jsenvPluginAutoreloadServer } from "./jsenv_plugin_autoreload_server.js";
3
+ import { jsenvPluginHotSearchParam } from "./jsenv_plugin_hot_search_param.js";
4
4
 
5
5
  export const jsenvPluginAutoreload = ({
6
6
  clientFileChangeEventEmitter,
@@ -1,4 +1,4 @@
1
- import { parseHtml, injectJsenvScript, stringifyHtmlAst } from "@jsenv/ast";
1
+ import { injectJsenvScript, parseHtml, stringifyHtmlAst } from "@jsenv/ast";
2
2
 
3
3
  export const jsenvPluginAutoreloadClient = () => {
4
4
  const autoreloadClientFileUrl = new URL(
@@ -7,8 +7,8 @@
7
7
  * - global
8
8
  */
9
9
 
10
- import { createMagicSource } from "@jsenv/sourcemap";
11
10
  import { applyBabelPlugins } from "@jsenv/ast";
11
+ import { createMagicSource } from "@jsenv/sourcemap";
12
12
 
13
13
  export const jsenvPluginCommonJsGlobals = () => {
14
14
  const transformCommonJsGlobals = async (urlInfo) => {
@@ -6,8 +6,8 @@
6
6
  */
7
7
 
8
8
  import {
9
- replacePlaceholders,
10
9
  INJECTIONS,
10
+ replacePlaceholders,
11
11
  } from "../injections/jsenv_plugin_injections.js";
12
12
 
13
13
  export const jsenvPluginGlobalScenarios = () => {
@@ -1,6 +1,6 @@
1
- import { readFileSync } from "node:fs";
2
- import { urlToRelativeUrl } from "@jsenv/urls";
3
1
  import { parseHtml } from "@jsenv/ast";
2
+ import { urlToRelativeUrl } from "@jsenv/urls";
3
+ import { readFileSync } from "node:fs";
4
4
 
5
5
  import { generateContentFrame } from "@jsenv/humanize";
6
6
 
@@ -1,4 +1,4 @@
1
- import { getHtmlNodeAttribute, analyzeLinkNode, parseSrcSet } from "@jsenv/ast";
1
+ import { analyzeLinkNode, getHtmlNodeAttribute, parseSrcSet } from "@jsenv/ast";
2
2
 
3
3
  // Some "smart" default applied to decide what should hot reload / fullreload:
4
4
  // By default:
@@ -1,8 +1,8 @@
1
+ import { applyBabelPlugins, parseHtml } from "@jsenv/ast";
1
2
  import { createMagicSource } from "@jsenv/sourcemap";
2
- import { parseHtml, applyBabelPlugins } from "@jsenv/ast";
3
3
 
4
- import { collectHotDataFromHtmlAst } from "./html_hot_dependencies.js";
5
4
  import { babelPluginMetadataImportMetaHot } from "./babel_plugin_metadata_import_meta_hot.js";
5
+ import { collectHotDataFromHtmlAst } from "./html_hot_dependencies.js";
6
6
 
7
7
  export const jsenvPluginImportMetaHot = () => {
8
8
  const importMetaHotClientFileUrl = new URL(
@@ -8,8 +8,8 @@
8
8
  * - replaced by undefined (import.meta.dev but it's build; the goal is to ensure it's tree-shaked)
9
9
  */
10
10
 
11
- import { createMagicSource } from "@jsenv/sourcemap";
12
11
  import { applyBabelPlugins } from "@jsenv/ast";
12
+ import { createMagicSource } from "@jsenv/sourcemap";
13
13
 
14
14
  export const jsenvPluginImportMetaScenarios = () => {
15
15
  return {
@@ -1,5 +1,5 @@
1
+ import { injectJsenvScript, parseHtml, stringifyHtmlAst } from "@jsenv/ast";
1
2
  import { createMagicSource } from "@jsenv/sourcemap";
2
- import { parseHtml, injectJsenvScript, stringifyHtmlAst } from "@jsenv/ast";
3
3
 
4
4
  export const injectGlobals = (content, globals, urlInfo) => {
5
5
  if (urlInfo.type === "html") {
@@ -1,6 +1,6 @@
1
+ import { createMagicSource } from "@jsenv/sourcemap";
1
2
  import { URL_META } from "@jsenv/url-meta";
2
3
  import { asUrlWithoutSearch } from "@jsenv/urls";
3
- import { createMagicSource } from "@jsenv/sourcemap";
4
4
 
5
5
  export const jsenvPluginInjections = (rawAssociations) => {
6
6
  let resolvedAssociations;
@@ -1,14 +1,14 @@
1
1
  import {
2
- parseHtml,
3
- stringifyHtmlAst,
4
- visitHtmlNodes,
5
- getHtmlNodeText,
6
2
  analyzeScriptNode,
7
3
  getHtmlNodeAttribute,
8
- setHtmlNodeAttributes,
9
- setHtmlNodeText,
10
4
  getHtmlNodePosition,
5
+ getHtmlNodeText,
11
6
  getUrlForContentInsideHtml,
7
+ parseHtml,
8
+ setHtmlNodeAttributes,
9
+ setHtmlNodeText,
10
+ stringifyHtmlAst,
11
+ visitHtmlNodes,
12
12
  } from "@jsenv/ast";
13
13
 
14
14
  export const jsenvPluginInliningIntoHtml = () => {
@@ -1,3 +1,5 @@
1
+ // tslint:disable:ordered-imports
2
+
1
3
  import { jsenvPluginSupervisor } from "@jsenv/plugin-supervisor";
2
4
  import { jsenvPluginTranspilation } from "@jsenv/plugin-transpilation";
3
5
 
@@ -1,28 +1,28 @@
1
1
  import {
2
- existsSync,
3
- readFileSync,
4
- realpathSync,
5
- statSync,
6
- lstatSync,
7
- readdirSync,
8
- } from "node:fs";
9
- import { pathToFileURL } from "node:url";
10
- import {
11
- urlIsInsideOf,
12
- urlToRelativeUrl,
13
- urlToFilename,
14
- ensurePathnameTrailingSlash,
15
- } from "@jsenv/urls";
2
+ assertAndNormalizeDirectoryUrl,
3
+ comparePathnames,
4
+ } from "@jsenv/filesystem";
16
5
  import {
17
6
  applyFileSystemMagicResolution,
18
7
  getExtensionsToTry,
19
8
  } from "@jsenv/node-esm-resolution";
20
9
  import { pickContentType } from "@jsenv/server";
10
+ import {
11
+ ensurePathnameTrailingSlash,
12
+ urlIsInsideOf,
13
+ urlToFilename,
14
+ urlToRelativeUrl,
15
+ } from "@jsenv/urls";
21
16
  import { CONTENT_TYPE } from "@jsenv/utils/src/content_type/content_type.js";
22
17
  import {
23
- assertAndNormalizeDirectoryUrl,
24
- comparePathnames,
25
- } from "@jsenv/filesystem";
18
+ existsSync,
19
+ lstatSync,
20
+ readdirSync,
21
+ readFileSync,
22
+ realpathSync,
23
+ statSync,
24
+ } from "node:fs";
25
+ import { pathToFileURL } from "node:url";
26
26
 
27
27
  const html404AndParentDirIsEmptyFileUrl = new URL(
28
28
  "./html_404_and_parent_dir_is_empty.html",
@@ -1,23 +1,23 @@
1
1
  import {
2
- parseHtml,
3
- visitHtmlNodes,
4
- getHtmlNodeText,
5
- setHtmlNodeText,
6
- removeHtmlNodeText,
7
- removeHtmlNode,
2
+ analyzeScriptNode,
8
3
  getHtmlNodeAttribute,
9
- getHtmlNodePosition,
10
- setHtmlNodeAttributes,
11
4
  getHtmlNodeAttributePosition,
12
- analyzeScriptNode,
5
+ getHtmlNodePosition,
6
+ getHtmlNodeText,
7
+ getUrlForContentInsideHtml,
8
+ parseHtml,
13
9
  parseSrcSet,
10
+ removeHtmlNode,
11
+ removeHtmlNodeText,
12
+ setHtmlNodeAttributes,
13
+ setHtmlNodeText,
14
14
  stringifyHtmlAst,
15
- getUrlForContentInsideHtml,
15
+ visitHtmlNodes,
16
16
  } from "@jsenv/ast";
17
17
  import {
18
- resolveImport,
19
18
  composeTwoImportMaps,
20
19
  normalizeImportMap,
20
+ resolveImport,
21
21
  } from "@jsenv/importmap";
22
22
 
23
23
  export const jsenvPluginHtmlReferenceAnalysis = ({
@@ -1,5 +1,5 @@
1
+ import { getUrlForContentInsideJs, parseJsUrls } from "@jsenv/ast";
1
2
  import { createMagicSource } from "@jsenv/sourcemap";
2
- import { parseJsUrls, getUrlForContentInsideJs } from "@jsenv/ast";
3
3
  import { urlToExtension } from "@jsenv/urls";
4
4
  import { JS_QUOTES } from "@jsenv/utils/src/string/js_quotes.js";
5
5
 
@@ -1,10 +1,10 @@
1
- import { jsenvPluginReferenceExpectedTypes } from "./jsenv_plugin_reference_expected_types.js";
2
- import { jsenvPluginDirectoryReferenceAnalysis } from "./directory/jsenv_plugin_directory_reference_analysis.js";
1
+ import { jsenvPluginCssReferenceAnalysis } from "./css/jsenv_plugin_css_reference_analysis.js";
3
2
  import { jsenvPluginDataUrlsAnalysis } from "./data_urls/jsenv_plugin_data_urls_analysis.js";
3
+ import { jsenvPluginDirectoryReferenceAnalysis } from "./directory/jsenv_plugin_directory_reference_analysis.js";
4
4
  import { jsenvPluginHtmlReferenceAnalysis } from "./html/jsenv_plugin_html_reference_analysis.js";
5
- import { jsenvPluginWebmanifestReferenceAnalysis } from "./webmanifest/jsenv_plugin_webmanifest_reference_analysis.js";
6
- import { jsenvPluginCssReferenceAnalysis } from "./css/jsenv_plugin_css_reference_analysis.js";
7
5
  import { jsenvPluginJsReferenceAnalysis } from "./js/jsenv_plugin_js_reference_analysis.js";
6
+ import { jsenvPluginReferenceExpectedTypes } from "./jsenv_plugin_reference_expected_types.js";
7
+ import { jsenvPluginWebmanifestReferenceAnalysis } from "./webmanifest/jsenv_plugin_webmanifest_reference_analysis.js";
8
8
 
9
9
  export const jsenvPluginReferenceAnalysis = ({
10
10
  inlineContent = true,
@@ -7,13 +7,13 @@
7
7
  * it should likely be an other plugin happening after the others
8
8
  */
9
9
 
10
- import { readFileSync } from "node:fs";
11
10
  import {
12
11
  applyNodeEsmResolution,
13
- readCustomConditionsFromProcessArgs,
14
12
  defaultLookupPackageScope,
15
13
  defaultReadPackageJson,
14
+ readCustomConditionsFromProcessArgs,
16
15
  } from "@jsenv/node-esm-resolution";
16
+ import { readFileSync } from "node:fs";
17
17
 
18
18
  export const createNodeEsmResolver = ({
19
19
  runtimeCompat,
@@ -1,4 +1,4 @@
1
- import { parseHtml, injectJsenvScript, stringifyHtmlAst } from "@jsenv/ast";
1
+ import { injectJsenvScript, parseHtml, stringifyHtmlAst } from "@jsenv/ast";
2
2
  import { URL_META } from "@jsenv/url-meta";
3
3
  import { asUrlWithoutSearch } from "@jsenv/urls";
4
4
 
@@ -3,7 +3,7 @@
3
3
  * to provide "serverEvents" used by other plugins
4
4
  */
5
5
 
6
- import { parseHtml, injectJsenvScript, stringifyHtmlAst } from "@jsenv/ast";
6
+ import { injectJsenvScript, parseHtml, stringifyHtmlAst } from "@jsenv/ast";
7
7
 
8
8
  const serverEventsClientFileUrl = new URL(
9
9
  "./client/server_events_client.js",