Skip to content

Commit

Permalink
docs: add equivalent commands for Yarn berry (antfu-collective#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng authored Jul 24, 2022
1 parent 6cb2334 commit fe03357
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ ni @types/node -D
ni --frozen

# npm ci
# yarn install --frozen-lockfile
# yarn install --frozen-lockfile (Yarn 1)
# yarn install --immutable (Yarn Berry)
# pnpm install --frozen-lockfile
# bun install --no-save
```
Expand All @@ -60,7 +61,7 @@ ni --frozen
ni -g eslint

# npm i -g eslint
# yarn global add eslint
# yarn global add eslint (Yarn 1)
# pnpm add -g eslint
# bun add -g eslint

Expand Down Expand Up @@ -115,15 +116,17 @@ nu

# (not available for bun)
# npm upgrade
# yarn upgrade
# yarn upgrade (Yarn 1)
# yarn up (Yarn Berry)
# pnpm update
```

```bash
nu -i

# (not available for npm & bun)
# yarn upgrade-interactive
# yarn upgrade-interactive (Yarn 1)
# yarn up -i (Yarn Berry)
# pnpm update -i
```

Expand Down
2 changes: 1 addition & 1 deletion src/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const AGENTS = {
'frozen': 'yarn install --immutable',
'upgrade': 'yarn up {0}',
'upgrade-interactive': 'yarn up -i {0}',
// yarn3 removed 'global', see https://github.com/yarnpkg/berry/issues/821
// Yarn 2+ removed 'global', see https://github.com/yarnpkg/berry/issues/821
'global': 'npm i -g {0}',
'global_uninstall': 'npm uninstall -g {0}',
},
Expand Down

0 comments on commit fe03357

Please sign in to comment.