Skip to content

[FEATURE] vlt use #109

Open
Open
@darcyclarke

Description

Description

It's annoying to have to use multiple tools to switch between different JavaScript runtimes/engines. As there is more & more interoperability (& work to standardize APIs across these projects) developers switching between &/or using multiple engines will become the norm. Providing an end-to-end toolchain experience eliminates the need for independent runtime management tools (ex. fnm, nvm, n, nave, asdf, volta etc.).

Proposal

  • implement a new use command
  • use will install the defined runtime/engine into node_modules/ & have it's bins available via run/exec (globally?)
  • engines gains support for devDependency references (similar to npm's dependency references in overrides)
  • engines references are resolved prior to any validating/usage
  • engines definitions can be overidden by publishConfig.engines during pack/publish (making it possible to delineate dev vs. dist-specific engines)
  • setting --publish will update publishConfig.engines instead of engines
  • support known tags/release channels beyond configured registry dist-tags (ex. node@lts ~ https://www.npmjs.com/package/@pkgjs/nv)

Key differences between install

  • intended to manage devDependencies & engines specifically
  • specs are respected & saved as defined

Known engines definitions/locations

Example Usage

$ vlt use npm@latest
$ vlt use node@lts
$ vlt use node@>=20 --publish
{
  "devDependencies": {
    "npm": "npm:npm@latest",
    "node": "npm:node@lts"
  },
  "engines": {
    "npm": "$npm",
    "node": "$node"
  },
  "publishConfig": {
  	"engines": {
      "node": "npm:node@>=20"
  	}
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurefeature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions