volta icon indicating copy to clipboard operation
volta copied to clipboard

Docs: explicitly mention that omitting `npm` version means using version bundled with Node? (PR#957)

Open bobo96run opened this issue 1 year ago • 1 comments

Re-hi and thank you again for this awesome tool!

I am a new user of Volta, and when starting to configure my projects, I naively explicitly specified npm version alongside node in package.json, e.g.:

{
  "volta": {
    "node": "14.21.3",
    "npm": "6.14.18"
  }
}

But now I realize that I can omit the npm spec, and Volta will automatically use the version that is bundled with the specified Node version (which is in this case indeed 6.14.18), as introduced by PR #957 (see issue #953).

I think it would be worthwhile mentioning this handy behaviour explicitly in the documentation? Maybe here: https://docs.volta.sh/guide/understanding#pinning-node-engines

bobo96run avatar Feb 05 '24 11:02 bobo96run

Probably related to https://github.com/volta-cli/volta/issues/1542?

bobo96run avatar Feb 05 '24 11:02 bobo96run