Support nodejs-18
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.
I guess a good entry point is https://github.com/svanderburg/node2nix/blob/master/lib/Package.js#L219
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?