From 3641ce927700adfb2923549c3173eaca6d521cd2 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 24 Oct 2024 19:14:46 -0700 Subject: [PATCH 1/2] throw error if modules path is unspecified --- src/config/io/generateTypeData.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config/io/generateTypeData.ts b/src/config/io/generateTypeData.ts index a39479f..e789a5f 100644 --- a/src/config/io/generateTypeData.ts +++ b/src/config/io/generateTypeData.ts @@ -33,6 +33,10 @@ async function readSubdir(subdir: string): Promise { export async function generateTypeData(): Promise { const mainDir = import.meta.env.SECRET_MODULES_PATH; + if (!mainDir || mainDir == "") { + throw new Error("Cannot generate types, missing SECRET_MODULES_PATH"); + } + const subdirs = await fs.readdir(mainDir, { withFileTypes: true, }); From 8fb1408bb44cd3ae900eb7729430a6be11ac7efc Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 24 Oct 2024 19:15:40 -0700 Subject: [PATCH 2/2] use nodejs_22 in nix files --- default.nix | 6 +++--- shell.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 37c785a..ceaf318 100644 --- a/default.nix +++ b/default.nix @@ -4,7 +4,7 @@ nix-gitignore, yarn-berry, - nodejs, + nodejs_22, cacert, }: stdenv.mkDerivation (final: let nodeModules = stdenv.mkDerivation { @@ -13,7 +13,7 @@ src = final.src; - nativeBuildInputs = [ nodejs yarn-berry cacert ]; + nativeBuildInputs = [ nodejs_22 yarn-berry cacert ]; configurePhase = '' mkdir garbage-tooling @@ -33,7 +33,7 @@ HOME=$(pwd)/garbage-tooling yarn install || true mkdir -p node_modules/node/bin - ln -s ${nodejs}/bin/node node_modules/node/bin/node + ln -s ${nodejs_22}/bin/node node_modules/node/bin/node HOME=$(pwd)/garbage-tooling yarn install ''; diff --git a/shell.nix b/shell.nix index 20d126e..141e743 100644 --- a/shell.nix +++ b/shell.nix @@ -8,7 +8,7 @@ set -x yarn install || true mkdir -p node_modules/node/bin - ln -sf ${pkgs.nodejs}/bin/node node_modules/node/bin/node + ln -sf ${pkgs.nodejs_22}/bin/node node_modules/node/bin/node yarn install '') ];