commits
When running in JavaScript, dynamic.classify returns 'Array' and
'Object' for native JS types, not 'List' and 'Dict'. This makes
the JSON conversion work correctly when called from JavaScript.
Adds honk_bundle.mjs entry point that re-exports honk functions
plus toList from prelude, enabling JavaScript users to convert
arrays to Gleam Lists for validation.
Changes esbuild output from ES modules to IIFE format with global
`honk` variable. This allows loading with a regular <script> tag
instead of requiring type="module".
- exclude CLI functions from JS target with @target(erlang)
- add build-js.sh script to bundle with esbuild
- output single minified file at dist/honk.min.js (69kb)
- available via jsDelivr CDN without npm publishing
- Add is_valid_raw_cid function to formats module for blob CID validation
(validates CIDv1 with raw multicodec, bafkrei prefix)
- Validate $type field must equal "blob"
- Validate ref object with $link containing raw CID
- Validate mimeType is non-empty
- Validate size is non-negative (zero allowed)
- Reject extra fields (strict mode per ATProto spec)
- Add ValidationContext type for external use
- Add build_validation_context to build context once from lexicons
- Add validate_record_with_context for faster batch validation
Bump version to 1.1.0
- Fix is_null_dynamic to use dynamic.classify for consistency
- Add test: nullable field accepts null value
- Add test: non-nullable field rejects null value
- Add test: nullable field not in properties fails schema validation
- Add test: valid nullable schema passes validation
- Fix double colon bug when validation path is empty
- Add defs.main prefix to data validation errors for clarity
- Add comprehensive tests for error message formats
- Schema validation errors show definition via #defName prefix
- Data validation errors include defs.main in path
- Fix union validator to properly validate local references through
resolution instead of skipping validation
- Add 6 new union tests with full lexicon catalog integration:
* All primitive non-object types validation
* Empty refs in data validation context
* Comprehensive reference matching (local, global main, fragments)
* Schema resolution with constraint validation
* Open vs closed union comparison
* Basic union with full context
- Implement complete params data validation with property type checking
- Add proper data validator to union tests via dispatch_data_validation
- Tests now validate required fields, constraints, and full resolution chain
- All 220 tests passing with full property schema resolution
Test coverage now aligns with reference implementations.
- Add is_valid_raw_cid function to formats module for blob CID validation
(validates CIDv1 with raw multicodec, bafkrei prefix)
- Validate $type field must equal "blob"
- Validate ref object with $link containing raw CID
- Validate mimeType is non-empty
- Validate size is non-negative (zero allowed)
- Reject extra fields (strict mode per ATProto spec)
- Fix union validator to properly validate local references through
resolution instead of skipping validation
- Add 6 new union tests with full lexicon catalog integration:
* All primitive non-object types validation
* Empty refs in data validation context
* Comprehensive reference matching (local, global main, fragments)
* Schema resolution with constraint validation
* Open vs closed union comparison
* Basic union with full context
- Implement complete params data validation with property type checking
- Add proper data validator to union tests via dispatch_data_validation
- Tests now validate required fields, constraints, and full resolution chain
- All 220 tests passing with full property schema resolution
Test coverage now aligns with reference implementations.