Yarn 2.x 升级迁移指南 All In One
Yarn 2.x 升级迁移指南 All In One
yarn 1.x
$ npm install --global yarn
$ npm uninstall --global yarn
$ brew install yarn
$ brew upgrade yarn
https://classic.yarnpkg.com/en/docs/install#mac-stable

https://github.com/yarnpkg/yarn

Yarn 2.x
https://yarnpkg.com/getting-started/qa#why-should-you-upgrade-to-yarn-modern
https://yarnpkg.com/getting-started/migration#why-should-you-migrate

https://yarnpkg.com/getting-started/migration#cli-commands
Renamed
| Yarn Classic (1.x) | Yarn (2.x) | Notes |
|---|---|---|
| yarn audit | yarn npm audit | |
| yarn create | yarn dlx create-<name> | yarn create still works, but prefer using yarn dlx |
| yarn global | yarn dlx | Dedicated section |
| yarn info yarn npm info | ||
| yarn login | yarn npm login | |
| yarn logout | yarn npm logou | |
| yarn outdated | yarn upgrade-interactive | Read more on GitHub |
| yarn publish | yarn npm publish | |
| yarn tag | yarn npm tag | |
| yarn upgrade | yarn up | Will now upgrade packages across all workspaces |
| yarn install --production | yarn workspaces focus --all --production | Requires the workspace-tools plugin |
| yarn install --verbose | YARN_ENABLE_INLINE_BUILDS=true yarn install |
Removed from core
| Yarn Classic (1.x) | Notes |
|---|---|
| yarn check | Cache integrity is now checked on regular installs; read more on GitHub |
| yarn import | First import to Classic, then migrate to 2.x |
| yarn licenses | Perfect use case for plugins; read more on GitHub |
| yarn versions | Use yarn --version and node -p process.versions |
Not implemented yet
| Yarn Classic (1.x) | Notes |
|---|---|
| yarn list | yarn why may provide some information in the meantime |
| yarn owner | Will eventually be available as yarn npm owner |
| yarn team | Will eventually be available as yarn npm team |
https://github.com/yarnpkg/berry

refs
©xgqfrms 2012-2020
www.cnblogs.com/anonymous007 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️anonymous007, 禁止转载 🈲️,侵权必究⚠️!
本文来自博客园,作者:anonymous007,转载请注明原文链接:https://www.cnblogs.com/anonymous-ufo/p/16834364.html

浙公网安备 33010602011771号