Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
CLI tool for checking you have one version of a dependency in node_modules
A simple CLI tool that checks you only have one version of a dependency in your node_modules folder.
only-one react
or for multiple deps
only-one react react-dom
If none or more than one version of the deps are found the process will exit
with failure. The tool works by globbing your
node_modules
, it has nothing to do with yarn or npm lock files and therefore checks that yarn or npm
is also correctly installing into node_modules
.
You may wish to add it to your test suite "test": "only-one react && mocha && eslint ."
.
I was motivated to build this because sometimes 3rd party libraries accidentally have react as a dependency and this can break stuff.
Please be aware if you have a large node_modules
it can be quite slow because it's a lot of file
paths to search through.
npm install only-one --save-dev
yarn add only-one --dev
--warn
or -w
to only warn about deps than are more than 1 and dont fail
FAQs
CLI tool for checking you have one version of a dependency in node_modules
The npm package only-one receives a total of 206 weekly downloads. As such, only-one popularity was classified as not popular.
We found that only-one demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.