Testing TypeScript 7.1 Against Framework Integrations with a CI Compatibility Gate

Testing TypeScript 7.1 Against Framework Integrations with a CI Compatibility Gate

pr0h0••34 min read•coding
AI Usage (86%)
On this page

TypeScript 7.1 Compatibility Is a Testable CI Contract

TypeScript 7.1's restored compiler APIs and expanded framework integration are claims to verify, not features to assume. This post shows how to build a CI compatibility gate that pins a baseline compiler, confirms the exact TypeScript 7.1 release stage from registry metadata, probes the compiler API surface your tooling actually imports, and tests framework integrations such as Vue, Angular, and Next.js with both positive and negative checks. The point is to catch a TypeScript 7.1 tooling break before a tsc --noEmit pass hides it.

"Restores compiler APIs" is the sentence tooling authors have been waiting for since the native port announcement, and it is also the one most likely to be half true. It can mean the full typescript surface behind the old entry point, or a narrow subset behind a new one. It says nothing about whether createProgram returns a Program with the methods your language-service plugin calls today.

So this is not a TypeScript 7.1 feature tour. Treat it as a CI compatibility gate: a pinned baseline, a verified candidate, and fixtures that fail loudly when the integration contract breaks.

Why a passing tsc --noEmit check does not prove compiler API or framework compatibility

I have hit the same trap repeatedly across major TypeScript transitions: the surface you test is not the surface you use.

tsc --noEmit compiles source text. It does not touch:

  • the compiler API that your ESLint rule, codemod, type generator, or editor plugin imports as a library
  • the programmatic diagnostics path your build script reads
  • the version-pinned adapter a framework uses to bridge templates into type checking
  • the peer-dependency ranges that decide whether a framework will accept the compiler at all

A repo can go green on tsc and be broken as tooling. Someone upgrades, CI passes, and three weeks later a codemod quietly stops reporting diagnostics because getSemanticDiagnostics now returns an empty array instead of throwing. No crash, no stack trace, just missing results. That is the worst class of failure.

There is a second reason to be skeptical of a synthetic check. TypeScript's move to a native compiler — announced publicly as TypeScript 7 in early 2025 — raised a real question about whether the JavaScript compiler API would be preserved at all, and through which entry point. "Restored" has to be checked against the installed package, not against a blog headline. Background: the native port announcement from the TypeScript team.

The CI compatibility gate: pinned baseline, verified TypeScript 7.1 candidate, and framework fixtures

The design is deliberately boring:

  1. One manifest naming the exact baseline build and the exact candidate build.
  2. One fixture per integration, each with its own dependency tree and committed lockfile.
  3. One runner in plain JavaScript that installs, swaps the compiler, executes the fixture's declared checks, and writes a JSON report.
  4. One CI gate that fails when required checks are missing, when the baseline fails, or when an infrastructure error gets mistaken for a clean result.

The rule that carries the design: the baseline must pass before any candidate failure is attributed to the candidate. Without it you cannot tell a compiler regression from a fixture that was already broken.

Verify the TypeScript 7.1 Release Before Testing Its Claims

Everyone skips this part. It is also the part that decides whether the rest of the work means anything.

What the December 4–5, 2026 coverage says: beta, compiler-candidate, and browser-compiler headlines

The source material here is three aggregated headlines that do not agree:

PublisherDateHeadline
ADTmag2026-12-04TypeScript 7.1 Beta Restores Compiler APIs, Expands Framework Integration
Wisevoter2026-12-04Microsoft Releases TypeScript 7.1 Compiler Candidate
NeoTeo2026-12-05TypeScript 7.1 browser compiler: what the RC does

A beta, a "compiler candidate," and an "RC" describing what is plausibly the same artifact within roughly thirty hours. The snippets are headlines only — no version numbers, no package names, no commit SHAs.

What remains unconfirmed in TypeScript 7.1: release stage, restored API surface, framework support, and browser distribution

Stated as unknowns rather than inferred facts:

  • Release stage. Whether the published artifact is beta, rc, or final on 2026-12-04/05 is not established by these headlines. "Compiler candidate" is not a term of art in the TypeScript release process; it likely means an RC, but that is inference.
  • API surface. Which compiler APIs are restored, under which entry point, with which signatures, is unstated. The ADTmag headline is a claim, not a specification.
  • Supported frameworks. "Expands framework integration" does not name the frameworks, the versions, or whether they are supported or merely non-crashing.
  • Browser distribution. Whether an official browser artifact exists (separate package, a browser export condition, a worker-compatible bundle) is unknown.

To be explicit: I have not executed this gate against a TypeScript 7.1 build. At the time of writing there was no verified artifact identity to point it at, and inventing a version string to make the post look finished would undercut the entire argument. The commands below are real and runnable; every output block is labelled expected shape, not captured evidence.

Check official announcements, repository release notes, and package metadata without assuming a package or executable name

Do not start with npx [email protected]. Start by finding out whether that identity exists.

## 1. What does the registry actually publish?
npm view typescript dist-tags --json

## 2. What does the publish timeline look like around the date in the headlines?
npm view typescript time --json | tail -n 40

## 3. Does the exact version resolve, and what is its integrity hash?
npm view [email protected] dist.integrity dist.tarball --json
## 4. What do the repository release notes say about release stage?
gh api "repos/microsoft/TypeScript/releases?per_page=10" \
  --jq '.[] | [.tag_name, .prerelease, .published_at] | @tsv'

A pre-release usually lands under a tag other than latest — commonly beta, rc, or next. Tags are pointers, and pointers move. npm view typescript dist-tags --json gives you the current mapping; it is not a stable identity and must never be what your test matrix references.

Check the CLI entry point too. Package names and bin names have moved before in this ecosystem, and a manifest that assumes tsc exists produces a confusing ENOENT at 2 a.m. instead of a clear "this artifact has no CLI."

Record the exact package, version, release stage, and integrity hash — never pin a moving beta, rc, or next tag

Write the identity into a file that lives in the repository, and reference only that.

{
  "package": "typescript",
  "version": "<exact semver, no range, no tag>",
  "releaseStage": "beta | rc | stable | unknown",
  "distIntegrity": "<sha512-... from npm view dist.integrity>",
  "sourceUrl": "<official announcement or release note URL>",
  "verifiedAt": "2026-12-08",
  "verifiedBy": "<name>"
}

Two rules I would enforce in review:

  • If releaseStage is unknown, the candidate job runs but cannot promote. It produces evidence only.
  • If distIntegrity is missing, the identity is incomplete. A version number alone can be republished in a different registry, mirror, or internal proxy.

Build an Isolated Baseline-and-Candidate Test Layout for TypeScript 7.1

Define a compatibility manifest for compiler identities, fixture paths, framework versions, and required checks

{
  "schemaVersion": 1,
  "compilers": {
    "baseline": {
      "package": "typescript",
      "version": "<the exact version your lockfile resolves today>",
      "releaseStage": "stable",
      "source": "current production lockfile"
    },
    "candidate": {
      "package": "typescript",
      "version": "<exact candidate>",
      "releaseStage": "rc",
      "source": "<official release note URL>",
      "verifiedAt": "2026-12-08"
    }
  },
  "fixtures": [
    {
      "name": "compiler-api",
      "path": "fixtures/compiler-api",
      "required": true,
      "checks": [
        { "name": "api-surface", "command": "node", "args": ["probe.mjs"] },
        { "name": "diagnostics", "command": "node", "args": ["program.mjs"] },
        { "name": "negative", "command": "node", "args": ["negative.mjs"], "expect": "failure" }
      ]
    },
    {
      "name": "vue-tsc",
      "path": "fixtures/vue-tsc",
      "required": true,
      "checks": [
        { "name": "check", "command": "npx", "args": ["vue-tsc", "--noEmit"] },
        { "name": "negative", "command": "npx", "args": ["vue-tsc", "--noEmit", "-p", "tsconfig.negative.json"], "expect": "failure" }
      ]
    },
    { "name": "angular", "path": "fixtures/angular", "required": false, "checks": [] },
    { "name": "next", "path": "fixtures/next", "required": false, "checks": [] }
  ]
}

expect: "failure" is doing real work. It is the only mechanism in this design that can prove type checking is actually enabled, and I will come back to it.

Give each fixture an isolated dependency tree and committed lockfile so baseline runs cannot load the candidate

Each fixture is a standalone npm project with its own package.json and committed package-lock.json. No workspaces, no hoisting, no shared root node_modules. Hoisting is exactly what lets a fixture resolve typescript from three directories up and test the wrong build without telling you.

compat/
  manifest.json
  out/
fixtures/
  compiler-api/  package.json  package-lock.json  tsconfig.json  src/  probe.mjs
  vue-tsc/       package.json  package-lock.json  tsconfig.json  src/  tsconfig.negative.json
  angular/       package.json  package-lock.json
  next/          package.json  package-lock.json
scripts/
  ts-compat-runner.mjs

The runner never edits package.json or the lockfile. It installs the locked tree, then overlays the exact compiler version in a way that leaves both files byte-identical — which is what makes the baseline run reproducible from the same commit.

Pin Node.js and the package manager, and classify install failures apart from compiler regressions

package.json should carry the pins npm actually honours:

{
  "engines": { "node": "22.x" },
  "packageManager": "[email protected]"
}

Then classify install outcomes before you classify test outcomes:

  • npm ci fails → infrastructure error. The fixture tree is broken or the lockfile drifted; this says nothing about the candidate.
  • Compiler overlay fails with ERESOLVE → unsupported. A peer range rejected the candidate. Real, actionable finding — report it as such.
  • Overlay succeeds but the resolved version ≠ the requested version → infrastructure error. Something hoisted or cached; the run is invalid.
  • Fixture check fails after a clean install with the correct resolved compiler → fail. Now you have a compiler or adapter regression.

Without that taxonomy, an npm ci timeout in CI becomes "TypeScript 7.1 broke Angular," and someone files a bug that costs a maintainer an afternoon.

Inspect framework peer dependencies without bypassing them, and classify unsupported combinations explicitly

Query the declared ranges instead of guessing:

npm view @angular/compiler-cli@<version> peerDependencies --json
npm view vue-tsc@<version> peerDependencies --json
npm view typescript@<candidate> peerDependencies --json

If an adapter's peerDependencies.typescript range excludes the candidate, the honest answer is unsupported, not a workaround. --legacy-peer-deps turns a clean "not yet declared compatible" into a green check that means nothing, and it hides a real runtime mismatch behind an install that merely did not argue.

⚠️

--legacy-peer-deps and --force convert a peer-range incompatibility into a silent test pass. If a fixture needs either flag to install the candidate, record it as unsupported and stop.

Implement the TypeScript Compatibility Runner in JavaScript

Create one runnable script that validates the manifest, runs fixture commands, captures output, and writes a JSON report

Plain Node, no dependencies, so the runner itself never becomes a source of version skew.

scripts/ts-compat-runner.mjs
import { spawnSync } from "node:child_process";



const S = { PASS: "pass", FAIL: "fail", UNSUPPORTED: "unsupported", INFRA: "infra-error" };

const which = process.argv.includes("--candidate") ? "candidate" : "baseline";
const manifest = JSON.parse(readFileSync("compat/manifest.json", "utf8"));
const target = manifest.compilers[which];

if (!target?.version || /[\^~><*]|latest|next|beta|rc/.test(target.version)) {
console.error("refusing to run: compiler identity is not an exact version");
process.exit(2);
}

const run = (cmd, args, cwd) => {
const r = spawnSync(cmd, args, {
  cwd,
  encoding: "utf8",
  env: { ...process.env, npm_config_audit: "false", npm_config_fund: "false" },
});
return { code: r.status, out: (r.stdout ?? "") + (r.stderr ?? "") };
};

const resolvedCompiler = (dir) => {
try {
  const p = path.join(dir, "node_modules/typescript/package.json");
  return JSON.parse(readFileSync(p, "utf8")).version;
} catch {
  return null;
}
};

const tail = (text, n = 12) => text.trim().split("\n").slice(-n).join("\n");
const results = [];

for (const fx of manifest.fixtures) {
const base = { fixture: fx.name, compiler: which, required: fx.required !== false };

const install = run("npm", ["ci", "--ignore-scripts", "--no-audit", "--no-fund"], fx.path);
if (install.code !== 0) {
  results.push({ ...base, check: "install", status: S.INFRA, detail: tail(install.out) });
  continue;
}

// Overlay the exact compiler without touching package.json or the lockfile.
const swap = run(
  "npm",
  ["install", "--no-save", "--no-package-lock", "--ignore-scripts", `typescript@${target.version}`],
  fx.path,
);
const resolved = resolvedCompiler(fx.path);

if (swap.code !== 0 || resolved !== target.version) {
  const peerConflict = /ERESOLVE/.test(swap.out);
  results.push({
    ...base,
    check: "compiler-identity",
    status: peerConflict ? S.UNSUPPORTED : S.INFRA,
    requested: target.version,
    resolved,
    detail: tail(swap.out),
  });
  continue;
}

for (const check of fx.checks ?? []) {
  const r = run(check.command, check.args, fx.path);
  const expectFailure = check.expect === "failure";
  const ok = expectFailure ? r.code !== 0 : r.code === 0;
  results.push({
    ...base,
    check: check.name,
    status: ok ? S.PASS : S.FAIL,
    resolvedCompiler: resolved,
    exitCode: r.code,
    expected: check.expect ?? "success",
    detail: ok ? "" : tail(r.out),
  });
}
}

const report = {
schemaVersion: 1,
compiler: which,
identity: target,
runtime: { node: process.version, platform: process.platform, arch: process.arch },
results,
};

mkdirSync("compat/out", { recursive: true });
writeFileSync(`compat/out/${which}-${target.version}.json`, JSON.stringify(report, null, 2));

const bad = results.filter((r) => r.status !== S.PASS);
process.exitCode = bad.length ? 1 : 0;

The regex guard on line 12 is the most important four lines in the file — it rejects latest, beta, rc, next, and any range operator before a single install runs.

Record the compiler actually resolved inside each fixture, not just the version requested by CI

resolvedCompiler() reads node_modules/typescript/package.json from inside the fixture directory after the overlay. If the tree somehow resolves a different build — stale cache, hoisted copy, a lockfile that pinned something else — the identity check catches it and marks the run invalid instead of reporting green against the wrong compiler.

The runner also stamps runtime.node into every report. A compiler result without the runtime it was observed on is not reproducible.

Define pass, fail, unsupported, and infrastructure-error results with an explicit required-check policy

StatusMeaningGate effect
passCheck succeeded against the recorded compiler identityRequired checks must be pass
failCheck ran against the correct compiler and did not behave as expectedBlocks promotion
unsupportedPeer range or documented support excludes the candidateAllowed, but counts as an open gap
infra-errorInstall, overlay, or identity verification failedBlocks, and is never attributed to the compiler

The promotion policy I would use:

  1. Every required: true fixture must have at least one pass per declared check.
  2. No required fixture may be fail or infra-error.
  3. unsupported on a required fixture is a blocker unless the manifest records an owner and a decision date.
  4. A missing report file for a required fixture is a failure, not a skip.

Rule 4 exists because a cancelled matrix job produces no report, and "no report" reads as "no failures" to anything that only greps for fail.

Show local runner commands and illustrative report output without presenting an unexecuted example as observed

node scripts/ts-compat-runner.mjs            # baseline
node scripts/ts-compat-runner.mjs --candidate
cat compat/out/baseline-<version>.json | jq '.results[] | {fixture, check, status}'

The report below is the expected shape of compat/out/candidate-<version>.json — a template, not captured output. I had no verified candidate build to run it against.

{
  "schemaVersion": 1,
  "compiler": "candidate",
  "identity": {
    "package": "typescript",
    "version": "<exact candidate>",
    "releaseStage": "rc",
    "source": "<official release note URL>",
    "verifiedAt": "2026-12-08"
  },
  "runtime": { "node": "v22.x.y", "platform": "linux", "arch": "x64" },
  "results": [
    { "fixture": "compiler-api", "check": "api-surface", "status": "fail",
      "detail": "missing exports: createProgram, createIncrementalProgram" },
    { "fixture": "compiler-api", "check": "diagnostics", "status": "fail",
      "expected": ["TS2322"], "detail": "expected 1 diagnostic, got 0" },
    { "fixture": "vue-tsc", "check": "install", "status": "infra-error",
      "detail": "npm ci exited 1" },
    { "fixture": "angular", "check": "compiler-identity", "status": "unsupported",
      "requested": "<exact candidate>", "resolved": null,
      "detail": "ERESOLVE: peer typescript@<range> from @angular/compiler-cli" }
  ]
}

Two things that report gets right: the API gap is separated from the identity problem, and Angular comes back unsupported with the peer range quoted instead of a green check produced by a flag.

Test the TypeScript Compiler API Surface Your Tooling Actually Uses

Turn the reported API restoration into a checklist verified against official docs and the installed package

Start with an inventory of what your code imports. Not the full typescript namespace — the actual set.

rg -o --no-filename 'ts\.[A-Za-z]+' src scripts | sort | uniq -c | sort -rn | head -40

That output is your checklist. A codemod shop needs createSourceFile, forEachChild, factory functions, and the printer. A type generator needs createProgram, TypeChecker, getDeclarations, emit. A lint rule needs TypeChecker and node predicates. Very different risk profiles, and only one of them cares whether createIncrementalProgram survived.

Cross-reference against the compiler API documentation, then against the installed package. Documentation says what should exist; the package says what does.

Probe the documented compiler entry point and required exports before deeper compatibility tests

fixtures/compiler-api/probe.mjs
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);

const required = [
"createProgram",
"createSourceFile",
"getPreEmitDiagnostics",
"forEachChild",
"isCallExpression",
"createPrinter",
];

let ts;
try {
ts = require("typescript");
} catch (err) {
console.error(JSON.stringify({ ok: false, reason: "entry-point-load-failed", message: String(err) }));
process.exit(1);
}

const present = required.filter((k) => typeof ts[k] === "function");
const missing = required.filter((k) => typeof ts[k] !== "function");

console.log(JSON.stringify({
ok: missing.length === 0,
entryPoint: require.resolve("typescript"),
version: ts.version,
present,
missing,
}, null, 2));

process.exit(missing.length === 0 ? 0 : 1);

Three details matter. createRequire so the probe works from an ESM fixture. require.resolve("typescript") so you can see which file answered. A non-zero exit so the runner records fail instead of parsing stdout.

If the probe reports entry-point-load-failed, stop. Everything downstream would be testing an error message.

Build a multi-file fixture with configuration loading, module resolution, and a deliberate type error

A single-file fixture will not catch module resolution changes, and module resolution is one of the areas that shifts between compiler generations.

fixtures/compiler-api/
  tsconfig.json
  src/index.ts       imports { User } from "./model"
  src/model.ts       export interface User { id: number; name: string }
  src/util.ts        export const make = (id: number, name: string): User => ({ id, name })
  src/bad.ts         const ok: number = "not a number";
{
  "compilerOptions": {
    "strict": true,
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "noEmit": false,
    "declaration": true,
    "outDir": "dist",
    "baseUrl": ".",
    "paths": { "@model/*": ["src/*"] }
  },
  "include": ["src/**/*.ts"]
}

paths plus a non-relative @model/user import forces both configuration loading and resolution mapping through the program. If either changes, the diagnostic set changes, and the assertion catches it.

Exercise program creation, diagnostics, symbol inspection, AST traversal, and emit only where the verified API supports them

fixtures/compiler-api/program.mjs
import { createRequire } from "node:module";


const require = createRequire(import.meta.url);
const ts = require("typescript");

const configPath = ts.findConfigFile("./src", ts.sys.fileExists, "tsconfig.json");
if (!configPath) throw new Error("tsconfig not found");

const parsed = ts.getParsedCommandLineOfConfigFile(configPath, {}, {
...ts.sys,
onUnRecoverableConfigFileDiagnostic: (d) => { throw new Error(ts.flattenDiagnosticMessageText(d.messageText, "\n")); },
});

const program = ts.createProgram({
rootNames: parsed.fileNames,
options: parsed.options,
});

const diagnostics = ts.getPreEmitDiagnostics(program);
const codes = diagnostics.map((d) => d.code).sort();
const check = { codes, expected: [2322], ok: JSON.stringify(codes) === JSON.stringify([2322]) };

// Symbol inspection: resolve the import target and confirm it is an interface.
const checker = program.getTypeChecker();
const indexFile = program.getSourceFile("src/index.ts");
const target = indexFile && checker.getSymbolAtLocation(indexFile.statements[0].moduleSpecifier);
const exports = target ? checker.getExportsOfModule(target) : [];
const userSymbol = exports.find((s) => s.getName() === "User");
const userDecl = userSymbol?.declarations?.[0];

// Emit with an in-memory writer so artifacts can be attached to CI.
const emitted = new Map();
const emitResult = program.emit(undefined, (fileName, text) => { emitted.set(fileName, text); });

