Skip to content

Hotfix/intl array v4#722

Open
pedrobonamin wants to merge 3 commits intomainfrom
hotfix/intl-array-v4
Open

Hotfix/intl array v4#722
pedrobonamin wants to merge 3 commits intomainfrom
hotfix/intl-array-v4

Conversation

@pedrobonamin
Copy link
Contributor

Description

Hotfix for i18n v4

What to review

Testing

pedrobonamin and others added 3 commits March 12, 2026 13:05
…n circular references (#719)

* fix(i18n-array):  prevent stack overflow on circular schema

* chore(test-studio): add repro schema to test studio
Copilot AI review requested due to automatic review settings March 12, 2026 12:19
@vercel
Copy link

vercel bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Mar 12, 2026 0:19am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

⚠️ No Changeset found

Latest commit: bcff794

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hotfix for sanity-plugin-internationalized-array v4 to prevent stack overflows when scanning Sanity document schemas that contain circular inline object/array nesting, while keeping the existing “detect internationalizedArray* usage” behavior.

Changes:

  • Add cycle detection to schema traversal in hasInternationalizedArrayField to avoid infinite recursion.
  • Add a regression test covering circular inline object nesting.
  • Bump plugin version to 4.0.7 and document the patch in the changelog (plus a dev-studio repro schema).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugins/sanity-plugin-internationalized-array/src/utils/hasInternationalizedArrayField.ts Adds a visited set to prevent infinite recursion when traversing circular schema graphs.
plugins/sanity-plugin-internationalized-array/src/utils/hasInternationalizedArrayField.test.ts Adds a regression test ensuring circular nesting does not throw/overflow.
plugins/sanity-plugin-internationalized-array/package.json Bumps package version from 4.0.6 to 4.0.7.
plugins/sanity-plugin-internationalized-array/CHANGELOG.md Documents the 4.0.7 patch change and links the PR/commit.
dev/test-studio/src/internationalized-array/index.tsx Adds a dev-studio schema setup to reproduce/validate the circular nesting scenario manually.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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.

2 participants