Skip to content

chore(deps): update core @sanity packages in packages/#12641

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/update-core-sanity-packages
Draft

chore(deps): update core @sanity packages in packages/#12641
Copilot wants to merge 6 commits intomainfrom
copilot/update-core-sanity-packages

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Description

Bump external @sanity/* dependencies across packages/ to latest versions.

Package From To
@sanity/diff-patch ^5.0.0 ^6.0.0
@sanity/message-protocol ^0.19.0 ^0.23.0
@sanity/sdk 2.1.2 ^2.8.0
@sanity/insert-menu 3.0.4 / ^3.0.4 3.0.5 / ^3.0.5
@sanity/preview-url-secret ^4.0.4 ^4.0.5
@sanity/visual-editing-csm ^3.0.6 ^3.0.7

@sanity/sdk was also changed from an exact pin to a ^ range for consistency with other deps.

@sanity/diff-patch v6 migration

v6 removes diffItem and its raw patch types (SetPatch, UnsetPatch, InsertAfterPatch, DiffOptions) in favor of diffValue, which returns pre-serialized SanityPatchOperations[].

Refactored undoChange.ts to:

  • Use diffValue() instead of diffItem(), filtering on object keys (set, unset, insert) rather than op discriminants
  • Parse serialized path strings via stringToPath() for getParentStubs calls
  • Handle diffMatchPatch operations (v6 uses DMP by default for eligible strings; v5 had it disabled) by resolving to set operations using diff.fromValue

What to review

  • packages/sanity/package.json and packages/@sanity/types/package.json — version bumps
  • packages/sanity/src/core/field/diff/changes/undoChange.ts — migration from diffItem to diffValue API

Testing

No new tests added. Existing undo-change tests continue to pass with the refactored code.

Notes for release

N/A – Internal only

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
page-building-studio Ready Ready Preview, Comment Apr 14, 2026 3:05pm
test-studio Ready Ready Preview, Comment Apr 14, 2026 3:05pm

Request Review

@stipsan
Copy link
Copy Markdown
Member

stipsan commented Apr 14, 2026

@copilot fill out the pr description template properly

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 14, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​sanity/​visual-editing-csm@​3.0.6 ⏵ 3.0.71001007196100

View full report

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot fill out the pr description template properly

Updated the PR description to follow the template with Description, What to review, Testing, and Notes for release sections.

Copilot AI requested a review from stipsan April 14, 2026 12:32
@stipsan
Copy link
Copy Markdown
Member

stipsan commented Apr 14, 2026

@copilot run pnpm dedupe and fix the pnpm lockfile

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot run pnpm dedupe and fix the pnpm lockfile

Done in b07b974 — ran pnpm dedupe which removed stale entries from the lockfile (old @sanity/insert-menu@3.0.4, @sanity/preview-url-secret@4.0.4, @sanity/visual-editing-csm@3.0.6, @sanity/visual-editing-types@2.0.5, xstate@5.28.0).

juice49
juice49 previously approved these changes Apr 14, 2026
@stipsan
Copy link
Copy Markdown
Member

stipsan commented Apr 14, 2026

@copilot resolve merge conflicts

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot resolve merge conflicts

Resolved in 0cb553f — merged main, regenerated the lockfile with pnpm install, and ran pnpm dedupe.

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.

3 participants