Skip to content

build: use TypeScript 7.1.0-dev.20261007.1 - #246

Draft
andrewzolotukhin wants to merge 2 commits into
developmentfrom
chore/typescript-7-1-nightly
Draft

andrewzolotukhin wants to merge 2 commits into
developmentfrom
chore/typescript-7-1-nightly

Conversation

@andrewzolotukhin

@andrewzolotukhin andrewzolotukhin commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Deferred until the official TypeScript 7.1 release. The nightly evaluation and CI fixes are retained here for later review.

Description

Pin builds and typechecks to typescript@7.1.0-dev.20261007.1. Clean monorepo builds take 62.8% less time on the measured host (37.81s → 14.06s median), with the candidate faster in all five paired runs.

  • Move declaration/consumer checks to the native CLI and port AST/editor regression tests to the native AST API and language server. Preserve all go-to-definition and hover assertions.
  • Upgrade both websites to Next.js 16.4.0 and enable experimental.useTypeScriptCli.
  • Isolate TypeDoc 0.28.20 with TypeScript 6.0.3 in a private workspace until upstream supports the native compiler. Every build, test and website compiler resolves the exact nightly.
  • Add explicit endpoint-builder variance to avoid excessive instantiation in large contracts; body/response parameters are invariant because their descriptors expose setters. Preserve scheduler storage types around the native compiler's circular comparison diagnostic, and annotate an internal Knex query builder. Add type regressions and a changeset.
  • Add scripts/benchmark-build.mjs and document reproduction.
  • Update the locked development tools to concurrently 9.2.5 and shell-quote 1.12.0 to clear the dependency-security CI failure.

Performance

Baseline: development at bd8b3791c52e3b79cd49b59cd5bbe00b0859a413, TypeScript 6.0.3. Benchmark candidate: 674699c14c090972fba804785d68532b22c4b073. Follow-up commit c3b84e06ded35650c02bbab364378285ef727f33 only updates the two development-tool lockfile entries; compiler and build code are unchanged.

Measurement Baseline median Native median Time reduction Faster pairs
Clean npm run build -- --force 37.812s 14.063s 62.8% 5/5
Compiler-only declarations, all published libraries 38.706s 8.382s 78.3% 5/5
Warm schema incremental check 0.357s 0.072s 80.0% 5/5

Same Linux x64 host, eight logical CPUs (i5-13500), Node 24.15.0, npm 11.12.1. Separate clean installations; one unmeasured warm-up per checkout followed by five alternating pairs. Remove generated package outputs/build-info before full builds; bypass Turbo cache reads; exclude installation time; filesystem caches remain warm. No concurrent local builds/tests during measured runs. The root build includes libraries and demos (24 tasks), and excludes websites as its existing script specifies. These are local measurements, not a promised CI speedup.

# Run npm ci in each disposable checkout first.
node scripts/benchmark-build.mjs --baseline /tmp/framework-baseline \
    --candidate /tmp/framework-candidate --runs 5 --output /tmp/build-results.json

Validation

CI run on the final commit: all four jobs passed.

  • Lint, build, both website typechecks: passed.
  • 5,305 unit/type tests in 295 files, no type errors: passed.
  • Coverage and every package floor: passed (92.17% statements, 86.08% branches).
  • PostgreSQL query/scheduler integrations in UTC and America/Los_Angeles, plus durable-job demos: passed.
  • Garage/S3 integration: passed.
  • 51 demo API/browser/telemetry E2E tests in 14 files: passed.
  • Dependency-security audit, packed-package smoke tests, both production website builds, and API reference generation: passed.

Additional local compatibility checks:

  • Fresh npm ci; 22 packed packages / 52 entry points, declarations and browser bundle: passed.
  • Both production website builds and isolated TypeDoc generation: passed (TypeDoc: 0 errors, 265 warnings).
  • Native navigation/hover regression suite, watch initial/edit/revert builds, and the 1,000-operation consumer with both TypeScript 7 and baseline TypeScript 6: passed.
  • Compared 293 declaration files: changes are equivalent member/union ordering, quote/import/generic-parameter spelling, and the intentional variance annotations. Compared 86 runtime JS files: equivalent after whitespace and generated chunk-hash normalization.

Dependency audit

