Merge remote-tracking branch 'origin/v2/main' into v2/chore/milestone-merge-v2.3.0

Signed-off-by: cliffhall <cliff@futurescale.com>

# Conflicts:
#	package-lock.json
#	package.json
This commit is contained in:
cliffhall 2026-08-18 20:03:07 -04:00
commit 3719151081
2 changed files with 18171 additions and 2062 deletions

View file

@ -258,18 +258,29 @@ describe("runMethod", () => {
);
expect(stdout.trim().split("\n")).toHaveLength(2);
// Invoke only the SIGINT handler consumeMethodOutcome registers, rather
// than broadcasting `process.emit("SIGINT")` process-wide: `atomically`
// (loaded via core's store-io) pulls in `when-exit`, whose module-level
// `process.once("SIGINT")` handler re-raises the signal with
// `process.kill(process.pid, "SIGINT")` — on Windows an unconditional
// TerminateProcess that kills the vitest worker fork mid-run (#1941).
const listenersBefore = new Set(process.listeners("SIGINT"));
const streamPromise = consumeMethodOutcome(
{
kind: "stream",
label: "t",
start: (write) => {
write({ hi: true });
queueMicrotask(() => process.emit("SIGINT"));
return () => {};
},
},
{},
);
const added = process
.listeners("SIGINT")
.filter((listener) => !listenersBefore.has(listener));
expect(added).toHaveLength(1);
for (const listener of added) listener("SIGINT");
await streamPromise;
expect(stdout).toContain('"hi":true');
} finally {

View file

@ -16,4 +16,22 @@ export default defineConfig([
globals: globals.node,
},
},
{
// Type-aware pass for `no-floating-promises` (#1959). The rule needs type
// information, which `tseslint.configs.recommended` does not provide, and
// the parser needs a project that literally contains the linted file — so
// both of this client's tsconfig projects are listed, exactly as
// `npm run typecheck` runs them (`src` is in the first, `__tests__` only
// in the second).
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json", "./tsconfig.test.json"],
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
},
},
]);