Skip to content

v2.0.0

@rockyshi1993 rockyshi1993 tagged this 22 May 03:02
Source fixes (19 files, 1095 tests):
- Security: safe-regex for ReDoS prevention in CustomKeywords
- Validation: stop caching DslBuilder.toSchema() in Validator (stale schema fix)
- Validation: ConditionalBuilder FIFO validator cache (max=20) + validateAsync try/catch contract
- Validation: SchemaUtils.extend() deep merge via _mergeProperties
- Validation: _normalizeSchemaInput skips cache for DSL objects
- Robustness: ErrorFormatter preserves constructor custom messages
- Robustness: SchemaHelper.isValidSchema adds anyOf/oneOf/allOf/$ref/enum branches
- Robustness: PluginManager.setMaxListeners(0) prevents listener warning
- API: DslBuilder.validate() return type narrowed to Promise<ValidationResult<unknown>>
- API: TypeRegistry.clearCustomTypes() clears all custom types including DslAdapter-registered
- API: dsl.config({ strict: true }) throws on unknown types instead of warn+fallback
- API: InferDslString adds array<Item> branch for type inference
- i18n: MarkdownExporter adds fr-FR and es-ES locale support
- Cleanup: remove dead code registerRangeKeyword; precision uses epsilon comparison

CI / infra:
- ci.yml: add build and typecheck steps before test
- ci.yml: extend branch triggers to include main
- package.json: add prepublishOnly gate (build + typecheck + test)

Docs:
- CHANGELOG: merge Unreleased section into [2.0.0]; update test count to 1095
- api-reference.md: add dsl.config() section; add TypeRegistry new methods
- dsl-syntax.md: fix string:N comment (exactLength, not max length)
- FEATURE-INDEX.md: remove deleted range keyword; remove broken STATUS.md link

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Assets 2
Loading