Skip to content

Commit 3d1e36e

Browse files
committed
fixup! Switch from npm to pnpm
1 parent e31ee52 commit 3d1e36e

4 files changed

Lines changed: 22 additions & 16 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
node-version: 22
1818
package-manager-cache: false
1919
# Install only pnpm, not the repo's full toolchain — Node comes from
20-
# actions/setup-node, which pins the version this job needs.
21-
# Appending only pnpm's directory to PATH keeps mise's own Node
22-
# (mise.toml pins "latest") from ever shadowing setup-node's.
20+
# actions/setup-node. See mise.toml for why, and for why PATH order is
21+
# not what makes it safe.
2322
- name: Setup mise
2423
uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
2524
with:

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ jobs:
2323
node-version: 22
2424
package-manager-cache: false
2525
# Install only pnpm, not the repo's full toolchain — Node comes from
26-
# actions/setup-node, which pins the version this job needs.
27-
# Appending only pnpm's directory to PATH keeps mise's own Node
28-
# (mise.toml pins "latest") from ever shadowing setup-node's.
26+
# actions/setup-node. See mise.toml for why, and for why PATH order is
27+
# not what makes it safe.
2928
- name: Setup mise
3029
uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
3130
with:
3231
install: false
3332
# Caching is disabled in this workflow only. zizmor's cache-poisoning
3433
# audit flags a restorable cache in a job that publishes artifacts
3534
# built at runtime, which is also why the setup-node steps here set
36-
# package-manager-cache: false. Caching stays on in test.yml and
37-
# lint.yml, where it is a real speed win and is not flagged.
35+
# package-manager-cache: false. test.yml and lint.yml leave the
36+
# default, which zizmor does not flag -- though with install: false
37+
# mise-action never writes a cache there either.
3838
cache: false
3939
- name: Install pnpm
4040
env:
@@ -81,18 +81,18 @@ jobs:
8181
echo "npm $npm_version (need >= 11.5.1 for OIDC trusted publishing)"
8282
printf '11.5.1\n%s\n' "$npm_version" | sort -V -C
8383
# Install only pnpm, not the repo's full toolchain — Node comes from
84-
# actions/setup-node, which pins the version this job needs.
85-
# Appending only pnpm's directory to PATH keeps mise's own Node
86-
# (mise.toml pins "latest") from ever shadowing setup-node's.
84+
# actions/setup-node. See mise.toml for why, and for why PATH order is
85+
# not what makes it safe.
8786
- name: Setup mise
8887
uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
8988
with:
9089
install: false
9190
# Caching is disabled in this workflow only. zizmor's cache-poisoning
9291
# audit flags a restorable cache in a job that publishes artifacts
9392
# built at runtime, which is also why the setup-node steps here set
94-
# package-manager-cache: false. Caching stays on in test.yml and
95-
# lint.yml, where it is a real speed win and is not flagged.
93+
# package-manager-cache: false. test.yml and lint.yml leave the
94+
# default, which zizmor does not flag -- though with install: false
95+
# mise-action never writes a cache there either.
9696
cache: false
9797
- name: Install pnpm
9898
env:

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ jobs:
2020
node-version: ${{ matrix.version }}
2121
package-manager-cache: false
2222
# Install only pnpm, not the repo's full toolchain — Node comes from
23-
# actions/setup-node so the version matrix stays in control.
24-
# Appending only pnpm's directory to PATH keeps mise's own Node
25-
# (mise.toml pins "latest") from ever shadowing setup-node's.
23+
# actions/setup-node. See mise.toml for why, and for why PATH order is
24+
# not what makes it safe.
2625
- name: Setup mise
2726
uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4
2827
with:

mise.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ lockfile_platforms = [
2828
]
2929

3030
[tools]
31+
# CI never installs this. Every workflow runs mise-action with install: false
32+
# and then installs only pnpm, putting just pnpm's install directory on PATH.
33+
# That directory holds pnpm and a dist/ subdir -- no node -- which is what
34+
# keeps this "latest" pin out of jobs where actions/setup-node fixed the Node
35+
# version (the test matrix, and the pinned Node in lint.yml and release.yml).
36+
# The directory's contents are the protection, not PATH order: $GITHUB_PATH
37+
# prepends, and mise-action prepends its own shims directory even with
38+
# install: false.
3139
node = "latest"
3240
lychee = "latest"
3341
# pnpm is on the github backend because aqua-registry's pnpm config keeps

0 commit comments

Comments
 (0)