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

Support for yarn.lock #25

Open
terlar opened this issue Oct 21, 2020 · 3 comments
Open

Support for yarn.lock #25

terlar opened this issue Oct 21, 2020 · 3 comments

Comments

@terlar
Copy link

terlar commented Oct 21, 2020

I have worked on some projects where yarn.lock is used and teams seem to be quite attached to yarn so it seems unlikely that they would switch away from it completely. Does it make sense to support yarn.lock as well for source of dependencies?

@terlar terlar changed the title Support for yarn.lock as well Support for yarn.lock Oct 21, 2020
@nmattia
Copy link
Collaborator

nmattia commented Oct 22, 2020

I remember reading up on both npm and yarn when I was developing napalm. I seem to recall that all the innovations that yarn brought had been integrated into npm over time, so I decided to simply support npm-style builds. Also, the yarn.lock format can't be parsed natively (with builtins.X) by Nix, which means pre-downloading the dependencies can get quite tricky! Does this help?

@terlar
Copy link
Author

terlar commented Oct 22, 2020

I see, because it is a YAML file right? I guess it could be possible to write a parser for the yarn.lock file in Nix, but might be some work. It makes sense, but still seems yarn is most popular among the people developing nodejs/typescript.

I guess the dirty way would be to do something like this:
https://github.com/serokell/nix-npm-buildpackage/blob/master/default.nix#L222-L230

But I guess that is in the murky Nix practices.

@nmattia
Copy link
Collaborator

nmattia commented Oct 23, 2020

I see, because it is a YAML file right?

I was under the impression that it was a custom format but maybe this changed? I encounter yarn in the wild rarely these days (though I don't work much with javascript), I assumed it was slowly dying...

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

No branches or pull requests

2 participants