Skip to content
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

chore: add missing transitive peerDependencies #102

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

matwilko
Copy link
Contributor

eslint-plugin-sonar is missing peerDependencies on @babel/core and @typescript-eslint/parser, as transitively requested by @babel/eslint-parser and @typescript-eslint/eslint-plugin respectively.

While it's not a massive problem, it does make life harder for package managers when trying to optimize package installation, see Implicit Transitive Peer Dependencies.

yarn currently reports as so:

eslint-plugin-sonar@npm:0.12.0 doesn't provide @babel/core, breaking the following requirements:
@babel/eslint-parser@npm:7.22.9 → >=7.11.0

eslint-plugin-sonar@npm:0.12.0 doesn't provide @typescript-eslint/parser, breaking the following requirements:
@typescript-eslint/eslint-plugin@npm:5.62.0 → ^5.0.0

Marked as a patch, since consumers will already need to be satisfying these dependencies, so adding the new peer dependencies won't force them to upgrade or install any new packages.

@stackblitz
Copy link

stackblitz bot commented Jul 25, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2023

🦋 Changeset detected

Latest commit: 0a6cacd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-sonar Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 25, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@JounQin
Copy link
Member

JounQin commented Oct 27, 2023

@matwilko Thanks for raising this PR first. And sorry I didn't notice about it for a long time.

AFAIK, @babel/core and @typescript-eslint/parser is not imported/required in eslint-plugin-sonar, but are peer dependencies from @babel/eslint-parser and @typescript-eslint/eslint-plugin, so I'm not so sure to understand why yarn complains about missing peer dependencies. Is this expected same from npm or pnpm?

@JounQin JounQin changed the title Add missing transitive peerDependencies chore: add missing transitive peerDependencies Dec 27, 2023
@JounQin JounQin enabled auto-merge (squash) December 27, 2023 04:19
@JounQin JounQin merged commit 23a43b3 into un-ts:main Dec 27, 2023
6 of 7 checks passed
@matwilko matwilko deleted the add-peer-dependencies branch January 13, 2024 22:23
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.

2 participants