Skip to content

Conversation

@samuelstroschein
Copy link
Member

@samuelstroschein samuelstroschein commented Jan 6, 2026

Note

Introduces a lazy, CSP-safe validation strategy for Zettel AST.

  • Refactors validate.ts to lazily compile a TypeBox validator on first use; falls back to Value.Check via TypeCheck when code generation/eval is blocked (e.g., Cloudflare Workers)
  • validate() now uses a cached validator and derives errors from validator.Errors
  • Adds validate.test.ts to assert lazy compilation and fallback behavior
  • Adds a changeset for a minor release of @opral/zettel-ast

Written by Cursor Bugbot for commit 57e6245. This will update automatically on new commits. Configure here.

…oving performance in CSP-restricted environments.
@samuelstroschein samuelstroschein merged commit d7039d5 into main Jan 6, 2026
2 checks passed
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