Repository navigation
Conversation
pnpm 12.21 can fill its store from downloaded tarballs with `pnpm store add`, reading the project's lockfile to serve registry, tarball-URL, and git-hosted dependencies. With --pnpm-store-add, the generated sources only download the tarballs and point pnpm's storeDir into flatpak-node, without populate_pnpm_store.py. The build commands then run `pnpm store add ./flatpak-node/pnpm-tarballs` before `pnpm install --offline`. pnpm decides the store format itself, so --pnpm-store-version does not apply with --pnpm-store-add. An entry without an integrity in the lockfile gets a warning, since `pnpm store add` cannot serve it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Collaborator
|
I'm not reviewing AI generated or assisted commits. GitHub doesn't let me remove my review request otherwise I would. |
Author
|
@bbhtt That’s understandable, and if you’d prefer to implement this yourself I am happy to close this. |
Author
|
I’m using this for Zulip Desktop, since it simplifies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
populate_pnpm_store.pyrequires intimate knowledge of the pnpm store binary format and requires extensive maintenance work every time the format changes (e.g. #537). To improve this situation, I’ve extended the upstreampnpm store addcommand in pnpm ≥ 12.21.0 so that we can use it to populate the store for us:Provide
flatpak-node-generator --pnpm-store-add, which sets up the generated sources to download the package tarballs intoflatpak-node/pnpm-tarballsand setstoreDiras before, but leaves outpopulate_pnpm_store.pyand its manifest. The app’s build commands can then fill the store with(This has to be a build command rather than a generated shell command because
pnpmis usually not runnable until the module’s own build commands set it up.)The default is unchanged;
populate_pnpm_store.pyremains for pnpm 9 through 12.20.