Skip to content

Remove @apidevtools/json-schema-ref-parser from cli-kit (inline internal $ref resolver)#7724

Draft
amcaplan wants to merge 2 commits into
mainfrom
remove-dep/json-schema-ref-parser
Draft

Remove @apidevtools/json-schema-ref-parser from cli-kit (inline internal $ref resolver)#7724
amcaplan wants to merge 2 commits into
mainfrom
remove-dep/json-schema-ref-parser

Conversation

@amcaplan
Copy link
Copy Markdown
Contributor

@amcaplan amcaplan commented Jun 5, 2026

What Changed

  • Removed @apidevtools/json-schema-ref-parser dependency from @shopify/cli-kit package.json
  • Implemented inline internal-only JSON pointer reference resolver in src/public/node/json-schema.ts
  • Updated pnpm-lock.yaml to reflect dependency removal

Why

Reduce Dependabot churn: This dependency generated 13 bumps in 24 months from the dependency-removal initiative. Removing it eliminates unnecessary maintenance overhead while preserving functionality.

Replacement Details

Implemented a custom internal-only $ref resolver with cycle safety:

  • Internal refs (#/... JSON pointers): Fully dereferenced inline with memoization to handle cycles
  • Non-internal refs: Preserved unchanged as $ref properties to maintain prior external: false behavior
  • The resolver uses a visited set to detect cycles and a resolved nodes map for memoization

Validation Results

All targeted validations pass:

  • ✅ Type check: pnpm --filter @shopify/cli-kit type-check
  • ✅ Linting: pnpm --filter @shopify/cli-kit lint
  • ✅ Tests: pnpm --filter @shopify/cli-kit exec vitest run src/public/node/json-schema.test.ts — 16 passed

🤖 Automated dependency-removal initiative — AI-generated draft, needs human review.

…nal $ref resolver

Co-Authored-By: Claude <noreply@anthropic.com>
@amcaplan amcaplan added the claudeception Pull request created by Claudeception agents label Jun 5, 2026
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 5, 2026
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added Area: @shopify/cli @shopify/cli package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels Jun 5, 2026
@amcaplan amcaplan added the dependency-removal Removes a dependency to cut Dependabot churn (cleanup initiative) label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues claudeception Pull request created by Claudeception agents dependency-removal Removes a dependency to cut Dependabot churn (cleanup initiative)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant