@jsenv/core 27.0.0-alpha.26 → 27.0.0-alpha.29

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "27.0.0-alpha.26",
3
+ "version": "27.0.0-alpha.29",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -66,7 +66,7 @@
66
66
  "@jsenv/node-esm-resolution": "0.0.4",
67
67
  "@jsenv/server": "12.6.1",
68
68
  "@jsenv/uneval": "1.6.0",
69
- "@jsenv/utils": "1.4.1",
69
+ "@jsenv/utils": "1.4.2",
70
70
  "construct-style-sheets-polyfill": "3.1.0",
71
71
  "cssnano": "5.1.7",
72
72
  "cssnano-preset-default": "5.2.7",
@@ -91,12 +91,11 @@
91
91
  "@jsenv/assert": "2.5.4",
92
92
  "@jsenv/eslint-config": "16.0.9",
93
93
  "@jsenv/file-size-impact": "12.1.11",
94
- "@jsenv/github-release-package": "1.3.6",
95
94
  "@jsenv/https-local": "1.0.8",
96
95
  "@jsenv/importmap-node-module": "5.1.3",
97
96
  "@jsenv/package-workspace": "0.0.5",
98
97
  "@jsenv/performance-impact": "2.2.10",
99
- "@jsenv/pwa": "4.0.1",
98
+ "@jsenv/pwa": "5.0.0",
100
99
  "eslint": "8.13.0",
101
100
  "eslint-plugin-html": "6.2.0",
102
101
  "eslint-plugin-import": "2.26.0",
@@ -22,6 +22,7 @@ import {
22
22
  fetchFileSystem,
23
23
  } from "@jsenv/server"
24
24
  import { createLogger } from "@jsenv/logger"
25
+ import { Abort } from "@jsenv/abort"
25
26
 
26
27
  import { initProcessAutorestart } from "@jsenv/utils/file_watcher/process_auto_restart.js"
27
28
  import { createTaskLog } from "@jsenv/utils/logs/task_log.js"
@@ -79,13 +80,17 @@ export const startBuildServer = async ({
79
80
  const logger = createLogger({ logLevel })
80
81
 
81
82
  let buildPromise
82
- let abortController
83
+ let buildAbortController
83
84
  const runBuild = async () => {
85
+ buildAbortController = new AbortController()
86
+ const buildOperation = Abort.startOperation()
87
+ buildOperation.addAbortSignal(signal)
88
+ buildOperation.addAbortSignal(buildAbortController.signal)
84
89
  const buildTask = createTaskLog(logger, `execute build command`)
85
90
  buildPromise = executeCommand(buildCommand, {
86
91
  cwd: rootDirectoryUrl,
87
92
  logLevel: buildCommandLogLevel,
88
- signal,
93
+ signal: buildOperation.signal,
89
94
  })
90
95
  try {
91
96
  await buildPromise
@@ -173,7 +178,7 @@ export const startBuildServer = async ({
173
178
  watchedFilePatterns,
174
179
  cooldownBetweenFileEvents,
175
180
  fileChangeCallback: ({ url, event }) => {
176
- abortController.abort()
181
+ buildAbortController.abort()
177
182
  // setTimeout is to ensure the abortController.abort() above
178
183
  // is properly taken into account so that logs about abort comes first
179
184
  // then logs about re-running the build happens
@@ -191,8 +191,8 @@ export const createRuntimeFromPlaywright = ({
191
191
  navigation: performance.navigation.toJSON(),
192
192
  measures,
193
193
  }
194
- /* eslint-enable no-undef */
195
194
  },
195
+ /* eslint-enable no-undef */
196
196
  )
197
197
  result.performance = performance
198
198
  return result
@@ -244,7 +244,10 @@ const willBeInsideJsDirectory = ({
244
244
  // generated by rollup
245
245
  return true
246
246
  }
247
- if (!jsModuleUrlInfo.data.isEntryPoint) {
247
+ if (
248
+ !jsModuleUrlInfo.data.isEntryPoint &&
249
+ !jsModuleUrlInfo.data.isWebWorkerEntryPoint
250
+ ) {
248
251
  // not an entry point, jsenv will put it inside js/ directory
249
252
  return true
250
253
  }