Comments (4)
Yeah can definitely support this.
from proto.
I've been trying this locally. Installing the bundled version of npm works!
Currently, when you have a newer version of npm installed (e.g., you ran proto install npm
), and you're using .nvmrc
/.node-version
, Proto will use the latest version of npm that you have installed. In contrast, nvm and Volta will use the bundled version of npm by default. E.g., Volta:
$ volta install node@16
success: installed and set [email protected] (with [email protected]) as default
$ node -v
v16.19.1
$ npm -v
8.19.3
$ volta install [email protected]
success: installed and set [email protected] (with [email protected]) as default
$ node -v
v16.14.2
$ npm -v
8.5.0
vs Proto:
$ cat .nvmrc
v16.14.2
$ proto install node
[INFO proto:install] Installing Node.js with version "latest"
[INFO proto:install] Node.js has been installed at /Users/timon.vanspronsen/.proto-2/tools/node/19.8.0!
[INFO proto:install] Installing npm with version "bundled"
[INFO proto:install] npm has been installed at /Users/timon.vanspronsen/.proto-2/tools/npm/9.5.1!
$ proto install node 16.14.2
[INFO proto:install] Installing Node.js with version "16.14.2"
[INFO proto:install] Node.js has been installed at /Users/timon.vanspronsen/.proto-2/tools/node/16.14.2!
[INFO proto:install] Installing npm with version "bundled"
[INFO proto:install] npm has been installed at /Users/timon.vanspronsen/.proto-2/tools/npm/8.5.0!
$ node -v
v16.14.2
$ npm -v
9.5.1
With Volta you can still install a newer version of npm, from then on it will use this newer version, but you can switch back by running volta install npm@bundled
(and from then on it will use the bundled version for any version of Node that you install).
$ volta install node@16
success: installed and set [email protected] as default
$ npm -v
8.19.3
$ volta install npm@9
success: installed and set [email protected] as default
$ volta install node@16
success: installed and set [email protected] as default
$ npm -v
9.6.1
$ volta install npm@bundled
success: set bundled npm (currently 8.5.0) as default
$ volta install [email protected]
success: installed and set [email protected] (with [email protected]) as default
$ npm -v
8.5.0
I realize that this is a very hard (UX) problem, I personally like what Volta has done to solve the problem. What are your thoughts?
from proto.
Thanks for testing it before it's been released!
This should definitely be doable. The only issue is that engines
or packageManager
would take precedent if they have an explicit version. Bundled would only really work as the "last case".
from proto.
Released 0.3
from proto.
Related Issues (20)
- Proto install-global not working on windows? HOT 26
- version matching got wrong HOT 5
- proto run npm/pnpm/yarn fails with `program not found` if bin not in path HOT 16
- nit: Proto tells me to run the migration script mutliple times, while running the migration script 😅 HOT 2
- Proto use nitpicks HOT 14
- Feature request: url version specifiers HOT 2
- Proto install prints "latest" when installing canary HOT 1
- `.prototools` should allow `[versions]` header HOT 5
- supports_bun test fails often in CI HOT 10
- Often requested to install same Node.js version HOT 16
- Fix for "Unable to create shims as the proto-shim binary cannot be found" HOT 1
- First proto debug log statement in the wrong timezone HOT 4
- Setup for Elvish shell is not working as intended HOT 2
- plugin::call_func_failed when loading a TOML plugin HOT 3
- (Question) Do you build the toolchains from source or only use pre-built binaries? HOT 1
- Crash when running executable with weird casing HOT 4
- Vague error message with missing executable. HOT 1
- pdk-test-utils: test errors_invalid_version - should panic ... FAILED HOT 2
- Proto regen poorly formats version output HOT 1
- Changed node version, but npm version not auto-switch. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proto.