@jsenv/core 25.4.7 → 25.6.2

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 (60) hide show
  1. package/dist/browser_runtime/asset-manifest.json +2 -2
  2. package/dist/browser_runtime/browser_runtime_c81cd9af.js +5300 -0
  3. package/dist/browser_runtime/browser_runtime_c81cd9af.js.map +1089 -0
  4. package/dist/build_manifest.js +6 -6
  5. package/dist/compile_proxy/asset-manifest.json +2 -2
  6. package/dist/compile_proxy/{compile_proxy.html__inline__20_f4285042.js.map → compile_proxy.html__inline__20_c05fdc30.js.map} +2 -2
  7. package/dist/compile_proxy/{compile_proxy_ab528227.html → compile_proxy_93ec4247.html} +7 -4
  8. package/dist/event_source_client/asset-manifest.json +2 -2
  9. package/dist/event_source_client/event_source_client_69f48287.js +354 -0
  10. package/dist/event_source_client/{event_source_client_80644aee.js.map → event_source_client_69f48287.js.map} +2 -2
  11. package/dist/redirector/asset-manifest.json +2 -2
  12. package/dist/redirector/{redirector.html__inline__12_404b8295.js.map → redirector.html__inline__12_20421b23.js.map} +2 -2
  13. package/dist/redirector/{redirector_6df2620a.html → redirector_ddc79416.html} +7 -4
  14. package/dist/toolbar/asset-manifest.json +5 -5
  15. package/dist/toolbar/assets/{compilation.css_e37c747b.map → compilation.css_7421bd55.map} +3 -3
  16. package/dist/toolbar/assets/settings.css_942b5a9e.map +12 -0
  17. package/dist/toolbar/assets/{toolbar.main.css_269d7ce2.map → toolbar.main.css_b7d8bec1.map} +4 -4
  18. package/dist/toolbar/{toolbar.main_2c56a4e0.js.map → toolbar.main_7d7783d3.js.map} +2 -2
  19. package/dist/toolbar/{toolbar_17abd09a.html → toolbar_d6045dd0.html} +17 -11
  20. package/dist/toolbar_injector/asset-manifest.json +2 -2
  21. package/dist/toolbar_injector/toolbar_injector_c8c214dd.js +977 -0
  22. package/dist/toolbar_injector/{toolbar_injector_0f93509c.js.map → toolbar_injector_c8c214dd.js.map} +4 -4
  23. package/helpers/babel/asyncIterator/asyncIterator.js +61 -8
  24. package/helpers/babel/createClass/createClass.js +12 -12
  25. package/helpers/babel/inherits/inherits.js +10 -6
  26. package/helpers/babel/jsx/jsx.js +27 -22
  27. package/helpers/babel/objectSpread2/objectSpread2.js +22 -14
  28. package/helpers/babel/readme.md +3 -8
  29. package/helpers/babel/wrapRegExp/wrapRegExp.js +29 -29
  30. package/package.json +36 -36
  31. package/readme.md +21 -18
  32. package/src/buildProject.js +12 -20
  33. package/src/dev_server.js +6 -4
  34. package/src/executeTestPlan.js +20 -19
  35. package/src/internal/building/buildUsingRollup.js +5 -20
  36. package/src/internal/building/build_logs.js +33 -37
  37. package/src/internal/building/build_stats.js +2 -1
  38. package/src/internal/building/es_to_system.js +34 -0
  39. package/src/internal/building/import_references.js +0 -1
  40. package/src/internal/building/rollup_plugin_jsenv.js +146 -43
  41. package/src/internal/compiling/createCompiledFileService.js +0 -4
  42. package/src/internal/compiling/jsenvCompilerForJavaScript.js +2 -3
  43. package/src/internal/compiling/jsenv_directory/compile_context.js +1 -10
  44. package/src/internal/compiling/jsenv_directory/compile_profile.js +1 -2
  45. package/src/internal/compiling/startCompileServer.js +0 -14
  46. package/src/internal/dev_server/toolbar/compilation/compilation.css +3 -2
  47. package/src/internal/dev_server/toolbar/settings/settings.css +1 -2
  48. package/src/internal/dev_server/toolbar/toolbar.html +8 -4
  49. package/src/internal/executing/coverage/reportToCoverage.js +1 -0
  50. package/src/internal/executing/coverage_utils/v8_coverage_from_directory.js +2 -1
  51. package/src/internal/executing/executePlan.js +450 -60
  52. package/src/internal/jsenvCoreDirectoryUrl.js +7 -18
  53. package/src/internal/runtime/s.js +3 -2
  54. package/src/internal/runtime_support/runtime_support.js +1 -1
  55. package/dist/browser_runtime/browser_runtime_0e3396a1.js +0 -5298
  56. package/dist/browser_runtime/browser_runtime_0e3396a1.js.map +0 -1089
  57. package/dist/event_source_client/event_source_client_80644aee.js +0 -356
  58. package/dist/toolbar/assets/settings.css_61548139.map +0 -12
  59. package/dist/toolbar_injector/toolbar_injector_0f93509c.js +0 -976
  60. package/src/internal/executing/executeConcurrently.js +0 -440
@@ -1,4 +1,4 @@
1
- import { extname } from "node:path"
1
+ import path from "node:path"
2
2
  import MagicString from "magic-string"
3
3
  import { composeTwoImportMaps, normalizeImportMap } from "@jsenv/importmap"
4
4
  import { isSpecifierForNodeCoreModule } from "@jsenv/importmap/src/isSpecifierForNodeCoreModule.js"
@@ -15,9 +15,11 @@ import {
15
15
  urlToBasename,
16
16
  urlToFilename,
17
17
  readFile,
18
+ urlToFileSystemPath,
18
19
  } from "@jsenv/filesystem"
19
20
  import { UNICODE } from "@jsenv/log"
20
21
 
22
+ import { require } from "@jsenv/core/src/internal/require.js"
21
23
  import { convertJsonTextToJavascriptModule } from "@jsenv/core/src/internal/building/json_module.js"
22
24
  import { convertCssTextToJavascriptModule } from "@jsenv/core/src/internal/building/css_module.js"
23
25
  import { transformJs } from "@jsenv/core/src/internal/compiling/js-compilation-service/transformJs.js"
@@ -49,6 +51,7 @@ import {
49
51
  } from "./ressource_builder.js"
50
52
  import { createBuildUrlGenerator } from "./build_url_generator.js"
51
53
  import { visitImportReferences } from "./import_references.js"
54
+ import { esToSystem } from "./es_to_system.js"
52
55
  import { createBuildStats } from "./build_stats.js"
53
56
 
