Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support sha1 integrity hashes #16

Merged
merged 1 commit into from
Aug 14, 2023
Merged

feat: support sha1 integrity hashes #16

merged 1 commit into from
Aug 14, 2023

Conversation

gBasil
Copy link
Contributor

@gBasil gBasil commented Aug 12, 2023

pnpm also supports sha1 hashes for integrity checks (see here: https://github.com/pnpm/npm-registry-client/blob/6d9f7ec580979e97c3fbc3fa17ea26f2a410d96f/lib/publish.js#L88). This PR adds support for them.

@gBasil
Copy link
Contributor Author

gBasil commented Aug 12, 2023

I'm getting some errors with a package that has a sha1 integrity, but I'm not sure if it's because of different sha1 behaviors or if it's unrelated.

 ERR_PNPM_NO_OFFLINE_TARBALL  A package is missing from the store but cannot download it in offline mode. The missing package may be downloaded from https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz.

@gBasil
Copy link
Contributor Author

gBasil commented Aug 13, 2023

The issue seemed to stem from the lockfile, I believe regenerating it caused the issue to disappear. In other words, it's not a bug with the implementation.

@nzbr
Copy link
Owner

nzbr commented Aug 13, 2023

The error you had usually means that there's a dependency in package.json which isn't present in the lockfile, so it doesn't get downloaded

Are there other hash algorithms that are supported by pnpm? If yes, it might make sense to add support for those as well

@gBasil
Copy link
Contributor Author

gBasil commented Aug 13, 2023

Are there other hash algorithms that are supported by pnpm? If yes, it might make sense to add support for those as well

I don't think so. Everything that I looked at suggested that it was only sha1 and sha512.

@nzbr nzbr merged commit 00e3722 into nzbr:main Aug 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants