[RRFC] Add support to plugin dependencies.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
Add support to plugin dependencies.
More specific title would be: add support to optional (not installed by default) global-style dependencies.
This would allow a running application installed at current (node_modules) to install an optional dependency and load it.
- Plugin dependencies should be installed at root level.
- They need to be installed with global style, so the node_modules tree won't mutate.
- Can or should be managed by the application that installed it.
- It would be great to have it inside package-lock.json for reproducibility.
- Can or should be ignored by
npm ci, and forced bynpm ci --with-plugins.
- Can or should be ignored by
Example
Using a real yeoman project generation:
mkdir new-project
cd new-project
npm install yo --save-dev
npx yo node --experimental
npx yo nodeis using a generator callednodethat is provided bygenerator-nodepackage.--experimentalflag uses an auto install feature that installsgenerator-nodeinside a hidden global-style node_modules.- Once installed,
yoloads it and executes. yois running so if we mutate current node_modules, it will break.nodegenerator can install another generator, so if we mutate the hidden node_modules will breaknodegenerator.
- Once installed,
This hidden global-style node_modules is a workaround, I want to get rid of it.
A implementation would be to add dependenciesMeta like peerDependenciesMeta:
{
devDependencies: {
'generator-node': '2.8.0'
},
dependenciesMeta: { // Unified meta for *Dependencies
'generator-node': {
globalStyle: true,
optional: true,
autoInstall: false
}
}
}
How
Current Behaviour
- No support this feature.
Desired Behaviour
- Add support to global_style dependency.
References
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal names npm ci, npx yo node, package-lock.json, and the hidden global-style node_modules as the relevant entry points; no implementation files or tests are identified. Start by reading the proposal and its referenced arborist issue, then define the dependency metadata and installation behavior before implementation can be considered done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100