-
Notifications
You must be signed in to change notification settings - Fork 3.1k
docs: improve devEngines
note
#1535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -903,7 +903,7 @@ The `devEngines` field aids engineers working on a codebase to all be using the | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting to get rid of the word alert
or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think I see what you're saying now 👍
What do you think of e012ff6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Please take a look at ffbb248
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
This comment was marked as spam.
This comment was marked as spam.
devEngines
notedevEngines
note
This PR improves the docs for
devEngines
and 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