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

npm-find-dupes: add page #14468

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pages/common/npm-find-dupes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# npm find-dupes

> Identify duplicate dependencies in `node_modules`.
> More information: <https://docs.npmjs.com/cli/commands/npm-find-dupes>.

- List all duplicate packages within `node_modules`:

`npm find-dupes`

- Include `devDependencies` in duplicate detection:

`npm find-dupes --include=dev`

- List all duplicate instances of a specific package in `node-modules`:

`npm find-dupes {{package_name}}`

- Exclude optional dependencies from duplicate detection:

`npm find-dupes --omit=optional`

- Set the logging level for output:

`npm find-dupes --loglevel={{silent|error|warn|info|verbose}}`

- Output duplicate information in JSON format:

`npm find-dupes --json`

- Limit duplicate search to specific scopes:

`npm find-dupes --scope={{@scope1,@scope2}}`

- Exclude specific scopes from duplicate detection:

`npm find-dupes --omit-scope={{@scope1,@scope2}}`