-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: typescript peer dependency #10373
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
fix: typescript peer dependency #10373
Conversation
Thanks for the PR, @rtritto! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Related #9744 |
d22d19b
to
e08bcad
Compare
Added reproduction |
e08bcad
to
0ae44b8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10373 +/- ##
=======================================
Coverage 86.76% 86.76%
=======================================
Files 444 444
Lines 15311 15311
Branches 4457 4457
=======================================
Hits 13285 13285
Misses 1672 1672
Partials 354 354
Flags with carried forward coverage won't be shown. Click here to find out more. |
0ae44b8
to
abc7931
Compare
Rebased |
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.
thanks for doing this and sticking with us!
@bradzacher could you guys please make the semver range more lenient? |
This PR was a breaking change (adding a peer dependency always is); see #10480. The proper fix here was probably downgrading to a version of ts-api-utils that doesn't have the peer dep. |
##### [v8.18.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8180-2024-12-09) ##### 🚀 Features - **eslint-plugin:** \[switch-exhaustiveness-check] add support for "no default" comment ([#10218](typescript-eslint/typescript-eslint#10218)) - **eslint-plugin:** \[no-deprecated] report on super call of deprecated constructor ([#10397](typescript-eslint/typescript-eslint#10397)) ##### 🩹 Fixes - **eslint-plugin:** \[use-unknown-in-catch-callback-variable] only flag function literals ([#10436](typescript-eslint/typescript-eslint#10436)) - **eslint-plugin:** \[no-base-to-string] handle more robustly when multiple `toString()` declarations are present for a type ([#10432](typescript-eslint/typescript-eslint#10432)) - **eslint-plugin:** \[no-deprecated] check if a JSX attribute is deprecated ([#10374](typescript-eslint/typescript-eslint#10374)) - typescript peer dependency ([#10373](typescript-eslint/typescript-eslint#10373)) ##### ❤️ Thank You - Kim Sang Du [@developer-bandi](https://github.com/developer-bandi) - Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger) - mdm317 - rtritto You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
@AviVahl the range represents what we officially support. As we have seen many times in the past the newer versions of TS could cause crashes until we release support. If you want to use a newer version of TS then you can use your package manager's flag to specify you want to ignore the peer dependency ranges. |
Regardless - as per our contributing guide - we do not seek comments on PRs because it's not searchable from the issue search. Please file an issue if you wish to discuss further. |
PR Checklist
Overview
typescript
is a mandatory peer dependency (peerDepedency ofts-api-utils
) and not optional peer dependency (it needs to be removed from peerDepedencyMeta).Info
ts-api-utils
hastypescript
as peer dependency:Changes
@typescript-eslint/typescript-estree
usests-api-utils
dependency that hastypescript
as peer dependency (see Info)@typescript-eslint/utils
uses@typescript-eslint/typescript-estree
dependency that usests-api-utils
dependency. It needstypescript
peer dependency@typescript-eslint/parser
uses@typescript-eslint/typescript-estree
dependency that usests-api-utils
dependency. It needstypescript
peer dependency@typescript-eslint/type-utils
uses@typescript-eslint/typescript-estree
and@typescript-eslint/utils
dependencies that usets-api-utils
dependency. It needstypescript
peer dependency@typescript-eslint/eslint-plugin
uses@typescript-eslint/utils
dependency that uses@typescript-eslint/typescript-estree
dependency that hastypescript
as peer dependencytypescript-eslint
uses@typescript-eslint/parser
and@typescript-eslint/utils
dependencies that uses@typescript-eslint/typescript-estree
dependency that hastypescript
as peer dependencyIssue Reproduction
Case where
typescript
is omitted byeslint-plugin-solid
because@typescript-eslint/utils
din't hastypescript
as mandatory peer dependency.yarn init -y
yarn set version berry
yarn add -D eslint typescript eslint-plugin-solid
yarn explain peer-requirements
and see logspcc27b → ✘ eslint-plugin-solid@npm:0.14.4 [3223e] doesn't provide typescript to @typescript-eslint/utils@npm:8.15.0 [e3d25] and 2 other dependencies
yarn explain peer-requirements pcc27b
and see logs