build: Switch to devEngines.packageManager#5018
Conversation
|
This should not be needed anymore with my changes in #5015. Do you think the changes are still useful? Is the |
|
In any case, I think we should link to https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines to make clear that |
Yes, several options related to the Also, the error message I got in the other PR sounded like corepack would now require the new option to install the correct pnpm version which might be relevant again for local builds after the next upgrade. |
I'd rather link the pnpm docs than the npm docs as they also better explain the packageManager option. |
But that's all PNPM-specific docs. To me, that does not count here.
I don't think that's the case. |
But we use pnpm not npm, so it matters which options are supported by pnpm. Also, it seems that npm never supported
This was the error message:
Although I don't understand why this happens, because corepack should have installed the correct version in the first place based on the I went down the rabbit hole a bit too far, but my conclusion is that currently it would be best to set both fields and keep them aligned, because pnpm is moving to the new property while corepack still seems to rely on the old one. But I also don't know if Renovate properly supports having both. I'll just turn this into a draft for now as long as there is no issue with only having Some references: |
Pull request was converted to draft
Well, Node.js ships with both npm and corepack, and corepack supports npm. If you launch npm, that's actually just a shim running corepack. In that sense, no Node.js package manager itself supports
Yes, that's the same I got before #5015.
Could be that there was a glitch in pnpm version before 11.0.2: "Fixed packageManagerDependencies going stale when pnpm is invoked through corepack". And so upgrading our project to use 11.0.8 maybe fixed it. |
03656ba to
7c20c2e
Compare
|
I guess it'd work now if we bump the versions to 11.0.9... |
I think #5037 is the required fix when using corepack. Maybe we always used the wrong version in the past and the version check just got more strict with pnpm 11. |
Define the pnpm version to using the new `devEngines.packageManager` [1] property instead of `packageManager`. As for dependencies, use a pinned version instead of a version range. [1]: https://pnpm.io/package_json#devenginespackagemanager Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.io>
|
@mnonnenmacher, how should we proceed with his now? |
@mnonnenmacher, I propose to close this unmerged as it seems to work without this now (also after several PNPM updates), and this avoids us to maintain the PNPM version in more places. |
I would still like to merge this as for PNPM 11 this is the correct configuration, it's also used by The only thing holding me back from marking this ready for review again was that it is unclear if Renovate supports And what do you mean by "maintain the PNPM version in more places"? |
Sorry, it seems I misremembered that this would also keep the upper-level |
Define the pnpm version to using the new
devEngines.packageManager1 property instead ofpackageManager. As for dependencies, use a pinned version instead of a version range.