node-or-bun 0.0.0-stage → 0.2.0

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 (52) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/dist/adapters/bun.d.ts +12 -0
  5. package/dist/adapters/bun.d.ts.map +1 -0
  6. package/dist/adapters/bun.js +263 -0
  7. package/dist/adapters/bun.js.map +1 -0
  8. package/dist/adapters/node.d.ts +11 -0
  9. package/dist/adapters/node.d.ts.map +1 -0
  10. package/dist/adapters/node.js +233 -0
  11. package/dist/adapters/node.js.map +1 -0
  12. package/dist/contract.d.ts +39 -0
  13. package/dist/contract.d.ts.map +1 -0
  14. package/dist/contract.js +4 -0
  15. package/dist/contract.js.map +1 -0
  16. package/dist/errors.d.ts +27 -0
  17. package/dist/errors.d.ts.map +1 -0
  18. package/dist/errors.js +25 -0
  19. package/dist/errors.js.map +1 -0
  20. package/dist/executor.d.ts +3 -0
  21. package/dist/executor.d.ts.map +1 -0
  22. package/dist/executor.js +281 -0
  23. package/dist/executor.js.map +1 -0
  24. package/dist/index.d.ts +6 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +4 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/internal/capture.d.ts +9 -0
  29. package/dist/internal/capture.d.ts.map +1 -0
  30. package/dist/internal/capture.js +58 -0
  31. package/dist/internal/capture.js.map +1 -0
  32. package/dist/internal/classification.d.ts +31 -0
  33. package/dist/internal/classification.d.ts.map +1 -0
  34. package/dist/internal/classification.js +61 -0
  35. package/dist/internal/classification.js.map +1 -0
  36. package/dist/internal/input.d.ts +9 -0
  37. package/dist/internal/input.d.ts.map +1 -0
  38. package/dist/internal/input.js +62 -0
  39. package/dist/internal/input.js.map +1 -0
  40. package/dist/internal/settlement.d.ts +15 -0
  41. package/dist/internal/settlement.d.ts.map +1 -0
  42. package/dist/internal/settlement.js +39 -0
  43. package/dist/internal/settlement.js.map +1 -0
  44. package/dist/internal/termination.d.ts +8 -0
  45. package/dist/internal/termination.d.ts.map +1 -0
  46. package/dist/internal/termination.js +22 -0
  47. package/dist/internal/termination.js.map +1 -0
  48. package/dist/testing/conformance.d.ts +12 -0
  49. package/dist/testing/conformance.d.ts.map +1 -0
  50. package/dist/testing/conformance.js +439 -0
  51. package/dist/testing/conformance.js.map +1 -0
  52. package/package.json +63 -4
@@ -0,0 +1,439 @@
1
+ import { PROCESS_CLEANUP_STEP_MS } from "../contract.js";
2
+ import { ProcessRuntimeError, isProcessRuntimeError } from "../errors.js";
3
+ import { createProcessExecutor } from "../executor.js";
4
+ const fail = (message) => {
5
+ throw new Error(message);
6
+ };
7
+ const assert = (condition, message) => {
8
+ if (!condition)
9
+ fail(message);
10
+ };
11
+ const expectError = async (code, operation) => {
12
+ try {
13
+ await operation();
14
+ }
15
+ catch (error) {
16
+ if (isProcessRuntimeError(error)) {
17
+ assert(error.code === code, `expected ${code}, received ${error.code}`);
18
+ return error;
19
+ }
20
+ throw error;
21
+ }
22
+ return fail(`expected ${code} error`);
23
+ };
24
+ const request = (options, mode, extra = {}) => ({
25
+ command: options.command,
26
+ args: [options.fixturePath, mode],
27
+ cwd: options.workingDirectory,
28
+ environment: { PROCESS_RUNTIME_CONFORMANCE: "1" },
29
+ ...extra,
30
+ });
31
+ const run = async (options, adapterMode, input) => {
32
+ return createProcessExecutor(options.adapterFactory(adapterMode)).run(input);
33
+ };
34
+ const deferred = () => {
35
+ let resolve;
36
+ const promise = new Promise((settle) => {
37
+ resolve = settle;
38
+ });
39
+ return { promise, resolve };
40
+ };
41
+ const delay = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
42
+ const syntheticStream = (values = [], failure) => ({
43
+ async *[Symbol.asyncIterator]() {
44
+ for (const value of values)
45
+ yield value;
46
+ if (failure !== undefined)
47
+ await failure();
48
+ },
49
+ });
50
+ const syntheticRunning = (exited, stdout, stderr, cleanup) => ({
51
+ stdout,
52
+ stderr,
53
+ exited,
54
+ cleanup,
55
+ closeCapture: async () => undefined,
56
+ });
57
+ const syntheticNeverEndingStream = () => ({
58
+ async *[Symbol.asyncIterator]() {
59
+ await new Promise(() => undefined);
60
+ },
61
+ });
62
+ const syntheticRun = async (running, request) => createProcessExecutor({
63
+ launch: async () => running,
64
+ }).run(request);
65
+ const expectSyntheticError = async (code, operation) => expectError(code, operation);
66
+ const runArbitrationCases = async () => {
67
+ const baseRequest = {
68
+ command: "synthetic",
69
+ args: [],
70
+ cwd: ".",
71
+ };
72
+ // Detects: cancellation observed before exit is the first initiating cause;
73
+ // a later numeric exit remains an observed fact but cannot replace it.
74
+ {
75
+ const controller = new AbortController();
76
+ const exit = deferred();
77
+ const running = syntheticRunning(exit.promise, syntheticStream(), syntheticStream(), async () => {
78
+ exit.resolve({ exitCode: 17, signal: null });
79
+ });
80
+ const resultPromise = syntheticRun(running, {
81
+ ...baseRequest,
82
+ signal: controller.signal,
83
+ });
84
+ controller.abort();
85
+ const error = await expectSyntheticError("cancelled", () => resultPromise);
86
+ assert(error.facts.initiatingCause === "cancellation", "cancellation lost its initiating cause");
87
+ assert(error.facts.completionRequestedBeforeExitObservation, "pre-exit cancellation lost its completion-order fact");
88
+ assert(error.facts.observedExit?.exitCode === 17, "cancellation arbitration lost the observed Exit fact");
89
+ }
90
+ // Detects: cancellation must not hide a later capture failure.
91
+ {
92
+ const controller = new AbortController();
93
+ const exit = deferred();
94
+ const running = syntheticRunning(exit.promise, syntheticStream([], async () => {
95
+ await delay(5);
96
+ throw new Error("late capture failure");
97
+ }), syntheticStream(), async () => {
98
+ exit.resolve({ exitCode: 0, signal: null });
99
+ });
100
+ const resultPromise = syntheticRun(running, {
101
+ ...baseRequest,
102
+ signal: controller.signal,
103
+ });
104
+ controller.abort();
105
+ const error = await expectSyntheticError("cancelled", () => resultPromise);
106
+ assert(error.facts.initiatingCause === "cancellation", "later capture failure replaced the first initiating cancellation");
107
+ assert(error.facts.lateFailureCodes.includes("stream"), "later capture failure was not preserved as a neutral code");
108
+ }
109
+ // Detects: cancellation must not hide a later strict UTF-8 decode failure.
110
+ {
111
+ const controller = new AbortController();
112
+ const exit = deferred();
113
+ const running = syntheticRunning(exit.promise, syntheticStream([new Uint8Array([0xff])]), syntheticStream(), async () => {
114
+ exit.resolve({ exitCode: 0, signal: null });
115
+ });
116
+ const resultPromise = syntheticRun(running, {
117
+ ...baseRequest,
118
+ signal: controller.signal,
119
+ strictUtf8: true,
120
+ });
121
+ controller.abort();
122
+ const error = await expectSyntheticError("cancelled", () => resultPromise);
123
+ assert(error.facts.initiatingCause === "cancellation", "later decode failure replaced the first initiating cancellation");
124
+ assert(error.facts.lateFailureCodes.includes("invalid-output"), "later decode failure was not preserved as a neutral code");
125
+ }
126
+ // Detects: an abnormal read settlement must finish through native close, but
127
+ // successful routine cleanup must preserve the stream's initiating reason.
128
+ {
129
+ let cleanupRequested = false;
130
+ let closeRequested = false;
131
+ const running = {
132
+ stdout: syntheticStream([], async () => {
133
+ throw new Error("early native read failure");
134
+ }),
135
+ stderr: syntheticStream(),
136
+ exited: Promise.resolve({ exitCode: 0, signal: null }),
137
+ cleanup: async () => {
138
+ cleanupRequested = true;
139
+ },
140
+ closeCapture: async () => {
141
+ closeRequested = true;
142
+ },
143
+ };
144
+ const error = await expectSyntheticError("stream", () => syntheticRun(running, baseRequest));
145
+ assert(error.message.includes("stdout capture failed"), "abnormal capture lost its initiating reason");
146
+ assert(error.cause instanceof Error && error.cause.message === "early native read failure", "abnormal capture lost the native read cause");
147
+ assert(cleanupRequested, "abnormal capture skipped owned cleanup");
148
+ assert(closeRequested, "abnormal capture skipped idempotent native close");
149
+ assert(!error.incompleteCustody, "successful abnormal-error cleanup claimed incomplete custody");
150
+ }
151
+ // Detects: an independently pending capture remains subject to the EOF
152
+ // deadline even after the other capture has already failed.
153
+ {
154
+ let pendingSettled;
155
+ let closeRequested = false;
156
+ const running = {
157
+ stdout: syntheticStream([], async () => {
158
+ throw new Error("independent stdout read failure");
159
+ }),
160
+ stderr: {
161
+ [Symbol.asyncIterator]() {
162
+ return {
163
+ next: () => new Promise((resolve) => {
164
+ pendingSettled = resolve;
165
+ }),
166
+ };
167
+ },
168
+ },
169
+ exited: Promise.resolve({ exitCode: 0, signal: null }),
170
+ cleanup: async () => undefined,
171
+ closeCapture: async () => {
172
+ closeRequested = true;
173
+ pendingSettled?.({ done: true, value: undefined });
174
+ },
175
+ };
176
+ const started = Date.now();
177
+ const error = await expectSyntheticError("cleanup", () => syntheticRun(running, baseRequest));
178
+ assert(closeRequested, "mixed capture failure skipped forced native closure");
179
+ assert(error.incompleteCustody, "mixed pending capture claimed release");
180
+ assert(error.initiatingError instanceof Error &&
181
+ error.initiatingError.message === "stdout capture failed", "mixed pending capture lost its initiating stream error");
182
+ assert(error.cause instanceof Error && error.cause.message === "capture EOF deadline elapsed", "mixed pending capture lost the EOF-deadline cause");
183
+ assert(Date.now() - started >= PROCESS_CLEANUP_STEP_MS, "mixed pending capture bypassed the EOF deadline");
184
+ }
185
+ // Detects: rejected undefined is an explicit cleanup/close failure and is
186
+ // retained in aggregation instead of being mistaken for successful closure.
187
+ {
188
+ const running = {
189
+ stdout: syntheticStream([], async () => {
190
+ throw undefined;
191
+ }),
192
+ stderr: syntheticStream(),
193
+ exited: Promise.resolve({ exitCode: 0, signal: null }),
194
+ cleanup: async () => {
195
+ throw undefined;
196
+ },
197
+ closeCapture: async () => {
198
+ throw undefined;
199
+ },
200
+ };
201
+ const error = await expectSyntheticError("cleanup", () => syntheticRun(running, baseRequest));
202
+ assert(error.incompleteCustody, "undefined cleanup rejection claimed release");
203
+ assert(error.initiatingError instanceof Error &&
204
+ error.initiatingError.message === "stdout capture failed", "undefined cleanup rejection lost its initiating stream error");
205
+ const aggregate = error.cause;
206
+ if (!(aggregate instanceof AggregateError)) {
207
+ throw new Error("undefined cleanup rejection was not retained in aggregation");
208
+ }
209
+ if (aggregate.errors.length !== 2 || aggregate.errors[0] !== undefined) {
210
+ throw new Error("undefined cleanup rejection was not retained in aggregation");
211
+ }
212
+ const closeFailure = aggregate.errors[1];
213
+ assert(closeFailure instanceof Error &&
214
+ Object.hasOwn(closeFailure, "cause") &&
215
+ closeFailure.cause === undefined, "undefined close rejection lost its explicit cause status");
216
+ }
217
+ // Detects: timeout remains the initiating result after late capture failure.
218
+ {
219
+ const exit = deferred();
220
+ const running = syntheticRunning(exit.promise, syntheticStream([], async () => {
221
+ await delay(25);
222
+ throw new Error("late timeout capture failure");
223
+ }), syntheticStream(), async () => {
224
+ exit.resolve({ exitCode: 0, signal: null });
225
+ });
226
+ await expectSyntheticError("timeout", () => syntheticRun(running, {
227
+ ...baseRequest,
228
+ timeoutMs: 5,
229
+ }));
230
+ }
231
+ // Detects: cleanup failure during setup rollback supersedes timeout and keeps
232
+ // the initiating setup failure plus incomplete-custody fact.
233
+ {
234
+ const adapter = {
235
+ launch: async () => {
236
+ await delay(20);
237
+ throw new ProcessRuntimeError("cleanup", "setup cleanup failed", {
238
+ cause: new Error("cleanup hook failed"),
239
+ initiatingError: new Error("observer setup failed"),
240
+ incompleteCustody: true,
241
+ });
242
+ },
243
+ };
244
+ const error = await expectSyntheticError("cleanup", () => createProcessExecutor(adapter).run({
245
+ ...baseRequest,
246
+ timeoutMs: 5,
247
+ }));
248
+ assert(error.incompleteCustody, "setup cleanup failure lost incomplete custody");
249
+ assert(error.initiatingError instanceof Error &&
250
+ error.initiatingError.message === "observer setup failed", "setup cleanup failure lost its initiating setup error");
251
+ }
252
+ };
253
+ export const runProcessRuntimeConformance = async (options) => {
254
+ await runArbitrationCases();
255
+ const exact = await run(options, "normal", {
256
+ ...request(options, "echo", { args: [options.fixturePath, "echo", "one", "two"] }),
257
+ environment: { EXACT: "yes" },
258
+ });
259
+ assert(exact.stdout.includes('"argv":["echo","one","two"]'), "argv was not passed exactly");
260
+ assert(exact.stdout.includes(`"cwd":${JSON.stringify(options.workingDirectory)}`), "cwd was not passed");
261
+ assert(exact.stdout.includes('"EXACT":"yes"'), "exact environment was not passed");
262
+ assert(!exact.stdout.includes("INHERITED"), "supplied environment silently merged");
263
+ const mutableArgs = [options.fixturePath, "echo", "snapshot"];
264
+ const mutableEnvironment = { EXACT: "snapshot" };
265
+ Object.defineProperty(mutableEnvironment, "__proto__", {
266
+ value: "snapshot",
267
+ enumerable: true,
268
+ writable: true,
269
+ configurable: true,
270
+ });
271
+ let snapshotWasFrozen = false;
272
+ let snapshotOwnProto = false;
273
+ const adapter = options.adapterFactory("normal");
274
+ const snapshotRun = createProcessExecutor({
275
+ launch: async (launch) => {
276
+ snapshotWasFrozen =
277
+ Object.isFrozen(launch) &&
278
+ Object.isFrozen(launch.args) &&
279
+ Object.isFrozen(launch.environment);
280
+ snapshotOwnProto =
281
+ launch.environment !== undefined &&
282
+ Object.hasOwn(launch.environment, "__proto__") &&
283
+ launch.environment["__proto__"] === "snapshot";
284
+ return adapter.launch(launch);
285
+ },
286
+ }).run({
287
+ command: options.command,
288
+ args: mutableArgs,
289
+ cwd: options.workingDirectory,
290
+ environment: mutableEnvironment,
291
+ });
292
+ mutableArgs[2] = "mutated";
293
+ mutableEnvironment.EXACT = "mutated";
294
+ Object.defineProperty(mutableEnvironment, "__proto__", {
295
+ value: "mutated",
296
+ enumerable: true,
297
+ writable: true,
298
+ configurable: true,
299
+ });
300
+ const snapshot = await snapshotRun;
301
+ assert(snapshotWasFrozen, "request snapshot was not frozen");
302
+ assert(snapshot.stdout.includes('"argv":["echo","snapshot"]'), "args changed after run entry");
303
+ assert(snapshot.stdout.includes('"EXACT":"snapshot"'), "environment changed after run entry");
304
+ assert(snapshotOwnProto, "own __proto__ environment key was not preserved");
305
+ const concurrent = await run(options, "normal", request(options, "concurrent"));
306
+ assert(concurrent.stdout === "out-0out-1out-2", "concurrent stdout was reordered or truncated");
307
+ assert(concurrent.stderr === "err-0err-1err-2", "concurrent stderr was reordered or truncated");
308
+ const numeric = await run(options, "normal", request(options, "exit", { args: [options.fixturePath, "exit", "7"] }));
309
+ assert(numeric.exitCode === 7 && numeric.signal === null, "numeric exit facts changed");
310
+ assert(numeric.facts.initiatingCause === "exit", "numeric exit lost its neutral result classification");
311
+ assert(numeric.facts.observedExit?.exitCode === 7, "numeric result lost its observed Exit fact");
312
+ assert(numeric.facts.outputBounded, "normal capture did not retain bounded-output status");
313
+ const signal = await run(options, "normal", request(options, "signal"));
314
+ if (options.supportsSignalExit) {
315
+ assert(signal.exitCode === null && signal.signal !== null, "signal exit facts were not preserved");
316
+ }
317
+ const split = await run(options, "normal", request(options, "split-utf8"));
318
+ assert(split.stdout === "AéB", "split UTF-8 bytes were decoded too early");
319
+ const exactLimit = await run(options, "normal", request(options, "limit"));
320
+ assert(new TextEncoder().encode(exactLimit.stdout).byteLength === 4 * 1024 * 1024, "4 MiB capture limit rejected valid output");
321
+ const invalidReplacement = await run(options, "normal", request(options, "invalid-utf8"));
322
+ assert(invalidReplacement.stdout === "\uFFFD", "default UTF-8 replacement was not explicit");
323
+ const strictDecodeFailure = await expectError("invalid-output", () => run(options, "normal", {
324
+ ...request(options, "invalid-utf8"),
325
+ strictUtf8: true,
326
+ }));
327
+ assert(strictDecodeFailure.facts.initiatingCause === "decode", "strict decode lost its initiating cause");
328
+ assert(strictDecodeFailure.facts.lateFailureCodes.includes("invalid-output"), "strict decode code was not retained");
329
+ const overflowFailure = await expectError("output-limit", () => run(options, "normal", request(options, "overflow")));
330
+ assert(overflowFailure.facts.initiatingCause === "capture", "overflow lost its capture classification");
331
+ assert(overflowFailure.facts.outputBounded, "overflow lost bounded-output status");
332
+ await expectError("invalid-input", async () => {
333
+ options.adapterFactory("partial-hooks");
334
+ });
335
+ await expectError("invalid-input", async () => run(options, "normal", {
336
+ ...request(options, "echo"),
337
+ command: "",
338
+ }));
339
+ await expectError("invalid-input", async () => run(options, "normal", {
340
+ ...request(options, "echo"),
341
+ timeoutMs: 0,
342
+ }));
343
+ // Detects: sparse argv holes must reject before any adapter launch.
344
+ {
345
+ const adapter = options.adapterFactory("normal");
346
+ let launchCount = 0;
347
+ const sparseArgs = new Array(1);
348
+ await expectError("invalid-input", () => createProcessExecutor({
349
+ launch: async (launch) => {
350
+ launchCount += 1;
351
+ return adapter.launch(launch);
352
+ },
353
+ }).run({
354
+ command: options.command,
355
+ args: sparseArgs,
356
+ cwd: options.workingDirectory,
357
+ }));
358
+ assert(launchCount === 0, "sparse argv reached adapter.launch");
359
+ }
360
+ await expectError("launch", () => run(options, "normal", {
361
+ ...request(options, "touch"),
362
+ command: `missing-process-runtime-${Date.now()}`,
363
+ }));
364
+ const marker = `${options.workingDirectory}/pre-abort-marker`;
365
+ const controller = new AbortController();
366
+ controller.abort();
367
+ await expectError("cancelled", () => run(options, "normal", {
368
+ ...request(options, "touch", { args: [options.fixturePath, "touch", marker] }),
369
+ signal: controller.signal,
370
+ }));
371
+ try {
372
+ const { readFile } = await import("node:fs/promises");
373
+ await readFile(marker);
374
+ fail("pre-abort request created effects");
375
+ }
376
+ catch (error) {
377
+ assert(error.code === "ENOENT", "pre-abort marker unexpectedly exists");
378
+ }
379
+ const activeAbort = new AbortController();
380
+ const activeRun = run(options, "normal", {
381
+ ...request(options, "slow"),
382
+ signal: activeAbort.signal,
383
+ timeoutMs: 2_000,
384
+ });
385
+ setTimeout(() => activeAbort.abort(), 25);
386
+ await expectError("cancelled", () => activeRun);
387
+ await expectError("timeout", () => run(options, "normal", {
388
+ ...request(options, "slow"),
389
+ timeoutMs: 25,
390
+ }));
391
+ await expectError("launch", () => run(options, "setup-failure", request(options, "slow")));
392
+ // Detects: rollback cleanup failure must win over setup failure and retain
393
+ // the initiating setup error plus incomplete-custody fact.
394
+ const setupCleanupFailure = await expectError("cleanup", () => run(options, "setup-cleanup-failure", request(options, "slow")));
395
+ assert(setupCleanupFailure.incompleteCustody, "setup cleanup failure lost incomplete custody");
396
+ assert(setupCleanupFailure.initiatingError instanceof Error &&
397
+ setupCleanupFailure.initiatingError.message === "observer setup", `setup cleanup failure lost its initiating setup error: ${String(setupCleanupFailure.initiatingError)}`);
398
+ await expectError("launch", () => run(options, "pre-retain-failure", request(options, "slow")));
399
+ const cleanupFailure = await expectError("cleanup", () => run(options, "cleanup-failure", {
400
+ ...request(options, "slow"),
401
+ timeoutMs: 25,
402
+ }));
403
+ assert(cleanupFailure.incompleteCustody, "cleanup failure did not retain incomplete custody");
404
+ assert(cleanupFailure.facts.initiatingCause === "timeout", "cleanup failure lost timeout arbitration facts");
405
+ assert(isProcessRuntimeError(cleanupFailure.initiatingError) &&
406
+ cleanupFailure.initiatingError.code === "timeout", "cleanup failure did not retain timeout as its initiating problem");
407
+ // Detects: forced closure after the EOF deadline is cleanup failure and
408
+ // retains close-requested, cause and incomplete-custody facts. A descendant
409
+ // inheriting stdio is not a portable retained-pipe oracle:
410
+ // Windows/libuv may honestly deliver EOF when the launched child exits.
411
+ // This deterministic pair instead remains open past both cleanup bounds and
412
+ // proves that an unclosed reader is never converted into success.
413
+ {
414
+ let closeRequested = false;
415
+ const running = {
416
+ stdout: syntheticNeverEndingStream(),
417
+ stderr: syntheticNeverEndingStream(),
418
+ exited: Promise.resolve({ exitCode: 0, signal: null }),
419
+ cleanup: async () => undefined,
420
+ closeCapture: async () => {
421
+ closeRequested = true;
422
+ throw new Error("synthetic native close failed");
423
+ },
424
+ };
425
+ const error = await expectSyntheticError("cleanup", () => syntheticRun(running, {
426
+ command: "synthetic",
427
+ args: [],
428
+ cwd: ".",
429
+ }));
430
+ assert(closeRequested, "unclosed capture did not reach native close");
431
+ assert(error.incompleteCustody, "unclosed capture claimed release");
432
+ assert(error.cause instanceof Error && error.cause.message === "synthetic native close failed", "unclosed capture lost the native close failure");
433
+ }
434
+ await expectError("timeout", () => run(options, "normal", {
435
+ ...request(options, "late-overflow"),
436
+ timeoutMs: 25,
437
+ }));
438
+ };
439
+ //# sourceMappingURL=conformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance.js","sourceRoot":"","sources":["../../src/testing/conformance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBA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KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,+BAA+B,EACvF,gDAAgD,CACjD,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,CAAC,SAAS,EAAE,GAAG,EAAE,CAChC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE;QACrB,GAAG,OAAO,CAAC,OAAO,EAAE,eAAe,CAAC;QACpC,SAAS,EAAE,EAAE;KACd,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "node-or-bun",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Runtime-agnostic process execution",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/agent-teams-ai/process-runtime.git"
9
+ },
10
+ "type": "module",
11
+ "types": "./dist/index.d.ts",
12
+ "sideEffects": false,
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ },
18
+ "./node": {
19
+ "types": "./dist/adapters/node.d.ts",
20
+ "import": "./dist/adapters/node.js"
21
+ },
22
+ "./bun": {
23
+ "types": "./dist/adapters/bun.d.ts",
24
+ "import": "./dist/adapters/bun.js"
25
+ },
26
+ "./testing": {
27
+ "types": "./dist/testing/conformance.d.ts",
28
+ "import": "./dist/testing/conformance.js"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "README.md",
34
+ "CHANGELOG.md",
35
+ "LICENSE"
36
+ ],
37
+ "engines": {
38
+ "node": "^24.18.0 || ^26.0.0",
39
+ "bun": ">=1.4.3"
40
+ },
41
+ "scripts": {
42
+ "clean": "node scripts/clean.ts",
43
+ "build": "tsc -p tsconfig.build.json",
44
+ "typecheck": "tsc -p tsconfig.root.json && tsc -p tsconfig.node.json && tsc -p tsconfig.bun.json && tsc -p tsconfig.tests.json",
45
+ "test": "npm run build && npm run build:tests && npm run test:node && npm run test:bun",
46
+ "build:tests": "tsc -p tsconfig.test-build.json",
47
+ "test:node": "node --test dist-tests/tests/conformance.node.test.js dist-tests/tests/native-lifecycle.node.test.js",
48
+ "test:bun": "bun test ./dist-tests/tests/conformance.bun.test.js ./dist-tests/tests/native-lifecycle.bun.test.js",
49
+ "test:node-under-bun": "node scripts/run-node-under-bun.ts",
50
+ "pack": "node scripts/pack.ts",
51
+ "qualify": "node scripts/qualify-installed-consumer.ts",
52
+ "verify-toolchain": "node scripts/verify-toolchain.ts",
53
+ "verify-node24": "node scripts/verify-node-compat.ts",
54
+ "check": "npm run verify-toolchain && npm run typecheck && npm run test && npm run test:node-under-bun && npm run pack && npm run qualify"
55
+ },
56
+ "devDependencies": {
57
+ "@types/bun": "1.4.3",
58
+ "@types/node": "26.6.5",
59
+ "typescript": "7.0.2"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "provenance": true
64
+ }
65
+ }