Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Nov 20, 2025

The latest version of TypeScript is 5.9, but no project can currently use this without producing peer dependency warnings. To prevent this and unlock new versions of TypeScript 5.x in the future, widen the peer dependency.

To ensure this does not cause a problem in this repo, also update the development version of TypeScript and TypeScript ESLint to their latest versions.


Note

Widen TypeScript peer dependency to <6 and upgrade dev deps to TypeScript 5.9.3 and typescript-eslint 8.47, with test tweaks and rules snapshot update.

  • TypeScript support:
    • Widen peerDependencies.typescript to >=4.8.4 <6 in packages/typescript/package.json.
  • Dependencies:
    • Bump typescript to ^5.9.3 and typescript-eslint to ^8.47.0 in root and packages/typescript.
    • Update related transitive deps in yarn.lock (e.g., @typescript-eslint/*, eslint-utils, ignore, ts-api-utils).
  • Tests:
    • Remove parserOptions.project from ESLint config tests in packages/jest/src/index.test.mjs and packages/typescript/src/index.test.mjs.
  • Rules snapshot:
    • Add "no-with": "off" in packages/typescript/rules-snapshot.json.

Written by Cursor Bugbot for commit 5aa2880. This will update automatically on new commits. Configure here.

The latest version of TypeScript is 5.9, but no project can currently
use this without producing peer dependency warnings. To prevent this and
unlock new versions of TypeScript in the future, widen the peer
dependencies:

- Allow TypeScript 5.9 and any future version up to 6
- Allow TypeScript ESLint versions betwen 8.24 and 9

To ensure this does not cause a problem in this repo, also update the
development version of TypeScript and TypeScript ESLint to their latest
versions.
@mcmire mcmire requested a review from a team as a code owner November 20, 2025 06:09
@socket-security
Copy link

socket-security bot commented Nov 20, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedtypescript-eslint@​8.28.0 ⏵ 8.47.010010074 -198100
Updatedtypescript@​5.8.2 ⏵ 5.9.3100 +110090 +110090

View full report

@socket-security
Copy link

socket-security bot commented Nov 20, 2025

Warning

MetaMask internal reviewing guidelines:

  • Do not ignore-all
  • Each alert has instructions on how to review if you don't know what it means. If lost, ask your Security Liaison or the supply-chain group
  • Copy-paste ignore lines for specific packages or a group of one kind with a note on what research you did to deem it safe.
    @SocketSecurity ignore npm/PACKAGE@VERSION
Action Severity Alert  (click "▶" to expand/collapse)
Warn Low
Potential code anomaly (AI signal): npm ignore is 100.0% likely to have a medium risk anomaly

Notes: The code fragment represents a conventional, well-structured path-ignore utility with caching and recursive parent-directory evaluation. Windows path normalization is present for compatibility but does not indicate malicious intent. No indicators of data leakage, external communication, or covert backdoors were found. Security impact primarily revolves around correct ignore semantics rather than intrinsic vulnerabilities. The component remains appropriate for use in a broader security-conscious pipeline if used with careful awareness of what is being ignored.

Confidence: 1.00

Severity: 0.60

From: ?npm/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

eslint: ^8.57.0 || ^9.0.0
typescript: ">=4.8.4 <5.9.0"
checksum: 10/cd83f6c52218f7d31142b08a73b398370e4a7cf95c8afc03821050c625ec4b35e0c56f554d48bfa4a1b95564e60c0b4d5993cf2054b80f39533c1b0b84a0c7cd
typescript: ">=4.8.4 <6.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Nice. I was going to say that we shouldn't widen beyond what the plugin requires, but the plugin has widened the supported range too! That's great.

Copy link
Member

Choose a reason for hiding this comment

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

Well, technically the range wasn't widened to allow this until v8.39, which is still well ahead of our minimum. But I can address this in a separate PR, I wanted to bump the minimum for other reasons anyway.

@mcmire mcmire changed the title Widen allowed TS / TS ESLint versions Allow remaining 5.x TypeScript versions Dec 1, 2025
@mcmire mcmire changed the title Allow remaining 5.x TypeScript versions Allow remaining TypeScript 5.x versions Dec 1, 2025
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire merged commit b116974 into main Dec 1, 2025
26 checks passed
@mcmire mcmire deleted the upgrade-typescript branch December 1, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants