Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

rtritto
Copy link
Contributor

@rtrittortritto commentedNov 23, 2024
edited
Loading

PR Checklist

Overview

typescript is a mandatory peer dependency (peerDepedency ofts-api-utils) and not optional peer dependency (it needs to be removed frompeerDepedencyMeta).

Info

  • ts-api-utils hastypescript as peer dependency:

    // ts-api-utils/package.json{"peerDependencies":{"typescript":">=4.2.0"}}

Changes

  • @typescript-eslint/typescript-estree usests-api-utils dependency that hastypescript as peer dependency (seeInfo)

  • @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 dependency

  • typescript-eslint uses@typescript-eslint/parser and@typescript-eslint/utils dependencies that uses@typescript-eslint/typescript-estree dependency that hastypescript as peer dependency

Issue Reproduction

Case wheretypescript 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
  • (optional)yarn explain peer-requirements and see logs
    pcc27b → ✘ 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
  • (detailed)yarn explain peer-requirements pcc27b and see logs
    Package eslint-plugin-solid@npm:0.14.4 [3223e] is requested to provide typescript by its descendantseslint-plugin-solid@npm:0.14.4 [3223e]└─ @typescript-eslint/utils@npm:8.15.0 [e3d25] (via *)   └─ @typescript-eslint/typescript-estree@npm:8.15.0 [0f560] (via *)      └─ ts-api-utils@npm:1.3.0 [37728] (via >=4.2.0)✘ Package eslint-plugin-solid@npm:0.14.4 [3223e] does not provide typescript.

@typescript-eslint
Copy link
Contributor

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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedNov 23, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitabc7931
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/674df03ecc15b7000840288d
😎 Deploy Previewhttps://deploy-preview-10373--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🟢 up 6 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedNov 23, 2024
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commitabc7931. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 32 targets

Sent with 💌 fromNxCloud.

@rtritto
Copy link
ContributorAuthor

@rtrittortrittoforce-pushed thefix-typescript-peer-deps branch 2 times, most recently fromd22d19b toe08bcadCompareNovember 23, 2024 20:59
@rtritto
Copy link
ContributorAuthor

Added reproduction

@rtrittortrittoforce-pushed thefix-typescript-peer-deps branch frome08bcad to0ae44b8CompareNovember 25, 2024 20:52
@codecovCodecov
Copy link

codecovbot commentedNov 25, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.76%. Comparing base(2c8a75e) to head(abc7931).
Report is 2 commits behind head on main.

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
FlagCoverage Δ
unittest86.76% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

@rtrittortrittoforce-pushed thefix-typescript-peer-deps branch from0ae44b8 toabc7931CompareDecember 2, 2024 17:37
@rtritto
Copy link
ContributorAuthor

Rebased

Copy link
Member

@bradzacherbradzacher left a 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!

rtritto reacted with heart emojirtritto reacted with rocket emoji
@bradzacherbradzacher merged commit4cb2cf8 intotypescript-eslint:mainDec 4, 2024
62 checks passed
@rtrittortritto deleted the fix-typescript-peer-deps branchDecember 4, 2024 17:06
@AviVahl
Copy link

@bradzacher could you guys please make the semver range more lenient?
we'd like to be able to upgrade to 5.8 even before the official typescript-eslint support (seeing the long warning about it)

@ljharb
Copy link

ljharb commentedDec 9, 2024
edited
Loading

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.

renovatebot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull requestDec 9, 2024
##### [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-   rtrittoYou 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.
@bradzacher
Copy link
Member

@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.

@bradzacher
Copy link
Member

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.

@typescript-eslinttypescript-eslint locked and limited conversation to collaboratorsDec 9, 2024
@JoshuaKGoldberg
Copy link
Member

This PR was a breaking change (adding a peer dependency always is); see#10480.

Just noting for visibility from#10480: the PR wasnot a breaking change. It was a bugfix in that we weren't properly declaring theactual peer dependency range before.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: Missing peer dependencies
5 participants
@rtritto@AviVahl@ljharb@bradzacher@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp