You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement devEngines proposal from Package Metadata Interoperability Collab Space #567
changed the title [-]Is corepack going to implement devEngines proposal?[/-][+]Implement devEngines proposal from Package Metadata Interoperability Collab Space[/+]on Oct 8, 2024
Since devEngines is proposed by Package Metadata Interoperability Collab Space and implemented by npm, it appears to be a standard over existing packageManager field for an average developer in JS ecosystem. If that's the case, it means the ecosystem should move towards devEngines over long term.
I see it as CJS and ESM. Node.js adopted CJS module system in 2009 as there was no standard in JS ecosystem. But after ESM was standardized in ES2015, Node.js gradually added support for it and now the ecosystem is slowly moving towards ESM.
Similarly, there was no standard for defining ES files in package.json, and bundlers had adopted non-standard module field. When exports was standardized, the bundlers moved prioritizing it over module.
As a user of corepack in all my JavaScript projects, I expect corepack to also support devEngines and slowly phase out packageManager field. If that doesn't happen, there will be fragmentation in JS ecosystem. It'll be up to end users what they want to choose.
Since there are parallel discussions about removing corepack from Node.js and some unofficial polls indicated users will not install corepack though npm, another stance corepack can take is to move itself in maintenance mode and delegate the work of processing devEngines to individual package managers, like npm did in v10.8.0.
Irrespective of what step corepack takes, it's better to inform it's existing users on what's ahead.
As a user of corepack in all my JavaScript projects, I expect corepack to also support devEngines and slowly phase out packageManager field
I strongly oppose any attempt to strip packageManager support, now or in the future. Whether Corepack supports devEngine or not I don't mind, but packageManager is already a de-facto standard, and I don't see anything to gain by removing the ability for projects already using it to rely on Corepack.
Similarly, there was no standard for defining ES files in package.json, and bundlers had adopted non-standard module field. When exports was standardized, the bundlers moved prioritizing it over module.
Key word being "prioritized". Support for module was never removed from any bundler because, just like here, it'd be a needless regression. Similarly, Node.js didn't deprecate main after introducing exports.
but packageManager is already a de-facto standard, and I don't see anything to gain by removing the ability for projects already using it to rely on Corepack.
Can we document this somewhere visible, like in README or corepack docs?
That way existing corepack users can continue to retain packageManager field if they decide to continue using corepack for managing their package managers, and choose to opt-out of specifying devEngines field in those projects.
I also prefer the short packageManager field for readability, over the object from devEngines proposal.
I'd also provided link to tens of thousands of package.json files from open source packages which contain packageManager field during the standardization discussions.
At the time of comment, npm doesn't plan to support onFail=download specification of devEngines proposal. npm/cli#8004
When corepack plans to implement devEngines, it would be awesome if the package manager version is downloaded automatically retaining the existing behavior.
Activity
[-]Is corepack going to implement devEngines proposal?[/-][+]Implement devEngines proposal from Package Metadata Interoperability Collab Space[/+]aduh95 commentedon Oct 8, 2024
Can you clarify what you mean by that? How/why would existing users not be able to continue using Corepack with devEngines?
aduh95 commentedon Oct 8, 2024
trivikr commentedon Oct 8, 2024
Since
devEnginesis proposed by Package Metadata Interoperability Collab Space and implemented by npm, it appears to be a standard over existingpackageManagerfield for an average developer in JS ecosystem. If that's the case, it means the ecosystem should move towardsdevEnginesover long term.I see it as CJS and ESM. Node.js adopted CJS module system in 2009 as there was no standard in JS ecosystem. But after ESM was standardized in ES2015, Node.js gradually added support for it and now the ecosystem is slowly moving towards ESM.
Similarly, there was no standard for defining ES files in package.json, and bundlers had adopted non-standard
modulefield. Whenexportswas standardized, the bundlers moved prioritizing it over module.As a user of corepack in all my JavaScript projects, I expect corepack to also support
devEnginesand slowly phase outpackageManagerfield. If that doesn't happen, there will be fragmentation in JS ecosystem. It'll be up to end users what they want to choose.Since there are parallel discussions about removing corepack from Node.js and some unofficial polls indicated users will not install corepack though npm, another stance corepack can take is to move itself in maintenance mode and delegate the work of processing
devEnginesto individual package managers, like npm did in v10.8.0.Irrespective of what step corepack takes, it's better to inform it's existing users on what's ahead.
arcanis commentedon Oct 8, 2024
I strongly oppose any attempt to strip
packageManagersupport, now or in the future. Whether Corepack supportsdevEngineor not I don't mind, butpackageManageris already a de-facto standard, and I don't see anything to gain by removing the ability for projects already using it to rely on Corepack.Key word being "prioritized". Support for
modulewas never removed from any bundler because, just like here, it'd be a needless regression. Similarly, Node.js didn't deprecatemainafter introducingexports.trivikr commentedon Oct 8, 2024
Thanks for the response.
Can we document this somewhere visible, like in README or corepack docs?
That way existing corepack users can continue to retain
packageManagerfield if they decide to continue using corepack for managing their package managers, and choose to opt-out of specifying devEngines field in those projects.I also prefer the short
packageManagerfield for readability, over the object from devEngines proposal.I'd also provided link to tens of thousands of package.json files from open source packages which contain
packageManagerfield during the standardization discussions.trivikr commentedon Dec 30, 2024
At the time of comment, npm doesn't plan to support
onFail=downloadspecification ofdevEnginesproposal.npm/cli#8004
When corepack plans to implement
devEngines, it would be awesome if the package manager version is downloaded automatically retaining the existing behavior.I've checked with Package Metadata Interoperability Collab Space if they want to revisit
onFail=downloadspecification atopenjs-foundation/package-metadata-interoperability-working-group#33