Skip to content

Commit a0e786e

Browse files
committed
CLI documentation update from CI
1 parent fd4f6d1 commit a0e786e

File tree

7 files changed

+115
-6
lines changed

7 files changed

+115
-6
lines changed

content/cli/v10/commands/npm-init.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ redirect_from:
3838
### Synopsis
3939

4040
```bash
41-
npm init <package-spec> (same as `npx <package-spec>`)
41+
npm init <package-spec> (same as `npx create-<package-spec>`)
4242
npm init <@scope> (same as `npx <@scope>/create`)
4343

4444
aliases: create, innit

content/cli/v10/commands/npm-install.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ Even if you never publish your package, you can still get a lot of benefits of u
164164
npm install ansi-regex --save-bundle
165165
```
166166

167-
**Note**: If there is a file or folder named `<name>` in the current working directory, then it will try to install that, and only try to fetch the package by name if it is not valid.
168-
169167
- `npm install <alias>@npm:<name>`:
170168

171169
Install a package under a custom alias. Allows multiple versions of a same-name package side-by-side, more convenient import names for packages with otherwise long ones, and using git forks replacements or forked npm packages as replacements. Aliasing works only on your project and does not rename packages in transitive dependencies. Aliases should follow the naming conventions stated in [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).

content/cli/v10/commands/npm-ls.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
5252
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:
5353

5454
```bash
55-
npm@10.8.3 /path/to/npm
55+
npm@10.9.0 /path/to/npm
5656
└─┬ init-package-json@0.0.4
5757
└── promzard@0.1.5
5858
```

content/cli/v10/commands/npm.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Note: This command is unaware of workspaces.
3131

3232
### Version
3333

34-
10.8.3
34+
10.9.0
3535

3636
### Description
3737

content/cli/v10/configuring-npm/package-json.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ Most of these ignored files can be included specifically if included in the `fil
299299

300300
These can not be included.
301301

302+
### exports
303+
304+
The "exports" provides a modern alternative to "main" allowing multiple entry points to be defined, conditional entry resolution support between environments, and preventing any other entry points besides those defined in "exports". This encapsulation allows module authors to clearly define the public interface for their package. For more details see the [node.js documentation on package entry points](https://nodejs.org/api/packages.html#package-entry-points)
305+
302306
### main
303307

304308
The main field is a module ID that is the primary entry point to your program. That is, if your package is named `foo`, and a user installs it, and then does `require("foo")`, then your main module's exports object will be returned.
@@ -905,6 +909,31 @@ Like the `os` option, you can also block architectures:
905909
906910
The host architecture is determined by `process.arch`
907911
912+
### devEngines
913+
914+
The `devEngines` field aids engineers working on a codebase to all be using the same tooling.
915+
916+
You can specify a `devEngines` property in your `package.json` which will run before `install`, `ci`, and `run` commands.
917+
918+
> Note: `engines` and `devEngines` differ in object shape. They also function very differently. `engines` is designed to alert the user when a dependency uses a differening npm or node version that the project it's being used in, whereas `devEngines` is used to alert people interacting with the source code of a project.
919+
920+
The supported keys under the `devEngines` property are `cpu`, `os`, `libc`, `runtime`, and `packageManager`. Each property can be an object or an array of objects. Objects must contain `name`, and optionally can specify `version`, and `onFail`. `onFail` can be `warn`, `error`, or `ignore`, and if left undefined is of the same value as `error`. `npm` will assume that you're running with `node`. Here's an example of a project that will fail if the environment is not `node` and `npm`. If you set `runtime.name` or `packageManager.name` to any other string, it will fail within the npm CLI.
921+
922+
```json
923+
{
924+
"devEngines": {
925+
"runtime": {
926+
"name": "node",
927+
"onFail": "error"
928+
},
929+
"packageManager": {
930+
"name": "npm",
931+
"onFail": "error"
932+
}
933+
}
934+
}
935+
```
936+
908937
### private
909938

910939
If you set `"private": true` in your package.json, then npm will refuse to publish it.

content/cli/v10/using-npm/changelog.mdx

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,88 @@ redirect_from:
1515
- /using-npm/changelog
1616
---
1717

18+
## [10.9.0](https://github.com/npm/cli/compare/v10.8.3...v10.9.0) (2024-10-03)
19+
20+
### Features
21+
22+
- [`4d57928`](https://github.com/npm/cli/commit/4d57928ea20c1672864dc0c8ebaff5d877e61c9c) [#7766](https://github.com/npm/cli/pull/7766) devEngines (#7766) (@reggi)
23+
24+
### Bug Fixes
25+
26+
- [`6ca609e`](https://github.com/npm/cli/commit/6ca609e20b68fb2e5ef8177db116b84a339461fd) [#7789](https://github.com/npm/cli/pull/7789) ping and doctor commands fix for checking if registry is online (#7789) (@milaninfy)
27+
28+
### Documentation
29+
30+
- [`63d6a73`](https://github.com/npm/cli/commit/63d6a732c3c0e9c19fd4d147eaa5cc27c29b168d) [#7783](https://github.com/npm/cli/pull/7783) package.json: add brief section on exports, link to Node.js docs (#7783) (@wheresrhys)
31+
- [`366c07e`](https://github.com/npm/cli/commit/366c07e2f3cb9d1c6ddbd03e624a4d73fbd2676e) [#7776](https://github.com/npm/cli/pull/7776) remove incorrect note about npm install (#7776) (@wraithgar)
32+
33+
### Dependencies
34+
35+
- [`60a7ee5`](https://github.com/npm/cli/commit/60a7ee5b7a71c1a46cee4026d7e06f8785a0786b) [#7803](https://github.com/npm/cli/pull/7803) hoist npm-normalize-package-bin
36+
- [`20dd44f`](https://github.com/npm/cli/commit/20dd44ff7deedd594f996fcfe48615fd93498db3) [#7803](https://github.com/npm/cli/pull/7803) hoist minipass-fetch
37+
- [`5795987`](https://github.com/npm/cli/commit/5795987605af9bb163ad3a689a0854b99cd39cbe) [#7803](https://github.com/npm/cli/pull/7803) update `proggy@3.0.0`
38+
- [`99ccae3`](https://github.com/npm/cli/commit/99ccae3ded6f7013b26ed268a208c24473cdeb8f) [#7803](https://github.com/npm/cli/pull/7803) update `bin-links@5.0.0`
39+
- [`75786ad`](https://github.com/npm/cli/commit/75786adb86f763d781f840feea4afb8d01953b99) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/query@4.0.0`
40+
- [`1c25a1d`](https://github.com/npm/cli/commit/1c25a1d74c26364742b59f9d57b9a07bb4f8726f) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/node-gyp@4.0.0`
41+
- [`2d7fc3d`](https://github.com/npm/cli/commit/2d7fc3d320b92a8447e7282df14e2b99047cc426) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/name-from-folder@3.0.0`
42+
- [`1e09334`](https://github.com/npm/cli/commit/1e093347e3723c77bb4dc9214e111a3ec78fbbea) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/metavuln-calculator@8.0.0`
43+
- [`820e983`](https://github.com/npm/cli/commit/820e983b1d5a82d6c9c10895487c2e43b423d6ef) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/installed-package-contents@3.0.0`
44+
- [`9cd6603`](https://github.com/npm/cli/commit/9cd66031ebd2e9a0d6fdee3a7b4d7779694306ff) [#7803](https://github.com/npm/cli/pull/7803) update `read-package-json-fast@4.0.0`
45+
- [`b84d907`](https://github.com/npm/cli/commit/b84d9079feaf9582763356e538c7247383b00e9f) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/git@6.0.1`
46+
- [`53ed632`](https://github.com/npm/cli/commit/53ed632561cc0336f4194524de6e236f50d67212) [#7803](https://github.com/npm/cli/pull/7803) update `write-file-atomic@6.0.0`
47+
- [`ab40dab`](https://github.com/npm/cli/commit/ab40dab333bd24ab255f7c63798e86e1a7f66374) [#7803](https://github.com/npm/cli/pull/7803) update `which@5.0.0`
48+
- [`b1c4770`](https://github.com/npm/cli/commit/b1c477084d5e2bcd7335610587091ca1189ebaf8) [#7803](https://github.com/npm/cli/pull/7803) update `validate-npm-package-name@6.0.0`
49+
- [`8206c4f`](https://github.com/npm/cli/commit/8206c4f675937e855b60164946c086eb64d7ecb6) [#7803](https://github.com/npm/cli/pull/7803) update `ssri@12.0.0`
50+
- [`8b7dbc8`](https://github.com/npm/cli/commit/8b7dbc8234914352b2649f56c6a11765f1904e30) [#7803](https://github.com/npm/cli/pull/7803) update `read@4.0.0`
51+
- [`f6909a0`](https://github.com/npm/cli/commit/f6909a022c9373c85d980c96a30f47a3a65aa4a9) [#7803](https://github.com/npm/cli/pull/7803) update `proc-log@5.0.0`
52+
- [`f9b2e18`](https://github.com/npm/cli/commit/f9b2e1884fbfe2a2c41e3fcaa4be722209141aed) [#7803](https://github.com/npm/cli/pull/7803) update `parse-conflict-json@4.0.0`
53+
- [`e7ab206`](https://github.com/npm/cli/commit/e7ab206370e5fc62fefe6916e5dcc40b3e577d22) [#7803](https://github.com/npm/cli/pull/7803) update `pacote@19.0.0`
54+
- [`b28dbb1`](https://github.com/npm/cli/commit/b28dbb10b382f51f2c80fa5719e804074655ed67) [#7803](https://github.com/npm/cli/pull/7803) update `npm-user-validate@3.0.0`
55+
- [`d13a20b`](https://github.com/npm/cli/commit/d13a20bebef1b9932f86c44741ea6d214ad6842b) [#7803](https://github.com/npm/cli/pull/7803) update `npm-registry-fetch@18.0.1`
56+
- [`5208f74`](https://github.com/npm/cli/commit/5208f7404c656a91cfb34671cf8533e147f5944f) [#7803](https://github.com/npm/cli/pull/7803) update `npm-profile@11.0.1`
57+
- [`092f41f`](https://github.com/npm/cli/commit/092f41fec40f418468605557fcb4f4e1babd9d45) [#7803](https://github.com/npm/cli/pull/7803) update `npm-pick-manifest@10.0.0`
58+
- [`50a7bc8`](https://github.com/npm/cli/commit/50a7bc8737bb4e0a8fbc5f00b8f580512153a5bc) [#7803](https://github.com/npm/cli/pull/7803) update `npm-package-arg@12.0.0`
59+
- [`591130d`](https://github.com/npm/cli/commit/591130d0aaaa032f484504287e993d38b6f04d4f) [#7803](https://github.com/npm/cli/pull/7803) update `npm-install-checks@7.1.0`
60+
- [`be6ae96`](https://github.com/npm/cli/commit/be6ae96bab5265a89090388f49be8311dc012a68) [#7803](https://github.com/npm/cli/pull/7803) update `npm-audit-report@6.0.0`
61+
- [`8d4060a`](https://github.com/npm/cli/commit/8d4060a661db50dc4d4a2f30cc57346f1d242599) [#7803](https://github.com/npm/cli/pull/7803) update `normalize-package-data@7.0.0`
62+
- [`105fa2b`](https://github.com/npm/cli/commit/105fa2bdb2bbb0502bb8e0c5ccec3dadcff3c2d6) [#7803](https://github.com/npm/cli/pull/7803) update `nopt@8.0.0`
63+
- [`eae4f57`](https://github.com/npm/cli/commit/eae4f577b40732dbcad6c959a2a479258247f399) [#7803](https://github.com/npm/cli/pull/7803) update `make-fetch-happen@14.0.1`
64+
- [`7214149`](https://github.com/npm/cli/commit/72141496fbc7e5f0e0824d584b82690eeee45bb5) [#7803](https://github.com/npm/cli/pull/7803) update `json-parse-even-better-errors@4.0.0`
65+
- [`c4bed31`](https://github.com/npm/cli/commit/c4bed312966bbdd70e457543c6a95c827a1e6b59) [#7803](https://github.com/npm/cli/pull/7803) update `init-package-json@7.0.1`
66+
- [`f54b155`](https://github.com/npm/cli/commit/f54b155d0cbc251c7159cc42ba3b6154563f9e49) [#7803](https://github.com/npm/cli/pull/7803) update `ini@5.0.0`
67+
- [`6deae9e`](https://github.com/npm/cli/commit/6deae9e5d989ac30208fbcbca13ec827c6f2b588) [#7803](https://github.com/npm/cli/pull/7803) update `hosted-git-info@8.0.0`
68+
- [`034c729`](https://github.com/npm/cli/commit/034c7297568d328bcaf79bd2c7226d3593e21810) [#7803](https://github.com/npm/cli/pull/7803) update `cacache@19.0.1`
69+
- [`ddb8be0`](https://github.com/npm/cli/commit/ddb8be0af2f2967f011d012d3634b78197000b80) [#7803](https://github.com/npm/cli/pull/7803) update `abbrev@3.0.0`
70+
- [`538a4cc`](https://github.com/npm/cli/commit/538a4cc1dd731a3643ab4477fe545db39997bcdf) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/run-script@9.0.1`
71+
- [`b80d048`](https://github.com/npm/cli/commit/b80d0482cb52fc00275fef9548d86e17eaf28f50) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/redact@3.0.0`
72+
- [`81137fc`](https://github.com/npm/cli/commit/81137fc3dab75f7bea5c2a78e10b050284fc11b0) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/promise-spawn@8.0.1`
73+
- [`2076368`](https://github.com/npm/cli/commit/207636897aa5544ec28cad5b75fe2e685028dafd) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/package-json@6.0.1`
74+
- [`feac87c`](https://github.com/npm/cli/commit/feac87c7ed6113665bc144ee677017bc66138b70) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/map-workspaces@4.0.1`
75+
- [`dd90f9e`](https://github.com/npm/cli/commit/dd90f9ee7882dbeec073604638b98e68f9873371) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/fs@4.0.0`
76+
77+
### Chores
78+
79+
- [`95e2cb1`](https://github.com/npm/cli/commit/95e2cb105f1c80362a2355801917425be84e6097) [#7810](https://github.com/npm/cli/pull/7810) ignore .github folder in release-please (@reggi)
80+
- [`be1e6da`](https://github.com/npm/cli/commit/be1e6da91380d7a10edb1767dd433ca296b96771) [#7803](https://github.com/npm/cli/pull/7803) update `minify-registry-metadata@4.0.0` (@reggi)
81+
- [`43f2374`](https://github.com/npm/cli/commit/43f2374bf5abe825be6068cdfb991f02ba08eac3) [#7803](https://github.com/npm/cli/pull/7803) update `ignore-walk@7.0.0` (@reggi)
82+
- [`bb03036`](https://github.com/npm/cli/commit/bb03036ba8f7d7f1497ecac17b5e2f3e2951e214) [#7803](https://github.com/npm/cli/pull/7803) update `npm-packlist@9.0.0` (@reggi)
83+
- [`2072705`](https://github.com/npm/cli/commit/2072705aa80d009dc077639adc305692f4a6c0b9) [#7803](https://github.com/npm/cli/pull/7803) update `@npmcli/eslint-config@5.0.1` (@reggi)
84+
- [`949d8f8`](https://github.com/npm/cli/commit/949d8f872d341590d17613203bb57b95084b390d) [#7803](https://github.com/npm/cli/pull/7803) engine ^18.17.0 || >=20.5.0 in package template (@reggi)
85+
- [`fefd509`](https://github.com/npm/cli/commit/fefd509992a05c2dfddbe7bc46931c42f1da69d7) [#7764](https://github.com/npm/cli/pull/7764) deps: bump actions/download-artifact from 3 to 4 in /.github/workflows (#7764) (@dependabot[bot], @wraithgar)
86+
- [workspace](https://github.com/npm/cli/releases/tag/arborist-v8.0.0): `@npmcli/arborist@8.0.0`
87+
- [workspace](https://github.com/npm/cli/releases/tag/config-v9.0.0): `@npmcli/config@9.0.0`
88+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmaccess-v9.0.0): `libnpmaccess@9.0.0`
89+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmdiff-v7.0.0): `libnpmdiff@7.0.0`
90+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmexec-v9.0.0): `libnpmexec@9.0.0`
91+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmfund-v6.0.0): `libnpmfund@6.0.0`
92+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmhook-v11.0.0): `libnpmhook@11.0.0`
93+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmorg-v7.0.0): `libnpmorg@7.0.0`
94+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmpack-v8.0.0): `libnpmpack@8.0.0`
95+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmpublish-v10.0.0): `libnpmpublish@10.0.0`
96+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmsearch-v8.0.0): `libnpmsearch@8.0.0`
97+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmteam-v7.0.0): `libnpmteam@7.0.0`
98+
- [workspace](https://github.com/npm/cli/releases/tag/libnpmversion-v7.0.0): `libnpmversion@7.0.0`
99+
18100
## [10.8.3](https://github.com/npm/cli/compare/v10.8.2...v10.8.3) (2024-08-28)
19101

20102
### Bug Fixes

content/nav.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@
13241324
- title: Changelog
13251325
url: /cli/v9/using-npm/changelog
13261326
description: Changelog notes for each version
1327-
- title: Version 10.8.3
1327+
- title: Version 10.9.0
13281328
shortName: v10
13291329
url: /cli/v10
13301330
default: true

0 commit comments

Comments
 (0)