npm-check-updates 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -21
- package/build/index.js +62 -62
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,27 +5,27 @@
|
|
|
5
5
|
|
|
6
6
|
**npm-check-updates upgrades your package.json dependencies to the _latest_ versions, ignoring specified versions.**
|
|
7
7
|
|
|
8
|
-
- maintains existing semantic versioning _policies_, i.e. `"react": "^
|
|
8
|
+
- maintains existing semantic versioning _policies_, i.e. `"react": "^17.0.2"` to `"react": "^18.3.1"`.
|
|
9
9
|
- _only_ modifies package.json file. Run `npm install` to update your installed packages and package-lock.json.
|
|
10
10
|
- sensible defaults, but highly customizable
|
|
11
|
+
- compatible with npm, yarn, pnpm, deno, and bun
|
|
11
12
|
- CLI and module usage
|
|
12
|
-
- compatible with: `npm`, `yarn`, `pnpm`, `deno`, `bun`
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
<img width="500" alt="example output" src="https://github.com/user-attachments/assets/4808618b-ac20-4fc0-92e0-a777de70a2b6">
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
$${\color{red}Red}$$ major upgrade (and all [major version zero](https://semver.org/#spec-item-4))<br/>
|
|
17
|
+
$${\color{cyan}Cyan}$$ minor upgrade<br/>
|
|
18
|
+
$${\color{green}Green}$$ patch upgrade<br/>
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
|
-
Install globally
|
|
22
|
+
Install globally to use `npm-check-updates` or the shorter `ncu`:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
25
|
npm install -g npm-check-updates
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Or run with [npx](https://docs.npmjs.com/cli/v7/commands/npx):
|
|
28
|
+
Or run with [npx](https://docs.npmjs.com/cli/v7/commands/npx) (only the long form is supported):
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
npx npm-check-updates
|
|
@@ -89,7 +89,7 @@ Combine with `--format group` for a truly _luxe_ experience:
|
|
|
89
89
|
|
|
90
90
|
## Filter packages
|
|
91
91
|
|
|
92
|
-
Filter packages using the `--filter` option or adding additional cli arguments
|
|
92
|
+
Filter packages using the `--filter` option or adding additional cli arguments:
|
|
93
93
|
|
|
94
94
|
```sh
|
|
95
95
|
# upgrade only mocha
|
|
@@ -97,26 +97,36 @@ ncu mocha
|
|
|
97
97
|
ncu -f mocha
|
|
98
98
|
ncu --filter mocha
|
|
99
99
|
|
|
100
|
+
# upgrade only chalk, mocha, and react
|
|
101
|
+
ncu chalk mocha react
|
|
102
|
+
ncu chalk, mocha, react
|
|
103
|
+
ncu -f "chalk mocha react"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Filter with wildcards or regex:
|
|
107
|
+
|
|
108
|
+
```sh
|
|
100
109
|
# upgrade packages that start with "react-"
|
|
101
110
|
ncu react-*
|
|
102
111
|
ncu "/^react-.*$/"
|
|
112
|
+
```
|
|
103
113
|
|
|
114
|
+
Exclude specific packages with the `--reject` option or prefixing a filter with `!`. Supports strings, wildcards, globs, comma-or-space-delimited lists, and regex:
|
|
115
|
+
|
|
116
|
+
```sh
|
|
104
117
|
# upgrade everything except nodemon
|
|
105
118
|
ncu \!nodemon
|
|
106
119
|
ncu -x nodemon
|
|
107
120
|
ncu --reject nodemon
|
|
108
121
|
|
|
109
|
-
# upgrade only chalk, mocha, and react
|
|
110
|
-
ncu chalk mocha react
|
|
111
|
-
ncu chalk, mocha, react
|
|
112
|
-
ncu -f "chalk mocha react"
|
|
113
|
-
|
|
114
122
|
# upgrade packages that do not start with "react-".
|
|
115
123
|
ncu \!react-*
|
|
116
124
|
ncu '/^(?!react-).*$/' # mac/linux
|
|
117
125
|
ncu "/^(?!react-).*$/" # windows
|
|
118
126
|
```
|
|
119
127
|
|
|
128
|
+
Advanced filters: [filter](https://github.com/raineorshine/npm-check-updates#filter), [filterResults](https://github.com/raineorshine/npm-check-updates#filterresults), [filterVersion](https://github.com/raineorshine/npm-check-updates#filterversion)
|
|
129
|
+
|
|
120
130
|
## How dependency updates are determined
|
|
121
131
|
|
|
122
132
|
- Direct dependencies are updated to the latest stable version:
|
|
@@ -134,18 +144,21 @@ ncu "/^(?!react-).*$/" # windows
|
|
|
134
144
|
- `*` → `*`
|
|
135
145
|
- Prerelease versions are ignored by default.
|
|
136
146
|
- Use `--pre` to include prerelease versions (e.g. `alpha`, `beta`, `build1235`)
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
147
|
+
- Choose what level to upgrade to:
|
|
148
|
+
- With `--target semver`, update according to your specified [semver](https://semver.org/) version ranges:
|
|
149
|
+
- `^1.1.0` → `^1.9.99`
|
|
150
|
+
- With `--target minor`, strictly update the patch and minor versions (including major version zero):
|
|
151
|
+
- `0.1.0` → `0.2.1`
|
|
152
|
+
- With `--target patch`, strictly update the patch version (including major version zero):
|
|
153
|
+
- `0.1.0` → `0.1.2`
|
|
154
|
+
- With `--target @next`, update to the version published on the `next` tag:
|
|
155
|
+
- `0.1.0` -> `0.1.1-next.1`
|
|
143
156
|
|
|
144
157
|
## Options
|
|
145
158
|
|
|
146
159
|
Options are merged with the following precedence:
|
|
147
160
|
|
|
148
|
-
1.
|
|
161
|
+
1. Command line options
|
|
149
162
|
2. Local [Config File](#config-file)
|
|
150
163
|
3. Project Config File
|
|
151
164
|
4. User Config File
|