Skip to content

Releases: jsonstat/validator

1.0.1

Choose a tag to compare

@badosa badosa released this 04 Jul 07:47

[1.0.1] - 2026-07-04

A hotfix republish. The 1.0.0 browser IIFE/ESM bundle
(dist/browser/jsonstat-validator.min.js) threw
on <script src> load in browsers: pipeline.ts imported node:fs at
module top level, and esbuild preserved that top-level static import in the browser build as an eager
__require("node:fs") that runs at load time (browsers have no require). The Node smoke test missed
it because Node supplies a real require.

Fixed — broken browser bundle

  • Moved the node:fs import out of the top of pipeline.ts and into
    validateFile() as a dynamic await import("node:fs"). Since the
    browser entry (browser.ts) does not export validateFile, esbuild
    now tree-shakes it — and the node:fs dependency — out of the browser bundle entirely. The
    documented jsDelivr / unpkg <script src> path works again. validateFile() is unchanged for Node
    consumers.

Added — regression guards (both run in npm run build via the verify:browser script)

  • tools/verify-browser-bundle.mjs: a static-content
    guard that fails the build if dist/browser/* references a Node builtin (node:* or a core-module
    require/import). Encodes the invariant the 1.0.0 build violated.
  • tools/smoke-browser-bundle.mjs: a functional guard
    that loads the built IIFE in a Node vm context with no require/module globals (browser-like)
    and drives validate() — the test that would have caught 1.0.0.

Changed — version bump (lockstep across all surfaces)

Deprecated

1.0.0

Choose a tag to compare

@badosa badosa released this 01 Jul 21:11

The 1.0.0 cut. The work tracked in the README "Toward 1.0.0" section is complete; this release
makes the stability commitments in STABILITY.md — the public validate() surface,
the ValidationResult shape, and the error-code vocabulary are now stable.

Added — curated schema architecture (DESIGN.md §2.3)

  • A de-duplicated schemas/curated/ schema set: one shared
    core.json holding all $defs, plus four thin per-class files
    (dataset, collection, dimension, index) that $ref into it — replacing the triplicated
    definitions the verbatim vendored originals carried.
  • tools/bundle-schemas.mjs, which inlines every $ref into
    self-contained schemas/curated/bundled/ output. The TS
    (gen-assets.mjs) and Rust
    (build.rs) generators now embed the bundled curated set, not the
    vendored originals. Committed, with a bundler-determinism check in CI.
  • The curated≡vendored structural-parity gate, proving the de-duplicated set is behaviorally
    identical to the verbatim upstream originals on every corpus case:
    packages/ts/test/curated-parity.test.ts (identical
    outcomes + clean Unicode-RegExp compile + self-contained) and its Rust mirror
    crates/validator/tests/curated_equiv_vendored.rs.
  • A dedicated curated-parity CI job
    (ci.yml) that re-bundles and asserts the committed output is fresh,
    then runs the outcome-parity test — the guard against "edited the source, forgot to re-bundle".
  • STABILITY.md — the SemVer / ruleSetVersion stability commitment artifact for the
    1.0.0 cut.
  • readme, keywords, and categories metadata to the Rust crate manifest
    (crates/validator/Cargo.toml) so crates.io renders the README and
    surfaces the crate under discovery tags. (0.3.0 shipped without a readme, so its crates.io page
    showed "no readme"; this takes effect from the next published version — published versions are
    immutable, so 0.3.0 itself cannot be retro-fixed.)

Fixed

  • The vendored updated date pattern carried an invalid \- RegExp escape (an escaped hyphen, which
    is a syntax error under the Unicode flag u). The curated set replaces it with a literal -,
    which matches the identical set of strings. This lets the structural pass compile cleanly under the
    default Unicode RegExp, removing the unicodeRegExp: false
    workaround in TS and the silent-skip-on-compile-failure fallback in
    structural.rs (now a .expect(), since the embedded
    schemas must compile).

Changed

  • Bumped the package version and engineVersion from 0.3.0 to 1.0.0 across every surface —
    @jsonstat-validator/ts, the jsonstat-validate CLI,
    @jsonstat-validator/wasm, and the jsonstat-validator Rust
    crate — plus the npm and Cargo lockfiles. ruleSetVersion stays 1.0.0 (no rule changes).
  • @jsonstat-validator/wasm now declares its @jsonstat-validator/ts dev dependency
    as ^1.0.0.
  • The Rust _vendored committed-snapshot drift guard
    (vendored_parity.rs) now asserts the snapshot matches
    the curated/bundled sources (its actual input), not the vendored originals.
  • Rewrote the README "Status" / "Versioning" sections for the 1.0.0 cut; retired the now-complete
    "Toward 1.0.0" section.

v0.3.0

Choose a tag to compare

@badosa badosa released this 27 Jun 23:02

Added

  • A publish-crate job in release.yml that publishes the
    jsonstat-validator Rust crate to crates.io. crates.io has no OIDC trusted
    publishing like npm, so the job is gated behind a crates-io environment with a
    CARGO_REGISTRY_TOKEN secret.
  • Node 18 to the TypeScript CI matrix (ci.yml), matching the
    documented Node 18/20/22 target in DESIGN.md §8.1.

Changed

v0.2.0

Choose a tag to compare

@badosa badosa released this 27 Jun 13:10

What's new

  • New @jsonstat-validator/wasm package — a wasm-pack wrapper exposing the Rust validator to JavaScript/TypeScript, with a parity test against the TS implementation (packages/wasm).
  • Rust vendored parity testcrates/validator/tests/vendored_parity.rs guards the committed _vendored manifest/schemas snapshot against drift.
  • Manifest syncrules-manifest.json and the vendored snapshot are kept in lockstep.
  • Version bump to 0.2.0 across the TypeScript, CLI, Rust, and WASM packages.
  • Docs & tooling — CI workflow, READMEs, and .gitignore updates.

Full changelog: v0.1.1...v0.2.0