From f23466143ec986bb72ca8ac6dfdf78c2cd8f68a4 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Tue, 26 Nov 2024 14:50:13 -0800 Subject: [PATCH] ci: fix node 16 builds (#413) --- package.json | 9 +++++---- scripts/install-dependencies | 9 ++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b65e953..cada7e0 100644 --- a/package.json +++ b/package.json @@ -103,9 +103,10 @@ "@testing-library/user-event": "^14.5.2", "@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/parser": "^8.0.0", - "@vitest/coverage-v8": "^2.0.2", + "@vitest/coverage-v8": "^1.0.0 || ^2.0.2", "all-contributors-cli": "^6.26.1", "doctoc": "^2.2.1", + "esbuild": "*", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard": "^17.1.0", @@ -123,10 +124,10 @@ "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.2.5", "svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0", - "svelte-check": "^4.0.4", + "svelte-check": "^3.0.0 || ^4.0.4", "svelte-jester": "^5.0.0", "typescript": "^5.5.3", - "vite": "^5.3.3", - "vitest": "^2.0.2" + "vite": "^4.0.0 || ^5.3.3", + "vitest": "^1.0.0 || ^2.0.2" } } diff --git a/scripts/install-dependencies b/scripts/install-dependencies index 2a3f24f..029bfdf 100755 --- a/scripts/install-dependencies +++ b/scripts/install-dependencies @@ -15,4 +15,11 @@ elif [[ "${svelte_version}" == "3" ]]; then npm install --no-save vite@4 vitest@1 @vitest/coverage-v8@1 @sveltejs/vite-plugin-svelte@2 svelte-check@3 svelte@3 fi -npm ls --depth=0 svelte +npm dedupe +installed_version=$(npm ls --depth=0 --parseable svelte@${svelte_version}) + +if [[ -z "${installed_version}" ]]; then + echo "Error: expected svelte@${svelte_version}" + npm ls --depth=0 svelte + exit 1 +fi