dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

nodejs: add pnpm-lock.yaml translator

Open tinybeachthor opened this issue 3 years ago • 4 comments
trafficstars

https://pnpm.io/

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

tinybeachthor avatar Aug 09 '22 16:08 tinybeachthor

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 avatar Aug 10 '22 20:08 wmertens

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

wmertens avatar Aug 20 '22 20:08 wmertens

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.

tinybeachthor avatar Aug 26 '22 17:08 tinybeachthor

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)

hsjobeki avatar Jan 14 '23 21:01 hsjobeki