Skip to content

feat: add --production flag to skip devDependencies#238

Open
mcmxcdev wants to merge 1 commit into
e18e:mainfrom
mcmxcdev:feat/production-flag
Open

feat: add --production flag to skip devDependencies#238
mcmxcdev wants to merge 1 commit into
e18e:mainfrom
mcmxcdev:feat/production-flag

Conversation

@mcmxcdev

Copy link
Copy Markdown

Summary

  • Adds a --production boolean CLI flag to the analyze command
  • When set, devDependencies are excluded from all three analyzers:
    • core-js: skips detection of core-js/core-js-pure in devDeps
    • dependencies: reports development: 0 for the dependency count stat
    • duplicate-dependencies: performs a BFS from production roots to collect only production-reachable packages, then filters both resolveDuplicateDependencies and computeParents accordingly
  • New tests cover all three analyzers for the --production path

Closes #193

Test plan

  • npm test — all 87 tests pass
  • --production flag skips core-js in devDependencies
  • --production flag zeroes out the development dependency count
  • --production flag excludes duplicates only reachable through devDependency parents

🤖 Generated with Claude Code

Adds a --production boolean option to the analyze command that, when set,
ignores devDependencies across all analyzers (core-js, dependency counts,
and duplicate-dependency detection via BFS reachability from production roots).

Closes e18e#193

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

feat: add support for processing only production (non-dev) package info

1 participant