-
Notifications
You must be signed in to change notification settings - Fork 138
Upgrade typescript v4 to v5 #2743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 upgrades TypeScript from v4 to v5 to enable native ESM module compilation and improve Node.js module compatibility. The upgrade requires corresponding updates to Jest, ESLint tooling, and type definitions to maintain compatibility.
- Upgraded TypeScript from v4.6.2 to v5.9.2
- Updated Jest ecosystem from v27 to v29 (Jest, @types/jest, ts-jest)
- Updated ESLint tooling and @types/node to support TypeScript v5
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
package.json | Updated TypeScript, ESLint tooling, and @types/node to support v5 upgrade |
packages/core/package.json | Updated Jest ecosystem and removed duplicate @types/node dependency |
Comments suppressed due to low confidence (1)
packages/core/package.json:86
- The @types/node dependency is being removed from this package.json but it's still present in the root package.json. Verify that all code in this package that depends on Node.js types will still have access to them through the workspace dependency resolution.
"@types/markdown-it": "^12.2.3",
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"eslint": "^7.32.0", | ||
"@types/node": "^18.19.122", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @types/node version (^18.19.122) appears to be for Node.js v18, but TypeScript v5.9.2 typically works better with more recent @types/node versions. Consider upgrading to @types/node v20 or v22 to match the TypeScript v5 capabilities and avoid potential compatibility issues.
"@types/node": "^18.19.122", | |
"@types/node": "^22.0.0", |
Copilot uses AI. Check for mistakes.
What is the purpose of this pull request?
Overview of changes:
Upgrading typescript version is to support native ESM module compilation, improving compatibility and moving away from legacy CommonJS. This allows improved Node.js module compatibility.
*https://stackoverflow.com/questions/78790943/in-typescript-5-6-buffer-is-not-assignable-to-arraybufferview-or-uint8arr
Old airbnb eslint configs no longer being maintained - we should shift to using something else.
Anything you'd like to highlight/discuss:
We would need to upgrade eslint as well at some point of time in the future
Upgrading ESlint to v9 and also migrating from previous airbnb-eslint configurations (which seem to no longer be maintained) is going to be an issue in the future
base last updated 4 years ago - https://www.npmjs.com/package/eslint-config-airbnb-base
airbnb-typescript-adaption repo has been archived, will not support eslint@9 going forward https://github.com/iamturns/eslint-config-airbnb-typescript
Testing instructions:
Sanity check that nothing major breaks
Proposed commit message: (wrap lines at 72 characters)
Upgrade typescript v4 to v5
Upgrade to support native ESM module compilation,
to later move away from legacy CommonJS.
Allows improved Node.js module compatibility.
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):