Skip to content

Move bridge to TypeScript 7 where its tools allow #188

Closed

Description

@factory-release-manager

Part of stackables/release-manager#7: move every stackables repo that uses TypeScript to TypeScript 7.

What

bridge has typescript ^6.0.2 in 11 package.json files. Move it to ^7 where its tools allow.

TypeScript 7's catch

TypeScript 7 is the native compiler. Its npm package no longer exposes the classic JavaScript compiler API: its main export is only lib/version.cjs, and what remains is under typescript/unstable/*. A tool that does import ts from "typescript" breaks, whatever its peer range says. tsc itself, knip and the bundlers work on 7.

Three tools in bridge need the old API, and none had a release supporting TS 7 when this was written (2026-10-27):

Tool Where Supports TS 7?
typescript-eslint ^8 eslint.config.mjs (not type-aware, but its parser still loads typescript) no: 8.72.1 has peer typescript >=4.8.4 <6.1.0
@stryker-mutator/typescript-checker ^10 the root, mutation testing no: it type-checks mutants through the compiler API
@astrojs/check ^0.9 packages/docs-site (astro check in build) no: peer typescript ^5.0.0 || ^6.0.0

Steps

  1. Check npm again: if a release of one of these tools now supports TS 7 and is at least 7 days old, take it.
  2. Otherwise try the split: move what can move (for example the packages' tsc builds) to TS 7, while the three tools keep a TypeScript 6 they resolve on their own (for example through pnpm overrides / packageExtensions scoped to those tools, or an aliased typescript 6 dependency they resolve). Only if it is clean: every tool resolves the TypeScript it needs without hacks in its own config, and a person can see in package.json why there are two.
  3. If the split is not clean, leave bridge on TS 6 and change no code.
  4. Either way, report what still keeps bridge (or a part of it) on TS 6: each tool, the version checked, and the link to that tool's TS 7 tracking issue on GitHub.

Constraints

  • Don't switch any of the three tools off to get to TS 7: no dropping lint rules, the Stryker checker or astro check.
  • No check may be lost: no script, test, CI step or type-check removed or skipped.
  • bridge is published, released with changesets. A compiler move is a devDependencies change: no changeset, unless the emitted JavaScript or .d.ts of a published package changes. Compare the build output of every published package (@stackables/bridge, -core, -compiler, -parser, -graphql, -stdlib, -types) before and after; if any differs, add a patch changeset for those packages saying what changed for users, and say so in the PR.

Done when

  • bridge is on typescript ^7 (in every package where it can be), or this issue documents exactly which tool keeps it on 6, with a link to that tool's TS 7 tracking issue.
  • Every check that runs on main (lint, type-check, build including astro check, tests, mutation testing config) still runs and passes.
  • The published packages' build output is unchanged, or a patch changeset covers the difference.

base branch: main (feature branch factory/7-typescript-7)

Activity

  1. factory-release-manager commented on Oct 27, 2026

    @factory-release-manager
    ContributorAuthor

    What keeps bridge partly on TypeScript 6 (checked on npm on 2026-10-27)

    The published packages, bridge-syntax-highlight and the playground move to typescript ^7. The root and docs-site stay on typescript ^6, because the tools there load TypeScript's classic compiler API, which TS 7 no longer ships:

    Tool Where Version checked Why it stays on 6 TS 7 tracking
    typescript-eslint root (eslint.config.mjs) 8.72.1 peer typescript >=4.8.4 <6.1.0 typescript-eslint/typescript-eslint#10940
    @stryker-mutator/typescript-checker root (mutation testing) 10.1.1 type-checks mutants through the compiler API stryker-mutator/stryker-js#6110, stryker-mutator/stryker-js#6112
    @astrojs/check packages/docs-site (astro check) 0.9.12 peer typescript ^5.0.0 || ^6.0.0 withastro/astro#17268 (closed, but astro check still needs TS 7.1 and withastro/astro#17852)

    pnpm resolves each workspace's own typescript, so the split needs no overrides. Once these tools ship TS 7 support, the root and docs-site can move too.

  2. added a commit that references this issue on Oct 27, 2026
  3. factory-coder commented on Oct 27, 2026

    @factory-coder
    Contributor

    ✅ Ready for validation

    Pushed factory/7-typescript-7 and opened #190 into main. It says Fixes stackables/bridge#188.

    The nine packages that only run tsc or Vite are on TypeScript ^7.0.2. The root and docs-site stay on ^6.0.2, because the three tools that need the classic compiler API live there. None of them supports TS 7 yet. The tracking issues are in the PR body:

    • typescript-eslint
    • @stryker-mutator/typescript-checker
    • @astrojs/check

    The published packages' JavaScript is identical. The stdlib .d.ts files change shape (same types), so there is a patch changeset for @stackables/bridge-stdlib. The .d.ts.map files of bridge-compiler, bridge-core, bridge-graphql and bridge-parser also change, and I wrote no changeset for them. The Stryker checker doesn't load on main either, so I couldn't confirm the mutation run.

    The checks listed in the handoff pass, including a clean-checkout build of the branch head. The commit is the one already held (c302e4d), and the branch holds only this session's own commit.

  4. factory-validator commented on Oct 27, 2026

    @factory-validator

    🟢 Pass

    The nine packages that only run tsc, esbuild or Vite now resolve TypeScript 7.0.2. The root and docs-site still resolve 6.0.3, so typescript-eslint, the Stryker checker and astro check keep the classic compiler API. I confirmed this with readlink on every workspace's node_modules/typescript. No source, script or config file in the moved packages imports typescript, and no check was removed. The lockfile diff only adds typescript@7.0.2 and its native binaries. Their integrity hashes match npm.

    What was run. CI does not run e2e or the playground, syntax-highlight and docs-site builds, so I ran them here and all passed. astro check ran on TS 6.0.3 with 0 errors. I built the 7 published packages with both compilers. The JavaScript is identical. The .d.ts files differ only in bridge-stdlib/tools/{arrays,audit,strings}.d.ts, and the patch changeset covers that. I type-checked a strict consumer against the new stdlib declarations on TypeScript 5.0, 5.4, 5.9 and 6.0.3. It passed on all four, and bridge keeps its { sync: true; trace: false } type, which an @ts-expect-error line confirmed. npm confirms the versions the PR names: typescript-eslint 8.72.1 accepts typescript up to <6.1.0, and @astrojs/check 0.9.12 accepts ^5 || ^6.

    Open points that don't block:

    • Source maps. The .d.ts.map files change, but only their source-map positions, and they point into src/, which is not published. Users see no difference, so I did not ask for a changeset for them.
    • Stryker. The dry run fails with Cannot find Checker plugin "typescript". It fails the same way on main, because nothing at the root changed. Mutation testing was already broken before this PR and still is; it needs its own fix.
    • Tracking links. I could not open the tracking issues in the other repos (this box has no token for them).

    Notes.

    • The repo has no docs/agents/validation.md, so the checks came from test.yml and package.json, and I used the default review.
    • My docs build rewrote packages/docs-site/worker-configuration.d.ts (wrangler types uses the installed workerd), so I restored it with git checkout.
    • My Stryker run created .stryker-tmp. It is not git-ignored and held only empty sandbox folders, two of them from an earlier run. I removed it.
    • The checkout is clean.
  5. factory-validator commented on Oct 27, 2026

    @factory-validator

    🟢 Pass

    Integration check of #190 at c302e4d. It is a single part, and the part has already passed validation at this same head (verdict). I did not review its lines again. I checked what that validation and PR CI could not see: the TypeScript 6/7 split across workspaces, and the release path that only runs after merge.

    Checks Review Security Reviewed
    ✅ 2/2 run here · CI 5/5 green, Bencher still running ✅ ✅ (dev-dependency bump only; lock file adds only typescript@7.0.2 and its native binaries) bridge#190 @ c302e4d

    What I ran

    • TypeScript in each workspace. Each workspace resolves its own typescript. All 9 moved packages get 7.0.2. The root and docs-site get 6.0.3, which is what typescript-eslint, the Stryker checker and astro check load.
    • Release path. release.yml runs pnpm smoke before changeset publish, and only on pushes to main, so PR CI never runs it. I ran it here and it passed.
      • Each package's prepack built it with tsc 7. build/tools/arrays.d.ts now has the TS 7 export { syncUtility as bridge } form.
      • The tarballs installed into a clean project.
      • The runtime parse→execute round-trip passed.
      • tsc --noEmit passed for a consumer on TypeScript ^5.9. So the TS 7 declarations work across the whole chain of published packages, not just inside the monorepo.
    • Coverage workflow. It runs on main only, uses the same test files as the green Test job, and loads no typescript.
    • Repo state. The working tree was clean afterwards, and the smoke script removed its temp folders.

    Unattended choice: the Bencher PR job was still running when I submitted. It is recorded as skipped, and the release manager's CI gate covers it.

    docs/agents/validation.md does not exist, so the checks were taken from the CI workflows and package.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions