@veryfront/ext-bundler-esbuild 0.1.1234 → 0.1.1235

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.
@@ -1,4 +1,12 @@
1
1
  import type { BuildContext, BundleOptions, Bundler, BundleResult, TransformOptions, TransformResult } from "veryfront/extensions/bundler";
2
+ import type { ChildProcess } from "node:child_process";
3
+ /**
4
+ * Keep lifecycle tracking tolerant of Node-compatible child-process shims.
5
+ *
6
+ * Native Node represents an active child with `null` exit fields. Some
7
+ * compatible runtimes leave those fields undefined until the child exits.
8
+ */
9
+ export declare function isLiveEsbuildServiceProcess(child: Pick<ChildProcess, "killed" | "exitCode" | "signalCode">): boolean;
2
10
  /**
3
11
  * esbuild-backed {@link Bundler} implementation.
4
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"esbuild-bundler.d.ts","sourceRoot":"","sources":["../src/esbuild-bundler.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAEb,OAAO,EACP,YAAY,EAGZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AA0TtC;;;;;GAKG;AACH,qBAAa,cAAe,YAAW,OAAO;IACtC,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAsCrD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAa9D,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAqCtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiF5B"}
1
+ {"version":3,"file":"esbuild-bundler.d.ts","sourceRoot":"","sources":["../src/esbuild-bundler.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAEb,OAAO,EACP,YAAY,EAGZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+LvD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC,GAC9D,OAAO,CAIT;AAwHD;;;;;GAKG;AACH,qBAAa,cAAe,YAAW,OAAO;IACtC,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAsCrD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAa9D,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAqCtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiF5B"}
@@ -157,10 +157,19 @@ function isEsbuildServiceSpawn(spawnArgs) {
157
157
  args.some((arg) => typeof arg === "string" && arg.startsWith("--service=")) &&
158
158
  args.includes("--ping");
159
159
  }
160
+ /**
161
+ * Keep lifecycle tracking tolerant of Node-compatible child-process shims.
162
+ *
163
+ * Native Node represents an active child with `null` exit fields. Some
164
+ * compatible runtimes leave those fields undefined until the child exits.
165
+ */
166
+ export function isLiveEsbuildServiceProcess(child) {
167
+ return !child.killed &&
168
+ (child.exitCode === null || child.exitCode === undefined) &&
169
+ (child.signalCode === null || child.signalCode === undefined);
170
+ }
160
171
  function isLiveService(service) {
161
- return !service.child.killed &&
162
- service.child.exitCode === null &&
163
- service.child.signalCode === null;
172
+ return isLiveEsbuildServiceProcess(service.child);
164
173
  }
165
174
  function invokeEsbuild(operation) {
166
175
  const originalSpawn = childProcess.spawn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-bundler-esbuild",
3
- "version": "0.1.1234",
3
+ "version": "0.1.1235",
4
4
  "description": "Veryfront first-party extension package for ext-bundler-esbuild",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -50,7 +50,7 @@
50
50
  "esbuild": "0.28.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "veryfront": "^0.1.1234"
53
+ "veryfront": "^0.1.1235"
54
54
  },
55
55
  "type": "module",
56
56
  "types": "./esm/index.d.ts",