-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support TypeScript 5.2.2 #338
base: main
Are you sure you want to change the base?
Conversation
…/utils to support typescript 5.2.2
@@ -2,6 +2,7 @@ | |||
"extends": "typesafeconfig", | |||
"compilerOptions": { | |||
"module": "commonjs", | |||
"moduleResolution": "Bundler", |
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.
Added to allow TS to continue to pick up the correct types.
typescript-eslint/typescript-eslint#7284
Contains a warning when building, but appears to still produce the same output.
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.
Does this issue persist into v8 of @typescript-eslint/utils
?
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.
It is fixed! Removed the patch in 34496c5.
@@ -31,12 +31,15 @@ | |||
}, | |||
"homepage": "https://github.com/shian15810/eslint-plugin-typescript-enum#readme", | |||
"dependencies": { | |||
"@typescript-eslint/experimental-utils": "^5.3.0" | |||
"@typescript-eslint/utils": "^6.7.2" |
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.
This is the main change, and what removes the nested problematic tsutils
package from the dependency tree: typescript-eslint/typescript-eslint#7155 (comment)
@shian15810 what do you think about this?
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.
Could you bump this to major version 8 of @typescript-eslint/utils
? Its latest version is currently 8.18.0
.
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.
Done!
This is a breaking change as well for this package I guess, might need to bump the major version~ |
I'm thinking should I merge your PR and release a major version first before bumping @dominicfraser What do you think? |
Hi @shian15810 I tested updating to v8, and pushed a commit showing what that would look like: 34496c5. I've then reset it back to v6. I think your plan of merging with the v6 changes, doing a release, and then updating to v8 and doing another release is a good plan. It gives flexibility to people to be able to update in stages if they need to 👍 |
Context
TypeScript 5.2.2 comes with a breaking change that requires all
@typescript-eslint/*
dependencies to move to >= v6: typescript-eslint/typescript-eslint#7155 (comment).In this repository that specifically means moving from
to
Changes
Add tests
To give more confidence that behaviour was preserved before and after making changes tests have been added.
This was done using the recommendations from https://typescript-eslint.io/developers/custom-rules#testing - use
@typescript-eslint/rule-tester
paired withvitest
.These tests can be reverted if they are not desired.
Update to
@typescript-eslint/utils
andtypescript@5.2.2
This is the main change, allowing this really helpful plugin to continue to be used with newer typescript.