Skip to content

fix(core): reject malformed array path indexes - #327

Open
simonyang08 wants to merge 1 commit into
vercel-labs:mainfrom
simonyang08:agent-tasks/strict-json-pointer-indexes
Open

fix(core): reject malformed array path indexes#327
simonyang08 wants to merge 1 commit into
vercel-labs:mainfrom
simonyang08:agent-tasks/strict-json-pointer-indexes

Conversation

@simonyang08

Copy link
Copy Markdown

Summary

  • reject malformed or unsafe array-index tokens instead of coercing them with parseInt
  • preserve arbitrary JSON Pointer member names when traversing objects
  • align immutable state-store writes with the same array semantics and no-op behavior
  • add regression coverage for mutable helpers, canonical indexes, object keys, and state-store notifications

Fixes #326

Test plan

  • pnpm test (66 files, 1082 tests)
  • pnpm lint
  • pnpm --filter @json-render/core build
  • pnpm exec vitest run packages/core/src/types.test.ts packages/core/src/state-store.test.ts (138 tests)

Environment note

The full pnpm type-check reaches the workspace build graph but cannot complete on Windows because @json-render/next invokes rm -rf dist. The focused core build, declaration generation, lint, and tests pass.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@ppt5928-dot is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@simonyang08
simonyang08 marked this pull request as ready for review August 22, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Array path helpers accept malformed RFC 6902 indexes

2 participants