Skip to content

Commit 36022e7

Browse files
committed
chore(ci): pin lerna's minimatch to v3 and fail step on lerna error
The publish step was silently emitting `changed_packages=0` because lerna 9.x crashed with `import_minimatch2.default is not a function` and `echo "x=$(... | wc -l)" | tee` swallowed the non-zero exit. - pnpm-workspace: scope `lerna>minimatch` to ^3.1.4 so lerna keeps the CJS-default-export shape its bundled code expects, while everything else still dedups to the global minimatch ^9.0.0 override. - test-ci: `set -eo pipefail` plus an explicit assignment so a lerna crash now fails the step instead of being masked by the outer pipe.
1 parent d1f4c98 commit 36022e7

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/test-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,14 @@ jobs:
166166

167167
- name: Generate changed packages list
168168
id: changed-packages
169+
# `set -eo pipefail` plus an explicit assignment ensures a lerna
170+
# crash fails the step instead of being swallowed by the outer
171+
# `echo | tee` (which would otherwise emit `changed_packages=0`
172+
# and skip the publish step silently).
169173
run: |
170-
echo "changed_packages=$(node ./node_modules/.bin/lerna changed -p | wc -l | xargs)" | tee -a $GITHUB_OUTPUT
174+
set -eo pipefail
175+
changed=$(node ./node_modules/.bin/lerna changed -p | wc -l | xargs)
176+
echo "changed_packages=$changed" | tee -a "$GITHUB_OUTPUT"
171177
172178
- name: Report nothing to release
173179
if: steps.changed-packages.outputs.changed_packages == '0'

pnpm-lock.yaml

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ minimumReleaseAgeExclude:
1515
overrides:
1616
playwright-core: 1.58.2
1717
"@browserbasehq/stagehand": 3.0.7
18+
# Dedup minimatch to v9 everywhere except inside lerna — lerna 9.x's bundled
19+
# code (`__toESM(require('minimatch')).default(...)`) only works with v3,
20+
# whose CJS export *is* the function. Pinning v9 there caused the publish
21+
# step to silently report 0 changed packages.
1822
minimatch: "^9.0.0"
23+
"lerna>minimatch": "^3.1.4"
1924

2025
onlyBuiltDependencies:
2126
- "@apify/ui-icons"

0 commit comments

Comments
 (0)