Skip to content

fix(workbench): drop @sanity/federation from federated-studio#1375

Merged
gu-stav merged 1 commit into
mainfrom
chore/federated-studio-drop-federation
Jun 24, 2026
Merged

fix(workbench): drop @sanity/federation from federated-studio#1375
gu-stav merged 1 commit into
mainfrom
chore/federated-studio-drop-federation

Conversation

@gu-stav

@gu-stav gu-stav commented Jun 24, 2026

Copy link
Copy Markdown
Member

Description

The federated-studio fixture pulled in @sanity/federation solely for unstable_defineApp. After the workbench refactor that helper is re-exported from sanity/cli (the same import the init scaffolding now generates), so the fixture can source it from there.

Dropping the dep also stops the fixture from pinning an older @module-federation/vite transitively — clearing the path for the Renovate bump in #1365 to leave a single resolved version in the lockfile.

What to review

fixtures/federated-studio/sanity.cli.ts now imports unstable_defineApp from sanity/cli; @sanity/federation is removed from the fixture's package.json and the lockfile.

Testing

Exercised by the existing build.studio integration test and the dev.workbench e2e test, both of which run against this fixture. Fixture typechecks clean against the new import.


Note

Low Risk
Fixture-only dependency and import path change with no production runtime logic changes.

Overview
The federated-studio fixture no longer depends on @sanity/federation. It now imports unstable_defineApp alongside defineCliConfig from sanity/cli, matching current init scaffolding after the workbench refactor.

Removing the package also drops transitive @module-federation/vite resolution from this fixture’s lockfile slice, avoiding a duplicate pinned version alongside broader dependency bumps.

Reviewed by Cursor Bugbot for commit 4f366db. Bugbot is set up for automated code reviews on this repo. Configure here.

Its only use was unstable_defineApp, which the workbench refactor now
re-exports from sanity/cli. Removing it also stops the fixture pinning an
older @module-federation/vite transitively.
@gu-stav gu-stav requested a review from a team as a code owner June 24, 2026 09:04
@gu-stav gu-stav changed the title chore(fixtures): drop @sanity/federation from federated-studio fix(workbench): drop @sanity/federation from federated-studio Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Stats — @sanity/cli

Compared against main (8d59d3b3)

@sanity/cli

Metric Value vs main (8d59d3b)
Internal (raw) 2.7 KB -
Internal (gzip) 1.0 KB -
Bundled (raw) 11.16 MB -
Bundled (gzip) 2.10 MB -
Import time 911ms -1ms, -0.2%

bin:sanity

Metric Value vs main (8d59d3b)
Internal (raw) 782 B -
Internal (gzip) 423 B -
Bundled (raw) 9.87 MB -
Bundled (gzip) 1.78 MB -
Import time 2.06s -35ms, -1.7%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — @sanity/cli-core

Compared against main (8d59d3b3)

Metric Value vs main (8d59d3b)
Internal (raw) 106.7 KB -
Internal (gzip) 26.7 KB -
Bundled (raw) 21.72 MB -
Bundled (gzip) 3.46 MB -
Import time 808ms +1ms, +0.1%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — create-sanity

Compared against main (8d59d3b3)

Metric Value vs main (8d59d3b)
Internal (raw) 908 B -
Internal (gzip) 483 B -
Bundled (raw) 931 B -
Bundled (gzip) 491 B -
Import time ❌ ChildProcess denied: node -
Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@gu-stav gu-stav requested a review from joshuaellis June 24, 2026 09:05
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Delta

No covered files changed in this PR.

Overall Coverage

Metric Coverage
Statements 74.2% (±0%)
Branches 64.2% (±0%)
Functions 69.0% (±0%)
Lines 74.8% (±0%)

@gu-stav gu-stav merged commit a5ce635 into main Jun 24, 2026
98 of 103 checks passed
@gu-stav gu-stav deleted the chore/federated-studio-drop-federation branch June 24, 2026 10:58
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