Skip to content

Commit

Permalink
Correct the docs for updating package versions
Browse files Browse the repository at this point in the history
`yarn` doesn't appear to have an `upgrade` sub-command. The `up`
sub-command does the same thing though.
  • Loading branch information
p-jackson committed Jul 14, 2022
1 parent 2db558a commit 173678e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/dependency-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ yarn remove -w lodash
Run

```
yarn upgrade <package>
yarn up <package>
# Example
# yarn upgrade react-query
# yarn up react-query
```

Note that this won't change the required range of `react-query` (i.e. it won't modify `package.json`). Instead, it will try to update `react-query` and any of its dependencies to the highest version that satisfies the specified range.
Expand All @@ -91,10 +91,10 @@ For example, if we declare a dependency on `react-query@^2.24.0` it may update r
Run

```
yarn upgrade <package>@^<semver-range>
yarn up <package>@^<semver-range>
# Example
# yarn upgrade react-query@^3.0.0
# yarn up react-query@^3.0.0
```

As before, it will update `react-query` and all its dependencies. But in this case, it _will_ change the required range (i.e. it will modify `package.json`)
Expand Down

0 comments on commit 173678e

Please sign in to comment.