| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,4 +50,4 @@ npm <command> | |||
| 50 | 50 | ||
| 51 | 51 | #### Is "npm" an acronym for "Node Package Manager"? | |
| 52 | 52 | ||
| 53 | - Contrary to popular belief, **`npm`** **is not** in fact an acronym for "Node Package Manager"; It is a recursive bacronymic abbreviation for **"npm is not an acronym"** (if the project was named "ninaa", then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were to ever have been considered an acronym, it would be as "node pm" or, potentially "new pm". | ||
| 53 | + Contrary to popular belief, **`npm`** **is not** an acronym for "Node Package Manager." It is a recursive backronymic abbreviation for **"npm is not an acronym"** (if the project were named "ninaa," then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were ever considered an acronym, it would be as "node pm" or, potentially, "new pm". | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,32 @@ | |||
| 1 | + --- | ||
| 2 | + title: npm-get | ||
| 3 | + section: 1 | ||
| 4 | + description: Get a value from the npm configuration | ||
| 5 | + --- | ||
| 6 | + | ||
| 7 | + ### Synopsis | ||
| 8 | + | ||
| 9 | + ```bash | ||
| 10 | + npm get [<key> ...] (See `npm config`) | ||
| 11 | + ``` | ||
| 12 | + | ||
| 13 | + Note: This command is unaware of workspaces. | ||
| 14 | + | ||
| 15 | + ### Description | ||
| 16 | + | ||
| 17 | + Get a value from the npm configuration | ||
| 18 | + | ||
| 19 | + ### Configuration | ||
| 20 | + | ||
| 21 | + #### `long` | ||
| 22 | + | ||
| 23 | + * Default: false | ||
| 24 | + * Type: Boolean | ||
| 25 | + | ||
| 26 | + Show extended information in `ls`, `search`, and `help-search`. | ||
| 27 | + | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + ### See Also | ||
| 31 | + | ||
| 32 | + * [npm help config](/commands/npm-config) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -264,7 +264,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the | |||
| 264 | 264 | will be used. For example, `foo@latest` might install `foo@1.2` even though | |
| 265 | 265 | `latest` is `2.0`. | |
| 266 | 266 | ||
| 267 | + This config cannot be used with: `min-release-age` | ||
| 267 | 268 | ||
| 269 | + #### `min-release-age` | ||
| 270 | + | ||
| 271 | + * Default: null | ||
| 272 | + * Type: null or Number | ||
| 273 | + | ||
| 274 | + If set, npm will build the npm tree such that only versions that were | ||
| 275 | + available more than the given number of days ago will be installed. If there | ||
| 276 | + are no versions available for the current set of dependencies, the command | ||
| 277 | + will error. | ||
| 278 | + | ||
| 279 | + This flag is a complement to `before`, which accepts an exact date instead | ||
| 280 | + of a relative number of days. | ||
| 281 | + | ||
| 282 | + This config cannot be used with: `before` | ||
| 268 | 283 | ||
| 269 | 284 | #### `bin-links` | |
| 270 | 285 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -606,7 +606,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the | |||
| 606 | 606 | will be used. For example, `foo@latest` might install `foo@1.2` even though | |
| 607 | 607 | `latest` is `2.0`. | |
| 608 | 608 | ||
| 609 | + This config cannot be used with: `min-release-age` | ||
| 609 | 610 | ||
| 611 | + #### `min-release-age` | ||
| 612 | + | ||
| 613 | + * Default: null | ||
| 614 | + * Type: null or Number | ||
| 615 | + | ||
| 616 | + If set, npm will build the npm tree such that only versions that were | ||
| 617 | + available more than the given number of days ago will be installed. If there | ||
| 618 | + are no versions available for the current set of dependencies, the command | ||
| 619 | + will error. | ||
| 620 | + | ||
| 621 | + This flag is a complement to `before`, which accepts an exact date instead | ||
| 622 | + of a relative number of days. | ||
| 623 | + | ||
| 624 | + This config cannot be used with: `before` | ||
| 610 | 625 | ||
| 611 | 626 | #### `bin-links` | |
| 612 | 627 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,229 @@ | |||
| 1 | + --- | ||
| 2 | + title: npm-ll | ||
| 3 | + section: 1 | ||
| 4 | + description: List installed packages | ||
| 5 | + --- | ||
| 6 | + | ||
| 7 | + ### Synopsis | ||
| 8 | + | ||
| 9 | + ```bash | ||
| 10 | + npm ll [[<@scope>/]<pkg> ...] | ||
| 11 | + | ||
| 12 | + alias: la | ||
| 13 | + ``` | ||
| 14 | + | ||
| 15 | + ### Description | ||
| 16 | + | ||
| 17 | + List installed packages | ||
| 18 | + | ||
| 19 | + ### Configuration | ||
| 20 | + | ||
| 21 | + #### `all` | ||
| 22 | + | ||
| 23 | + * Default: false | ||
| 24 | + * Type: Boolean | ||
| 25 | + | ||
| 26 | + When running `npm outdated` and `npm ls`, setting `--all` will show all | ||
| 27 | + outdated or installed packages, rather than only those directly depended | ||
| 28 | + upon by the current project. | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + #### `json` | ||
| 33 | + | ||
| 34 | + * Default: false | ||
| 35 | + * Type: Boolean | ||
| 36 | + | ||
| 37 | + Whether or not to output JSON data, rather than the normal output. | ||
| 38 | + | ||
| 39 | + * In `npm pkg set` it enables parsing set values with JSON.parse() before | ||
| 40 | + saving them to your `package.json`. | ||
| 41 | + | ||
| 42 | + Not supported by all npm commands. | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + #### `long` | ||
| 47 | + | ||
| 48 | + * Default: false | ||
| 49 | + * Type: Boolean | ||
| 50 | + | ||
| 51 | + Show extended information in `ls`, `search`, and `help-search`. | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + #### `parseable` | ||
| 56 | + | ||
| 57 | + * Default: false | ||
| 58 | + * Type: Boolean | ||
| 59 | + | ||
| 60 | + Output parseable results from commands that write to standard output. For | ||
| 61 | + `npm search`, this will be tab-separated table format. | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + #### `global` | ||
| 66 | + | ||
| 67 | + * Default: false | ||
| 68 | + * Type: Boolean | ||
| 69 | + | ||
| 70 | + Operates in "global" mode, so that packages are installed into the `prefix` | ||
| 71 | + folder instead of the current working directory. See | ||
| 72 | + [folders](/configuring-npm/folders) for more on the differences in behavior. | ||
| 73 | + | ||
| 74 | + * packages are installed into the `{prefix}/lib/node_modules` folder, instead | ||
| 75 | + of the current working directory. | ||
| 76 | + * bin files are linked to `{prefix}/bin` | ||
| 77 | + * man pages are linked to `{prefix}/share/man` | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + #### `depth` | ||
| 82 | + | ||
| 83 | + * Default: `Infinity` if `--all` is set; otherwise, `0` | ||
| 84 | + * Type: null or Number | ||
| 85 | + | ||
| 86 | + The depth to go when recursing packages for `npm ls`. | ||
| 87 | + | ||
| 88 | + If not set, `npm ls` will show only the immediate dependencies of the root | ||
| 89 | + project. If `--all` is set, then npm will show all dependencies by default. | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + | ||
| 93 | + #### `omit` | ||
| 94 | + | ||
| 95 | + * Default: 'dev' if the `NODE_ENV` environment variable is set to | ||
| 96 | + 'production'; otherwise, empty. | ||
| 97 | + * Type: "dev", "optional", or "peer" (can be set multiple times) | ||
| 98 | + | ||
| 99 | + Dependency types to omit from the installation tree on disk. | ||
| 100 | + | ||
| 101 | + Note that these dependencies _are_ still resolved and added to the | ||
| 102 | + `package-lock.json` or `npm-shrinkwrap.json` file. They are just not | ||
| 103 | + physically installed on disk. | ||
| 104 | + | ||
| 105 | + If a package type appears in both the `--include` and `--omit` lists, then | ||
| 106 | + it will be included. | ||
| 107 | + | ||
| 108 | + If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment | ||
| 109 | + variable will be set to `'production'` for all lifecycle scripts. | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + | ||
| 113 | + #### `include` | ||
| 114 | + | ||
| 115 | + * Default: | ||
| 116 | + * Type: "prod", "dev", "optional", or "peer" (can be set multiple times) | ||
| 117 | + | ||
| 118 | + Option that allows for defining which types of dependencies to install. | ||
| 119 | + | ||
| 120 | + This is the inverse of `--omit=<type>`. | ||
| 121 | + | ||
| 122 | + Dependency types specified in `--include` will not be omitted, regardless of | ||
| 123 | + the order in which omit/include are specified on the command-line. | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + | ||
| 127 | + #### `link` | ||
| 128 | + | ||
| 129 | + * Default: false | ||
| 130 | + * Type: Boolean | ||
| 131 | + | ||
| 132 | + Used with `npm ls`, limiting output to only those packages that are linked. | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + | ||
| 136 | + #### `package-lock-only` | ||
| 137 | + | ||
| 138 | + * Default: false | ||
| 139 | + * Type: Boolean | ||
| 140 | + | ||
| 141 | + If set to true, the current operation will only use the `package-lock.json`, | ||
| 142 | + ignoring `node_modules`. | ||
| 143 | + | ||
| 144 | + For `update` this means only the `package-lock.json` will be updated, | ||
| 145 | + instead of checking `node_modules` and downloading dependencies. | ||
| 146 | + | ||
| 147 | + For `list` this means the output will be based on the tree described by the | ||
| 148 | + `package-lock.json`, rather than the contents of `node_modules`. | ||
| 149 | + | ||
| 150 | + | ||
| 151 | + | ||
| 152 | + #### `unicode` | ||
| 153 | + | ||
| 154 | + * Default: false on windows, true on mac/unix systems with a unicode locale, | ||
| 155 | + as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. | ||
| 156 | + * Type: Boolean | ||
| 157 | + | ||
| 158 | + When set to true, npm uses unicode characters in the tree output. When | ||
| 159 | + false, it uses ascii characters instead of unicode glyphs. | ||
| 160 | + | ||
| 161 | + | ||
| 162 | + | ||
| 163 | + #### `workspace` | ||
| 164 | + | ||
| 165 | + * Default: | ||
| 166 | + * Type: String (can be set multiple times) | ||
| 167 | + | ||
| 168 | + Enable running a command in the context of the configured workspaces of the | ||
| 169 | + current project while filtering by running only the workspaces defined by | ||
| 170 | + this configuration option. | ||
| 171 | + | ||
| 172 | + Valid values for the `workspace` config are either: | ||
| 173 | + | ||
| 174 | + * Workspace names | ||
| 175 | + * Path to a workspace directory | ||
| 176 | + * Path to a parent workspace directory (will result in selecting all | ||
| 177 | + workspaces within that folder) | ||
| 178 | + | ||
| 179 | + When set for the `npm init` command, this may be set to the folder of a | ||
| 180 | + workspace which does not yet exist, to create the folder and set it up as a | ||
| 181 | + brand new workspace within the project. | ||
| 182 | + | ||
| 183 | + This value is not exported to the environment for child processes. | ||
| 184 | + | ||
| 185 | + #### `workspaces` | ||
| 186 | + | ||
| 187 | + * Default: null | ||
| 188 | + * Type: null or Boolean | ||
| 189 | + | ||
| 190 | + Set to true to run the command in the context of **all** configured | ||
| 191 | + workspaces. | ||
| 192 | + | ||
| 193 | + Explicitly setting this to false will cause commands like `install` to | ||
| 194 | + ignore workspaces altogether. When not set explicitly: | ||
| 195 | + | ||
| 196 | + - Commands that operate on the `node_modules` tree (install, update, etc.) | ||
| 197 | + will link workspaces into the `node_modules` folder. - Commands that do | ||
| 198 | + other things (test, exec, publish, etc.) will operate on the root project, | ||
| 199 | + _unless_ one or more workspaces are specified in the `workspace` config. | ||
| 200 | + | ||
| 201 | + This value is not exported to the environment for child processes. | ||
| 202 | + | ||
| 203 | + #### `include-workspace-root` | ||
| 204 | + | ||
| 205 | + * Default: false | ||
| 206 | + * Type: Boolean | ||
| 207 | + | ||
| 208 | + Include the workspace root when workspaces are enabled for a command. | ||
| 209 | + | ||
| 210 | + When false, specifying individual workspaces via the `workspace` config, or | ||
| 211 | + all workspaces via the `workspaces` flag, will cause npm to operate only on | ||
| 212 | + the specified workspaces, and not on the root project. | ||
| 213 | + | ||
| 214 | + This value is not exported to the environment for child processes. | ||
| 215 | + | ||
| 216 | + #### `install-links` | ||
| 217 | + | ||
| 218 | + * Default: false | ||
| 219 | + * Type: Boolean | ||
| 220 | + | ||
| 221 | + When set file: protocol dependencies will be packed and installed as regular | ||
| 222 | + dependencies instead of creating a symlink. This option has no effect on | ||
| 223 | + workspaces. | ||
| 224 | + | ||
| 225 | + | ||
| 226 | + | ||
| 227 | + ### See Also | ||
| 228 | + | ||
| 229 | + * [npm help config](/commands/npm-config) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages. | |||
| 23 | 23 | For example, running `npm ls promzard` in npm's source tree will show: | |
| 24 | 24 | ||
| 25 | 25 | ```bash | |
| 26 | - npm@11.9.0 /path/to/npm | ||
| 26 | + npm@11.10.1 /path/to/npm | ||
| 27 | 27 | └─┬ init-package-json@0.0.4 | |
| 28 | 28 | └── promzard@0.1.5 | |
| 29 | 29 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,7 +165,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the | |||
| 165 | 165 | will be used. For example, `foo@latest` might install `foo@1.2` even though | |
| 166 | 166 | `latest` is `2.0`. | |
| 167 | 167 | ||
| 168 | + This config cannot be used with: `min-release-age` | ||
| 168 | 169 | ||
| 170 | + #### `min-release-age` | ||
| 171 | + | ||
| 172 | + * Default: null | ||
| 173 | + * Type: null or Number | ||
| 174 | + | ||
| 175 | + If set, npm will build the npm tree such that only versions that were | ||
| 176 | + available more than the given number of days ago will be installed. If there | ||
| 177 | + are no versions available for the current set of dependencies, the command | ||
| 178 | + will error. | ||
| 179 | + | ||
| 180 | + This flag is a complement to `before`, which accepts an exact date instead | ||
| 181 | + of a relative number of days. | ||
| 182 | + | ||
| 183 | + This config cannot be used with: `before` | ||
| 169 | 184 | ||
| 170 | 185 | ### See Also | |
| 171 | 186 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments