Skip to content

fix: make generated theme tooling work without overrides - #322

Merged
callinmullaney merged 3 commits into
mainfrom
codex/fix-generated-theme-defaults
Oct 30, 2026
Merged

callinmullaney merged 3 commits into
mainfrom
codex/fix-generated-theme-defaults

Conversation

@callinmullaney

@callinmullaney callinmullaney commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepare Core 4.5.1 so generated themes can lint and build without consumer npm overrides or install-time source rewriting. The Node support floor remains >=24.13.0; the repository runtime remains .nvmrc's Node 24.18.0.

User-facing changes

  • Shared ESLint skips the root dist/, .out/, .coverage/ and components/ output directories while still checking authored src/components files. Prettier excludes /components/.
  • Require Pa11y 10 and one exact Storybook 10.6.4 cohort so independently published patch packages cannot pull an unavailable Storybook host.
  • Use the maintained @forumone/twig-drupal-filters 4 adapter with Core's Twig 3 peer, removing the separate vulnerable Twig 1 dependency tree. Remove the obsolete root overrides and the audit check that told consumers to add them.
  • Document Puppeteer's native Linux system-library installation command.

Compatibility and migration impact

Update Core before removing the old glob/locutus/minimatch overrides. Preserve unrelated overrides your own project needs. Drupal filter/function registration and ordinary output remain compatible. The maintained link() helper now correctly omits falsy attributes and the internal _keys entry; a real Twig render test covers classes and these omissions. Stylelint ignore globs and generated Prettier defaults are supplied by the companion Drupal starter patch because their paths resolve relative to the theme's config file.

Internal architecture and performance

No new abstraction or runtime policy layer. Two adapter imports switch to the maintained dependency. Dead override-audit code and its configuration-content assertions are removed. No performance claim is made.

Public API and package exports

No export-map or JSON schema changes. The obsolete recommended-package-overrides-missing warning is retired because the dependency problems are fixed upstream.

Known limitations and outstanding work — do not merge yet

  • CLI 2.4.2 is merged (fix(deps): use simple-git 4 without consumer overrides emulsify-cli#377), but its publish run 41018227355 failed with E401/EINVALIDNPMTOKEN. The maintainer must repair npm publishing authentication.
  • Raise Core's CLI minimum from ^2.4.1 to ^2.4.2 and refresh the lockfile once that release is available. This draft intentionally keeps a resolvable current lockfile in the meantime.
  • Final clean installation against published releases is still pending. Candidate validation injected npm tarballs without saving generated source changes and used no overrides.
  • The clean candidate audit has six low findings from the existing Jest/deepmerge chain and zero moderate/high/critical findings. This patch does not expand into unrelated Jest updates.

Release evidence

  • Exact clean commit 4fb42ba: full npm run release:verify passed all nine checks on Node 24.22.1: lint, 118 suites/1551 tests/12 snapshots, Storybook build, release/browser fixtures, packed consumers including React 18/19, pack dry-run/smoke and patch analysis to 4.5.1. Tracked source stayed clean.
  • All 19 required PR checks passed, including supported Node 24.13.0 and 24.18.0, every release fixture and every packed consumer. A separate non-required project-board automation failed; it is unrelated to code verification.
  • Final filter change: 84 focused real Twig/runtime/audit tests and full npm run lint also passed.
  • Fresh disposable consumer using candidate Core 4.5.1 and CLI 2.4.2: real npm installation with no overrides; Storybook cohort 10.6.4, Pa11y 10.0.0 and simple-git 4.0.2 verified; no legacy Twig 1, locutus 2 or minimatch 3.0.8.
  • Real SQLite Drupal site: drush emulsify acceptance_theme, UI Kit system install, npm run lint, npm run build, npm run lint, npm run storybook-build, npm run lint. No source auto-fix or manual source edits.
Review track Evidence Status
Storybook API/custom elements API unchanged; existing mixed/React fixtures Reviewed; required CI passed
Twig/Vite runtime Maintained adapter API comparison and real link render regression Reviewed; final fixtures passed
Audit CLI/JSON Removed obsolete override warning; JSON schema unchanged Reviewed; final full audit tests passed
Package/tarball Native pack and clean install of candidate artifact Reviewed
Generated consumers Clean Drush-generated theme and React 18/19 packed consumers Published-release repeat pending
Node/dependencies Supported floor unchanged; coherent peers; zero high/critical in candidate tree CLI release/minimum update pending
Accessibility WCAG preset tests; Linux browser instructions from Puppeteer Reviewed; automated checks retain their limits
Docs/migration Updated adapter links and override removal guidance Reviewed
Release automation/version Existing workflow; fix commits predict 4.5.1 Required review and npm auth pending

Originating work

Requested by Sous maintainers to replace downstream install-time fixes with upstream releases; no separate originating issue exists. Companion PRs: emulsify-ds/emulsify-cli#377, emulsify-ds/emulsify-ui-kit#189, emulsify-ds/emulsify-drupal#385. UI Kit is explicitly waiting for maintainer review.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant