Commit b1e0201
committed
Fixed deploy zips shipping pnpm files and repaired the ncc build
The zip step's hard-coded exclude list covered yarn* and npm* but not
pnpm*, so themes deployed from pnpm-based repos shipped pnpm-lock.yaml
and pnpm-workspace.yaml to the live Ghost site (found via the pnpm
migration in TryGhost/Themes#529, where all 16 demo-site deploys were
affected). Added pnpm* to the default excludes.
Preparing this fix surfaced that the build has been broken since
Renovate bumped @actions/core, @actions/exec, and slug to ESM-only
majors: the CommonJS source can no longer require() them, so ncc build
fails and dist has not been rebuildable since February. Load the three
packages via dynamic import() instead, keeping the source and dist
CommonJS so the node20 runtime keeps executing the action as before.
dist/ is intentionally not rebuilt in this commit; it must be
regenerated with yarn build (which works again with this change) when
the action is next shipped. Note ncc now also emits the dynamic imports
as async chunk files next to dist/index.js — they are part of the build
output and need to ship with it.1 parent c0861b6 commit b1e0201
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
0 commit comments