Skip to content

Run Chromatic on PRs, update GitHub Actions + Dependabot#276

Merged
colinrotherham merged 11 commits intomainfrom
npm-github-actions
Oct 8, 2025
Merged

Run Chromatic on PRs, update GitHub Actions + Dependabot#276
colinrotherham merged 11 commits intomainfrom
npm-github-actions

Conversation

@colinrotherham
Copy link
Collaborator

@colinrotherham colinrotherham commented Oct 8, 2025

This PR makes the following changes:

  1. Set up esbuild: { jsx: 'automatic' } for storybook build
  2. Set up NODE_ENV=production for package build
  3. Run Chromatic on PRs to prevent future regressions

These changes resolve the error thrown by the Chromatic deployment:

Error: D.jsxDEV is not a function. (In 'D.jsxDEV(t,{...e},void 0,!1,{fileName:"/home/runner/work/nhsuk-react-components/nhsuk-react-components/stories/Form Elements/Button.stories.tsx",lineNumber:59,columnNumber:19},void 0)', 'D.jsxDEV' is undefined)

I've added Dependabot groups to prevent Chromatic CLI warnings coming back:

Warning

This build was created using Chromatic CLI version 11.27.0, which is significantly outdated. Please upgrade your chromatic dependency.

@colinrotherham colinrotherham force-pushed the npm-github-actions branch 2 times, most recently from c7cdac4 to a2902b6 Compare October 8, 2025 10:31
@colinrotherham colinrotherham force-pushed the npm-github-actions branch 7 times, most recently from 7819869 to 4c7bf10 Compare October 8, 2025 11:34
@colinrotherham colinrotherham changed the title Set default NODE_ENV, update GitHub Actions + Dependabot Run Chromatic on PRs, update GitHub Actions + Dependabot Oct 8, 2025
@colinrotherham colinrotherham force-pushed the npm-github-actions branch 2 times, most recently from 09148dd to bb630d6 Compare October 8, 2025 12:55
@colinrotherham colinrotherham force-pushed the npm-github-actions branch 3 times, most recently from e61fd7d to 4da2b36 Compare October 8, 2025 13:28
@colinrotherham colinrotherham force-pushed the npm-github-actions branch 2 times, most recently from 143b952 to e2ef6a5 Compare October 8, 2025 13:42
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

@colinrotherham
Copy link
Collaborator Author

@JoshuaBates-NHS Just for completeness (and it was noisy) I've suppressed the same "use client" directive warnings in both the package yarn build and the storybook yarn build-storybook via 2578e87

I'll go ahead and merge and we can double check the baseline images are saved 🙏

@colinrotherham colinrotherham added this pull request to the merge queue Oct 8, 2025
Merged via the queue into main with commit cca2c48 Oct 8, 2025
3 checks passed
@colinrotherham colinrotherham deleted the npm-github-actions branch October 8, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants