Skip to content

fix(cli-integ): exclude TypeScript 7.x from the init-typescript-app matrix#1718

Closed
iankhou wants to merge 1 commit into
mainfrom
iankhou-fix-ts7-integ
Closed

fix(cli-integ): exclude TypeScript 7.x from the init-typescript-app matrix#1718
iankhou wants to merge 1 commit into
mainfrom
iankhou-fix-ts7-integ

Conversation

@iankhou

@iankhou iankhou commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

TypeScript 7.0.2 — the first stable release of the Go-based compiler — was published to npm on 2026-07-08 at 15:55 UTC. The init-typescript-app integ test enumerates TypeScript minor versions dynamically from npm at runtime, so 7.0 immediately entered the test matrix on every PR.

The test installs typescript@7.0 alongside ts-node@^10 and runs cdk synth through ts-node — which is incompatible with TypeScript 7 (the Go compiler no longer exposes the ts.sys API ts-node reads its configuration through). Every run since the release crashes:

TypeError: Cannot read properties of undefined (reading 'fileExists')
    at readConfig (.../ts-node/dist/configuration.js:91:33)

This fails the four integ_init-templates (init-typescript-app, *) jobs on every PR, regardless of content (first observed on #1676; the last passing run started 26 minutes before the 7.0.2 publish). The crash reproduces standalone with no CDK involvement:

npm install typescript@7.0 ts-node@^10 && npx ts-node anything.ts

Fix

Bound the version enumeration in typescriptVersionsSync to <7.0. The resulting matrix (3.9 through 6.0) is identical to what ran — and passed — before the release. Verified against npm that the fixed range excludes 7.0 and drops nothing else.

Follow-up

Testing the init template against TypeScript 7 needs a synth toolchain that supports it (a ts-node replacement such as tsx, or Node's native type stripping) — that's a template change, not a test-matrix change, so it's left out of this unblocking fix.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…atrix

TypeScript 7.0.2 (the first stable release of the Go-based compiler) was
published on 2026-07-08 and immediately entered the dynamically-enumerated
version matrix of the init-typescript-app test. The test runs 'cdk synth'
through ts-node@^10, which reads its configuration through the ts.sys API
that no longer exists in TypeScript 7, so every enumeration since then
crashes with:

    TypeError: Cannot read properties of undefined (reading 'fileExists')
        at readConfig (.../ts-node/dist/configuration.js:91:33)

This fails the integ_init-templates jobs on every PR, regardless of content.
The failure reproduces standalone (npm i typescript@7.0 ts-node@^10 &&
npx ts-node x.ts) with no CDK involvement.

Bound the enumeration to '<7.0' until the init template's synth toolchain
supports TypeScript 7 (ts-node replacement or native type stripping); 3.9
through 6.0 remain covered, identical to the matrix before the release.
@aws-cdk-automation aws-cdk-automation requested a review from a team July 8, 2026 20:09
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added the p2 label Jul 8, 2026
@iankhou iankhou marked this pull request as draft July 8, 2026 20:11
auto-merge was automatically disabled July 8, 2026 20:11

Pull request was converted to draft

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.59%. Comparing base (4086fdf) to head (063e9ba).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1718   +/-   ##
=======================================
  Coverage   89.59%   89.59%           
=======================================
  Files          77       77           
  Lines       11758    11758           
  Branches     1651     1651           
=======================================
  Hits        10534    10534           
  Misses       1195     1195           
  Partials       29       29           
Flag Coverage Δ
suite.unit 89.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants