Rewrite conformance/ in TypeScript with pnpm, vitest, turbo and eslint - #8
Merged
Conversation
…ing pnpm and vitest codec.ts/generate.ts replace codec.mjs/generate.mjs; verify.mjs becomes a vitest suite (verify.test.ts) with one test per vector instead of a hand- rolled assertion loop. Node's native TypeScript execution (26+) runs every .ts file directly, so no tsx/ts-node is needed; tsconfig.json's moduleResolution: "nodenext" and allowImportingTsExtensions match that reality rather than a bundler's more lenient resolution. codec.ts builds (tsdown) into dual ESM/CJS output with .d.mts/.d.cts declarations, and generate.ts/verify.test.ts import it by package name (self-reference) rather than a relative path, so the same artifact a real consumer would get is what actually runs here. @arethetypeswrong/cli (wired into the build script) verifies that dual-package surface resolves correctly under Node's own module resolution, catching a class of bug a bare tsc build can't see. npm's package-lock.json is replaced by pnpm's pnpm-lock.yaml throughout.
turbo.json declares build/generate/test/typecheck/lint as a task graph: generate, test, typecheck, and lint all depend on build, so codec.ts rebuilds once per invocation regardless of how many downstream tasks need it, and turbo skips work entirely when nothing relevant changed. Task names are underscore-prefixed (_build, _generate, ...) so each public package.json script (build, generate, ...) can call `turbo run _<name>` without turbo resolving that name back to the public script that invoked it. tsconfig.json is now scoped to codec.ts alone -- the one file tsdown actually builds -- since including every top-level .ts file broke tsdown's declaration generation on eslint.config.ts's own inferred type. tsconfig.node.json (extending it) covers generate.ts, verify.test.ts, and the two *.config.ts files instead; typecheck runs both. typescript is pinned to 6.0.3 rather than left on the latest 7.x: typescript-eslint does not yet support TypeScript 7, and this is the newest release still inside its own supported peer range.
pnpm/action-setup reads the packageManager field from package.json at the repo root by default, but wire-mesh has no root package.json -- only conformance/package.json declares one. The action failed outright with "No pnpm version is specified" until pointed at the right file.
Mearman
marked this pull request as ready for review
September 10, 2026 06:02
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites conformance/ from plain .mjs + npm to TypeScript + pnpm:
turbo run _<name>without recursing into themselves.Every regenerated vector file is byte-identical to what the old .mjs generator produced -- confirmed directly, this is a tooling rewrite, not a vector content change.
typescript is pinned to 6.0.3 (not left on latest 7.x): typescript-eslint doesn't support TS 7 yet, confirmed directly against the latest release.