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

Use integrity Field from yarn.lock as sha512 for Nix Derivation #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pathway27
Copy link

@pathway27 pathway27 commented Dec 19, 2022

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

@CLAassistant
Copy link

CLAassistant commented Dec 19, 2022

CLA assistant check
All committers have signed the CLA.

@pathway27 pathway27 changed the title feat: use integrity field from yarn.lock as sha512 for nix derivation Use integrity Field from yarn.lock as sha512 for Nix Derivation Dec 19, 2022
@@ -1,6 +1,6 @@
// @ts-check

const lockfile = require('@yarnpkg/lockfile');
Copy link
Author

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;
Copy link
Author

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

@pathway27 pathway27 marked this pull request as ready for review December 19, 2022 02:54
@olebedev
Copy link
Collaborator

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!

andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 23, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 23, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 23, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 23, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
andrew-vts added a commit to viewthespace/js2nix that referenced this pull request Feb 24, 2023
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.

None yet

3 participants