Skip to content

chore(i18n-doc): export InternationalizedArrayItem#581

Merged
pedrobonamin merged 1 commit intomainfrom
i18n-array/types-update
Feb 16, 2026
Merged

chore(i18n-doc): export InternationalizedArrayItem#581
pedrobonamin merged 1 commit intomainfrom
i18n-array/types-update

Conversation

@pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Feb 16, 2026

Description

Reducing footprint of #567
Export InternationalizedArrayItem from sanity-plugin-internationalized-array and update @sanity/document-internationalization to consume the shared type.

What to review

Testing

Copilot AI review requested due to automatic review settings February 16, 2026 14:33
@vercel
Copy link

vercel bot commented Feb 16, 2026

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

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Feb 16, 2026 2:37pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: 6072c7e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sanity/document-internationalization Patch
sanity-plugin-internationalized-array Patch

Not sure what this means? Click here to learn what changesets are.

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

@pedrobonamin pedrobonamin force-pushed the i18n-array/types-update branch from 5e7f41b to 6072c7e Compare February 16, 2026 14:36
Copy link
Contributor

@RitaDias RitaDias left a comment

Choose a reason for hiding this comment

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

🚀
Let's go!!

@pedrobonamin pedrobonamin enabled auto-merge (squash) February 16, 2026 14:37
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

Exports a shared InternationalizedArrayItem type from sanity-plugin-internationalized-array and updates @sanity/document-internationalization to consume it, reducing duplicated/parallel type definitions across plugins.

Changes:

  • Introduce and export InternationalizedArrayItem (and a runtime _type guard) in sanity-plugin-internationalized-array.
  • Replace internal usage of the old Value type with InternationalizedArrayItem across utils, components, field actions, schema validation, and test helpers.
  • Update @sanity/document-internationalization’s TranslationReference to extend the shared InternationalizedArrayItem<Reference> type.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/sanity-plugin-internationalized-array/src/utils/createAddLanguagePatches.ts Switches patch generation to use InternationalizedArrayItem and validates derived _type via a new guard.
plugins/sanity-plugin-internationalized-array/src/utils/createAddAllTitle.ts Updates function signature to accept InternationalizedArrayItem[].
plugins/sanity-plugin-internationalized-array/src/utils/checkAllLanguagesArePresent.ts Updates value typing to InternationalizedArrayItem[].
plugins/sanity-plugin-internationalized-array/src/types.ts Adds InternationalizedArrayItem + isInternationalizedArrayItemType, deprecates Value.
plugins/sanity-plugin-internationalized-array/src/test/helpers.ts Updates test factories to return InternationalizedArrayItem.
plugins/sanity-plugin-internationalized-array/src/schema/array.ts Updates validation generics and duplicate tracking types to InternationalizedArrayItem[].
plugins/sanity-plugin-internationalized-array/src/index.test.ts Updates exports snapshot to include the new runtime guard export.
plugins/sanity-plugin-internationalized-array/src/fieldActions/index.ts Updates useFormValue assertions to InternationalizedArrayItem[].
plugins/sanity-plugin-internationalized-array/src/components/InternationalizedArray.tsx Refactors prop/value typing to align with InternationalizedArrayItem.
plugins/sanity-plugin-internationalized-array/src/components/AddButtons.tsx Updates prop typing to InternationalizedArrayItem[].
plugins/@sanity/document-internationalization/src/types.ts Replaces KeyedObject usage with the shared InternationalizedArrayItem<Reference> type.
.changeset/internationalized-array-export-array-item.md Declares a patch release for exporting InternationalizedArrayItem.
.changeset/document-i18n-consume-array-item-type.md Declares a patch release for consuming InternationalizedArrayItem in document i18n.

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

@pedrobonamin pedrobonamin merged commit 952a50b into main Feb 16, 2026
8 checks passed
@pedrobonamin pedrobonamin deleted the i18n-array/types-update branch February 16, 2026 15:01
@squiggler squiggler bot mentioned this pull request Feb 16, 2026
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

Comments