-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Describe the bug
This project publishes its npm-shrinkwrap.json. That's discouraged:
It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates.
The practical impact is that electronegativity's dev dependencies are ending up in our package-lock.json (marked as either optional or extraneous, maybe depending on npm version). This is even though we are declaring electronegativity as a devDependency so its dev dependencies should be ignored. That may be caused by an npm issue. But if electronegativity didn't publish its npm-shrinkwrap.json, that bug wouldn't matter.
There are three dev dependencies that are particularly problematic because they or their dependencies have security advisories against them:
To Reproduce
Steps to reproduce the behavior:
npm initin new directory- In
package.jsonadd:
"devDependencies": {
"@doyensec/electronegativity": "^1.9.0"
}
npm install --include=dev- Search in
package-lock.jsonfor"base","chokidar","snapdragon-node"to see optional or extraneous dependencies.
Expected behavior
Expect there to be no npm-shrinkwrap.json published with electronegativity, so its package.json is used to declare its dependencies. Only the runtime dependencies of electronegativity (and their trees of runtime dependencies) should end up in our package-lock.json.
Platform (please complete the following information):
- OS: Windows
- Electronegativity version: 1.9.0