feat(shopify-assets): migrate sanity-plugin-shopify-assets to monorepo#976
Draft
stipsan wants to merge 46 commits into
Draft
feat(shopify-assets): migrate sanity-plugin-shopify-assets to monorepo#976stipsan wants to merge 46 commits into
stipsan wants to merge 46 commits into
Conversation
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
feat: strict schema support
…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.
…rated by scaffold
- 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 detectedLatest commit: 0cccf18 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
sanity-plugin-shopify-assetsinto the monorepo using thecopy plugingenerator (git subtree preserves full history).What changed
pnpm generate "copy plugin"and scaffolded monorepo config (package.json,package.config.ts,tsconfig.json,tsconfig.build.json,vitest.config.ts)@sanity/uiv3 (catalog):getTheme_v2theme API instead of the deprecated legacy theme,gapinstead of deprecatedspacepropsReactdefault imports, removed unsafeas Assetassertions by typing the input asObjectInputProps<Asset>, derived the picker config error during render instead ofsetStatein an effect, removed staleeslint-disablecomments and dead codeshopify.assetoptionsoptional in the type augmentation so the documented plugin-levelshopifyDomainconfiguration type-checks@types/video.jssovideo.js@7imports type-check;rxjsnow from catalogdev/test-studio/src/shopify-assets) with both plugin-level and field-levelshopifyDomain, registered in the kitchen-sink workspacecatalog:specifiers indev/test-studio/package.jsonthat the generator run had pinned to5.31.0Manual verification in test studio
Asset preview rendering (document seeded via API with a Shopify CDN asset value), exercising the migrated
getTheme_v2styling,InfoLinefilename 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
npm trust github sanity-plugin-shopify-assets --file=release.yml --repository=sanity-io/pluginspackage.jsondependencies/peerDependencies/exports verified against original repopnpm dev)pnpm format,pnpm knip,pnpm lint,pnpm build,pnpm test runall passMaintainer follow-up
# [This plugin has moved](https://github.com/sanity-io/plugins/tree/main/plugins/sanity-plugin-shopify-assets)shopify-assetsTo show artifacts inline, enable in settings.