A universal class for creating any JSON objects and simple manipulations with them. Published to npm as protoobject.
- TypeScript (
tsc), targeting CJS + ESM dual build with type declarations. - Node
>=16runtime; CI tests on Node 20, 22 and 24. - ESLint + Prettier.
- Test runner:
node --test(no Jest/Mocha).
npm run lint # ESLint over src/**/*.ts — must exit 0
npm run build # Clean + tsc CJS + tsc ESM + tsc types + write package.json shims
npm run test:ts # Primary test suite (TypeScript) used by autoupdate verification
npm run cov # Coverage run; used by PR checks on Node 20/22/24
npm run test:sql # SQL tests; only on Node >= 22
npm test # Full suite — runs lint, all unit suites, browser-node, transformersYou are NOT done with a code change until all three of the following exit 0 in the working tree on the branch you're going to push:
npm run lint
npm run build
npm run test:tsRun these explicitly with the Bash tool before your last commit on the branch. Do not assume "the change looks right" is sufficient — tsc errors and ESLint errors must be observed as exit code 0, not inferred. If any of them fail, fix the failure and re-run all three from a clean state until they all pass. Only then commit and push.
If npm install is needed (e.g. lockfile changed), run it with --no-audit --no-fund and ensure it returned 0 before running checks.
- Do not modify product logic when fixing dependency-compatibility issues. Acceptable edits: type adjustments, renamed exports, breaking-change shims, ESLint-config tweaks for new rule defaults.
- Do not bump the package
versionmanually. The autoupdate flow usesnpm version patchor has the maintainer set the version on release. - Do not edit
.github/workflows/build-and-deploy.ymlunless explicitly asked — it is the release pipeline. - Do not push to
maindirectly. Always work on the existing branch you were summoned to.
- Branch will be
chore/autoupdate-<run_id>. - Goal: bring
npm run lint && npm run build && npm run test:tsto green. - Push compatibility fixes onto this branch. Each push re-runs
pr-checks.ymlautomatically; you don't need to mention checks back to the maintainer until they're green. - If a fix is impossible without changing product behavior, stop and leave a comment explaining what's blocked rather than guessing.
This repo follows the unified autoupdate-with-claude baseline (same template across siblings). Several workarounds are intentional:
autoupdate.ymlusesGITHUB_TOKEN(notTOKEN_FOR_WORKFLOW) for unification across repos and explicitly dispatchespr-checks.ymlafter PR creation, because events created viaGITHUB_TOKENdon't triggerpull_requestworkflows.autoupdate.ymldispatchesclaude.ymldirectly viaworkflow_dispatch(passingbranchandrun_urlinputs) instead of relying on an@claudePR comment, since a comment posted viaGITHUB_TOKENwould not fireissue_commenttriggers.- Releases are wired via
release-on-version-bump.yml(push to main → detectpackage.jsonversion change → force-recreatevX.Y.Ztag on main HEAD → dispatchbuild-and-deploy.yml). - All actions pinned to the
@v4line (actions/checkout@v4,actions/setup-node@v4,actions/download-artifact@v4) because the runner image currently lacksexternals/node24, breaking post-cleanup of@v5/@v6actions.
Do not "fix" any of the above by replacing dispatch calls with comment-based mentions, or by bumping action versions back to @v5/@v6 — these are deliberate workarounds for current GitHub-side limitations.