-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use integrity Field from yarn.lock as sha512 for Nix Derivation #11
base: main
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,6 @@ | |||
// @ts-check | |||
|
|||
const lockfile = require('@yarnpkg/lockfile'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This upstream package doesn't have it defined in the type though... 😞
export interface FirstLevelDependency { | ||
version: string; | ||
resolved?: string | undefined; | ||
integrity?: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only extra line compared to @yarnpkg/lockfile
Hey @pathway27, thanks for raising this issue, this is true, we can leverage this field from the modern-built lockfiles. The build seems failing, would you mind to fix it before the review? Thanks! |
The newset yarn version (1.22.19) generates yarn.lock files which don't have the sha1 in their url with a
#
, so fails for some users.One public example I've found: https://github.com/iptv-org/iptv/blob/master/yarn.lock#L7.
But I notice most lockfiles have an
integrity
field. See https://github.com/canva-public/js2nix/blob/main/yarn.lock#L8