Repository navigation
schema-dsl v3.0.0
schema-dsl v3.0.0
Release date: 2026-07-15
Changed
- Made both root ESM and CommonJS imports side-effect-free: importing
schema-dslno longer installs, replaces, or removes properties onString.prototype. - Retained direct String-chain authoring only through explicit
schema-dsl/compat,schema-dsl/register-string, orinstallStringExtensions()opt-in paths. - Limited package
sideEffectsmetadata to the explicit compatibility installers so bundlers can treat the root and pure entries as side-effect-free. - Stopped transform integrations from warning about the now-safe root entry while preserving the legacy warning option and code as compatibility no-ops.
Public contract
- Object-level JSON Schema
required[]remains the public requiredness contract; v3 does not addisRequired()orisOptional()getters. schema-dsl/pureremains available as a stable side-effect-free subpath and exposes the same canonical core API as the root entry.schema-dsl/string-typesremains a type-only opt-in and does not install runtime prototype methods.
Migration
- Replace implicit direct String chains with builder calls, or explicitly import
schema-dsl/compat/schema-dsl/register-stringbefore using them. - TypeScript consumers retaining String chains must also opt into
schema-dsl/string-types. - See
docs/en/migration-v3.mdanddocs/zh/migration-v3.mdfor bilingual examples and compatibility guidance.
Validation
- Root and pure ESM/CJS descriptor probes verify that every pre-existing
String.prototypedescriptor remains unchanged. - Explicit compat/register probes verify that legacy methods are installed only after opt-in.
- Package tests cover exports, TypeScript opt-in boundaries, transform behavior, examples, interop, audit, website, performance regression, pack contents, and isolated packed consumers.