Skip to content

Upgrade TypeScript 5.3.3 → 6.0.x (prerequisite: ESLint v10 / #1045) #1046

Closed

Description

@brunoborges

Upgrade TypeScript 5.3.3 → 6.0.x

Tracking issue for upgrading the project's TypeScript compiler from 5.3.3 to the 6.0.x line.

This supersedes the Dependabot PR #1019, which could not be merged as a standalone version bump — TypeScript 6 requires coordinated changes to the lint toolchain, the compiler target, and the built dist/ output (see below).

Why the Dependabot PR couldn't merge as-is

  1. Peer conflict with the old @typescript-eslint stack. On the previous lint toolchain, @typescript-eslint/eslint-plugin@8.48.0 declares peerDependencies.typescript: ">=4.8.4 <6.0.0", which hard-excludes TypeScript 6.0.3 and produces an ERESOLVE at install time.
  2. Compiler target too old. The current tsconfig.json uses target: "es6". Modern TypeScript errors on the source as-is: TS1503: Named capturing groups are only available when targeting 'ES2018' or later. The build (ncc build ...) fails until the target is raised.
  3. dist/ must be rebuilt. Raising the target changes the emitted/bundled output, so dist/setup/index.js and dist/cleanup/index.js must be regenerated and committed (the Check dist/ workflow enforces this).

Prerequisites

  • chore: upgrade ESLint to v10 with flat config #1045 (ESLint v10 + flat config) must be merged first. It replaces the old @typescript-eslint/* packages with typescript-eslint@8.62.0, whose parser peer range is typescript: ">=4.8.4 <6.1.0" — this is the version that actually permits TypeScript 6.0.x. Without it, the upgrade hits the ERESOLVE peer conflict described above.

Work required (after #1045 lands)

  • Rebase onto main (post-chore: upgrade ESLint to v10 with flat config #1045) and bump typescript ^5.3.3 → ^6.0.3 in package.json; regenerate package-lock.json.
  • Raise the compiler target in tsconfig.json from es6 to at least ES2018 (recommend ES2022 to also unlock Error(msg, { cause }) and modern lib features). Reconcile lib/module settings as needed.
  • Re-run npm run build and commit the regenerated dist/ (the bundle will change).
  • Audit TypeScript 6.0 breaking changes against the codebase (stricter checks, removed/changed flags, lib differences). See the TypeScript 6.0 announcement.
  • Confirm @typescript-eslint/typescript-eslint supports the chosen TS 6.0.x (peer is <6.1.0); bump if a newer line is needed.
  • Re-run the full validation matrix: npm ci, npm run lint, npm run format-check, npm run build (verify dist/ matches), npm test, npm audit --audit-level=high.

Optional follow-up (enabled by the higher target)

Notes

Closes the effort tracked by #1019.

Activity

  1. added
    dependencies
    on Jun 22, 2026
  2. added theissue type on Jun 23, 2026
  3. brunoborges commented on Jul 8, 2026

    @brunoborges
    ContributorAuthor

    This upgrade has already landed on main via #1078 ("Migrate to ESM and upgrade dependencies"). The prerequisite #1045 (ESLint v10 + flat config) is merged/closed, and the superseded Dependabot PR #1019 is closed.

    Verified the current main against every acceptance criterion in this issue:

    Requirement State
    typescript ^5.3.3 → ^6.0.3 (package.json + lock) ✅ ^6.0.3; lock resolves typescript@6.0.3
    tsconfig.json target es6 → ≥ ES2018 (recommended ES2022) ✅ target: "ES2022", module: "NodeNext"
    Rebuild + commit dist/ ✅ npm run build (ncc + typescript@6.0.3) produces no diff — dist/ already current
    @typescript-eslint/typescript-eslint supports TS 6.0.x ✅ @typescript-eslint/*@^8.62.0 (parser peer >=4.8.4 <6.1.0) on ESLint 10 flat config
    Optional: attach { cause } to re-thrown errors ✅ src/distributions/graalvm/installer.ts already re-throws with { cause: error }

    Full validation matrix — all green:

    • npm ci → 0 vulnerabilities
    • npm run lint (ESLint 10) → clean
    • npm run format-check (Prettier) → clean
    • npm run build → success, dist/ unchanged
    • npm test (Jest) → 878 passed / 26 suites
    • npm audit --audit-level=high → 0 vulnerabilities

    Closing as completed by #1078.

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

    dependencies

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions