Comments (11)
It looks like the npm team is interested in collaborating on whatever this new configuration would be: nodejs/node#51888 (comment).
So maybe we don’t name it corepack
; we can decide the name later. But I think let’s open this up and define something in collaboration with them, so that hopefully we can spec out something that both Corepack and npm can support, so that from the user’s perspective npm is compatible. Does that work for you @styfle @arcanis @aduh95 ?
from corepack.
This issue is about several independent feature requests ("I want to use different package managers on different commands", "I want to specify what happens when the version mismatches"). The packageManager
field itself has no impact on those, and it makes little sense to start the discussion from that.
Can you close this thread and open dedicated ones for each of those two use cases?
from corepack.
The request is that I want more configuration options for Corepack. Specifically, these are the things I want to be able to configure. I can split it into multiple issues, but I think these all go together (many of these ideas are current features of the engines
field) and the question is really “what use cases do we want to support” which would lead to an update of the design doc (#401).
from corepack.
packageManager
is not a replacement for the engines
field, its goal is more narrow (and that’s probably a good thing)
from corepack.
is not a replacement for the engines field
It should be. The engines
field can't do some of these things, and for the parts that overlap there should be a clear precedence rather than the two being mixed.
from corepack.
its goal is more narrow
Where is the goal defined?
from corepack.
its goal is more narrow
Where is the goal defined?
https://nodejs.org/api/packages.html#packagemanager
from corepack.
All that says is "The "packageManager" field defines which package manager is expected to be used when working on the current project." Are my use cases in scope or out of scope? You're saying its scope is limited but I don't see a limiting principle here.
from corepack.
Cross linking this other comment from GeoffreyBooth since it has a suggestion how to implement:
I do wonder if we are going to hit a wall in the future trying to shove everything into one string.
We already have several things defined in one string today: name, version, hash
from corepack.
I mean this field is already not enough to define what we need to properly develop a project because it doesn't include what node version you should develop with. IMO trying to fix packageManager
is the wrong course and we should deprecate it and move to a more holistic approach to binary management which is more generic to account for the many requirements real projects have.
I know my comment is derailing this issue, but I think it is a big waste of everyone's time to push forward on a bad plan.
from corepack.
I do wonder if we are going to hit a wall in the future trying to shove everything into one string.
💯
Or more to the point, it’s too limiting. Maybe we might never want to implement #406, where we can define different package manager possibilities based on operation (or maybe say that we want Corepack validation to apply only to operations that affect lockfiles) but if we’re limiting ourselves to just a single string, it’s awfully hard to potentially someday add such a feature. (Sure, the string could be stringified JSON, but that’s just ridiculous 😄) Or if we want to implement #405, mimicking npm’s engines.strict
; I can easily see that being a feature that users want.
Better to shift to something new now, before we’re enabled by default and stable. I like top-level "corepack"
, or another option is engines.packageManager
; in either case, the value would be an object that can continue expanding as we add more options.
from corepack.
Related Issues (20)
- Tests fail when using Corepack v0.25.0 jumper binary HOT 2
- v0.25.0 crashes with ENOENT on fresh install HOT 12
- v0.25.0 prompts about fetching metadata
- npm install fails with node:20-alpine HOT 2
- Internal Error: ENOENT: no such file or directory, open '/root/.cache/node/corepack/lastKnownGood.json' HOT 1
- no such file or directory in Docker container HOT 1
- installation failure with Type Error: URL.canParse is not a function HOT 2
- How do we run upgrade global package managers HOT 9
- Provide reproducible build by default HOT 21
- Versions above `v0.25.0` glitches on Node v18.17.1 HOT 3
- Need goals/use cases HOT 5
- `packageManager` should accept a version range HOT 1
- Validation failure should be configurable HOT 4
- Validation should be configurable based on operation HOT 4
- Changing linter rules HOT 6
- Add `corepack pnpm` and `corepack yarn` to `corepack --help` HOT 5
- Unable to use offline workflow HOT 2
- [ Error ] - NixOS - Corepack/Pnpm Version Mismatch/Internal Error HOT 2
- Using corepack behind corporate proxy and injected certificate HOT 15
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 corepack.