Skip to content

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

Merged
merged 3 commits into from
Apr 4, 2025

Conversation

styfle
Copy link
Contributor

@styfle styfle commented Apr 2, 2025

@styfle styfle requested a review from a team as a code owner April 2, 2025 14:16
@@ -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.
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.

Copy link
Contributor Author

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?

Copy link
Contributor

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 :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@styfle I like the nuance from @ljharb as well. If you want to update it with that I can see about getting this merged :)

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

@styfle styfle Apr 4, 2025

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@SamIam121

This comment was marked as spam.

@owlstronaut owlstronaut changed the title fix: improve devEngines note docs: improve devEngines note Apr 4, 2025
@owlstronaut owlstronaut merged commit c2efb64 into npm:main Apr 4, 2025
9 of 11 checks passed
@styfle styfle deleted the styfle/fix-devEngines-note branch April 4, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants