I'm working on one CLI solution for our ecosystem and I need to install only selected dependencies with adding 1 by 1 or alltogether (yarn add packge1 packge2)
npm works as I need, but yarn installs all not-installed dependencies from the package.json when I just add any new dependency
Is there some option to prevent it?
What I have:
yarn -v 1.22.11
package.json:
"dependencies": {
"apollo-enchanted-cache-inmemory": "^1.2.0", // not installed
"colors": "^1.4.0"
},
What I do:
$ yarn add security-holder
What I expect
apollo-enchanted-cache-inmemory is not installed
yarn add v1.22.11
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ security-holder@1.0.1
info All dependencies
└─ security-holder@1.0.1
✨ Done in 2.10s.
What I receive
apollo-enchanted-cache-inmemory is installed
yarn add v1.22.11
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
├─ apollo-enchanted-cache-inmemory@1.2.0
└─ security-holder@1.0.1
info All dependencies
├─ apollo-enchanted-cache-inmemory@1.2.0
└─ security-holder@1.0.1
✨ Done in 2.65s.
Problem:
I'm working on one CLI solution for our ecosystem and I need to install only selected dependencies with adding 1 by 1 or alltogether (
yarn add packge1 packge2
)npm
works as I need, butyarn
installs all not-installeddependencies
from thepackage.json
when I just add any new dependencyIs there some option to prevent it?
What I have:
yarn -v 1.22.11
package.json:
What I do:
$ yarn add security-holder
What I expect
apollo-enchanted-cache-inmemory
is not installedWhat I receive
apollo-enchanted-cache-inmemory
is installed