feat(workbench): setup#907
Conversation
|
Claude finished @gu-stav's task in 3m 58s —— View job Claude PR Review
Reviewing only the high-signal issues — this is a 100-file feature branch made up of many sub-PRs that were merged in over time, so most code has already been reviewed in those individual PRs. The findings below are the things I'd want addressed before this lands on Bugs / logic issues1. Workbench lock leaks if The lock is acquired at line 77, but the work between then and the
When any of these throws, the lock file stays on disk. The error then propagates out of It self-heals on the next 2. Org-ID failure crashes
3. const resolvedPath = resolve(workDir, iconPath)
const pathRelativeToWorkDir = relative(workDir, resolvedPath)
if (pathRelativeToWorkDir.startsWith('..')) { throw … }On Windows, 4. The template always emits 5. In Test coverage
Changeset issuesThe
Many other entries start with Minor
|
📦 Bundle Stats —
|
| Metric | Value | vs main (cd110e7) |
|---|---|---|
| Internal (raw) | 2.1 KB | +8 B, +0.4% |
| Internal (gzip) | 801 B | +2 B, +0.3% |
| Bundled (raw) | 10.97 MB | +78 B, +0.0% |
| Bundled (gzip) | 2.06 MB | +19 B, +0.0% |
| Import time | 836ms | +15ms, +1.8% |
bin:sanity
| Metric | Value | vs main (cd110e7) |
|---|---|---|
| Internal (raw) | 1023 B | - |
| Internal (gzip) | 486 B | - |
| Bundled (raw) | 9.84 MB | - |
| Bundled (gzip) | 1.77 MB | - |
| Import time | 2.27s | +339ms, +17.5% |
🗺️ 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 (cd110e7c)
| Metric | Value | vs main (cd110e7) |
|---|---|---|
| Internal (raw) | 99.5 KB | +2.5 KB, +2.6% |
| Internal (gzip) | 23.4 KB | +657 B, +2.8% |
| Bundled (raw) | 21.64 MB | +2.2 KB, +0.0% |
| Bundled (gzip) | 3.43 MB | +676 B, +0.0% |
| Import time | 801ms | +9ms, +1.2% |
🗺️ 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 (cd110e7c)
| Metric | Value | vs main (cd110e7) |
|---|---|---|
| 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.
Coverage Delta
Comparing 42 changed files against main @ Overall Coverage
|
Preview this PR with pkg.pr.newRun the Sanity CLInpx https://pkg.pr.new/sanity-io/cli/@sanity/cli@d73d551 <command>...Or upgrade project dependencies📦
|
770d32d to
f7b42c8
Compare
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
|
The axios security warning will be resolved by module-federation/core#4644 I think |
|
Rebased onto |
ffc8344 to
f2b1294
Compare
5e50a1d to
1e221bd
Compare
16e7dfe to
319ef83
Compare
905b492 to
cf3839a
Compare
Co-authored-by: Josh <joshua.ellis18@gmail.com> fix(workbench): allow for a dynamic port (#830)
) * feat(dev): forward CLI config organization id to workbench runtime * chore: update auto-generated changeset for PR #905 --------- Co-authored-by: ecospark[bot] <ecospark[bot]@users.noreply.github.com>
Co-authored-by: Gustav Hansen <gustav.hansen@sanity.io>
…913) Pass `reactRefreshHost` to `@vitejs/plugin-react` so federated Studio modules connect their react-refresh preamble to the workbench host, enabling component-level HMR across the module federation boundary. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(workbench): externalize sanity and @sanity/workbench * chore: update auto-generated changeset for PR #971 * chore: exclude .github from oxfmt format check Co-authored-by: Gustav Hansen <gu-stav@users.noreply.github.com> * fix: revert update changeset --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Gustav Hansen <gu-stav@users.noreply.github.com>
Co-authored-by: Gustav Hansen <gu-stav@users.noreply.github.com> Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
* feat(init): add promt for federation * chore: update auto-generated changeset for PR #988 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
* fix: types * chore: update auto-generated changeset for PR #989 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(workbench): extend local application payloads * fix: types * fix: pr feedback * chore: improve tests * fix: concise * fix: pr feedback
* feat(init): use `workbench` dist-tag for `sanity` package * chore: update auto-generated changeset for PR #992 * test: add unit tests --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
* fix(init): do not resolve dist tags * chore: update auto-generated changeset for PR #1000 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
* feat(dev): extract studio manifest and pass it for local applications * chore: update auto-generated changeset for PR #997 * fix: rework to use manifests for both * chore: update auto-generated changeset for PR #997 * fix: cleanup * chore: share cache dir constant * feat: extract manifest in background * fix: path resolution on windows * fix: pr feedback * fix: pr feedback --------- Co-Authored-By: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
* fix(workbench): remove warmup for dependencies * chore: update auto-generated changeset for PR #1047 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
Adds `--federation` / `--no-federation` flag to `sanity init` and wires it through `initAction` so the value is passed to `initApp` / `initStudio` alongside the federation prompt added in #988. The flag plumbing was previously part of the rebase merge that resolved feat/workbench against main, and was dropped in the latest rebase.
* fix(workbench): prune stale lock files * fix: add back * chore: update auto-generated changeset for PR #1057 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(workbench): detect PID reuse on Windows via PowerShell * chore: update auto-generated changeset for PR #1067 * chore(changeset): rewrite changeset summary as user-facing description Co-authored-by: Rune Botten <runeb@users.noreply.github.com> * chore: update auto-generated changeset for PR #1067 --------- Co-authored-by: squiggler-app[bot] <265501495+squiggler-app[bot]@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Rune Botten <runeb@users.noreply.github.com>
After rebasing onto main: - buildStudio.ts: plumb `federation` through `InternalBuildOptions` so the `!options.federation?.enabled` guard and the `federation` prop passed to `buildStaticFiles` resolve. Mirrors the same plumbing already done in buildApp.ts during the rebase. - buildStaticFiles.test.ts: `copyDir`/`writeFavicons` moved to `@sanity/cli-build/_internal` in main's #1062 refactor — point the mock at the new path. - startStudioDevServer.test.ts: `checkStudioDependencyVersions` moved to `@sanity/cli-build/_internal`; `getLocalPackageVersion` moved to `@sanity/cli-core` (main's #1062 and #1053). Update mocks accordingly.
Fix stale plugin mock paths and align typegen test assertions with the app dev server output.
# Conflicts: # packages/@sanity/cli/src/actions/manifest/extractManifest.ts # packages/@sanity/cli/src/commands/manifest/extract.ts
Description
Note
Please ignore this PR. It's just open to have visibility into the state of the feature branch.
What to review
Testing
Notes for release