Closed sylwiavargas closed 2 years ago
We use the package.json packageManager
field to declare the version we prefer to use and an engine restriction to ensure it.
If webcontainer can't provide the latest pnpm version, we may be able to relax the engine restriction a bit, but ideally it would be great if webcontainer could detect the existance of packageManager
and honor that, which would be similar to a user having corepack enabled.
https://nodejs.org/api/packages.html#packagemanager https://nodejs.org/api/corepack.html
Running corepack inside webcontainer might not be feasible, but you can do it without by simply parsing packageManager
and fetching the version from npm registry as well:
https://github.com/sveltejs/vite-plugin-svelte/blob/74fd16db25d0be6c624e3d7e77b170ff7afb34ed/.github/workflows/ci.yml#L46-L48
While this issue only touches pnpm, i think it also applies to yarn (does that work in webcontainers at all?) and npm if there is a packageManager/engine combo for that in the repo.
@dominikg we currently ship pnpm@7.13.0 and try to stay close to the latest version. I think we usually wait a bit to make sure there are no breaking bugs on the pnpm side. Is there a reason that 7.13.1
is needed for that package?
We recently shipped updates regarding yarn
. But we currently only support yarn v1 officially.
we use renovate-bot to keep our dependencies updated and it bumps the engine restriction alongside the packageManager field:
Our CI automatically installs and uses the version in packageManager
.
There is no absolute need for using the latest version, but we prefer keeping everyone on the same version and updating it regularly. If webcontainers only support a single version of pnpm and that is behind latest, is there a way to follow the version you support?
We've updated pnpm to the latest version (7.13.6) and it now seems to work again 👍 .
Describe the bug
From Dominik: in @sveltejs/vite-plugin-svelte we use a pretty recent version of pnpm and renovate-bot helps us keeping it up2date. our
package.json
currently haswhich leads to
Link to the blitz that caused the error
https://stackblitz.com/~/github.com/sveltejs/vite-plugin-svelte
Steps to reproduce
Expected behavior
Dependency installation
Parity with Local
Screenshots
No response
Platform
No response
Additional context
No response