- Test and support Node.js 18, 20, 22.
- Update dependencies:
ajv@6.12.6
klona@2.0.6
- Update dev dependencies.
- Fix lint issues.
- Errors now use the spelling
occurred
vs the typooccured
.- NOTE: This typo is known to be present in many tests of error message and will require similar typo fixes.
- Added a validator for
VerifiablePresentation
- Added a validator for
VerifiableCredential
.
- The
credential
andpresentation
schemas are now deprecated and will be removed in a future major release.
- BREAKING: Update peer deps:
@bedrock/core@6
.
- Use
jsdoc-to-markdown@7
.
- BREAKING: Rename package to
@bedrock/validation
. - BREAKING: Convert to module (ESM).
- BREAKING: Remove default export.
- BREAKING: Require node 14.x.
- BREAKING: All APIs now use options-style/named parameters.
- BREAKING: When no schema can be found to match a given schema name,
the error returned from
validateInstance
is now of typeNotFoundError
instead ofUnknownSchema
.
- BREAKING: Remove deprecated
validate
function. UsevalidateInstance
orcreateValidateMiddleware
. - BREAKING: All callback-style APIs/parameters have been removed. Functions that validate instances are synchronous.
- BREAKING: Removed obsolete
graphSignature
schema.
- Fix slow loading of schemas in same dir (load in parallel).
- Handle case that import schema has no default export.
- Update schemas to use esm style and
esm.js
to transpile to CommonJS.
- Update peer deps:
bedrock@4.5
.
- Update internals to use esm style and use
esm.js
to transpile to CommonJS.
- Add
createValidateMiddleware
to create a more modern validate express-style middleware. This function has more clear name, simpler parameters, and ensures that the schemas used are compiled once. It requires schemas to be passed directly, a string identifying a schema may not be used.
- Ensure
title
is set on compiled function.
- Add
compile()
function to pre-compile a schema and return a function that outputs the same validation results as callingvalidateInstance
.
- Pre-compile schemas that are used in middlewares to prevent compiling on every request.
- Fix bug in
graphSignature
schema causing it to be invalid.
- Fix
api.validate
to throw error if schema does not exist instead of returning middleware that raises the error.
- Update peer dependencies; use bedrock@4.
- Support
linkedDataSignature2020
schema generator.
- BREAKING: Email pattern no longer supports uppercase chars.
- Implement a new ES6 Map based cache for AJV schemas. This provides a significant peformance improvement over the default AJV caching mechanism.
- Allow context in
DID Login
validator to be array with single context string.
- Increase character length of email domain labels per RFC 1034.
- Update dependencies.
- Support verificationMethod in linkedDataSignature2018.
- Add missing RsaSignature2018 type in LD signature schema.
- Remove
async
module dependency. - Return value is {valid: , error: }
- Invalid
jsonldType
schema.
- Improper use of arrow function in
validate
API.
- Schema
linkedDataSignature2018
.
- Errors are now 2.x compatible.
- Fixed test suite.
- Switch core validator to
ajv
.
- Use child logger.
- Add
jsonPatch
andsequencedPatch
validators.
- Support multiple signatures in
linkedDataSignature
schema.
- Restructure test framework for CI.
- Add
lowerCaseOnly
option to email validator.
- Replace deprecated
GLOBAL
withglobal
.
- Add
linkedDataSignature
schema.
- Accept dates before the year 2000 (1000+). A future fix should also accept dates 0-1000.
- Update bedrock dependencies.
- Use jsonldContext schema to validate Credential @context.
- Update publicKeyPem schema to accept RSA PUBLIC KEY.
- Update package dependencies for npm v3 compatibility.
- Fix synchronous error emission when invalid schema is specified.
- Fix credential schema bugs/style.
- Support validating JSON-LD context arrays.
- Accept and ignore null as jsonldContext context param.
- Labels/titles: Allow double quotes.
- Lables: Allow length of 200 (up from 32).
- See git history for changes.