Skip to content

Commit e012ff6

Browse files
committed
fix: revise note
1 parent 8e6a4ca commit e012ff6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ The `devEngines` field aids engineers working on a codebase to all be using the
903903
904904
You can specify a `devEngines` property in your `package.json` which will run before `install`, `ci`, and `run` commands.
905905
906-
> Note: `engines` and `devEngines` differ in object shape and functionality. `engines` is designed to alert the user when a dependency uses a different npm or node version than the project it's being used in, whereas `devEngines` is used to alert people interacting with the source code of a project.
906+
> Note: `devEngines` and `engines` differ in object shape and functionality. `devEngines` only impacts developers working directly in the source code of your package, whereas `engines` will also impact consumers who install your package.
907907
908908
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.
909909

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ The `devEngines` field aids engineers working on a codebase to all be using the
928928
929929
You can specify a `devEngines` property in your `package.json` which will run before `install`, `ci`, and `run` commands.
930930
931-
> Note: `engines` and `devEngines` differ in object shape and functionality. `engines` is designed to alert the user when a dependency uses a different npm or node version than the project it's being used in, whereas `devEngines` is used to alert people interacting with the source code of a project.
931+
> Note: `devEngines` and `engines` differ in object shape and functionality. `devEngines` only impacts developers working directly in the source code of your package, whereas `engines` will also impact consumers who install your package.
932932
933933
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.
934934

0 commit comments

Comments
 (0)