Skip to content

v0.13.2

Choose a tag to compare

@mertcanaltin mertcanaltin released this 09 May 16:34
· 133 commits to master since this release

Fixed

  • Invalid validation crashed in environments without the native addon (Cloudflare Workers, browsers, Bun without N-API). When the JS error-codegen probe couldn't produce a safe error function, errFn fell through to this._compiled.validate(d). With no native addon _compiled stays null, so the call threw TypeError: Cannot read properties of null (reading 'validate'). Valid inputs were unaffected because they short-circuited before reaching errFn. The fallback now stays on a JS-only path when native isn't present, returning the boolean result with a generic detail-not-available error so callers see { valid: false, errors: [...] } instead of a crash. Added tests/test_no_native.js (Workers-style sandbox) to lock the behavior. Fixes #22.