Skip to content

fix(node): pnpm - support v10 offline tarballs for URL dependencies#517

Closed
tonur wants to merge 1 commit intoflatpak:masterfrom
tonur:master
Closed

fix(node): pnpm - support v10 offline tarballs for URL dependencies#517
tonur wants to merge 1 commit intoflatpak:masterfrom
tonur:master

Conversation

@tonur
Copy link
Contributor

@tonur tonur commented Mar 16, 2026

This PR adds support for generating offline pnpm store entries for packages retrieved from URL tarballs (e.g., GitHub codeload links) in pnpm v10.

It now parses package.json from inside downloaded tarballs to extract the actual name and version fields, which pnpm v10 strictly requires for offline resolution.

Updates the cache index directory structure to match pnpm v10's expected format for URL dependencies (using the sanitized URL directory and integrity.json).

Safely generates tarball filenames for URLs by using a SHA-256 hash to avoid filesystem path issues with special characters.

Made based on the Stoat flathub submission: flathub/flathub#7783

@github-actions github-actions bot added the node label Mar 16, 2026
@tonur tonur marked this pull request as ready for review March 16, 2026 20:02
@tonur tonur requested a review from a team as a code owner March 16, 2026 20:02
@bbhtt
Copy link
Collaborator

bbhtt commented Mar 17, 2026

you have to drop the first commit and rebase properly not sure where that is coming from. and rest should be squahsed where it make sense or prefixed with node:.

@bbhtt
Copy link
Collaborator

bbhtt commented Mar 17, 2026

you have to run format+lint+typecheck it is documented in readme. is it possible to add tests for this as well?

@tonur tonur force-pushed the master branch 3 times, most recently from cdc4a2d to 5f0a223 Compare March 17, 2026 08:57
@tonur
Copy link
Contributor Author

tonur commented Mar 17, 2026

I followed the readme to fix linting and syntax. I will have a look at adding tests later tonight.

@tonur tonur changed the title fix(pnpm): support v10 offline tarballs for URL dependencies fix(node): pnpm - support v10 offline tarballs for URL dependencies Mar 17, 2026
@tonur
Copy link
Contributor Author

tonur commented Mar 17, 2026

is it possible to add tests for this as well?

@bbhtt I have added tests in this commit: 5640a69
Please let me know if they are sufficient.

@bbhtt
Copy link
Collaborator

bbhtt commented Mar 18, 2026

can you clean the commit history? Why is poetry.lock getting updated here? And there are a bunch of line length changes, if those aren't done by ruff they should be dropped.

@tonur
Copy link
Contributor Author

tonur commented Mar 18, 2026

can you clean the commit history? Why is poetry.lock getting updated here? And there are a bunch of line length changes, if those aren't done by ruff they should be dropped.

Sorry, my editor was configured to cleanup on save, I have turned it off and reverted this.

With clean commit history, I would ask if the current is sufficient? Otherwise, I'd like to hear what you want me to do, as I do not know how a clean commit history would look then.

@bbhtt
Copy link
Collaborator

bbhtt commented Mar 19, 2026

something is blocking me pushing to your branch, i will fix the commit message and authorship and merge it manually.

ERROR: Permission to tonur/flatpak-builder-tools.git denied to bbhtt.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@bbhtt bbhtt closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants