Run the TypeScript workspaces by the name cultcache-ts actually has

`npm run build:ts` and `test:ts` have been dead since 8cb3b72, not 8dd5a45 as
first recorded. That commit renamed the package to @gamecult/cultcache-ts and
left `run-typescript-workspaces.mjs` asking npm for a workspace called
`cultcache-ts`, which no longer exists; npm refused at the first entry in the
list, so neither script reached any workspace at all. npm resolves a workspace
by manifest name, not directory, so the list moves whenever a package is scoped
— said out loud in the source now, since nothing else will say it.

The mutation runner is renamed `scripts/mutate-cultmesh.mjs`. It stopped being
about the route verifier alone when cut 2 gave it a third target, the realtime
frame codec, and a file named for one of its three targets invites the reader to
assume the other two are somebody else's problem.

`docs/typescript-quic-realtime-cut.md:46-47` names the old path; the map is
Self's and is updated separately.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-16 20:19:49 +02:00
commit 65f2b666ef
2 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,7 @@
// Mutation check for the CultMesh route verification rules.
// Mutation check for the CultMesh rules TypeScript owns: route verification and
// the realtime frame codec.
//
// Two files own those rules and each is one target here. `shared` is
// Two files own the route rules and each is one target here. `shared` is
// `packages/cultnet-ts/src/cultmesh-authority.ts`, the one verifier, killed by
// `npm run test --workspace packages/cultnet-ts`. `browser` is
// `packages/cultmesh-browser/src/index.ts`, which must *call* the shared rules
@ -20,7 +21,10 @@
// that sidecar by the next run, not by git. After the final restore each
// package is rebuilt so `dist/` never carries the last mutant.
//
// node scripts/mutate-cultmesh-authority.mjs
// `realtime` is `packages/cultmesh-ts/src/realtime-wire.ts`, the frame codec,
// killed by `npm run test --workspace packages/cultmesh-ts`.
//
// node scripts/mutate-cultmesh.mjs
import { createHash } from "node:crypto";
import { execFileSync } from "node:child_process";

View file

@ -6,7 +6,11 @@ if (!command) throw new Error("Usage: node scripts/run-typescript-workspaces.mjs
const npmCli = process.env.npm_execpath ??
join(dirname(process.execPath), "node_modules", "npm", "bin", "npm-cli.js");
const workspaces = ["cultcache-ts", "cultnet-ts", "cultmesh-ts", "cultmesh-browser"];
// npm resolves a workspace by its manifest name, not its directory, so this list
// moves when a package is scoped: `8cb3b72` renamed `cultcache-ts` to
// `@gamecult/cultcache-ts` and left this entry behind, which broke `build:ts` and
// `test:ts` for every workspace from that commit on.
const workspaces = ["@gamecult/cultcache-ts", "cultnet-ts", "cultmesh-ts", "cultmesh-browser"];
const childEnv = process.platform === "win32"
? {
...process.env,