54
57
  export const createRollupPlugins = async ({
@@ -66,13 +69,12 @@ export const createRollupPlugins = async ({
66
69
  externalImportSpecifiers,
67
70
  importPaths,
68
71
  preservedUrls,
69
- workers,
70
- serviceWorkers,
71
72
  serviceWorkerFinalizer,
72
- classicWorkers,
73
- classicServiceWorkers,
73
+
74
74
  format,
75
75
  systemJsUrl,
76
+ globals,
77
+ preservedDynamicImports,
76
78
 
77
79
  node,
78
80
  compileServer,
@@ -127,12 +129,15 @@ export const createRollupPlugins = async ({
127
129
  let buildStats = {}
128
130
  const buildStartMs = Date.now()
129
131
 
132
+ const serviceWorkerUrls = []
133
+ const classicServiceWorkerUrls = []
134
+
130
135
  let lastErrorMessage
131
136
  const storeLatestJsenvPluginError = (error) => {
132
137
  lastErrorMessage = error.message
133
138
  }
134
139
 
135
- const extension = extname(entryPoints[Object.keys(entryPoints)[0]])
140
+ const extension = path.extname(entryPoints[Object.keys(entryPoints)[0]])
136
141
  const outputExtension = extension === ".html" ? ".js" : extension
137
142
 
138
143
  const entryPointUrls = {}
@@ -140,19 +145,6 @@ export const createRollupPlugins = async ({
140
145
  const url = resolveUrl(key, projectDirectoryUrl)
141
146
  entryPointUrls[url] = entryPoints[key]
142
147
  })
143
- const workerUrls = workers.map((worker) =>
144
- resolveUrl(worker, projectDirectoryUrl),
145
- )
146
- const serviceWorkerUrls = serviceWorkers.map((serviceWorker) =>
147
- resolveUrl(serviceWorker, projectDirectoryUrl),
148
- )
149
- const classicWorkerUrls = classicWorkers.map((classicWorker) =>
150
- resolveUrl(classicWorker, projectDirectoryUrl),
151
- )
152
- const classicServiceWorkerUrls = classicServiceWorkers.map(
153
- (classicServiceWorker) =>
154
- resolveUrl(classicServiceWorker, projectDirectoryUrl),
155
- )
156
148
 
157
149
  let ressourceBuilder
158
150
  let importResolver
@@ -311,6 +303,123 @@ export const createRollupPlugins = async ({
311
303
  },
312
304
  })
313
305
  }
306
+ if (format === "global") {
307
+ const globalsForRollup = {}
308
+ Object.keys(globals).forEach((key) => {
309
+ if (key.startsWith("./")) {
310
+ const keyAsUrl = resolveUrl(key, projectDirectoryUrl)
311
+ const keyAsPath = urlToFileSystemPath(keyAsUrl)
312
+ globalsForRollup[keyAsPath] = globals[key]
313
+ } else {
314
+ globalsForRollup[key] = globals[key]
315
+ }
316
+ })
317
+ const ESIIFE = require("es-iife")
318
+ const globalNameFromChunkInfo = (chunkInfo) => {
319
+ const originalUrl = asOriginalUrl(chunkInfo.facadeModuleId)
320
+ const originalPath = urlToFileSystemPath(originalUrl)
321
+ const nameFromGlobals = globalsForRollup[originalPath]
322
+ return nameFromGlobals || path.parse(chunkInfo.fileName).name
323
+ }
324
+ const structuredMetaMap = normalizeStructuredMetaMap(
325
+ { preserved: preservedDynamicImports },
326
+ projectDirectoryUrl,
327
+ )
328
+ const isPreservedDynamicImport = (url) => {
329
+ const meta = urlToMeta({ url, structuredMetaMap })
330
+ return Boolean(meta.preserved)
331
+ }
332
+ rollupPlugins.push({
333
+ async transform(code, id) {
334
+ const serverUrl = asServerUrl(id)
335
+ const originalUrl = asOriginalUrl(id)
336
+ if (isPreservedDynamicImport(originalUrl)) {
337
+ return null
338
+ }
339
+ const jsRessource = ressourceBuilder.findRessource((ressource) => {
340
+ return ressource.url === serverUrl
341
+ })
342
+ if (!jsRessource || !jsRessource.isEntryPoint) {
343
+ return null
344
+ }
345
+ let map = null
346
+ const ast = this.parse(code, {
347
+ // used to know node line and column
348
+ locations: true,
349
+ })
350
+ let useDynamicImport = false
351
+ const { walk } = await import("estree-walker")
352
+ walk(ast, {
353
+ enter: (node) => {
354
+ if (node.type === "ImportExpression") {
355
+ useDynamicImport = true
356
+ }
357
+ },
358
+ })
359
+ if (!useDynamicImport) {
360
+ return null
361
+ }
362
+ const magicString = new MagicString(code)
363
+ magicString.prepend(`import "@jsenv/core/src/internal/runtime/s.js";`)
364
+ code = magicString.toString()
365
+ map = magicString.generateMap({ hires: true })
366
+ return { code, map }
367
+ },
368
+
369
+ outputOptions: (outputOptions) => {
370
+ outputOptions.globals = globalsForRollup
371
+ outputOptions.format = "esm"
372
+ },
373
+ resolveImportMeta: (property, { chunkId }) => {
374
+ if (property === "url") {
375
+ return `(document.currentScript && document.currentScript.src || new URL("${chunkId}", document.baseURI).href);`
376
+ }
377
+ return undefined
378
+ },
379
+ renderDynamicImport: ({ moduleId }) => {
380
+ const originalUrl = asOriginalUrl(moduleId)
381
+ if (isPreservedDynamicImport(originalUrl)) {
382
+ return null
383
+ }
384
+ return {
385
+ left: "System.import(",
386
+ right: ")",
387
+ }
388
+ },
389
+ async renderChunk(code, chunkInfo) {
390
+ const serverUrl = asServerUrl(chunkInfo.facadeModuleId)
391
+ const jsRessource = ressourceBuilder.findRessource(
392
+ (ressource) => ressource.url === serverUrl,
393
+ )
394
+ if (jsRessource.isEntryPoint) {
395
+ const name = globalNameFromChunkInfo(chunkInfo)
396
+ const out = ESIIFE.transform({
397
+ code,
398
+ parse: this.parse,
399
+ name,
400
+ sourcemap: true,
401
+ resolveGlobal: (specifier) => {
402
+ const url = resolveUrl(specifier, chunkInfo.facadeModuleId)
403
+ const globalName = urlToBasename(url)
404
+ return globalName
405
+ },
406
+ strict: true,
407
+ })
408
+ code = out.code
409
+ const map = out.map
410
+ return {
411
+ code,
412
+ map,
413
+ }
414
+ }
415
+ return esToSystem({
416
+ code,
417
+ url: serverUrl,
418
+ map: chunkInfo.map,
419
+ })
420
+ },
421
+ })
422
+ }
314
423
  if (minify) {
315
424
  const methodHooks = {
316
425
  minifyJs: async (...args) => {
@@ -322,7 +431,6 @@ export const createRollupPlugins = async ({
322
431
  return minifyHtml(...args)
323
432
  },
324
433
  }
325
-
326
434
  minifyJs = async ({ url, code, map, ...rest }) => {
327
435
  const result = await methodHooks.minifyJs({
328
436
  url,
@@ -336,11 +444,9 @@ export const createRollupPlugins = async ({
336
444
  map: result.map,
337
445
  }
338
446
  }
339
-
340
447
  minifyHtml = async (html) => {
341
448
  return methodHooks.minifyHtml(html, minifyHtmlOptions)
342
449
  }
343
-
344
450
  rollupPlugins.push({
345
451
  name: "jsenv_minifier",
346
452
  async renderChunk(code, chunk) {
@@ -354,7 +460,6 @@ export const createRollupPlugins = async ({
354
460
  module: format === "esmodule",
355
461
  ...(format === "global" ? { toplevel: false } : { toplevel: true }),
356
462
  })
357
-
358
463
  code = result.code
359
464
  map = result.map
360
465
  return {
@@ -685,19 +790,21 @@ export const createRollupPlugins = async ({
685
790
  const compiledFileUrl = asCompiledServerUrl(fileUrl)
686
791
  resolutionResult.url = compiledFileUrl
687
792
  }
688
-
689
- if (workerUrls.includes(ressourceOriginalUrl)) {
793
+ const { searchParams } = new URL(ressourceUrl)
794
+ if (searchParams.has("module")) {
795
+ resolutionResult.isJsModule = true
796
+ } else if (searchParams.has("worker")) {
690
797
  resolutionResult.isWorker = true
691
798
  resolutionResult.isJsModule = true
692
- } else if (serviceWorkerUrls.includes(ressourceOriginalUrl)) {
799
+ } else if (searchParams.has("service_worker")) {
693
800
  resolutionResult.isServiceWorker = true
694
801
  resolutionResult.isJsModule = true
695
- } else if (classicWorkerUrls.includes(ressourceOriginalUrl)) {
802
+ serviceWorkerUrls.push(ressourceOriginalUrl)
803
+ } else if (searchParams.has("worker_type_classic")) {
696
804
  resolutionResult.isWorker = true
697
- } else if (
698
- classicServiceWorkerUrls.includes(ressourceOriginalUrl)
699
- ) {
805
+ } else if (searchParams.has("service_worker_type_classic")) {
700
806
  resolutionResult.isServiceWorker = true
807
+ classicServiceWorkerUrls.push(ressourceOriginalUrl)
701
808
  }
702
809
  return resolutionResult
703
810
  },
@@ -927,6 +1034,9 @@ export const createRollupPlugins = async ({
927
1034
  return ressource.rollupReferenceId === referenceId
928
1035
  })
929
1036
  ressource.buildRelativeUrlWithoutHash = fileName
1037
+ if (ressource.isJsModule) {
1038
+ return fileName
1039
+ }
930
1040
  const buildRelativeUrl = ressource.buildRelativeUrl
931
1041
  return buildRelativeUrl
932
1042
  }
@@ -1047,22 +1157,16 @@ export const createRollupPlugins = async ({
1047
1157
  onReferenceWithImportMetaUrlPattern: async ({ importNode }) => {
1048
1158
  const specifier = importNode.arguments[0].value
1049
1159
  const { line, column } = importNode.loc.start
1050
-
1051
1160
  const { id } = normalizeRollupResolveReturnValue(
1052
1161
  await this.resolve(specifier, url),
1053
1162
  )
1054
1163
  const ressourceUrl = asServerUrl(id)
1055
- const originalUrl = asOriginalUrl(ressourceUrl)
1056
- const isJsModule = Boolean(
1057
- workerUrls[originalUrl] || serviceWorkerUrls[originalUrl],
1058
- )
1059
1164
  const reference = ressourceBuilder.createReferenceFoundInJsModule({
1060
1165
  referenceLabel: "URL + import.meta.url",
1061
1166
  jsUrl: url,
1062
1167
  jsLine: line,
1063
1168
  jsColumn: column,
1064
1169
  ressourceSpecifier: ressourceUrl,
1065
- isJsModule,
1066
1170
  })
1067
1171
  if (!reference) {
1068
1172
  return
@@ -1363,7 +1467,6 @@ export const createRollupPlugins = async ({
1363
1467
  }
1364
1468
  return sourceUrl
1365
1469
  }
1366
-
1367
1470
  return outputOptions
1368
1471
  },
1369
1472
 
@@ -1373,9 +1476,12 @@ export const createRollupPlugins = async ({
1373
1476
  // happens for inline module scripts for instance
1374
1477
  return null
1375
1478
  }
1376
-
1377
1479
  const url = asOriginalUrl(facadeModuleId)
1378
- if (workerUrls.includes(url) || serviceWorkerUrls.includes(url)) {
1480
+ const { searchParams } = new URL(url)
1481
+ if (
1482
+ format === "systemjs" &&
1483
+ (searchParams.has("worker") || searchParams.has("service_worker"))
1484
+ ) {
1379
1485
  const magicString = new MagicString(code)
1380
1486
  const systemjsCode = await readFile(
1381
1487
  new URL("../runtime/s.js", import.meta.url),
@@ -1388,7 +1494,6 @@ export const createRollupPlugins = async ({
1388
1494
  map,
1389
1495
  }
1390
1496
  }
1391
-
1392
1497
  return null
1393
1498
  },
1394
1499
 
@@ -1609,9 +1714,9 @@ export const createRollupPlugins = async ({
1609
1714
  buildMappings = sortObjectByPathnames(buildMappings)
1610
1715
  await visitServiceWorkers({
1611
1716
  projectDirectoryUrl,
1717
+ serviceWorkerFinalizer,
1612
1718
  serviceWorkerUrls,
1613
1719
  classicServiceWorkerUrls,
1614
- serviceWorkerFinalizer,
1615
1720
  buildMappings,
1616
1721
  ressourceMappings,
1617
1722
  buildFileContents,
@@ -1831,7 +1936,6 @@ const visitServiceWorkers = async ({
1831
1936
  ...serviceWorkerUrls,
1832
1937
  ...classicServiceWorkerUrls,
1833
1938
  ]
1834
-
1835
1939
  await Promise.all(
1836
1940
  allServiceWorkerUrls.map(async (serviceWorkerUrl) => {
1837
1941
  const serviceWorkerRelativeUrl = urlToRelativeUrl(
@@ -1845,7 +1949,6 @@ const visitServiceWorkers = async ({
1845
1949
  `"${serviceWorkerRelativeUrl}" service worker file missing in the build`,
1846
1950
  )
1847
1951
  }
1848
-
1849
1952
  if (serviceWorkerFinalizer) {
1850
1953
  let code = buildFileContents[serviceWorkerBuildRelativeUrl]
1851
1954
  code = await serviceWorkerFinalizer(code, {
@@ -41,8 +41,6 @@ export const createCompiledFileService = ({
41
41
  topLevelAwait,
42
42
  prependSystemJs,
43
43
  customCompilers,
44
- workerUrls,
45
- serviceWorkerUrls,
46
44
 
47
45
  jsenvEventSourceClientInjection,
48
46
  jsenvToolbarInjection,
@@ -167,8 +165,6 @@ export const createCompiledFileService = ({
167
165
  babelPluginMap,
168
166
  compileProfile,
169
167
  }),
170
- workerUrls,
171
- serviceWorkerUrls,
172
168
  topLevelAwait,
173
169
  prependSystemJs,
174
170
 
@@ -11,8 +11,6 @@ export const compileJavascript = async ({
11
11
 
12
12
  compileProfile,
13
13
  babelPluginMap,
14
- workerUrls,
15
- serviceWorkerUrls,
16
14
  topLevelAwait,
17
15
  prependSystemJs,
18
16
 
@@ -22,8 +20,9 @@ export const compileJavascript = async ({
22
20
  sourcemapMethod,
23
21
  }) => {
24
22
  if (prependSystemJs === undefined) {
23
+ const { searchParams } = new URL(url)
25
24
  prependSystemJs =
26
- workerUrls.includes(url) || serviceWorkerUrls.includes(url)
25
+ searchParams.has("worker") || searchParams.has("service_worker")
27
26
  }
28
27
  const transformResult = await transformJs({
29
28
  projectDirectoryUrl,
@@ -7,15 +7,10 @@ import {
7
7
  } from "@jsenv/core/dist/build_manifest.js"
8
8
  import { jsenvCoreDirectoryUrl } from "@jsenv/core/src/internal/jsenvCoreDirectoryUrl.js"
9
9
 
10
- import {
11
- sameValuesInTwoArrays,
12
- sameValueInTwoObjects,
13
- } from "./comparison_utils.js"
10
+ import { sameValueInTwoObjects } from "./comparison_utils.js"
14
11
 
15
12
  const COMPARERS = {
16
13
  preservedUrls: sameValueInTwoObjects,
17
- workers: sameValuesInTwoArrays,
18
- serviceWorkers: sameValuesInTwoArrays,
19
14
  replaceProcessEnvNodeEnv: (a, b) => a === b,
20
15
  inlineImportMapIntoHTML: (a, b) => a === b,
21
16
 
@@ -36,15 +31,11 @@ export const compareCompileContexts = (
36
31
 
37
32
  export const createCompileContext = async ({
38
33
  preservedUrls,
39
- workers,
40
- serviceWorkers,
41
34
  replaceProcessEnvNodeEnv,
42
35
  inlineImportMapIntoHTML,
43
36
  }) => {
44
37
  return {
45
38
  preservedUrls,
46
- workers,
47
- serviceWorkers,
48
39
  replaceProcessEnvNodeEnv,
49
40
  inlineImportMapIntoHTML,
50
41
 
@@ -18,7 +18,6 @@ export const createCompileProfile = ({
18
18
  preservedUrls,
19
19
  customCompilers,
20
20
  babelPluginMapWithoutSyntax,
21
- workerUrls,
22
21
  importMapInWebWorkers,
23
22
  moduleOutFormat,
24
23
  sourcemapMethod,
@@ -65,7 +64,7 @@ export const createCompileProfile = ({
65
64
  import_assertion_type_css: true,
66
65
  })
67
66
  }
68
- if (env.browser && workerUrls.length > 0) {
67
+ if (env.browser) {
69
68
  features["worker_type_module"] = true
70
69
  }
71
70
  if (env.browser && importMapInWebWorkers) {
@@ -9,7 +9,6 @@ import {
9
9
  readRequestBody,
10
10
  } from "@jsenv/server"
11
11
  import {
12
- resolveUrl,
13
12
  urlToRelativeUrl,
14
13
  resolveDirectoryUrl,
15
14
  urlIsInsideOf,
@@ -79,8 +78,6 @@ export const startCompileServer = async ({
79
78
  babelConfigFileUrl,
80
79
  customCompilers = {},
81
80
  preservedUrls,
82
- workers = [],
83
- serviceWorkers = [],
84
81
  importMapInWebWorkers = false,
85
82
  prependSystemJs,
86
83
 
@@ -127,12 +124,6 @@ export const startCompileServer = async ({
127
124
  */
128
125
  ...preservedUrls,
129
126
  }
130
- const workerUrls = workers.map((worker) =>
131
- resolveUrl(worker, projectDirectoryUrl),
132
- )
133
- const serviceWorkerUrls = serviceWorkers.map((serviceWorker) =>
134
- resolveUrl(serviceWorker, projectDirectoryUrl),
135
- )
136
127
  const babelPluginMapFromFile = await loadBabelPluginMapFromFile({
137
128
  projectDirectoryUrl,
138
129
  babelConfigFileUrl,
@@ -209,8 +200,6 @@ export const startCompileServer = async ({
209
200
  })
210
201
  const compileContext = await createCompileContext({
211
202
  preservedUrls,
212
- workers,
213
- serviceWorkers,
214
203
  replaceProcessEnvNodeEnv,
215
204
  inlineImportMapIntoHTML,
216
205
  })
@@ -252,7 +241,6 @@ export const startCompileServer = async ({
252
241
  customCompilers,
253
242
  babelPluginMapWithoutSyntax,
254
243
  preservedUrls,
255
- workerUrls,
256
244
  importMapInWebWorkers,
257
245
  moduleOutFormat,
258
246
  sourcemapMethod,
@@ -343,8 +331,6 @@ export const startCompileServer = async ({
343
331
  topLevelAwait,
344
332
  babelPluginMap,
345
333
  customCompilers,
346
- workerUrls,
347
- serviceWorkerUrls,
348
334
  prependSystemJs,
349
335
  jsenvEventSourceClientInjection,
350
336
  jsenvToolbarInjection,
@@ -17,6 +17,7 @@
17
17
 
18
18
  .browser_support_text[data-warning],
19
19
  .files_compilation_text[data-warning] {
20
- background: orange;
21
- color: black;
20
+ color: #cb5909;
21
+ margin-bottom: 5px;
22
+ display: block;
22
23
  }
@@ -3,8 +3,7 @@
3
3
  }
4
4
 
5
5
  #settings-button[data-warning] svg {
6
- fill: orange;
7
- stroke: darkorange;
6
+ fill: #cb5909;
8
7
  }
9
8
 
10
9
  #settings-button[data-warning] svg:hover {
@@ -475,13 +475,17 @@
475
475
  <div data-when="has_warning:yes">
476
476
  <svg
477
477
  xmlns="http://www.w3.org/2000/svg"
478
- viewBox="0 0 511.999 511.999"
479
- width="24px"
480
- height="24px"
478
+ viewBox="0 0 45.818 45.818"
479
+ width="20px"
480
+ height="20px"
481
481
  class="iconToolbar"
482
+ style="transform: rotate(180deg)"
482
483
  >
483
484
  <path
484
- d="M506.43 421.536 291.573 49.394c-15.814-27.391-55.327-27.401-71.147 0L5.568 421.536c-15.814 27.391 3.934 61.616 35.574 61.616h429.714c31.629.001 51.394-34.214 35.574-61.616zm-231.609-36.502c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-11.239c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v11.239zm0-73.332c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-107.89c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v107.89z"
485
+ d="M22.909,0C10.258,0,0,10.257,0,22.908c0,12.652,10.258,22.91,22.909,22.91s22.909-10.258,22.909-22.91
486
+ C45.818,10.257,35.561,0,22.909,0z M26.411,35.417c0,1.921-1.573,3.478-3.492,3.478c-1.92,0-3.492-1.557-3.492-3.478V20.201
487
+ c0-1.92,1.572-3.477,3.492-3.477c1.919,0,3.492,1.556,3.492,3.477V35.417z M22.909,13.851c-2.119,0-3.837-1.718-3.837-3.836
488
+ c0-2.12,1.718-3.836,3.837-3.836c2.118,0,3.837,1.716,3.837,3.836C26.746,12.133,25.027,13.851,22.909,13.851z"
485
489
  />
486
490
  </svg>
487
491
  </div>
@@ -62,6 +62,7 @@ export const reportToCoverage = async (
62
62
 
63
63
  if (!coverageForceIstanbul && process.env.NODE_V8_COVERAGE) {
64
64
  await visitNodeV8Directory({
65
+ logger,
65
66
  signal,
66
67
  NODE_V8_COVERAGE: process.env.NODE_V8_COVERAGE,
67
68
  onV8Coverage: (nodeV8Coverage) => {
@@ -8,6 +8,7 @@ import { createDetailedMessage } from "@jsenv/logger"
8
8
  import { Abort } from "@jsenv/abort"
9
9
 
10
10
  export const visitNodeV8Directory = async ({
11
+ logger,
11
12
  signal,
12
13
  NODE_V8_COVERAGE,
13
14
  onV8Coverage,
@@ -20,7 +21,7 @@ export const visitNodeV8Directory = async ({
20
21
  if (dirContent.length > 0) {
21
22
  return dirContent
22
23
  }
23
- console.warn(`v8 coverage directory is empty at ${NODE_V8_COVERAGE}`)
24
+ logger.warn(`v8 coverage directory is empty at ${NODE_V8_COVERAGE}`)
24
25
  return dirContent
25
26
  }
26
27