
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
yarn-tool
Advanced tools
⚠️ BREAKING CHANGE (v3+): 從 v3 開始,指令預設支援 pnpm。若要使用 yarn,需明確指定
--npmClients yarn或確保系統中無 pnpm。
recommend use
npxway
npm install -g yarn-tool yarn
u can use alias name
ytinstead ofyarn-tool, when installed
yt <command>
npx yarn-tool <command>
yt --help
yt <cmd> --help
$ yarn-tool --help
yt <command>
Commands:
yt add [name] Installs a package
yt bin Get the path to a binary script.
yt create create a npm package or update package.json file
yt dedupe [cwd] package deduplication for yarn.lock [aliases: d]
yt dlx Run a package in a temporary environment. require yarn
version >= 2
yt init create a npm package or update package.json file
yt install [cwd] do dedupe with yarn install [aliases: i]
yt link Symlink a package folder during development.
yt list List installed packages.
yt lockfile show yarn.lock info
yt ncu [-u] Find newer versions of dependencies than what your
package.json allows [aliases: update]
yt node Run node with the hook already setup.
yt pack Creates a compressed gzip archive of package dependencies.
yt publish publish a npm package [aliases: push]
yt remove Running yarn remove foo will remove the package named foo
from your direct dependencies updating your package.json and
yarn.lock files in the process. [aliases: rm]
yt run Runs a defined package script.
yt sort sort package.json file
yt test Runs the test script defined by the package.
yt types [name] Installs @types/* of packages if not exists in package.json
yt unlink To remove a symlinked package created with yarn link, yarn
unlink can be used.
yt unplug Temporarily copies a package (with an optional @range
suffix) outside of the global cache for debugging purposes
[aliases: upnp]
yt upgrade Symlink a package folder during development.
[aliases: upgrade, up]
yt versions Displays version information of the currently installed
Yarn, Node.js, and its dependencies.
yt why Show information about why a package is installed.
yt ws <cmd> yarn workspaces [aliases: ws, workspaces, workspace]
Options:
--cwd current working directory or package directory
[string] [default: "G:\Users\The
Project\nodejs-yarn\ws-create-yarn-workspaces\packages\yarn-tool"]
--skipCheckWorkspace this options is for search yarn.lock, pkg root,
workspace root, not same as
--ignore-workspace-root-check [boolean]
--yt-debug-mode [boolean]
-v, --version Show version number [boolean]
-h, --help Show help [boolean]
yt ws <cmd>
yarn workspaces
命令:
yt ws add Installs a package in workspaces.
yt ws info Show information about your workspaces.
yt ws init create yarn workspaces
yt ws remove Remove a package in workspaces.
yt ws run run script by lerna
yt ws exec Execute an arbitrary command in each package
yt ncu [-u]
Find newer versions of dependencies than what your package.json or bower.json
allows
選項:
--version 顯示版本 [布林]
--cwd current working directory or package directory
[字串] [預設值: "G:\Users\The
Project\nodejs-yarn\ws-create-yarn-workspaces\packages\yarn-tool"]
--skipCheckWorkspace this options is for search yarn.lock, pkg root,
workspace root, not same as
--ignore-workspace-root-check [布林]
--yt-debug-mode [布林]
--help 顯示說明 [布林]
--dep check only a specific section(s) of dependencies:
prod|dev|peer|optional|bundle (comma-delimited) [字串]
--minimal, -m do not upgrade newer versions that are already satisfied
by the version range according to semver [布林]
--newest, -n find the newest versions available instead of the latest
stable versions [布林]
--packageManager, -p npm (default) or bower [字串] [預設值: "npm"]
--registry, -r specify third-party npm registry [字串]
--silent, -s don't output anything (--loglevel silent) [布林]
--greatest, -g find the highest versions available instead of the
latest stable versions [布林]
--upgrade, -u overwrite package file [布林]
--semverLevel find the highest version within "major" or "minor"[字串]
--removeRange remove version ranges from the final package version
[布林]
--dedupe remove upgrade module from resolutions
[布林] [預設值: true]
yt add [name]
Installs a package
選項:
--version 顯示版本 [布林]
--cwd current working directory or package
directory [字串] [預設值: "G:\Users\The
Project\nodejs-yarn\ws-create-yarn-workspaces\packages\yarn-tool"]
--skipCheckWorkspace this options is for search yarn.lock, pkg
root, workspace root, not same as
--ignore-workspace-root-check [布林]
--yt-debug-mode [布林]
--help 顯示說明 [布林]
--dev, -D install packages to devDependencies. [布林]
--peer, -P install packages to peerDependencies.[布林]
--optional, -O install packages to optionalDependencies.
[布林]
--exact, -E see
https://yarnpkg.com/lang/en/docs/cli/add/
[布林]
--tilde, -T see
https://yarnpkg.com/lang/en/docs/cli/add/
[布林]
--audit see
https://yarnpkg.com/lang/en/docs/cli/add/
[布林]
--name [字串] [必須]
--dedupe, -d Data deduplication for yarn.lock
[布林] [預設值: true]
--ignore-workspace-root-check, -W see
https://yarnpkg.com/lang/en/docs/cli/add/
[布林]
--types, --type try auto install @types/* too [布林]
this same as
yarn, but will do dedupe
npx yarn-tool install
Data deduplication for yarn.lock
npx yarn-tool dedupe
npx yarn-tool dedupe C:/xxxx/packages/name
npx yarn-tool dedupe .
this same as
yarn add [name], but will do dedupe before install by default
npx yarn-tool add @bluelovers/tsconfig -D
Show help
npx yarn-tool help
npx yarn-tool --help
FAQs
yarn/pnpm/lerna cli tool helper - support pnpm and yarn
The npm package yarn-tool receives a total of 57 weekly downloads. As such, yarn-tool popularity was classified as not popular.
We found that yarn-tool demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.