Skip to content

fix: add twig boolval fallback#255

Merged
callinmullaney merged 1 commit into
mainfrom
codex/fix-twig-boolval-shim
Jun 5, 2026
Merged

fix: add twig boolval fallback#255
callinmullaney merged 1 commit into
mainfrom
codex/fix-twig-boolval-shim

Conversation

@callinmullaney

@callinmullaney callinmullaney commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

This PR does the following:

  • Adds a narrow Twig.js compatibility fallback for Twig.lib.boolval when dependency optimizer or transitive package interop leaves the helper undefined.
  • Preserves Twig.js’ native boolval implementation when it already exists.
  • Adds regression coverage for missing boolval, including a real Twig conditional render.
  • Documents the Twig.lib.boolval is not a function migration troubleshooting case.

Related Issue(s)

  • N/A

Notes:

  • This fallback only patches the missing internal helper. It does not override a valid Twig.js-provided boolval.
  • The migration note still recommends clearing Storybook/Vite caches and confirming project-level dependency overrides because the error usually points to package or optimizer drift.

Functional Testing:

  • Run npm run test -- src/extensions/twig/__tests__/register.test.js --runInBand
  • Run targeted ESLint against the touched Twig registration files
  • Run targeted Prettier against the touched files
  • Confirm pre-commit full lint and Prettier checks complete with no errors

Security

No new user input handling or external execution paths are introduced. The change only fills a missing internal Twig.js boolean coercion helper.

Accessibility

No accessibility review needed. This change does not alter rendered markup, styles, or interactive behavior except allowing existing Twig conditionals to render successfully.

@callinmullaney callinmullaney changed the base branch from develop to main June 5, 2026 16:50
@callinmullaney callinmullaney merged commit 87c77b1 into main Jun 5, 2026
7 of 8 checks passed
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.0.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