CLI documentation update from CI
npm CLI robot committed
Apr 8, 2025 at 02:42 UTC
25364a352b22a9412ae3ac3a2c5a374ebc723cc6
2 files changed
+2
-2
cli-cache.json
+1
-1
@@ -2,5 +2,5 @@
2
"v8": "aa8fff11cdab94fff1a2160ee5241f5f4632e96b",
3
"v9": "64763a341e7aa5b456e696f956759bf9b3440dc1",
4
"v10": "a3041941586b6fb8ed7403fe3c24d81138a96005",
5
- "v11": "a96d8f6295886c219076178460718837d2fe45d6"
5
+ "v11": "7fb624f32a4ae881824965c190bf6ae324eb83cb"
6
}
\ No newline at end of file
content/cli/v11/configuring-npm/package-json.mdx
+1
-1
@@ -928,7 +928,7 @@ The `devEngines` field aids engineers working on a codebase to all be using the
928
929
You can specify a `devEngines` property in your `package.json` which will run before `install`, `ci`, and `run` commands.
930
931
-> Note: `devEngines` and `engines` differ in object shape and functionality. `devEngines` is used to declare the intended runtime (node, etc) and/or package manager (npm, etc) to be used by developers working directly in the source code of a project, whereas `engines` is intended for a package to declare the node and/or npm versions it is compatible with.
931
+> 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.
932
933
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.
934