You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-cache.mdx
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,20 +42,35 @@ npm cache add <package-spec>
42
42
npm cache clean [<key>]
43
43
npm cache ls [<name>@<version>]
44
44
npm cache verify
45
+
npm cache npx ls
46
+
npm cache npx rm [<key>...]
47
+
npm cache npx info <key>...
45
48
```
46
49
47
50
Note: This command is unaware of workspaces.
48
51
49
52
### Description
50
53
51
-
Used to add, list, or clean the npm cache folder.
54
+
Used to add, list, or clean the `npm cache` folder. Also used to view info about entries in the `npm exec` (aka `npx`) cache folder.
55
+
56
+
#### `npm cache`
52
57
53
58
- add: Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly.
54
59
55
-
- clean: Delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.
60
+
- clean: Delete a single entry or all entries out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues.
61
+
62
+
- ls: List given entries or all entries in the local cache.
56
63
57
64
- verify: Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.
58
65
66
+
#### `npm cache npx`
67
+
68
+
- ls: List all entries in the npx cache.
69
+
70
+
- rm: Remove given entries or all entries from the npx cache.
71
+
72
+
- info: Get detailed information about given entries in the npx cache.
73
+
59
74
### Details
60
75
61
76
npm stores cache data in an opaque directory within the configured `cache`, named `_cacache`. This directory is a [`cacache`](http://npm.im/cacache)-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through `pacote`, the library responsible for all package fetching as of npm@5.
@@ -90,6 +105,7 @@ The location of npm's cache directory.
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-init.mdx
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,13 @@ The value `npm init` should use by default for the package license.
180
180
181
181
A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/npm/init-package-json) module for more information, or [npm init](/cli/v11/commands/npm-init).
182
182
183
+
#### `init-type`
184
+
185
+
- Default: "commonjs"
186
+
- Type: String
187
+
188
+
The value that `npm init` should use by default for the package.json type field.
Copy file name to clipboardExpand all lines: content/cli/v11/commands/npm-ls.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
52
52
Positional arguments are `name@version-range` identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will _also_ show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show:
-[`3a80a7b`](https://github.com/npm/cli/commit/3a80a7b7d168c23b5e297cba7b47ba5b9875934d)[#8081](https://github.com/npm/cli/pull/8081) add --init-type flag (#8081) (@reggi)
24
+
-[`2a1e11f`](https://github.com/npm/cli/commit/2a1e11f1f6e4a4c948b8ac52b9cda8f370d8674b)[#8071](https://github.com/npm/cli/pull/8071) move nerfDart list into @npmcli/config (@wraithgar)
25
+
26
+
### Bug Fixes
27
+
28
+
-[`8461186`](https://github.com/npm/cli/commit/846118686849f821b084775f7891038013f7ba97)[#8100](https://github.com/npm/cli/pull/8100) update npx cache if possible when spec is a range (@wraithgar)
29
+
-[`e345cc5`](https://github.com/npm/cli/commit/e345cc58ecad0e1e18eefc00638d7fa32966c2b7)[#8050](https://github.com/npm/cli/pull/8050) don't suggest npm update outside of valid engine range (#8050) (@milaninfy)
30
+
-[`811ca29`](https://github.com/npm/cli/commit/811ca2927eed733c8fabf308bf9d467e7c959163)[#8115](https://github.com/npm/cli/pull/8115) stop working around bug fixed in `npm-package-arg@12.0.2` (@TrevorBurnham)
31
+
-[`879303c`](https://github.com/npm/cli/commit/879303cd7c529a04d855f47d14dce433118ac626)[#8078](https://github.com/npm/cli/pull/8078) warn on invalid publishConfig (#8078) (@wraithgar)
32
+
-[`41417de`](https://github.com/npm/cli/commit/41417de9f493969a5826d05d7024fdd1da8d88da)[#8080](https://github.com/npm/cli/pull/8080) warn when TUF fetching of keys fails (#8080) (@wraithgar)
33
+
-[`593c849`](https://github.com/npm/cli/commit/593c84921b0df963cef2ca7b13e44acc20cbd558)[#8076](https://github.com/npm/cli/pull/8076) warn on invalid single-hyphen cli flags (#8076) (@wraithgar)
-[`cc72b89`](https://github.com/npm/cli/commit/cc72b89cc07993a0fa3a7fb55ab91ac2798de7a2)[#8143](https://github.com/npm/cli/pull/8143) fix smoke tests to account for new release versions within a workspace (#8143) (@reggi)
56
+
-[`c3810bc`](https://github.com/npm/cli/commit/c3810bc8735336e6983fefb811f8e08279f7cddf)[#8134](https://github.com/npm/cli/pull/8134) dev dependency updates (@wraithgar)
57
+
-[`9dc40e6`](https://github.com/npm/cli/commit/9dc40e6c96c2c019c95fdc745bc1756da08bcc28)[#8118](https://github.com/npm/cli/pull/8118) dev dependency updates (@wraithgar)
Copy file name to clipboardExpand all lines: content/cli/v11/using-npm/config.mdx
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -600,6 +600,13 @@ The value `npm init` should use by default for the package license.
600
600
601
601
A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/npm/init-package-json) module for more information, or [npm init](/cli/v11/commands/npm-init).
602
602
603
+
#### `init-type`
604
+
605
+
- Default: "commonjs"
606
+
- Type: String
607
+
608
+
The value that `npm init` should use by default for the package.json type field.
0 commit comments