Skip to content

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

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

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

Conversation

@colinrotherham

@colinrotherhamcolinrotherham commented Oct 8, 2025

Copy link
Copy Markdown
Collaborator

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
colinrotherhamforce-pushed the npm-github-actions branch 2 times, most recently from c7cdac4 to a2902b6CompareOctober 8, 2025 10:31
@colinrotherhamcolinrotherham mentioned this pull request Oct 8, 2025
@colinrotherham
colinrotherhamforce-pushed the npm-github-actions branch 7 times, most recently from 7819869 to 4c7bf10CompareOctober 8, 2025 11:34
@colinrotherhamcolinrotherham changed the title Set default NODE_ENV, update GitHub Actions + DependabotRun Chromatic on PRs, update GitHub Actions + DependabotOct 8, 2025
Comment thread.github/workflows/ci.yml Fixed
@colinrotherham
colinrotherhamforce-pushed the npm-github-actions branch 2 times, most recently from 09148dd to bb630d6CompareOctober 8, 2025 12:55
@colinrotherham
colinrotherhamforce-pushed the npm-github-actions branch 3 times, most recently from e61fd7d to 4da2b36CompareOctober 8, 2025 13:28
@colinrotherham
colinrotherhamforce-pushed the npm-github-actions branch 2 times, most recently from 143b952 to e2ef6a5CompareOctober 8, 2025 13:42
@sonarqubecloud

Copy link
Copy Markdown

@colinrotherham

Copy link
Copy Markdown
CollaboratorAuthor

@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 cca2c48Oct 8, 2025
3 checks passed
@colinrotherham
colinrotherham deleted the npm-github-actions branch October 8, 2025 15:17
Sign up for freeto 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.

3 participants

@colinrotherham@github-advanced-security@JoshuaBates-NHS