Start Here: Safe JSON Parse & Shape Boundary
PRESERVE-WHAT-WORKS
Checkpoint first. Change one reviewed JSON trust boundary only. Do not redesign, restyle, reorganize, replace routes, change public contracts, or modify unrelated authentication, authorization, payments, databases, APIs, analytics, content, or UI.
- Touches: one boundary call and its focused tests.
- Does not touch: transport, schema ownership, storage, rendering, navigation, logging, deployment, or unrelated behavior.
- Prerequisites: approved payload contract, byte ceiling, root type, validator, error mapping, checkpoint, and rollback owner.
- Install: copy the package, run tests, configure limits, add the host-owned validator, then map safe codes.
- Targeted tests: syntax, size, root type, depth, nodes, arrays, keys, unsafe integers, validator rejection and failure.
- Regression: clients, auth, errors, logging, storage, retries, analytics, performance, and critical journeys.
- Recovery: failures return bounded codes without raw input. Configuration and validator failures stop acceptance.
- Rollback: restore the checkpoint and remove the single integration call.
- Unverified: customer schema, traffic distribution, endpoint behavior, monitoring, and production compatibility.
- Deploy: publish only after focused, regression, security, compatibility, and production-smoke checks pass.
PRESERVATION CONFLICT / REVIEW REQUIRED: stop if integration changes an existing API or requires broad restructuring. Prefer observation-only or versioned adoption.
Run
npm test
npm run check
node examples/basic.mjs