-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Running npm ls --production
is not omitting dev deps of child workspaces, e.g:
# Given a workspace structure:
.
├── a
│ └── package.json (devDependencies: abbrev@^1.1.1)
├── b
│ └── package.json
└── package.json
# Running default list:
$ npm ls
[email protected] <path>/test-ls-workspaces-dev
├─┬ [email protected] -> ./a
│ └── [email protected]
└── [email protected] -> ./b
# Running prod-only list:
$ npm ls --prod
[email protected] <path>/test-ls-workspaces-dev
├─┬ [email protected] -> ./a
│ └── [email protected]
└── [email protected] -> ./b
Expected Behavior
# Given a workspace structure:
.
├── a
│ └── package.json (devDependencies: abbrev@^1.1.1)
├── b
│ └── package.json
└── package.json
# Running prod-only list:
$ npm ls --prod
[email protected] <path>/test-ls-workspaces-dev
├── [email protected] -> ./a
└── [email protected] -> ./b
Steps To Reproduce
- In an properly configured workspaces project
- Run
npm ls --prod
- Should not be seeing dev deps of child workspaces
Environment
- Node: v16.3.0
- npm: v7.16.0
panayot-cankov, zooltd and hybridherbst
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release