chore(deps): test @sanity/[email protected] - #3565
Draft
stipsan wants to merge 8 commits into
Draft
Conversation
Bump catalog, visual-editing, and standalone pins from 3.4.3 to 4.0.0-next.0, and add a pnpm override so transitive sanity/plugin deps resolve to the same prerelease for integration testing. Co-authored-by: Cody Olsen <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
9 Skipped Deployments
|
🦋 Changeset detectedLatest commit: ca8d2ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Also refresh visual-editing-standalone transitive pins pulled in by the new UI release (@sanity/color, motion/framer-motion, @sanity/types). Co-authored-by: Cody Olsen <[email protected]>
…oval @sanity/[email protected] removed the private @_visual-editing entrypoint; consumers should import from @sanity/ui instead now that displayName side effects no longer block tree-shaking. Co-authored-by: Cody Olsen <[email protected]>
Bump the catalog, visual-editing/standalone pins, and the pnpm override
to 4.0.0-next.5, then adopt the breaking changes introduced since next.3:
- next.5 moved heavy components to dedicated subpath entry points. Import
Menu/MenuButton/MenuItem/MenuGroup/MenuDivider from '@sanity/ui/menu',
Popover from '@sanity/ui/popover', Tooltip from '@sanity/ui/tooltip',
and Code from '@sanity/ui/code' across the packages and the studio app.
- next.5 ships static styles as a stylesheet consumers import themselves.
Add `import '@sanity/ui/styles.css'`:
- visual-editing: at the shared ThemeProvider host (Overlays), so every
JS entry point (and the standalone bundle + svelte wrapper) loads it.
The `smallest` treeshake preset drops side-effect-only imports, so
override `moduleSideEffects` to keep `.css` imports; mark the package
`sideEffects: ["*.css"]`.
- @repo/sanity-schema: at src/index.ts; mark `sideEffects: ["*.css"]`.
- studio: at sanity.config.ts.
- standalone bundles visual-editing, so it now bundles the stylesheet.
Add @tsdown/css and enable `css.inject` to extract a package-internal
style.css and preserve the import, keeping the package self-contained
(no external @sanity/ui dependency). Update the entry-point test for the
new `./style.css` asset export.
The standalone inlinedDependencies also drop @juggle/resize-observer,
removed upstream in next.4.
Co-authored-by: Cody Olsen <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Patch release ships styles.css unminified for easier cross-version diffs. No API changes; catalog, pins, and the pnpm override all move to next.6. Co-authored-by: Cody Olsen <[email protected]>
The repo-wide pnpm override forced 4.0.0-next.x into `sanity` and its prebuilt plugins (@sanity/assist, @sanity/vision, @sanity/color-input, ...), which are compiled against @sanity/ui@3 and import Autocomplete, Breadcrumbs, Menu, MenuButton, Popover, Tooltip, useToast and friends from the package root. next.5 moved those to subpath entry points, so the apps/studio build failed with [MISSING_EXPORT] on Vercel. Scope the prerelease to the packages actually under test. @sanity/visual-editing and -standalone keep their direct 4.0.0-next.6 pins since they render in the preview frame, while the catalog goes back to ^3.4.3: its only consumers are apps/studio and @repo/sanity-schema, which render inside the `sanity` React tree and so have to track whatever major `sanity` depends on. Co-authored-by: Cody Olsen <[email protected]>
Resolves three conflicts from the `@sanity/pkg-utils` v12 bump (#3567): - packages/visual-editing/package.config.ts: took main's version verbatim. v12 drops the `rollup.treeshake` block and replaces `babel.reactCompiler` + `reactCompilerOptions` with `reactCompiler`. This branch had added `moduleSideEffects: (id) => id.endsWith('.css')` inside that block purely to stop `preset: 'smallest'` from stripping the side-effect-only `import '@sanity/ui/styles.css'`. With the preset gone the default `moduleSideEffects: true` applies, so the workaround is obsolete — verified the built chunk still emits a bare `import "@sanity/ui/styles.css"`. - packages/visual-editing-standalone/package.json: kept both sides. Both had already moved `@sanity/types` to 6.6.0; only `@sanity/ui` differed, and this branch exists to test 4.0.0-next.6. - pnpm-lock.yaml: regenerated from main's copy via `pnpm install`. Main's `apps/page-builder-vite/vercel.json` (`ignoreCommand: exit 0`) also lands here, which should clear the unrelated page-builder-vite check. Co-authored-by: Cody Olsen <[email protected]>
Co-authored-by: Cody Olsen <[email protected]>
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.
Draft PR to validate compatibility with
@sanity/[email protected]. Merged up to date withmain(including the@sanity/pkg-utilsv12 bump, #3567).Scope
@sanity/ui@4is adopted by the two publishable packages that render in the preview frame, where they own their own React tree:@sanity/visual-editing@sanity/visual-editing-standaloneThe Studio side (
apps/studio,@repo/sanity-schema) stays on@sanity/ui@3. Those render inside thesanityReact tree, so they can only move oncesanityitself does. The pnpm catalog — whose only consumers are those two — therefore stays at^3.4.3, and there is no repo-wide@sanity/uioverride.Changes
@sanity/uito4.0.0-next.6invisual-editingandvisual-editing-standaloneMenu/MenuButton/MenuItem/MenuGroup/MenuDividerfrom@sanity/ui/menu,Popoverfrom@sanity/ui/popover,Tooltipfrom@sanity/ui/tooltipimport '@sanity/ui/styles.css'):@sanity/visual-editing: imported at the sharedThemeProviderhost (Overlays) so every JS entry point + the standalone bundle + the svelte wrapper load it; package markedsideEffects: ["*.css"]@sanity/visual-editing-standalone: added@tsdown/css+css.injectso the bundle emits a package-internalstyle.cssand keeps the import — stays self-contained, with no external@sanity/uidependency@sanity/ui/_visual-editingentrypointinlinedDependencies(drops@juggle/resize-observer, removed upstream in next.4)@sanity/visual-editingand@sanity/visual-editing-standaloneWhy the Studio stack stays on v3
An earlier revision forced
4.0.0-next.xon every package via a pnpm override. That broke theapps/studioVercel build:sanityand its prebuilt plugins (@sanity/assist,@sanity/vision,@sanity/color-input, …) are compiled against@sanity/ui@3and importAutocomplete,Breadcrumbs,Menu,MenuButton,Popover,Tooltip,useToastand friends from the package root, which next.5 moved to subpaths:Dropping the override lets those packages resolve their own
^3.4.xagain, sopnpm why @sanity/ui -rnow reports a clean split:Note on the pkg-utils v12 merge
@sanity/pkg-utils@12removes therollup.treeshakeblock frompackages/visual-editing/package.config.ts. This branch had addedmoduleSideEffects: (id) => id.endsWith('.css')inside that block purely to stoppreset: 'smallest'from stripping the side-effect-onlyimport '@sanity/ui/styles.css'. With the preset gone the defaultmoduleSideEffects: trueapplies, so that workaround is obsolete and has been dropped — the built chunk still emits a bareimport "@sanity/ui/styles.css".Verification
pnpm build,pnpm test(unit + typecheck) andpnpm lintall passapps/studiobuilds locally (sanity build, exit 0, 441 assets) — reverting just the dependency config reproduces the[MISSING_EXPORT]failure with exit 1, confirming the root causevisual-editing's built chunk keepsimport "@sanity/ui/styles.css", and the standalone bundle emitsdist/style.cssand imports it relatively (publintclean)pnpm exec changeset status --since=origin/mainvalidates the patch changeset4.0.0-next.6with the external stylesheetoverlays_after_merge_trimmed.mp4
To show artifacts inline, enable in settings.