Skip to content

Commit 5c76322

Browse files
committed
Allow not setting version in package.json
This is in fact the default behavior with e.g. npx create-remix. Previously, if you created a package with that command and tried running dream2nix, you'd get a missing attribute error.
1 parent a8dac99 commit 5c76322

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/dream2nix/nodejs-granular-v3/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
pdefs = config.nodejs-package-lock-v3.pdefs;
3535

3636
defaultPackageName = config.nodejs-package-lock-v3.packageLock.name;
37-
defaultPackageVersion = config.nodejs-package-lock-v3.packageLock.version;
37+
defaultPackageVersion = config.nodejs-package-lock-v3.packageLock.version or "";
3838

3939
nodejs = config.deps.nodejs;
4040

modules/dream2nix/nodejs-package-lock-v3/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# Root level package
5555
name = entry.name;
5656
value = {
57-
${entry.version} = {
57+
${entry.version or ""} = {
5858
dependencies = getDependencies lock path entry;
5959
};
6060
};

0 commit comments

Comments
 (0)