Skip to content

build(deps-dev): bump typescript from 6.0.3 to 7.0.2#95

Merged
unknowIfGuestInDream merged 3 commits into
masterfrom
dependabot/npm_and_yarn/typescript-7.0.2
Jul 10, 2026
Merged

build(deps-dev): bump typescript from 6.0.3 to 7.0.2#95
unknowIfGuestInDream merged 3 commits into
masterfrom
dependabot/npm_and_yarn/typescript-7.0.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 9, 2026

Copy link
Copy Markdown
Contributor

Bumps typescript from 6.0.3 to 7.0.2.

Commits
Maintainer changes

This version was pushed to npm by microsoft1es, a new releaser for typescript since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [typescript](https://github.com/microsoft/TypeScript) from 6.0.3 to 7.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 7.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies, npm. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@unknowIfGuestInDream

Copy link
Copy Markdown
Contributor

@copilot
问题修复,不要回滚版本升级

npm ci
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: typescript-eslint@8.63.0
npm error Found: typescript@7.0.2
npm error node_modules/typescript
npm error   dev typescript@"^7.0.2" from the root project
npm error   peer typescript@">=4.8.4" from ts-api-utils@2.5.0
npm error   node_modules/ts-api-utils
npm error     ts-api-utils@"^2.5.0" from @typescript-eslint/eslint-plugin@8.63.0
npm error     node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin
npm error       @typescript-eslint/eslint-plugin@"8.63.0" from typescript-eslint@8.63.0
npm error       node_modules/typescript-eslint
npm error         dev typescript-eslint@"^8.63.0" from the root project
npm error     ts-api-utils@"^2.5.0" from @typescript-eslint/type-utils@8.63.0
npm error     node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils
npm error       @typescript-eslint/type-utils@"8.63.0" from @typescript-eslint/eslint-plugin@8.63.0
npm error       node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin
npm error         @typescript-eslint/eslint-plugin@"8.63.0" from typescript-eslint@8.63.0
npm error         node_modules/typescript-eslint
npm error     1 more (@typescript-eslint/typescript-estree)
npm error
npm error Could not resolve dependency:
npm error peer typescript@">=4.8.4 <6.1.0" from typescript-eslint@8.63.0
npm error node_modules/typescript-eslint
npm error   dev typescript-eslint@"^8.63.0" from the root project
npm error
npm error Conflicting peer dependency: typescript@6.0.3
npm error node_modules/typescript
npm error   peer typescript@">=4.8.4 <6.1.0" from typescript-eslint@8.63.0
npm error   node_modules/typescript-eslint
npm error     dev typescript-eslint@"^8.63.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\npm\cache\_logs\2026-07-09T08_14_56_419Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\npm\cache\_logs\2026-07-09T08_14_56_419Z-debug-0.log
Error: Process completed with exit code 1.

- Add `typescript-compat` alias (npm:typescript@~6.0.3) to provide TypeScript 6
  for ESLint tooling while TypeScript 7 is used for compilation
- Add `overrides` for typescript-eslint and ts-api-utils to use TypeScript 6
- Add `scripts/postinstall.js` to install nested TypeScript 6 for linting packages
- Update package-lock.json with nested TypeScript 6 for typescript-eslint and ts-api-utils
- Remove .npmrc (no longer needed since overrides handle peer dep resolution)

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@copilot
问题修复,不要回滚版本升级

...

Fixed in commit fix: resolve TypeScript 7 incompatibility with typescript-eslint.

TypeScript 7 completely restructured its npm package — require('typescript') now returns only { version: "7.0.2" } instead of the full compiler API (ts.Extension, ts.TypeFlags, etc.) that typescript-eslint@8.x depends on. No existing version of typescript-eslint supports the TypeScript 7 API yet.

What was done (without reverting the upgrade):

  1. Added "typescript-compat": "npm:typescript@~6.0.3" as an aliased devDependency — installs TypeScript 6 alongside TypeScript 7.
  2. Added overrides in package.json so the typescript-eslint and ts-api-utils peer dependency constraints resolve against TypeScript 6 (fixing the ERESOLVE at npm ci time).
  3. Added scripts/postinstall.js that copies TypeScript 6 into the nested node_modules locations where require('typescript') is resolved by those ESLint tools — fixing the runtime crash.

Result:

  • npm ci succeeds (no more ERESOLVE)
  • npm run lint passes (typescript-eslint uses TypeScript 6 at runtime)
  • npm run compile uses TypeScript 7.0.2 via tsc

This workaround can be removed once typescript-eslint releases a version with TypeScript 7 support.

@unknowIfGuestInDream unknowIfGuestInDream merged commit b22e18c into master Jul 10, 2026
7 checks passed
@unknowIfGuestInDream unknowIfGuestInDream deleted the dependabot/npm_and_yarn/typescript-7.0.2 branch July 10, 2026 10:21
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