const sourceFile = program.getSourceFile("src/util.ts");
let callCount = 0;
sourceFile && ts.forEachChild(sourceFile, function visit(node) {
if (ts.isCallExpression(node)) callCount++;
ts.forEachChild(node, visit);
});

const out = {
check,
symbol: { found: Boolean(userSymbol), kind: userDecl && ts.SyntaxKind[userDecl.kind] },
emit: { skipped: emitResult.emitSkipped, files: [...emitted.keys()] },
ast: { callExpressions: callCount },
};

writeFileSync("dist-api-report.json", JSON.stringify(out, null, 2));
process.exit(check.ok ? 0 : 1);

Each block is its own contract: diagnostics through getPreEmitDiagnostics, symbols through getSymbolAtLocation plus getExportsOfModule, traversal through forEachChild, emit through a custom write callback. When one of those methods disappears, the failure names the layer.

Assert diagnostic codes, locations, symbol relationships, and emitted behavior instead of brittle snapshots

The fixture asserts that codes equals [2322], not the full diagnostic text. Diagnostic wording is the most volatile string in the compiler — phrasing, suggestion lists, and formatting all move between releases, and snapshotting it produces diffs nobody can act on. Codes are stable API.

Better assertions in the same spirit:

  • The diagnostic's start position falls inside src/bad.ts, not inside a .d.ts from node_modules.
  • getExportsOfModule returns an export named User whose declaration kind is InterfaceDeclaration.
  • The emitted file map contains dist/util.js and dist/util.d.ts.
  • emitResult.emitSkipped is false on a non-noEmitOnError config.

The .d.ts list deserves its own assertion. Declaration emit is where native-compiler output differences tend to surface first, and a missing .d.ts in a consumer's build is silent breakage.

Test incremental rebuilds, language-service operations, and transforms only when your tooling depends on them

Skip this section entirely if your tooling is a one-shot codemod. If it is an editor plugin or a watch-mode build, this is where your real risk lives.

Worth testing, but only if you use them:

  • ts.createIncrementalProgram + a second emit() — count writes in the custom callback to confirm unchanged files are not re-written, and assert the second run's diagnostic set matches the first.
  • ts.createLanguageService(host) with a host implementing getScriptFileNames, getScriptVersion, getScriptSnapshot — assert getSemanticDiagnostics(fileName) matches the program's result for the same file.
  • ts.transform with a custom transformer — assert the transform runs and the printer round-trips without throwing.
  • createSourceFile with setParentNodes: true if your AST code depends on parent links. It matters for forEachChild traversal patterns and it is cheap to assert.

If a documented API exists but behaves differently — an incremental rebuild that re-emits everything, say — that is a behavioural regression and deserves its own status line instead of being folded into "API missing."

Separate a missing API, a changed signature, and a behavioral regression in the report

SymptomReport asTypical cause
typeof ts.createProgram !== "function"missing APIexport removed or renamed
Call throws TypeError: ... is not a function on a methodchanged signature / shapemethod moved, or return type changed
Runs, but diagnostic codes differbehavioural regressionchecking or resolution change
Runs, but emitted .d.ts differs in shapebehavioural regression (emit)declaration emitter change
ERESOLVE on installunsupportedpeer range excludes candidate

That distinction is not pedantry. "Missing API" may mean "wait for the next build." "Behavioural regression" means your output contract with consumers just changed, which is a decision you make before promoting — not after.

Exercise Framework-Owned Compilation Paths in CI

Select framework integrations from the actual application inventory, not a popularity list

Build the fixture list from real repositories, not from a list of popular frameworks. Three Next.js apps, nine Vue SPAs behind vue-tsc, one Angular admin tool: that is four fixtures. A React-only codebase does not need Angular, and an Angular-only codebase does not need Vue.

The ADTmag claim "expands framework integration" does not tell you which of your integrations is covered. Test the ones you own.

Test Vue single-file-component checking through the pinned vue-tsc version when its peer range supports the candidate

npm view vue-tsc@<pinned> peerDependencies --json

If the pinned vue-tsc version's typescript peer range accepts the candidate, run:

npx vue-tsc --noEmit

The contract here is narrower than it looks. vue-tsc goes through @vue/language-core to turn SFC templates into virtual TypeScript, then hands it to the compiler. Two failure modes, and they are different problems:

  • vue-tsc crashes on the compiler API → adapter problem, pinned to the vue-tsc version, fixable by bumping it
  • vue-tsc runs but template diagnostics vanish → compiler behaviour change, and much worse

Neither is visible from tsc --noEmit on the same project, because tsc never sees the template.

Test Angular template diagnostics through a compiler-cli version whose peer range permits the candidate

Angular is the fixture most likely to come back unsupported, and that is a legitimate outcome rather than a failure of your testing.

npm view @angular/compiler-cli@<pinned> peerDependencies --json

Angular's toolchain declares a bounded typescript peer range, and it is bounded for a reason: ngc consumes compiler internals far more aggressively than a typical adapter. If the range excludes the candidate, unsupported with the range quoted is the correct result. Do not force the install, and do not treat a crash under a forced install as a compiler bug — that is an unsupported combination doing exactly what "unsupported" predicts.

Once the peer range does allow it, a template check worth having:

npx ngc -p tsconfig.app.json --noEmit

Test the Next.js build and generated types while recording which process performs type checking

next build type-checks as part of the build and writes generated route types into .next/types. Both matter, and they are toggled differently:

  • typescript.ignoreBuildErrors: true in next.config.ts disables build-time checking entirely
  • if that flag is set, a separate tsc --noEmit step may be your only real gate

The fixture has to record which process produced the pass. A green next build with ignoreBuildErrors: true is a green check for the bundler and nothing else. Assert both:

npx next build
npx tsc --noEmit
test -f .next/types/app/page.ts   # generated types exist

The last line is the one most likely to break across a compiler transition, and it breaks silently if nothing asserts it.

Add a deliberate negative case to each supported fixture so a successful build cannot hide disabled checking

This is the check I would not merge a compatibility gate without. Every positive check needs a corresponding negative fixture that must fail.

{ "compilerOptions": { "strict": true, "noEmit": true }, "include": ["src/negative.ts"] }

with:

// src/negative.ts — must produce TS2322
export const broken: number = "definitely not a number";

Then assert non-zero exit for vue-tsc -p tsconfig.negative.json, for ngc -p tsconfig.negative.json, and for tsc --noEmit -p tsconfig.negative.json. In the Next fixture, the negative case is a bad prop type in a page component, run through tsc --noEmit with a config that includes it.

Why it is non-negotiable: there are at least four ways to get a passing framework check with checking disabled — skipLibCheck plus an over-broad include, a misconfigured tsconfig, an adapter that swallows diagnostics, or a build flag. All four look identical to a working setup. The negative case is the only thing that separates them.

Verify generated declarations, consumer imports, and runtime smoke behavior where they are part of the integration contract

A library fixture needs three layers, not one:

  1. tsc -p tsconfig.build.json produces dist/index.d.ts
  2. A consumer fixture imports from the packed tarball (npm pack → file:../lib/lib-0.0.0.tgz) and type-checks against the emitted declarations
  3. A runtime smoke test imports the built ESM output in Node and calls one exported function

Layer 2 catches declarations that emit but are structurally broken — a missing generic parameter, a widened literal, a .d.ts that references a type it does not export. Layer 3 catches output that type-checks but does not run.

Read a baseline-versus-candidate result table and identify whether each failure belongs to the compiler, adapter, or fixture

The table below is a template with illustrative values, not an observed result. Fill it from compat/out/*.json.

FixtureBaselineCandidateBlame
compiler-api / api-surfacepassfailcompiler (missing export)
compiler-api / diagnosticspassfailcompiler (behavioural)
vue-tscpasspass—
angularpassunsupportedadapter (peer range)
next / buildpasspass—
next / generated-typespassfailundetermined — see below

The last row is the interesting one. A framework check fails while the API probe passes, and the report alone cannot attribute that. Reduce it:

cd fixtures/next
npm ci
npm install --no-save --no-package-lock --ignore-scripts typescript@<candidate>
npx tsc --noEmit                     # same error?
npx next build                       # fails here but not in tsc?
cat node_modules/next/package.json | jq '.peerDependencies.typescript'

If tsc --noEmit fails identically, it is a compiler-side behaviour change and the framework is a bystander. If tsc passes and next build fails, the framework's own compilation path is the problem — a pinned adapter or an assumption about compiler internals. That is "undetermined" resolving into a real owner.

Keep TypeScript 7.1 Browser Compiler Claims Behind an Evidence Gate

Verify whether the reported browser capability is an official artifact before adding browser-specific setup

The NeoTeo headline says "browser compiler." That supports at least four implementations:

  • a documented export condition ("browser" in the package exports map)
  • a separate published package
  • a bundler-level shim stubbing node:fs and friends
  • something a blog author got working with a custom bundler config

Only the first two are artifacts you can depend on. Check the metadata:

node -p "JSON.stringify(require('./node_modules/typescript/package.json').exports, null, 2)"
node -p "require('./node_modules/typescript/package.json').browser ?? 'no browser field'"
ls node_modules/typescript/lib/ | head -30

If exports has no browser condition and no separate browser package is published, the capability is unverified and off the gate. That is not a compiler failure; it is the absence of a documented contract.

If supported, test worker initialization, virtual files, diagnostics, asset loading, and cleanup in a pinned browser

Only if the checks above come back positive. Then the fixture is a Playwright test in a pinned browser, asserting:

  • the worker initialises from the documented entry point
  • a virtual file set arrives through a documented host interface, not by patching globals
  • diagnostics for a deliberately broken virtual file come back with the expected code
  • any required runtime asset (a .wasm file, a .js shim) loads from an expected path
  • the worker terminates, and the test asserts zero remaining workers after cleanup
// trimmed for brevity — error handling omitted
await page.evaluate(async () => {
  const w = new Worker("/ts-worker.mjs", { type: "module" });
  const result = await new Promise((resolve) => {
    w.onmessage = (e) => resolve(e.data);
    w.postMessage({ files: { "/a.ts": "const x: number = 'no';" } });
  });
  w.terminate();
  return result;
});

The cleanup assertion is the one people skip. A worker that leaks per compilation is a memory bug in an editor rather than a test failure — until the tab dies.

Distinguish browser execution from editor-service support, bundler compatibility, and Node.js parity

Four distinct questions, four distinct statuses:

ClaimWhat it actually means
"Runs in a browser"the package loads under type: "module" in a worker
"Editor support"tsserver / typescript-language-server works — a protocol surface, not a browser one
"Bundler compatibility"your bundler can resolve and bundle the package without Node polyfills
"Parity"identical diagnostics and emit versus the Node build on the same inputs

A browser smoke test proves the first. It proves nothing about the other three, and parity is the expensive one: you would run the same fixture corpus through both builds and diff diagnostic codes and emitted output. That is a project, not an afternoon.

Report an unavailable or undocumented browser artifact as unverified, not as a passing check

Give it its own status so it cannot be confused with a pass:

{ "fixture": "browser-compiler", "status": "unverified",
  "reason": "no documented browser export condition or package found in the resolved artifact",
  "checkedAt": "2026-12-08" }

unverified should never satisfy a required check, and it should not be reported as skipped either. "Skipped" implies someone chose not to run it. "Unverified" records that the evidence does not exist.

Wire the TypeScript 7.1 Checks into a Required CI/CD Gate

Provide a GitHub Actions workflow with exact installs and explicit baseline-and-candidate jobs

.github/workflows/ts-compat.yml
name: ts-compat
on:
pull_request:
  paths: ["compat/**", "fixtures/**", "scripts/ts-compat-runner.mjs", ".github/workflows/ts-compat.yml"]
workflow_dispatch:

jobs:
compat:
  runs-on: ubuntu-latest
  strategy:
    fail-fast: false
    matrix:
      compiler: [baseline, candidate]
      include:
        - compiler: baseline
          ts_version: "<exact baseline version>"
        - compiler: candidate
          ts_version: "<exact candidate version>"
  steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-node@v4
      with:
        node-version: "22.x"
        cache: npm
        cache-dependency-path: fixtures/**/package-lock.json

    - name: Assert manifest identity
      run: |
        node -e '
          const m = require("./compat/manifest.json");
          const t = m.compilers[process.env.COMPILER];
          if (t.version !== process.env.TS_VERSION) {
            throw new Error("matrix version does not match manifest identity");
          }
        '
      env:
        COMPILER: ${{ matrix.compiler }}
        TS_VERSION: ${{ matrix.ts_version }}

    - run: npm ci
    - run: npm --version
    - run: node scripts/ts-compat-runner.mjs --${{ matrix.compiler }}
      env:
        COMPILER: ${{ matrix.compiler }}

    - uses: actions/upload-artifact@v4
      if: always()
      with:
        name: ts-compat-${{ matrix.compiler }}
        path: |
          compat/out/
          fixtures/**/dist-api-report.json
          fixtures/**/*.log
        retention-days: 14

The if: always() on the upload is not optional. A gate that only preserves artifacts on success gives you nothing when it fails — which is the only time you need the logs.

The workflow also asserts the matrix version against the manifest before running. That blocks the subtle bug where someone edits the workflow's ts_version, forgets the manifest, and --candidate runs the old compiler and reports a clean pass.

Key caches by runtime, package manager, fixture lockfile, and compiler identity to avoid contamination

setup-node's cache: npm caches the download cache (~/.npm), which is safe. Do not cache fixture node_modules across compiler identities; that is exactly how a baseline tree leaks into a candidate run.

If you add an explicit cache step for anything else, key it on everything that can change the resolved tree:

key: tscompat-${{ runner.os }}-node22-npm-${{ hashFiles('fixtures/**/package-lock.json') }}-${{ matrix.ts_version }}

Four components, four real variables: OS-specific optional binaries, Node ABI, the locked dependency graph, the compiler build. Drop one and you get a stale hit that makes a regression disappear.

Preserve logs, resolved dependency metadata, diagnostic summaries, and emitted artifacts on failure

The runner already writes the JSON report, and it survives failures because spawnSync captures rather than streams. Two additions worth making:

npm ls typescript --all > compat/out/deps-<identity>.txt 2>&1 || true

and the resolvedCompiler field on every result row. Together those answer "which compiler actually ran" without reconstructing it from CI timestamps.

Fail the gate on missing required checks and require a green baseline before attributing candidate failures

A small final job that reads both reports:

scripts/ts-compat-gate.mjs
import { readFileSync } from "node:fs";

const load = (which) => {
try {
  return JSON.parse(readFileSync(`compat/out/${which}-${process.env.TS_VERSION}.json`, "utf8"));
} catch {
  return null;
}
};

const base = load("baseline");
const cand = load("candidate");

if (!base || !cand) {
console.error("missing report — treating as gate failure");
process.exit(1);
}

const baselineBad = base.results.filter((r) => r.required && r.status !== "pass");
if (baselineBad.length) {
console.error("baseline is not green; candidate failures cannot be attributed");
process.exit(1);
}

const candBad = cand.results.filter((r) => r.required && (r.status === "fail" || r.status === "infra-error"));
if (candBad.length) {
console.error(JSON.stringify(candBad.map((r) => `${r.fixture}/${r.check}`), null, 2));
process.exit(1);
}

console.log("gate passed: required checks green against verified candidate identity");

The baseline check running before the candidate check is the point of the two-job design. Without it, every fixture already broken on main becomes a candidate regression and the upgrade conversation drowns in noise.

Diagnose TypeScript 7.1 Failures and Define the Upgrade Decision

Reduce failures to one fixture and classify unsupported combinations, resolution changes, API breaks, and adapter assumptions

Work the decision tree in this order, because each step eliminates a large class of causes cheaply:

  1. Identity correct? resolvedCompiler on the failing row must equal the requested version. If not, fix the harness and re-run.
  2. Peer range? If the result is unsupported, the answer is already known: the adapter does not declare support yet.
  3. Is it resolution? Run the fixture with tsc --traceResolution and diff the module list against baseline. A changed resolution result is often a moduleResolution default change, not a bug.
  4. Is it API? Run probe.mjs in isolation.
  5. Is it behaviour? Only after 1–4 are clean.

Step 3 deserves emphasis. Module resolution changes surface as a wall of unrelated-looking errors, and it is easy to read them as hundreds of behavioural regressions. Diff the resolution trace first.

Apply targeted mitigations: retain the baseline, update a supported adapter, fix the fixture, or add a tested wrapper

Four options, in order of preference:

  • Retain the baseline. The default. Do nothing until a required fixture passes. That is a valid outcome, not a failure of the upgrade process.
  • Update the adapter. If vue-tsc or @angular/compiler-cli has a release declaring the candidate in its peer range, bump the fixture's pin and re-run. Cite the release note in the PR.
  • Fix the fixture. If the failure traces to your own code — a tsconfig that relied on a removed default, a codemod using an undocumented internal — fix it on the baseline first, confirm it still passes there, then re-run the candidate.
  • Write a compatibility wrapper. Only if the API genuinely changed and you need to ship before the ecosystem catches up. It has to be tested against both compilers, in the same gate, or it becomes the thing that breaks next year.

Avoid blanket diagnostic suppression, peer-dependency bypasses, and automatic snapshot acceptance

Three anti-patterns that all look like progress:

  • // @ts-expect-error sprays or a widened skipLibCheck to get past a candidate regression. That suppresses the signal you built the gate to capture. If a diagnostic is genuinely wrong, it belongs in a tracked issue with the compiler, not in a comment.
  • --legacy-peer-deps / --force to install the candidate. That converts "unsupported" into a false "pass" and makes a real incompatibility invisible.
  • --updateSnapshot / --ci=false to accept changed output. Snapshot acceptance is a review action, not a CI action. If the emitted .d.ts changed, a human reads the diff and decides whether the change is acceptable for consumers.

If you accept a behavioural change, record it in the manifest as a reviewed decision with a date and an owner. That is different from suppressing it, because it is visible.

State acceptance criteria: verified release identity, passing integrations, reviewed output diffs, and a reproducible rollback

The full list:

  1. The candidate has an exact version, integrity hash, release stage, source URL, and verification date in compat/manifest.json.
  2. The baseline job is green on the same commit.
  3. Every required fixture is pass on both the positive and negative checks.
  4. Every emitted-output difference has a reviewed note explaining why it is acceptable.
  5. unsupported results have an owner and a decision date.
  6. Rollback is a single commit reverting the manifest's candidate version to the baseline version — no source changes, no lockfile surgery.

That last criterion is what makes promotion safe. If rolling back the compiler also requires reverting application code, the upgrade is coupled to unrelated changes and you cannot isolate a regression after the fact.

Further Reading and TypeScript 7.1 Evidence Boundaries

Primary sources worth checking directly, in the order the gate checks them:

Keep the supplied reports as attributed secondary coverage, not proof of the TypeScript 7.1 release stage

Three outlets, two days, three different release-stage labels. That is the material this post was built on, and it is not enough to establish what shipped:

PublisherDateHeadlineLink
ADTmag2026-12-04TypeScript 7.1 Beta Restores Compiler APIs, Expands Framework Integrationcoverage
Wisevoter2026-12-04Microsoft Releases TypeScript 7.1 Compiler Candidatecoverage
NeoTeo2026-12-05TypeScript 7.1 browser compiler: what the RC doescoverage

What these headlines support: multiple outlets reported on a TypeScript 7.1 pre-release around December 4–5, 2026, mentioning compiler API restoration, framework integration, and a browser compiler. What they do not support: the release stage, the list of restored APIs, which frameworks have declared support, or the existence of a distributable browser artifact. All of that is marked unverified above, and the gate is built to answer it from metadata rather than from prose.

Promote an exact compiler build only when the integration contract passes, not because a release label sounds ready

Where I land:

Promote on evidence, not vocabulary. A beta, an RC, and a "compiler candidate" are three names for the same unknown until the registry metadata, the release notes, and your own fixtures agree. None of those words tells you whether createProgram returns what your codemod needs or whether vue-tsc still surfaces template diagnostics.

Treat the compiler API as a public API of your tooling, and test it like one. The upgrade failure I expect to see most often is not a syntax break — it is a tooling build going green while diagnostics silently return empty. tsc --noEmit cannot see that. A probe that checks export presence, diagnostic codes, symbol relationships, and emit output can.

Keep the negative case. Every framework fixture needs a file that must fail type checking. Without it, your gate is one ignoreBuildErrors: true away from certifying a compiler that is not doing anything.

Keep unsupported honest. When a peer range says not yet, record it and wait. --legacy-peer-deps buys a green check and spends the trust the gate was built to earn.

Keep the baseline. It is not bureaucracy. It is the only thing that separates "7.1 broke this" from "this was already broken," and it is what makes the rollback a one-line manifest change.

The upgrade is worth doing when the evidence says so. Build the gate first, and the evidence arrives on its own.

Share this post

More posts

Loading comments…