Conversation
| You can specify a `devEngines` property in your `package.json` which will run before `install`, `ci`, and `run` commands. | ||
|
|
||
| > 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. | ||
| > 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. |
There was a problem hiding this comment.
this isn’t quite accurate - engines is for a package to declare what npm and/or node versions it’s compatible with.
There was a problem hiding this comment.
Are you suggesting to get rid of the word alert or something else?
There was a problem hiding this comment.
| > 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. | |
| > Note: `engines` and `devEngines` differ in object shape and functionality. `engines` is intended for a package to declare the node and/or npm versions it is compatible with (the default for both is `*`), whereas `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. |
There was a problem hiding this comment.
Thanks! I think I see what you're saying now 👍
What do you think of e012ff6?
There was a problem hiding this comment.
That's certainly correct! It would be nice to have the nuance that's contained in my suggestion, though :-)
There was a problem hiding this comment.
Sounds good. Please take a look at ffbb248
There was a problem hiding this comment.
Looks good to me. The part about the default value is documented elsewhere, so it doesn't need to be here, but it seemed useful to reinforce.
There was a problem hiding this comment.
The reason I left out the default value is because this section of the docs is about devEngines, not engines.
We should keep the NOTE short(ish) or else move it out of the NOTE and into a normal paragraph.
This comment was marked as spam.
This comment was marked as spam.
devEngines notedevEngines note
This PR improves the docs for
devEnginesand fixes some typos.https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines
https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines