From 0653e2db90fe14920e23c458efd964eacf45a520 Mon Sep 17 00:00:00 2001 From: Jake Runzer Date: Wed, 11 Dec 2024 13:07:57 -0500 Subject: [PATCH] add missing node lts tests --- ...te_plan_tests__node_nvmrc_invalid_lts.snap | 54 +++++++++++++++++++ .../generate_plan_tests__node_nvmrc_lts.snap | 54 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 tests/snapshots/generate_plan_tests__node_nvmrc_invalid_lts.snap create mode 100644 tests/snapshots/generate_plan_tests__node_nvmrc_lts.snap diff --git a/tests/snapshots/generate_plan_tests__node_nvmrc_invalid_lts.snap b/tests/snapshots/generate_plan_tests__node_nvmrc_invalid_lts.snap new file mode 100644 index 000000000..ad79a5806 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__node_nvmrc_invalid_lts.snap @@ -0,0 +1,54 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "CI": "true", + "NIXPACKS_METADATA": "node", + "NODE_ENV": "production", + "NPM_CONFIG_PRODUCTION": "false" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install" + ], + "cacheDirectories": [ + "node_modules/.cache" + ] + }, + "install": { + "name": "install", + "dependsOn": [ + "setup" + ], + "cmds": [ + "npm ci" + ], + "cacheDirectories": [ + "/root/.npm" + ], + "paths": [ + "/app/node_modules/.bin" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "nodejs_18", + "npm-8_x" + ], + "nixOverlays": [ + "https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz" + ], + "nixpkgsArchive": "[archive]" + } + }, + "start": { + "cmd": "npm run start" + } +} diff --git a/tests/snapshots/generate_plan_tests__node_nvmrc_lts.snap b/tests/snapshots/generate_plan_tests__node_nvmrc_lts.snap new file mode 100644 index 000000000..da280c251 --- /dev/null +++ b/tests/snapshots/generate_plan_tests__node_nvmrc_lts.snap @@ -0,0 +1,54 @@ +--- +source: tests/generate_plan_tests.rs +expression: plan +--- +{ + "providers": [], + "buildImage": "[build_image]", + "variables": { + "CI": "true", + "NIXPACKS_METADATA": "node", + "NODE_ENV": "production", + "NPM_CONFIG_PRODUCTION": "false" + }, + "phases": { + "build": { + "name": "build", + "dependsOn": [ + "install" + ], + "cacheDirectories": [ + "node_modules/.cache" + ] + }, + "install": { + "name": "install", + "dependsOn": [ + "setup" + ], + "cmds": [ + "npm ci" + ], + "cacheDirectories": [ + "/root/.npm" + ], + "paths": [ + "/app/node_modules/.bin" + ] + }, + "setup": { + "name": "setup", + "nixPkgs": [ + "nodejs_20", + "npm-8_x" + ], + "nixOverlays": [ + "https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz" + ], + "nixpkgsArchive": "[archive]" + } + }, + "start": { + "cmd": "npm run start" + } +}