Repository navigation
build: TypeScript 7 - #1009
build: TypeScript 7#1009
Conversation
New patch repos start on TypeScript 7 since #1009; this makes it the bar for anything published. Publish reads the version in the repo's node_modules/typescript, the compiler it runs, and refuses one outside the release's accepted range (^7.0.2) with toolchain_unsupported, before it syncs the description or runs config, Vite or the typecheck. The refusal names `pnpm add --save-dev 'typescript@^7.0.2'` and points at the patchy-preact skill, which now carries the scaffold's .oxlintrc.json for moving lint off typescript-eslint, which can't run beside TypeScript 7. Dev and refresh only warn: an existing TypeScript 6 repo keeps running locally, and published patches are untouched. As people's agents next publish them, they move. Part of #985. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review (GPT 6.1 Sol, xhigh) and what changed:
Nothing else blocked. Sol confirmed these:
|
Acceptance: PASS with notesChecked Done means — #985, step 4
Compiler canary and suite evidenceGolden journeys
Rollback answers: match the diff. No migrations, stored-data changes or infrastructure changes. The earlier CLI invokes the consumer's installed compiler and does not gate its major version, so newly scaffolded TypeScript 7 repos remain publishable after reverting this PR. Head CI's rollback rehearsal passed. Not run
Notes
|
17b0280 to
d9759cf
Compare
c270b9f to
6def2cd
Compare
New patch repos start on TypeScript 7 since #1009; this makes it the bar for anything published. Publish reads the version in the repo's node_modules/typescript, the compiler it runs, and refuses one outside the release's accepted range (^7.0.2) with toolchain_unsupported, before it syncs the description or runs config, Vite or the typecheck. The refusal names `pnpm add --save-dev 'typescript@^7.0.2'` and points at the patchy-preact skill, which now carries the scaffold's .oxlintrc.json for moving lint off typescript-eslint, which can't run beside TypeScript 7. Dev and refresh only warn: an existing TypeScript 6 repo keeps running locally, and published patches are untouched. As people's agents next publish them, they move. Part of #985. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Rebased onto #994's final head (dc83ce9), which changed only |
d9759cf to
7d6977d
Compare
The workspace compiles with TypeScript 7.0.2, the native compiler, and nothing in it reads TypeScript 6 any more. - Effect diagnostics come from @effect/tsgo. Builds and `pnpm typecheck` run `effect-tsgo tsc`, TypeScript 7 with the Effect checker built in, so `prepare` no longer patches a compiler in the shared pnpm store. The rule set is unchanged; tsgo's unstableApiUsage is off (effect/http and effect/sql are used on purpose), suggestions stay out of tsc's output, and its new schemaClassObjectLiteral warning is off until #1002. - The CLI's declarations are emitted by TypeScript 7 and bundled by Rolldown. Only the files the bundle publishes must emit cleanly, and the release's own dependencies (Preact, signals, PGlite) stay imports whatever NODE_PATH says. server.ts and csv.ts join the build's entries. - The tests that type-checked through TypeScript 6's API run the real `tsc` on a temp directory (test/typescript.ts), and esbuild strips the types the generated-client tests execute. - New patch repos scaffold typescript ^7.0.2; the offline test registry packs TypeScript 7's platform binary for this machine and skips the rest. TypeScript 7 exits 1, not 2, when it reports errors. - Dependabot moves typescript with @effect/tsgo, whose Effect-patched builds support exact TypeScript versions. Part of #985. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review found the helper reading no output as no errors, so a compiler killed by a signal or failing to start passed every type test. It now throws on a spawn error, a signal, or a nonzero exit without diagnostics. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6def2cd to
c441394
Compare
New patch repos start on TypeScript 7 since #1009; this makes it the bar for anything published. Publish reads the version in the repo's node_modules/typescript, the compiler it runs, and refuses one outside the release's accepted range (^7.0.2) with toolchain_unsupported, before it syncs the description or runs config, Vite or the typecheck. The refusal names `pnpm add --save-dev 'typescript@^7.0.2'` and points at the patchy-preact skill, which now carries the scaffold's .oxlintrc.json for moving lint off typescript-eslint, which can't run beside TypeScript 7. Dev and refresh only warn: an existing TypeScript 6 repo keeps running locally, and published patches are untouched. As people's agents next publish them, they move. Part of #985. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## What changed Patches now publish on TypeScript 7. Publishing a patch repo still on TypeScript 6 stops before anything runs, with the exact steps for the builder's agent: upgrade TypeScript, and move lint from ESLint to Oxlint, because typescript-eslint can't run beside TypeScript 7. Published patches keep running untouched, and `patchy dev` and `patchy refresh` only warn. Each repo moves the next time someone publishes it. Closes #985 (step 5 of 5). Stacked on #1009. ## Look at - **The gate (`toolchainProcess.ts`, `repoBuild.ts`).** Publish reads the version in the repo's `node_modules/typescript`, the compiler it actually runs, rather than the declared range. It checks that against the release's `typescript.accepted` (`^7.0.2`, served by `GET /api/release`) right after the release check, before it syncs the description or runs config, Vite or the typecheck. The refusal reuses `toolchain_unsupported`, exit 1 and the existing `--json` failure shape: > This repo has TypeScript 6.0.3; this release publishes only TypeScript ^7.0.2 (tested against 7.0.2). Run: pnpm add --save-dev 'typescript@^7.0.2'. typescript-eslint doesn't run beside TypeScript 7: if the lint script runs ESLint, move it to Oxlint as .agents/skills/patchy-preact/SKILL.md says. - **The lint move (`patchy-preact` skill).** The skill now carries the scaffold's `.oxlintrc.json` and what to remove. A test fails if the documented config drifts from what `patchy init` writes. - **Docs.** ADR-0004 now treats TypeScript as a publish gate, and the CLI README and `docs/product.md` follow. `docs/product.md` also drops a stale "by TypeScript AST" left from #994. ## How it was verified - The new `cliRepoBuild` case runs against a release that requires `typescript@^99`: - `refresh` exits 0 with the warning. - `publish --json` exits 1 with `toolchain_unsupported` and the upgrade line. - The only API calls during publish are `/api/me` and `/api/release`, and `patchy.config.ts` is unchanged. - `cliRepoBuild` (13), `initProject` (15) and `packages/sdk` (34) pass. `pnpm lint`, `pnpm typecheck:tests` and the CLI's `effect-tsgo` typecheck exit 0. - The upgrade path is real: three of the company's own patch repos (52, 40 and 25 files) type-check under `[email protected]`, and lint clean under the scaffold's Oxlint config, with no code changes (see #985). - Not covered by a test: `patchy dev`'s warning. It rides the same `typescriptRefusal` check and the warnings list dev already prints. ## Release impact - [x] **Breaking** — requires action from anyone already running this - [ ] **Not breaking** — no action required A patch repo on TypeScript 6 can't publish until it moves: `pnpm add --save-dev 'typescript@^7.0.2'`, then, if its lint runs ESLint, the Oxlint config from the `patchy-preact` skill. The refusal says exactly that, so a builder's agent can do it unaided. Running patches, local dev and refresh are unaffected. Deploying this needs a What's new line telling builders their next publish asks for the move. - **What does a revert leave behind?** Patch repos moved to TypeScript 7 and Oxlint, which the release before publishes fine: it never gated TypeScript. - **Does the release before it still work with that?** Yes. Made by Claude Opus 5.5 (Claude Code in T3 Code); reviewed by GPT 6.1 Sol. Co-authored-by: Claude Opus 5.5 <[email protected]>
… 7 (#1046) ## What changed This adds release 22's What's new entry, written from `a2d1331`. It covers everything merged since release 21's `through` (`f30d8fe`), and sets the `patchy` release to `0.22.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. With this release, patch repos move to TypeScript 7 and Oxlint, and Patchy's crypto runs through one Effect service. | Change | PRs | | --- | --- | | Improved: Your agent checks patches several times faster. New repos use TypeScript 7 and Oxlint, the patchy download is a third smaller, and an existing repo's next publish asks it to move over | #989, #994, #1009, #1010 | | Behind the scenes: Patchy itself builds with TypeScript 7 and Oxlint | #989, #1009 | | Behind the scenes: Encryption, signing and ids go through one place, with tests proving stored values still open | #1000, #1041, #1042 | One merged PR gets no line: #971 is release 21's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. It tells builders that their next publish of an existing repo will ask them to move to TypeScript 7, and that live patches keep working. That's the one behaviour change people will meet. - **Rollback safety, from the live commit `2f9f7c1` (release 21) to `a2d1331`:** - No PR in the range is labelled `one-way`, and none has a migration or an infrastructure change. - Every stored format is unchanged: ids, tokens, digests, sealed credentials, file handles and index names. The crypto PRs prove this with known-answer tests. - #1010 is Breaking for builders: publishing a TypeScript 6 repo is refused, with the command to fix it. A rollback lifts that refusal, and doesn't strand anyone. - `rollback-rehearsal` passed on every landed head. **Rollback line:** If this release misbehaves, roll back to `2f9f7c1` (release 21). ## How it was verified - **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and `schemas.test.ts` pass (21 tests), and prettier passes on the changed files. - **The stack.** All seven PRs were Sol-reviewed with every finding fixed, and each got an acceptance PASS or PASS with notes. Each landed after a rebase onto `main` that left it unchanged (range-diff `=`), with all 12 required checks passing. #1000's one red run was the known Fleet flake #1012, and it passed on rerun. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `2f9f7c1` (release 21). The Deploy run updated last succeeded, and none is unfinished. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Text and version numbers only. The `0.22.0` bump tells CLIs and patch repos installed before this deploy to upgrade, as every release does. - **What does a revert leave behind?** Nothing. - **Does the release before it still work with that?** Yes. Made by Claude Opus 5.5 (Claude Code in T3 Code). Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
Patchy now compiles with TypeScript 7, the native compiler, and nothing in the repo reads TypeScript 6 any more. Type-checking the workspace is 6–12× faster, building it 6.5× faster, and new patch repos start on TypeScript 7.
Part of #985 (step 4 of 5). Stacked on #1000.
Look at
@effect/tsgo. Builds andpnpm typecheckruneffect-tsgo tsc, TypeScript 7 with the Effect checker built in, soprepareno longer patches a compiler in the shared pnpm store. That patching was the trap where one worktree's install silently turned Effect rules off in another.nodeBuiltinImport,globalDateInEffect,globalConsoleInEffectandpreferSchemaOverJsonstill fail the build.unstableApiUsage, sinceeffect/httpandeffect/sqlare used on purpose (about 5,700 hits); suggestions intscoutput; and the newschemaClassObjectLiteralwarning, until Effect checker: review schemaClassObjectLiteral's findings #1002.PatchLocktest keeps its suppression; its two comments swapped order for the Go checker.scripts/build-patchy-package.mjs).NODE_PATHcan't pull them inline..d.tsfiles import exactly whatmain's do:preact,preact/compat,preact/jsx-*and@preact/signals.server.tsandcsv.tsjoined the build's entries.tscon a temp directory (test/typescript.ts), and esbuild strips the types the generated-client tests execute.typescript@^7.0.2. The offline test registry packs TypeScript 7's platform binary for this machine and skips the other platforms'. TypeScript 7 exits 1, not 2, on type errors. Publishing still accepts TypeScript 6 until the next PR.Same 16-core machine and script as the baseline in #985, medians, uncached, with equal or higher load during these runs:
main)pnpm typecheckpnpm buildpnpm lintpatchy --versiontsc --noEmit(3 real repos)How it was verified
pnpm typecheckexits 0, andpnpm build,pnpm lintandpnpm format:checkpass.[email protected]: no TypeScript 6, typescript-eslint,@effect/language-serviceor rollup-plugin-dts.pnpm test:packed-cli-e2eandpnpm test:packed-preact-e2epass locally. Real scaffolded repos installtypescript@^7.0.2from npm and type-check with it.GET /stub-server failures on this loaded machine asmain, so CI is the oracle for those.Release impact
Build tooling, plus the scaffold's TypeScript range for new repos. Existing patch repos and their publishing are untouched here.
Made by Claude Opus 5.5 (Claude Code in T3 Code); reviewed by GPT 6.1 Sol.