Skip to content

Commit 477e66c

Browse files
salevineclaude
andauthored
fix(client): drop over-broad minimatch resolution so glob@10/11 get GLOBSTAR (fixes storybook) (#41949)
## Problem `storybook-tests` fails. There are two independent layers, both fixed here. ### Layer 1 — `GLOBSTAR` build failure The Storybook preview build fails with: `SyntaxError: The requested module 'minimatch' does not provide an export named 'GLOBSTAR'` **Root cause:** the `resolutions` block in `app/client/package.json` had an over-broad blanket `"minimatch": "^5.1.8"` that force-downgraded *every* minimatch to 5.x — including `glob@10` / `glob@11` (ESM), which require minimatch 9/10 for the `GLOBSTAR` named export. **Fix:** replaced the blanket with the specific `minimatch@^3.x -> ^5.1.8` pins (the CVE-2022-3517 ReDoS remediation, including the exact `3.0.4` consumer). Resulting resolution: - `glob@11 -> minimatch 10.2.5`, `glob@10 -> 9.0.9` (GLOBSTAR export present) - `glob 7/8 -> 5.1.9` (unchanged) - all minimatch `>= 3.0.5` (no CVE regression — a bare blanket removal would have reintroduced vulnerable `3.0.4`, which these pins prevent) ### Layer 2 — test-runner OOM Once the build works, `test-storybook:ci` runs the Jest + Playwright test-runner, which exceeds Node's ~2GB default old-space heap and dies with `JavaScript heap out of memory` (exit 129). Added `NODE_OPTIONS=--max-old-space-size=8192` to the Storybook Tests step. ## Verification (local, Node 24) - `yarn install --immutable` clean - Resolved minimatch all `>= 3.0.5` (no vulnerable version) - Storybook builds clean (no `GLOBSTAR` error), `storybook-static` artifact produced - `glob 7/8` (used by the webpack client build) unchanged, so the client build is unaffected ## Context The identical fix landed in the EE repo (`appsmith-ee`) to unblock its CI; the blanket resolution is identical in CE, so CE's Storybook is broken the same way. Landing it here makes the fix durable (the CE->EE sync converges the two) and fixes CE's own Storybook. **Merge with a merge commit — do not squash** (preserves CE<->EE sync history). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Automation /ok-to-test tags="@tag.All" <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Increased the memory limit for Storybook tests in CI to help them run more reliably. * Updated dependency resolution settings to keep compatible versions of a transitive package pinned consistently. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/28718473128> > Commit: 9fc1f09 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=28718473128&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Sat, 04 Jul 2026 21:26:14 UTC <!-- end of auto-generated comment: Cypress test results --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d03d506 commit 477e66c

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

.github/workflows/test-storybook.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
4545
- name: Storybook Tests
4646
working-directory: ./app/client/packages/storybook
47+
env:
48+
# The Storybook test-runner (Jest + Playwright over every story) exceeds
49+
# Node's ~2GB default old-space heap on the runner and OOMs (exit 129).
50+
# Raise the limit; the runner has ample RAM.
51+
NODE_OPTIONS: --max-old-space-size=8192
4752
run: |
4853
yarn build-storybook
4954
yarn test-storybook:ci

app/client/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,14 @@
417417
"fast-csv": "4.3.6",
418418
"json-schema": "0.4.0",
419419
"node-fetch": "2.6.7",
420-
"minimatch": "^5.1.8",
420+
"minimatch@^3.0.3": "^5.1.8",
421+
"minimatch@^3.0.4": "^5.1.8",
422+
"minimatch@^3.0.5": "^5.1.8",
423+
"minimatch@^3.1.1": "^5.1.8",
424+
"minimatch@^3.1.2": "^5.1.8",
425+
"minimatch@~3.0.2": "^5.1.8",
426+
"minimatch@~3.0.4": "^5.1.8",
427+
"minimatch@3.0.4": "^5.1.8",
421428
"loader-utils": "^2.0.4",
422429
"json5": "2.2.3",
423430
"dns-packet": "5.4.0",

app/client/yarn.lock

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25988,7 +25988,25 @@ __metadata:
2598825988
languageName: node
2598925989
linkType: hard
2599025990

25991-
"minimatch@npm:^5.1.8":
25991+
"minimatch@npm:^10.1.1":
25992+
version: 10.2.5
25993+
resolution: "minimatch@npm:10.2.5"
25994+
dependencies:
25995+
brace-expansion: ^5.0.5
25996+
checksum: 000423875fecbc7da1d74bf63c9081363a71291ef2588c376c45647ac004582cb5bc8cc09ef84420b26bfb490f4d0818d328e78569c6228e20d90271283f73ba
25997+
languageName: node
25998+
linkType: hard
25999+
26000+
"minimatch@npm:^3.0.2":
26001+
version: 3.1.5
26002+
resolution: "minimatch@npm:3.1.5"
26003+
dependencies:
26004+
brace-expansion: ^1.1.7
26005+
checksum: 47ef6f412c08be045a7291d11b1c40777925accf7252dc6d3caa39b1bfbb3a7ea390ba7aba464d762d783265c644143d2c8a204e6b5763145024d52ee65a1941
26006+
languageName: node
26007+
linkType: hard
26008+
26009+
"minimatch@npm:^5.0.1, minimatch@npm:^5.1.8":
2599226010
version: 5.1.9
2599326011
resolution: "minimatch@npm:5.1.9"
2599426012
dependencies:
@@ -25997,6 +26015,15 @@ __metadata:
2599726015
languageName: node
2599826016
linkType: hard
2599926017

26018+
"minimatch@npm:^9.0.4":
26019+
version: 9.0.9
26020+
resolution: "minimatch@npm:9.0.9"
26021+
dependencies:
26022+
brace-expansion: ^2.0.2
26023+
checksum: 5292681ba1e14544ca9214ba5e412bb346214fb783354b22752f2d1e5c176e4a2c0bfcafeb1046389b816009ab73ba5410b176ce605632e8aa695db25f87f6b9
26024+
languageName: node
26025+
linkType: hard
26026+
2600026027
"minimist@npm:^1.1.0, minimist@npm:^1.1.1, minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.8":
2600126028
version: 1.2.8
2600226029
resolution: "minimist@npm:1.2.8"

0 commit comments

Comments
 (0)