Skip to content

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

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.

No activity

Activity on this issue will appear here.

Activity

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

    dependenciesPull requests that update a dependency file

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions