Skip to content

schema-dsl v3.0.0

Choose a tag to compare

@rockyshi1993 rockyshi1993 released this 15 Jul 13:10
· 12 commits to main since this release

schema-dsl v3.0.0

Release date: 2026-07-15

Changed

  • Made both root ESM and CommonJS imports side-effect-free: importing schema-dsl no longer installs, replaces, or removes properties on String.prototype.
  • Retained direct String-chain authoring only through explicit schema-dsl/compat, schema-dsl/register-string, or installStringExtensions() opt-in paths.
  • Limited package sideEffects metadata 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 add isRequired() or isOptional() getters.
  • schema-dsl/pure remains available as a stable side-effect-free subpath and exposes the same canonical core API as the root entry.
  • schema-dsl/string-types remains 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-string before using them.
  • TypeScript consumers retaining String chains must also opt into schema-dsl/string-types.
  • See docs/en/migration-v3.md and docs/zh/migration-v3.md for bilingual examples and compatibility guidance.

Validation

  • Root and pure ESM/CJS descriptor probes verify that every pre-existing String.prototype descriptor 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.