Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
yarn-install
Advanced tools
If command yarn
exists it uses Yarn to install, otherwise fallbacks to npm.
$ npm install --save yarn-install
const install = require('yarn-install')
const result = install({
deps: ['webpack', 'mocha']
})
//=> result, returned by child_process.spawnSync
yarn global add yarn-install
# then you will have `yarn-install` & `yarn-remove` commands
yarn-install pokemon --dev
yarn-install yo --global
yarn-remove xo
# don't forget that `yarn-install` with dependencies is always `--save` by default.
yarn-install help
yarn-remove help
Type: array
An array of dependencies to install, you can omit it to install dependencies in package.json
. If dependencies
is present, it defaults to --save
mode.
install({
deps: ['ava', 'koa']
})
Type: string
The directory to run the command.
Type: string
Specfic a custom npm registry to use.
Type: boolean
Use --dev
for Yarn and --save-dev
for npm.
Type: boolean
Install globally, stands for npm --global
or yarn global
.
Type: boolean
Default: undefined
The reversed behavior to install
, ie. yarn remove
and npm uninstall
Type: boolean
Default: undefined
Only install dependencies
in package.json
.
Type: boolean
Default: undefined
Use npm if it's >= npm5.
Get the package manager that will be used to install.
// Given you have yarn & npm 4 installed
const pm = install.getPm()
//=> yarn
// Given you have yarn & npm 5 installed
const pm = install.getPm()
//=> yarn
// Given you have yarn & npm 5 installed
const pm = install.getPm({ respectNpm5: true })
//=> npm
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
FAQs
Install dependencies using Yarn with npm fallback.
The npm package yarn-install receives a total of 208,306 weekly downloads. As such, yarn-install popularity was classified as popular.
We found that yarn-install 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.