Skip to content
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

volta respects engines property of package.json #1422

Open
barinbritva opened this issue Jan 19, 2023 · 2 comments
Open

volta respects engines property of package.json #1422

barinbritva opened this issue Jan 19, 2023 · 2 comments

Comments

@barinbritva
Copy link

Now volta creates own property volta and uses only it. It would be extremely convenient if volta have a look for volta prop first and if it's not found it looks for engines prop.

A few points:

  • In most cases it's enough to specify only major version in engines prop of a tool instead of major.minor.fix, like node: ^16. But if a user needs to define a specific version he can do in using volta prop. In the first case we don't need to duplicate the info about tool version.
  • In some cases a user can use volta to work with a project, but other team mates don't. In this case commiting volta prop to package.json is redundant and might be declined on a code review
@mufasa71
Copy link
Contributor

This sounds as an good idea on first sense, but will lead to a breaking changes and unexpected behaviour for users who already using global node for some reason. Second issue with semver of such records, e.b. node: ^16 may not work with volta, as it expects exact version

@Moshyfawn
Copy link

While there were a couple of discussions about the usage of the engines field (#355, for example), in the latest Node versions there's an experimental corepack tool Volta can leverage for setting and referring to the current package manager and its version.

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

No branches or pull requests

3 participants