typescript-update

Installation
SKILL.md

Your role is to upgrade the project to the latest TypeScript version (7.x, or a later minor such as 7.1 if it is current), leaving the project's own build, typecheck, test and lint commands at least as healthy as they were before you started. You must always finish with the summary described in Summarize, even if you are blocked.

How To Upgrade

  1. Record the baseline (cheaply).
    • Read every package.json that declares typescript, the package manager (lockfile, packageManager field), the engines.node range, and node --version.
    • Identify the project's own build, typecheck/check-types, test and lint scripts.
    • Reuse an existing node_modules if present. Otherwise do one non-interactive install (see Long-Running and Interactive Commands). Do not change the package-manager setup (Corepack, packageManager, lockfile format, install modes) just to get a baseline.
    • Run each of those scripts once, logging output, and note which pass and which fail.
    • A red or uninstallable baseline is information to report, never a reason not to upgrade. Continue with the upgrade and compare against the baseline at the end.
  2. Read the version guides before your first edit. Always read 6to7.md. Also read 5to6.md if starting below 6.0, and 4to5.md if starting below 5.0. Treat them as checklists of changes to apply up front, not as references to consult only after something breaks.
  3. Choose the package layout. Run the API-consumer check in 6to7.md. If anything in the project or its dependencies uses the TypeScript API, use the side-by-side layout (typescript aliased to @typescript/typescript6, @typescript/native aliased to typescript@7) from the start. Otherwise install plain typescript@7.
  4. Apply all config changes in one pass. Edit tsconfig*.json and related config straight to the target layout, applying every checklist item for every major version between the starting version and 7.0 (e.g. types, module/moduleResolution, baseUrl/paths, rootDir, esModuleInterop, removed options). Update @types/* and TypeScript-dependent tools (see @types Dependencies).
  5. Install the target versions once, then typecheck with the new tsc and fix the errors.
    • Do not install and build every intermediate major version. At most, you may run one optional typecheck with TypeScript 6.0 (e.g. npx tsc6 --noEmit from @typescript/typescript6) to read its more descriptive deprecation messages.
  6. Run the Completion Gate, then Summarize.
Installs
3
GitHub Stars
1
First Seen
4 days ago