开发者社区> 镜像站> NPM> diglett
diglett
Detect multiple versions of dependencies
Last updated 10 months ago by oblador .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install diglett 
SYNC missed versions from official npm registry.

Diglett

Diglett is a command line tool that helps you detect packages with multiple versions in your JavaScript project. It is particularly useful for frontend apps where you want to keep the bundle size down.

Usage

By default diglett will ignore packages not imported by dependencies defined in the dependencies field of your package.json. If duplicate resolved packages found it will exit with code 1 and output the resolved versions:

Found 1 duplicate dependency
@material/animation with versions 3.1.0, 4.0.0.

npm projects

npx diglett npm <optional path to project>

Yarn projects

npx diglett yarn <optional path to project>

Yarn workspaces

npx diglett yarn-workspace <optional path to project> [--package <package name>]

By default all workspace packages are analyzed. If you just want to analyze one, pass the --package option with the package name – not folder name. It's possible to pass the --package option multiple times to analyze multiple packages.

General options

Name Description Default
--filter <regex> Ignores packages except those matching the regular expression. None
--all Checks all packages defined in package.json. false
--dev Also checks packages in the devDependencies field. false
--optional Also checks packages in the optionalDependencies field. false
--peer Also checks packages in the peerDependencies field. false

Prior work

License

Copyright 2020 Joel Arvidsson. MIT licensed, see LICENSE file.

Current Tags

  • 2.1.1                                ...           latest (10 months ago)

4 Versions

  • 2.1.1                                ...           10 months ago
  • 2.0.0                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None