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

nodejs: add pnpm-lock.yaml translator #234

Open
tinybeachthor opened this issue Aug 9, 2022 · 4 comments
Open

nodejs: add pnpm-lock.yaml translator #234

tinybeachthor opened this issue Aug 9, 2022 · 4 comments

Comments

@tinybeachthor
Copy link
Contributor

https://pnpm.io/

https://github.com/vercel/serve/blob/main/pnpm-lock.yaml

@wmertens
Copy link
Contributor

sadly it will have to be an ifd translator because Nix can't parse yaml.

The discoverer will also need updating to figure out pnpm workspaces, I think?

It does have all the necessary information in the file; the npm urls have to be composed manually.

@wmertens
Copy link
Contributor

Maybe this will be useful https://github.com/arcnmx/nixexprs/blob/f90f7c0a758f2142a448b9e59cc5d6f768b9275b/lib/from-yaml.nix

@tinybeachthor
Copy link
Contributor Author

pnpm workspaces

example: https://github.com/vuejs/core

pnpm workspaces are defined a bit different than npm workspaces

The discoverer will need to be extended to handle pnpm projects.

@DavHau DavHau added the nodejs label Nov 9, 2022
@hsjobeki
Copy link
Contributor

pnpm has that complex structure. It also is the only tool that is capable of resolving peerDependency conflicts.
Translating pnpms lockfile is not enough to support pnpm as it can produce edge cases that are not representable with the plain npm node_modules structure. It is also necessary to change the node_modules structure of the builder(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants