Skip to content

Use TypeScript 7 RC side-by-side with TypeScript 6 compatibility#2504

Merged
pethers merged 6 commits into
mainfrom
copilot/typescript-7-0-rc-installation
Jul 8, 2026
Merged

Use TypeScript 7 RC side-by-side with TypeScript 6 compatibility#2504
pethers merged 6 commits into
mainfrom
copilot/typescript-7-0-rc-installation

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

The repository needed a safe path to evaluate TypeScript 7 RC without disrupting the existing TypeScript 6 toolchain. Microsoft’s compatibility model makes that possible by keeping the 6.x API available under the default package name while exposing the RC compiler through a separate entry point.

  • Summary

    • Adopt the TypeScript 6 compatibility package as the default typescript dependency and add a dedicated typescript-7 alias for the RC compiler.
    • Make the project’s compile entry points use the RC compiler explicitly so builds do not depend on ambiguous tsc resolution.
  • What changed

    • Updated package.json to use @typescript/typescript6 for typescript and add typescript-7 for typescript@rc.
    • Added a dedicated tsc:7 script that invokes the TypeScript 7 RC binary directly.
    • Routed build, build:check, and build:check-tests through that explicit entry point.
  • Example

{
  "devDependencies": {
    "typescript": "npm:@typescript/typescript6@^6.0.0",
    "typescript-7": "npm:typescript@rc"
  }
}

@pethers pethers marked this pull request as ready for review July 8, 2026 10:54
Copilot AI review requested due to automatic review settings July 8, 2026 10:54
@github-actions github-actions Bot added infrastructure CI/CD and build infrastructure dependencies Dependency updates javascript JavaScript dependencies labels Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dual-TypeScript setup so the repository can evaluate the TypeScript 7 RC compiler while keeping TypeScript 6 compatibility as the default typescript dependency.

Changes:

  • Switch typescript to the TypeScript 6 compatibility package (npm:@typescript/typescript6@^6.0.2) and add a typescript-7 alias for the TypeScript 7 RC compiler.
  • Add a dedicated tsc:7 script and route build / build:check / build:check-tests through it.
  • Update package-lock.json to reflect the new alias + compatibility dependency graph.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
package.json Introduces tsc:7/build scripts and dual TypeScript dependencies (TS6 compatibility + TS7 RC alias).
package-lock.json Locks the new @typescript/typescript6 and typescript-7 alias dependency trees and platform-specific optional deps for TS7.

Comment thread package.json Outdated
"typedoc": "0.28.20",
"typescript": "6.0.3",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"typescript-7": "npm:typescript@^7.0.1-rc",
Comment thread package.json
Comment on lines +61 to +64
"tsc:7": "node ./node_modules/typescript-7/bin/tsc",
"build": "npm run tsc:7",
"build:check": "npm run tsc:7 -- --noEmit",
"build:check-tests": "npm run tsc:7 -- --project tsconfig.test.json --noEmit",
Copilot AI and others added 3 commits July 8, 2026 11:43
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions Bot added the documentation Documentation updates label Jul 8, 2026
@pethers pethers merged commit 02ca180 into main Jul 8, 2026
16 checks passed
@pethers pethers deleted the copilot/typescript-7-0-rc-installation branch July 8, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates documentation Documentation updates infrastructure CI/CD and build infrastructure javascript JavaScript dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants