Skip to content

feat(shopify-assets): migrate sanity-plugin-shopify-assets to monorepo#976

Draft
stipsan wants to merge 46 commits into
mainfrom
cursor/migrate-shopify-assets-3d60
Draft

feat(shopify-assets): migrate sanity-plugin-shopify-assets to monorepo#976
stipsan wants to merge 46 commits into
mainfrom
cursor/migrate-shopify-assets-3d60

Conversation

@stipsan

@stipsan stipsan commented Jun 12, 2026

Copy link
Copy Markdown
Member

Migrates sanity-plugin-shopify-assets into the monorepo using the copy plugin generator (git subtree preserves full history).

What changed

  • Imported source via pnpm generate "copy plugin" and scaffolded monorepo config (package.json, package.config.ts, tsconfig.json, tsconfig.build.json, vitest.config.ts)
  • Migrated UI code to @sanity/ui v3 (catalog): getTheme_v2 theme API instead of the deprecated legacy theme, gap instead of deprecated space props
  • Fixed legacy patterns for monorepo lint rules: type-only imports, removed React default imports, removed unsafe as Asset assertions by typing the input as ObjectInputProps<Asset>, derived the picker config error during render instead of setState in an effect, removed stale eslint-disable comments and dead code
  • Made field-level shopify.asset options optional in the type augmentation so the documented plugin-level shopifyDomain configuration type-checks
  • Added @types/video.js so video.js@7 imports type-check; rxjs now from catalog
  • Wired a test-studio example (dev/test-studio/src/shopify-assets) with both plugin-level and field-level shopifyDomain, registered in the kitchen-sink workspace
  • Added a major changeset and a root README plugins table entry
  • Restored catalog: specifiers in dev/test-studio/package.json that the generator run had pinned to 5.31.0

Manual verification in test studio

Asset preview rendering (document seeded via API with a Shopify CDN asset value), exercising the migrated getTheme_v2 styling, InfoLine filename badge, and Select/Remove buttons:

shopify_assets_seeded_preview_demo.mp4

Picker dialog opening from both fields with graceful error handling (the placeholder store domain is not connected via Sanity Connect, so the expected "Configuration not found - check plugin configuration" card is shown):

shopify_assets_plugin_test_studio_demo.mp4

Rendered asset preview in document form

Transfer verification

  • Trusted publishing configured: npm trust github sanity-plugin-shopify-assets --file=release.yml --repository=sanity-io/plugins
  • package.json dependencies/peerDependencies/exports verified against original repo
  • Test studio example wired and manually verified (pnpm dev)
  • pnpm format, pnpm knip, pnpm lint, pnpm build, pnpm test run all pass
  • Major changeset added with validated breaking changes

Maintainer follow-up

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

thebiggianthead and others added 30 commits December 23, 2022 15:22
This isn't a big deal, but we tend to sort imports by type:
1. Node built-ins
2. npm modules
3. Local modules, by depth (eg the "closest" modules to the current module last)
refactor: sort imports roughly by type
RitaDias and others added 15 commits July 10, 2025 10:22
…and typescript to latest (#16)

* fix(deps): allow studio v4 in peer dep ranges

* fix: upgrade canIuse, update main actio

* chore: upgrade typescript

* Delete tsconfig.tsbuildinfo

---------

Co-authored-by: Cody Olsen <81981+stipsan@users.noreply.github.com>
Changed "Add New" URL to correct location in shopify backend.
…52062e85b0d067fa9ed490816f6c'

git-subtree-dir: plugins/sanity-plugin-shopify-assets
git-subtree-mainline: 064dc6b
git-subtree-split: e66af5f
- Migrate to @sanity/ui v3 (catalog) with getTheme_v2 theme API and gap props
- Use type-only imports, drop legacy React default imports
- Type input props as ObjectInputProps<Asset>, removing unsafe assertions
- Derive picker config error during render instead of setState in effect
- Make field-level shopify.asset options optional to match documented usage
- Add @types/video.js, use rxjs from catalog
- Remove unused Scroller styled component and StyledBox export
- Wire test-studio example with plugin- and field-level domains
- Add major changeset and root README plugins table entry
- Restore catalog: specifiers in dev/test-studio after generator run
@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0cccf18

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

This PR includes changesets to release 1 package
Name Type
sanity-plugin-shopify-assets Major

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

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Jun 12, 2026 2:53pm

Request Review

Resolve pnpm-lock.yaml conflict by taking main's lockfile (Sanity Studio v6
upgrade) and regenerating with pnpm install to re-add the
sanity-plugin-shopify-assets workspace entries.
@socket-security

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​pretty-ms@​8.0.010010010081100
Addednpm/​pretty-bytes@​6.1.110010010081100
Addednpm/​react-photo-album@​2.4.110010010086100
Addednpm/​react-infinite-scroll-component@​6.1.110010010093100
Addednpm/​axios@​1.17.09610010094100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants