Skip to content

Commit 5215eca

Browse files
Create upgrading-out-versions.md
1 parent 9af6345 commit 5215eca

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Upgrade old versions
3+
description: Guide to managing out NPM packages in your project
4+
---
5+
6+
## Find outdated packages
7+
8+
[docs](https://docs.npmjs.com/cli/outdated)
9+
10+
> This command will check the registry to see if any (or, specific) installed packages are currently outdated.
11+
12+
```sh
13+
$ npm outdated
14+
```
15+
16+
## Upgrade packages
17+
18+
[docs](https://docs.npmjs.com/cli/update)
19+
20+
> This command will update all the packages listed to the latest version (specified by the tag config), respecting semver.
21+
22+
```sh
23+
$ npm update
24+
```
25+
26+
This can be used with `-g` flag too.
27+
28+
Optionally supply package names as arguments.
29+
30+
Note that the above command will still stick with your bounds of tilde and caret.
31+
32+
33+
### Newest
34+
35+
If you want to install the absolute latest available, you a separate tool.
36+
37+
[docs](https://www.npmjs.com/package/npm-upgrade)
38+
39+
> Interactive CLI utility to easily update outdated NPM dependencies with changelogs inspection support.
40+
41+
```sh
42+
$ npx npm-upgrade
43+
```
44+
45+
## Fix security sulnernabities
46+
47+
### Audit
48+
49+
```sh
50+
$ npm audit
51+
```
52+
53+
### Fix
54+
55+
```sh
56+
$ npm audit --fix
57+
```

0 commit comments

Comments
 (0)