itsthatguy / itsthatguy/group-dependencies

Seems to always install all dependencies?

Open
#13 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Perhaps an update to npm or node broke this repo?

Create new empty directory and add this `package.json`:

```json
{
"dependencies": {
"group-dependencies": "^0.0.11"
},
"devDependencies": {
"react": "^17.0.2",
"vue": "^2.6.14"
},
"rDependencies": [
"react"
],
"vDependencies": [
"vue"
]
}
```

From there,

```bash
➜ ~ cd example
➜ example npm install --only=prod

added 2 packages, and audited 3 packages in 1s

found 0 vulnerabilities
➜ example ls node_modules
colors group-dependencies
➜ example ./node_modules/group-dependencies/bin/deps.js install r
deps info resolve react@^17.0.2
deps cmd npm install react@^17.0.2

added 5 packages, and audited 8 packages in 630ms

found 0 vulnerabilities
➜ example ls node_modules
colors js-tokens object-assign vue
group-dependencies loose-envify react
```

Am I doing something wrong? If not, is there a simple patch?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the example using the provided package.json and npm install commands, then inspect bin/deps.js, the entry point named in the report. Trace why installing the r group also installs vue, and consider the issue done when the command installs only the requested dependency group and the behavior is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.