Repository navigation
refactor: remove @sanity/themer-legacy - #3070
Conversation
@sanity/themer-legacy is developed and published from sanity-io/themer. Remove its `themerTool` from the studio together with the `@sanity/themer-legacy` dependency, instead of installing it from npm. The legacy docs schemas and the docs export script stay.
@sanity/themer-legacy is developed and published from sanity-io/themer. Remove packages/themer-legacy (with its react-compiler typings) and drop it from the build and test scripts, knip, pkg.pr.new and the docs. Nothing left in ui depends on it, so there is no catalog entry for it, and every catalog entry it used still has another user. Release config: the pending oxc-transform-react changeset no longer lists the package, so the next Version Packages PR only bumps @sanity/ui, and .changeset/config.json drops bumpVersionsWithWorkspaceProtocolOnly, which #2960 added only to keep Changesets from rewriting this package's deliberate @sanity/ui ^4 range. No other package uses a non-workspace range, so the remaining releases are unaffected. ui's Storybook has no themer stories and gets no themer ref.
…gacy-from-ui-3adf
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…gacy-from-ui-3adf # Conflicts: # .changeset/dependencies-GH-3065.md # pnpm-lock.yaml
Renovate's changeset for the sanity ^6.17.0 bump (#3069) only lists @sanity/themer-legacy, which this branch removes (@sanity/ui doesn't depend on sanity). Like the deleted oxc-transform-react changeset, it would otherwise make ui release a package that now lives in sanity-io/themer, and Changesets fails on a changeset for a package outside the workspace.
…gacy-from-ui-3adf
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The transferred package and all corresponding workspace, Studio, release, build, test, lockfile, and documentation references are consistently removed.
Review effort: Balanced
Findings: None
What changed in this PR
Removes @sanity/themer-legacy after its ownership moved to sanity-io/themer, eliminating the local package and Studio integration.
Changes:
- Deletes the complete legacy package implementation and tests.
- Removes Studio, build, test, preview-publishing, lockfile, and release configuration references.
- Updates repository documentation to identify the package’s new home.
| File | Description |
|---|---|
.changeset/config.json |
Removes the package-specific version-bumping workaround. |
.changeset/dependencies-GH-3062.md |
Normalizes quote formatting. |
.github/workflows/pkg-pr-new.yml |
Stops publishing package previews. |
AGENTS.md |
Documents the external package location and revised tooling. |
CONTRIBUTING.md |
Removes the package from testing guidance. |
README.md |
Updates ownership and test documentation. |
apps/studio/package.json |
Removes the workspace dependency. |
apps/studio/sanity.config.ts |
Removes the legacy Themer Studio plugin. |
knip.jsonc |
Removes the deleted package’s exception. |
package.json |
Drops the package from root build and test scripts. |
packages/themer-legacy/CHANGELOG.md |
Removes package release history. |
packages/themer-legacy/README.md |
Removes package documentation. |
packages/themer-legacy/package.json |
Removes the package manifest. |
packages/themer-legacy/src/generator/__fixtures__/hosted.ts |
Removes hosted-service fixtures. |
packages/themer-legacy/src/generator/applyHues.ts |
Removes hue-default merging logic. |
packages/themer-legacy/src/generator/createTheme.ts |
Removes the public theme generator. |
packages/themer-legacy/src/generator/createTonesFromHues.ts |
Removes tint generation logic. |
packages/themer-legacy/src/generator/defaults.ts |
Removes default theme exports. |
packages/themer-legacy/src/generator/dropUndefined.ts |
Removes the hue cleanup helper. |
packages/themer-legacy/src/generator/legacy.test.ts |
Removes generator compatibility tests. |
packages/themer-legacy/src/generator/palette.ts |
Removes the vendored legacy palette. |
packages/themer-legacy/src/generator/parseHuesFromSearchParams.ts |
Removes URL parameter parsing. |
packages/themer-legacy/src/generator/presets.ts |
Removes legacy theme presets. |
packages/themer-legacy/src/generator/themeFromHues.ts |
Removes legacy theme construction. |
packages/themer-legacy/src/generator/types.ts |
Removes generator API types. |
packages/themer-legacy/src/index.ts |
Removes the package entry point. |
packages/themer-legacy/src/lib/mix.test.ts |
Removes color-mixing tests. |
packages/themer-legacy/src/lib/mix.ts |
Removes color-mixing utilities. |
packages/themer-legacy/src/tool/HueFields.tsx |
Removes hue editor controls. |
packages/themer-legacy/src/tool/ThemerLayout.tsx |
Removes the Studio preview layout. |
packages/themer-legacy/src/tool/ThemerNavbar.tsx |
Removes the navbar integration. |
packages/themer-legacy/src/tool/ThemerSidebar.tsx |
Removes the editor sidebar. |
packages/themer-legacy/src/tool/TintStrip.tsx |
Removes tint preview controls. |
packages/themer-legacy/src/tool/context.ts |
Removes shared tool state. |
packages/themer-legacy/src/tool/hues.test.ts |
Removes hue utility tests. |
packages/themer-legacy/src/tool/hues.ts |
Removes hue utilities. |
packages/themer-legacy/src/tool/huesReducer.test.ts |
Removes reducer tests. |
packages/themer-legacy/src/tool/huesReducer.ts |
Removes draft-state reduction logic. |
packages/themer-legacy/src/tool/index.ts |
Removes the tool entry point. |
packages/themer-legacy/src/tool/plugin.test.ts |
Removes plugin registration tests. |
packages/themer-legacy/src/tool/plugin.tsx |
Removes the Studio plugin definition. |
packages/themer-legacy/src/tool/storage.test.ts |
Removes draft-storage tests. |
packages/themer-legacy/src/tool/storage.ts |
Removes persisted draft handling. |
packages/themer-legacy/src/tool/theme.test.ts |
Removes preview-theme tests. |
packages/themer-legacy/tsconfig.json |
Removes TypeScript configuration. |
packages/themer-legacy/tsdown.config.mts |
Removes build configuration. |
packages/themer-legacy/typings/babel-plugin-react-compiler.d.ts |
Removes the compiler typing stub. |
packages/themer-legacy/vitest.config.ts |
Removes test configuration. |
pnpm-lock.yaml |
Removes package and Studio importer entries. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Running oxfmt on this branch rewrote the quotes in Renovate's .changeset/dependencies-GH-3062.md, which this PR has no reason to touch. Restore main's version so the PR changes no changeset file. The release plan is the same either way: @sanity/ui patch, from #3062.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The migrated package and all functional references are removed consistently, with its destination repository already merged.
Review effort: Balanced
Findings: None
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
@sanity/themer-legacyis developed and published from sanity-io/themer now that sanity-io/themer#379 has merged, and 0.2.2 has already been published from there. This PR removes it from ui completely, following the pattern of #3057.What changed
packages/themer-legacy, including itstypings/babel-plugin-react-compiler.d.ts.apps/studio): the themer-legacy tool and the@sanity/themer-legacydependency are gone entirely, not switched to the catalog. With refactor: remove @sanity/themer #3057, the studio no longer has any themer tools. The legacy docs schemas andscripts/export-docs-to-code.tsstay.@sanity/themer-legacy, so there's no catalog entry for it. Every catalog entry it used still has another user, so none were dropped..changeset/config.jsondropsbumpVersionsWithWorkspaceProtocolOnly. feat(themer-legacy): extract the legacy generator into @sanity/themer-legacy #2960 added it only to keep Changesets from rewriting this package's deliberate@sanity/ui^4range, and no other package uses a non-workspace range, so releases are unaffected..changeset/*.mdfile, and nothing ui publishes changes.changeset status --since=origin/mainlists no packages to bump.buildandtestscripts, knip andpkg-pr-new.ymldrop the package. oxlint, the workspace globs and the other workflows had no themer-legacy entries.@sanity/themer-legacylives in sanity-io/themer.autoDedupeon or off. Merges ofmaintookmain's lockfile and regenerated it rather than hand-merging it.Merge order with Version Packages (#3064)
Either order works now. #3064 bumps only
@sanity/uito 4.2.8, and the two PRs change no files in common. If #3064 merges first, ui'schangeset publishskips@sanity/themer-legacybecause its version onmain, 0.2.1, is already on npm.What you need to do
release.ymlmay still be registered for@sanity/themer-legacynext to sanity-io/themer's. You may want to remove it.bumpVersionsWithWorkspaceProtocolOnly: truefrom ui's config when they matched it. It does nothing there. Drop it in those repos if you want exact parity, or tell me to keep it in ui.ui-studioVercel deployment and the nextsanity deployof the hosted studio no longer include the themer-legacy tool.Verification
pnpm install --frozen-lockfilepasses on pnpm 12.8.1, and a non-frozen install leaves the lockfile unchanged.oxfmt --checkflags only.changeset/dependencies-GH-3062.md. That file stays byte-identical tomain, where it fails the same way, and CI runs no format check.