svanderburg / node2nix

Generate Nix expressions to build NPM packages
MIT License
527 stars 100 forks source link

Support nodejs-18 #319

Open ptitfred opened 1 year ago

ptitfred commented 1 year ago

package-lock.json format has been upgraded to version 3, with most noticeable change: dependencies attributes doesn't exist anymore and node2nix should rely on packages instead. packages is present since at least version 2.

nodejs-18 is the default (and only supported version) on nixpkgs' branch nixos-23.05.

I'm willing to help if nobody is on it already.

ptitfred commented 1 year ago

I guess a good entry point is https://github.com/svanderburg/node2nix/blob/master/lib/Package.js#L219

dsalaza4 commented 10 months ago

Hi! We've been using nodejs-18 and package-lock.json on "lockfileVersion": 2 and it seems to work fine. I also see that the node2nix command supports the --nodejs-18 flag.

Does this mean that node2nix only lacks support for "lockfileVersion": 3?

What about using nodejs-20, would that be possible?