Skip to content

Commit 3210b6b

Browse files
committed
ci(bundlers): avoid E401 by installing ts-jest/jest via npm i with clean userconfig and explicit registry
1 parent 07b1dbf commit 3210b6b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/test-bundlers.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ jobs:
2929
- name: 📦 Install bundler dev deps (ts-jest, jest)
3030
shell: bash
3131
run: |
32-
# Use a temporary npmrc that points to the public registry only and has no tokens
33-
printf "registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=\nalways-auth=false\n" > "$RUNNER_TEMP/npmrc-public"
34-
npm ci --prefer-online --no-audit --userconfig "$RUNNER_TEMP/npmrc-public" --prefix test/bundler
32+
# Use a clean, token-free npm user config and explicit registry
33+
printf "registry=https://registry.npmjs.org/\n" > "$RUNNER_TEMP/npmrc-public"
34+
export NPM_CONFIG_USERCONFIG="$RUNNER_TEMP/npmrc-public"
35+
# Ensure no local npmrc shadows config
36+
rm -f test/bundler/.npmrc || true
37+
# Install only what's needed for the preset (no lockfile, no scripts)
38+
npm i -D ts-jest@29 jest@29 --no-audit --no-fund --ignore-scripts --prefer-online --registry=https://registry.npmjs.org/ --prefix test/bundler
3539
env:
3640
NPM_TOKEN: ''
3741
NODE_AUTH_TOKEN: ''

0 commit comments

Comments
 (0)