Skip to content

fix(core): store the new Ajv instance when handling setAjv - #2642

Open
gigibiffi84 wants to merge 1 commit into
eclipsesource:masterfrom
gigibiffi84:fix/set-ajv-stores-instance
Open

gigibiffi84 wants to merge 1 commit into
eclipsesource:masterfrom
gigibiffi84:fix/set-ajv-stores-instance

Conversation

@gigibiffi84

Copy link
Copy Markdown

Part of #1498

What changed

The SET_AJV reducer compiled the schema with the new Ajv instance but never stored that instance in state. Every later setSchema, and re-enabling validation after NoValidation, silently compiled with the previous instance again. The reducer now stores ajv: action.ajv.

For adopters

Nothing changes unless you dispatch setAjv; if you do, the instance you pass is now actually used from then on.

Tests

Three new cases in packages/core/test/reducers/core.test.ts: the instance is stored, a later setSchema compiles with it, and re-enabling validation compiles with it. Full core suite green.

🤖 Generated with Claude Code

The SET_AJV reducer compiled the schema with the new Ajv instance but
never wrote it to state, so every later setSchema or re-enabled
validation silently went back to the previous instance.

Part of eclipsesource#1498

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 1339578
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6ac67ef47f92140008ba33d6
😎 Deploy Preview https://deploy-preview-2642--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant

CLAassistant commented Oct 7, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 84.762% (+0.2%) from 84.58% — gigibiffi84:fix/set-ajv-stores-instance into eclipsesource:master

This branch has not been deployed

No deployments
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.

3 participants