From 3b63e735458947ef39aca247923f8775633363e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 27 Nov 2022 23:33:58 +0100 Subject: [PATCH] Update nodejs package attr to fit https://github.com/NixOS/nixpkgs/pull/199835 --- bin/node2nix.js | 30 +++++++++++++++--------------- default.nix | 2 +- tests/default-v14.nix | 2 +- tests/default-v16.nix | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bin/node2nix.js b/bin/node2nix.js index a04b6d5..cb848b3 100755 --- a/bin/node2nix.js +++ b/bin/node2nix.js @@ -17,15 +17,15 @@ var switches = [ ['-e', '--node-env FILE', 'Path to the Nix expression implementing functions that builds NPM packages (defaults to: node-env.nix)'], ['-l', '--lock FILE', 'Path to the package-lock.json file that pinpoints the variants of all dependencies'], ['-d', '--development', 'Specifies whether to do a development (non-production) deployment for a package.json deployment (false by default)'], - ['-4', '--nodejs-4', 'Provides all settings to generate expression for usage with Node.js 4.x (default is: nodejs-14_x)'], - ['-6', '--nodejs-6', 'Provides all settings to generate expression for usage with Node.js 6.x (default is: nodejs-14_x)'], - ['-8', '--nodejs-8', 'Provides all settings to generate expression for usage with Node.js 8.x (default is: nodejs-14_x)'], - ['-10', '--nodejs-10', 'Provides all settings to generate expression for usage with Node.js 10.x (default is: nodejs-14_x)'], - ['-12', '--nodejs-12', 'Provides all settings to generate expression for usage with Node.js 12.x (default is: nodejs-14_x)'], - ['-13', '--nodejs-13', 'Provides all settings to generate expression for usage with Node.js 13.x (default is: nodejs-14_x)'], - ['-14', '--nodejs-14', 'Provides all settings to generate expression for usage with Node.js 14.x (default is: nodejs-14_x)'], - ['-16', '--nodejs-16', 'Provides all settings to generate expression for usage with Node.js 16.x (default is: nodejs-14_x)'], - ['-18', '--nodejs-18', 'Provides all settings to generate expression for usage with Node.js 18.x (default is: nodejs-14_x)'], + ['-4', '--nodejs-4', 'Provides all settings to generate expression for usage with Node.js 4.x (default is: nodejs_14)'], + ['-6', '--nodejs-6', 'Provides all settings to generate expression for usage with Node.js 6.x (default is: nodejs_14)'], + ['-8', '--nodejs-8', 'Provides all settings to generate expression for usage with Node.js 8.x (default is: nodejs_14)'], + ['-10', '--nodejs-10', 'Provides all settings to generate expression for usage with Node.js 10.x (default is: nodejs_14)'], + ['-12', '--nodejs-12', 'Provides all settings to generate expression for usage with Node.js 12.x (default is: nodejs_14)'], + ['-13', '--nodejs-13', 'Provides all settings to generate expression for usage with Node.js 13.x (default is: nodejs_14)'], + ['-14', '--nodejs-14', 'Provides all settings to generate expression for usage with Node.js 14.x (default is: nodejs_14)'], + ['-16', '--nodejs-16', 'Provides all settings to generate expression for usage with Node.js 16.x (default is: nodejs_14)'], + ['-18', '--nodejs-18', 'Provides all settings to generate expression for usage with Node.js 18.x (default is: nodejs_14)'], ['--supplement-input FILE', 'A supplement package JSON file that are passed as build inputs to all packages defined in the input JSON file'], ['--supplement-output FILE', 'Path to a Nix expression representing a supplementing set of Nix packages provided as inputs to a project (defaults to: supplement.nix)'], ['--include-peer-dependencies', 'Specifies whether to include peer dependencies. In npm 2.x, this is the default. (true by default for Node.js 16+)'], @@ -57,7 +57,7 @@ var supplementNix = "supplement.nix"; var nodeEnvNix = "node-env.nix"; var lockJSON; var registries = []; -var nodePackage = "nodejs-14_x"; +var nodePackage = "nodejs_14"; var noCopyNodeEnv = false; var bypassCache = true; var useFetchGitPrivate = false; @@ -138,14 +138,14 @@ parser.on('nodejs-8', function(arg, value) { parser.on('nodejs-10', function(arg, value) { flatten = true; - nodePackage = "nodejs-10_x"; + nodePackage = "nodejs_10"; bypassCache = true; includePeerDependencies = false; }); parser.on('nodejs-12', function(arg, value) { flatten = true; - nodePackage = "nodejs-12_x"; + nodePackage = "nodejs_12"; bypassCache = true; includePeerDependencies = false; }); @@ -159,14 +159,14 @@ parser.on('nodejs-13', function(arg, value) { parser.on('nodejs-14', function(arg, value) { flatten = true; - nodePackage = "nodejs-14_x"; + nodePackage = "nodejs_14"; bypassCache = true; includePeerDependencies = false; }); parser.on('nodejs-16', function(arg, value) { flatten = true; - nodePackage = "nodejs-16_x"; + nodePackage = "nodejs_16"; bypassCache = true; includePeerDependencies = true; }); @@ -180,7 +180,7 @@ parser.on('nodejs-17', function(arg, value) { parser.on('nodejs-18', function(arg, value) { flatten = true; - nodePackage = "nodejs-18_x"; + nodePackage = "nodejs_18"; bypassCache = true; includePeerDependencies = true; }); diff --git a/default.nix b/default.nix index e4fb6a9..5d0215b 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,7 @@ {pkgs ? import { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}: let nodeEnv = import ./nix/node-env.nix { diff --git a/tests/default-v14.nix b/tests/default-v14.nix index e528025..52f49c3 100644 --- a/tests/default-v14.nix +++ b/tests/default-v14.nix @@ -2,7 +2,7 @@ {pkgs ? import { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}: let nodeEnv = import ../nix/node-env.nix { diff --git a/tests/default-v16.nix b/tests/default-v16.nix index 8c1f04a..faed39d 100644 --- a/tests/default-v16.nix +++ b/tests/default-v16.nix @@ -2,7 +2,7 @@ {pkgs ? import { inherit system; - }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-16_x"}: + }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_16"}: let nodeEnv = import ../nix/node-env.nix {