Skip to content

feat: detect duplicated package.json dependencies#1611

Merged
webpro merged 1 commit intowebpro-nl:mainfrom
Zamiell:fix-1610
Mar 17, 2026
Merged

feat: detect duplicated package.json dependencies#1611
webpro merged 1 commit intowebpro-nl:mainfrom
Zamiell:fix-1610

Conversation

@Zamiell
Copy link
Contributor

@Zamiell Zamiell commented Mar 14, 2026

Fixes #1610

Claude helped me write this PR.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/knip@1611
npm i https://pkg.pr.new/@knip/language-server@1611
npm i https://pkg.pr.new/@knip/mcp@1611

commit: e58a383

@Zamiell
Copy link
Contributor Author

Zamiell commented Mar 14, 2026

I don't think the "argos" CI failure is related to my pull request.

Copy link
Contributor

@lishaduck lishaduck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, but just the usual friendly reminder that it's completely valid (encouraged even!) to have a duplicate between peerDependencies and one of dependencies/devDependencies. 😄

(Happened to notice this PR in passing, excited to see this one land! ❤️)

@Zamiell
Copy link
Contributor Author

Zamiell commented Mar 16, 2026

it's completely valid (encouraged even!) to have a duplicate between peerDependencies and one of dependencies/devDependencies. 😄

Yup, true. Just to clarify, this PR explicitly checks for dupes between "dependencies" and "devDependencies". It does not look at "peerDependencies" at all. (Or optionalDependencies/bundledDependencies/bundleDependencies.)

@webpro webpro merged commit dec15a7 into webpro-nl:main Mar 17, 2026
28 of 29 checks passed
@webpro
Copy link
Member

webpro commented Mar 17, 2026

Thanks James, the CI "failure" is exactly caused by your changes ;) ❤️

@Zamiell Zamiell deleted the fix-1610 branch March 17, 2026 16:16
@Zamiell
Copy link
Contributor Author

Zamiell commented Mar 17, 2026

Oh whoops. I guess it wasn't a blocker though?

@webpro
Copy link
Member

webpro commented Mar 18, 2026

🚀 This pull request is included in v5.88.0. See Release 5.88.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

@webpro
Copy link
Member

webpro commented Mar 19, 2026

🚀 This pull request is included in v6.0.0-2. See Release 6.0.0-2 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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.

💡 Error on duplicated package.json entries

3 participants