The failed security gate was caused by concurrently 9.2.4 pinning shell-quote 1.9.0, affected by GHSA-pqg4-j6r4-53mv. The lockfile now selects concurrently 9.2.5 and its patched shell-quote 1.12.0 dependency. Only those two dependency entries changed in the CI fix.

npm audit --audit-level=high passes locally and in CI, with no high or critical findings. The existing audit threshold is unchanged; five lower-severity findings remain (three low, two moderate).

Tooling compatibility

npm ls typescript --all also flags the T3 environment packages' optional stable-only >=5.0.0 peer range. Clean installation and both website builds pass; the lockfile/compiler-isolation test confirms no legacy compiler outside TypeDoc. This remains a nightly compiler using unstable AST APIs, pinned exactly for reproducibility.

Type of Change

  • Refactor / internal improvement
  • Documentation update

Checklist

  • I've added tests for my changes
  • I've run npm run lint and fixed any issues
  • I've run npm run build
  • I've run npm run test and all tests pass
  • I've added a changeset if this changes package behavior
Raw benchmark measurements and environment

The runner captured checkout metadata before the candidate was committed during warm-up. The candidate working-tree sources measured here are commit 674699c14c090972fba804785d68532b22c4b073; timings are unmodified.

{
  "recordedAt": "2026-10-08T11:39:53.866Z",
  "machine": {
    "platform": "linux",
    "architecture": "x64",
    "cpu": "13th Gen Intel(R) Core(TM) i5-13500",
    "logicalCpus": 8,
    "memoryBytes": 25205882880,
    "node": "v24.15.0",
    "npm": "11.12.1"
  },
  "methodology": {
    "runs": 5,
    "warmups": 1,
    "ordering": "alternating baseline/candidate, reversed on odd iterations",
    "cleanBuild": "remove package dist and tsbuildinfo; npm run build -- --force",
    "declarations": "sequential tsc --project <library>/tsconfig.build.json --emitDeclarationOnly --incremental false --composite false for every published library",
    "incremental": "schema declaration-only incremental build immediately after an untimed priming build",
    "installationExcluded": true,
    "caches": "Turbo cache reads bypassed with --force; filesystem cache warm"
  },
  "checkouts": [
    {
      "name": "baseline",
      "root": "/tmp/framework-ts71-baseline",
      "commit": "bd8b3791c52e3b79cd49b59cd5bbe00b0859a413",
      "diffSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "lockSha256": "097ec53bfc3522c5b6c963559d1570f14034d0e4a805f54bd44ab70c53cfeaf5",
      "compiler": "Version 6.0.3",
      "libraries": [
        "async",
        "auth",
        "client",
        "deep",
        "di",
        "env",
        "knex-clickhouse",
        "knex-schema",
        "log",
        "mapper",
        "orm",
        "orm-cli",
        "otel",
        "react-form",
        "scheduler",
        "scheduler-postgres",
        "schema",
        "schema-json",
        "server",
        "server-openapi",
        "storage",
        "storage-s3"
      ]
    },
    {
      "name": "candidate",
      "root": "/tmp/framework-ts71",
      "commit": "bd8b3791c52e3b79cd49b59cd5bbe00b0859a413",
      "diffSha256": "03f532c2b09ee5fd30229c6b9bbbc20b8588f0b668bf4960f568e6d2a721def9",
      "lockSha256": "da84f88e43acf109486f7ca0df46c1dbeb646dca0e843ee6987fe464d9cd5fd7",
      "compiler": "Version 7.1.0-dev.20261007.1",
      "libraries": [
        "async",
        "auth",
        "client",
        "deep",
        "di",
        "env",
        "knex-clickhouse",
        "knex-schema",
        "log",
        "mapper",
        "orm",
        "orm-cli",
        "otel",
        "react-form",
        "scheduler",
        "scheduler-postgres",
        "schema",
        "schema-json",
        "server",
        "server-openapi",
        "storage",
        "storage-s3"
      ]
    }
  ],
  "samples": [
    {
      "iteration": 0,
      "warmup": true,
      "checkout": "baseline",
      "buildSeconds": 40.913456928,
      "declarationSeconds": 41.808942591000005,
      "incrementalSeconds": 0.33943513399999936
    },
    {
      "iteration": 0,
      "warmup": true,
      "checkout": "candidate",
      "buildSeconds": 15.408772026000007,
      "declarationSeconds": 8.456198915000002,
      "incrementalSeconds": 0.09165949700000056
    },
    {
      "iteration": 1,
      "warmup": false,
      "checkout": "candidate",
      "buildSeconds": 14.613228548999992,
      "declarationSeconds": 8.451224402000006,
      "incrementalSeconds": 0.06483084000000963
    },
    {
      "iteration": 1,
      "warmup": false,
      "checkout": "baseline",
      "buildSeconds": 37.324625558,
      "declarationSeconds": 38.705917591,
      "incrementalSeconds": 0.35729190400001243
    },
    {
      "iteration": 2,
      "warmup": false,
      "checkout": "baseline",
      "buildSeconds": 37.811679111000004,
      "declarationSeconds": 38.62591365900001,
      "incrementalSeconds": 0.35259891999996035
    },
    {
      "iteration": 2,
      "warmup": false,
      "checkout": "candidate",
      "buildSeconds": 14.073769008999982,
      "declarationSeconds": 8.18921567299997,
      "incrementalSeconds": 0.0715616550000268
    },
    {
      "iteration": 3,
      "warmup": false,
      "checkout": "candidate",
      "buildSeconds": 13.992978033000021,
      "declarationSeconds": 8.455170488999983,
      "incrementalSeconds": 0.07223540199996205
    },
    {
      "iteration": 3,
      "warmup": false,
      "checkout": "baseline",
      "buildSeconds": 38.00458164699999,
      "declarationSeconds": 38.21540492,
      "incrementalSeconds": 0.4236684869999881
    },
    {
      "iteration": 4,
      "warmup": false,
      "checkout": "baseline",
      "buildSeconds": 37.142466781000024,
      "declarationSeconds": 39.006707345,
      "incrementalSeconds": 0.3511056220000028
    },
    {
      "iteration": 4,
      "warmup": false,
      "checkout": "candidate",
      "buildSeconds": 13.985192161999992,
      "declarationSeconds": 8.362248239999987,
      "incrementalSeconds": 0.06268616500002099
    },
    {
      "iteration": 5,
      "warmup": false,
      "checkout": "candidate",
      "buildSeconds": 14.062949465999962,
      "declarationSeconds": 8.382470354999997,
      "incrementalSeconds": 0.07342295899998862
    },
    {
      "iteration": 5,
      "warmup": false,
      "checkout": "baseline",
      "buildSeconds": 38.573014371,
      "declarationSeconds": 39.97003503399994,
      "incrementalSeconds": 0.4589196750000119
    }
  ],
  "summary": {
    "buildSeconds": {
      "baseline": {
        "median": 37.811679111000004,
        "min": 37.142466781000024,
        "max": 38.573014371
      },
      "candidate": {
        "median": 14.062949465999962,
        "min": 13.985192161999992,
        "max": 14.613228548999992
      },
      "improvementPercent": 62.80792126497013,
      "fasterPairs": 5
    },
    "declarationSeconds": {
      "baseline": {
        "median": 38.705917591,
        "min": 38.21540492,
        "max": 39.97003503399994
      },
      "candidate": {
        "median": 8.382470354999997,
        "min": 8.18921567299997,
        "max": 8.455170488999983
      },
      "improvementPercent": 78.34318141330124,
      "fasterPairs": 5
    },
    "incrementalSeconds": {
      "baseline": {
        "median": 0.35729190400001243,
        "min": 0.3511056220000028,
        "max": 0.4589196750000119
      },
      "candidate": {
        "median": 0.0715616550000268,
        "min": 0.06268616500002099,
        "max": 0.07342295899998862
      },
      "improvementPercent": 79.97109528683183,
      "fasterPairs": 5
    }
  }
}

@andrewzolotukhin andrewzolotukhin changed the title build: adopt TypeScript 7.1 native nightly build: use TypeScript 7.1.0-dev.20261007.1 Oct 8, 2026
@andrewzolotukhin
andrewzolotukhin marked this pull request as ready for review October 9, 2026 07:16
@andrewzolotukhin
andrewzolotukhin marked this pull request as draft October 9, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant