From e4b3e798fc4e623d2f85cf41152f0902cb045b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Repe=C4=87?= Date: Wed, 14 Oct 2026 11:05:31 +0200 Subject: [PATCH] ci: Install root typescript for the workflow scripts test job The job sweeps scripts/*.test.mjs into the .github/scripts test run but installs only the .github/scripts dependencies. env-vars-manifest.mjs imports typescript, so its test failed with ERR_MODULE_NOT_FOUND. Install just typescript at the repo root, pinned to the root package.json version, so the suite keeps its scoped install. --- .github/workflows/test-workflow-scripts-reusable.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test-workflow-scripts-reusable.yml b/.github/workflows/test-workflow-scripts-reusable.yml index d2236a70f10..dc453fd71bd 100644 --- a/.github/workflows/test-workflow-scripts-reusable.yml +++ b/.github/workflows/test-workflow-scripts-reusable.yml @@ -33,6 +33,16 @@ jobs: install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --lockfile-dir ${{ github.workspace }}/.github/scripts --ignore-workspace cache-dependency-path: .github/scripts/pnpm-lock.yaml + # Tests under scripts/ may need root devDependencies (for example + # typescript for scripts/env-vars-manifest.mjs); the scoped install + # above only covers .github/scripts. Install just typescript into + # scripts/, pinned to the root package.json version. npm cannot + # install at the repo root (workspace: protocol in devDependencies). + - name: Install root script dependencies + run: | + VERSION=$(node -p "require('./package.json').devDependencies.typescript") + npm install --no-save --no-package-lock --ignore-scripts --prefix scripts "typescript@${VERSION}" + - name: Run tests id: run-tests run: npm test --prefix=.github/scripts