chore(calm-suite): migrate calm-studio to npm workspaces#2408
Open
gjs-opsflo wants to merge 4 commits into
Open
chore(calm-suite): migrate calm-studio to npm workspaces#2408gjs-opsflo wants to merge 4 commits into
gjs-opsflo wants to merge 4 commits into
Conversation
This was referenced May 4, 2026
aamanrebello
previously approved these changes
May 8, 2026
…-workspaces # Conflicts: # .github/workflows/automated-release-calm-studio.yml # .github/workflows/build-calm-studio-desktop.yml # .github/workflows/build-calm-studio.yml # calm-suite/calm-studio/pnpm-lock.yaml # package-lock.json # package.json
The Playwright webServer was still spawning the dev server with pnpm, but the runner has no pnpm after the npm-workspaces migration. Use npm run dev so the e2e CI job can start the server. Signed-off-by: Matthew Bain <66839492+rocketstack-matt@users.noreply.github.com>
Under npm workspaces, @sveltejs/kit (and friends) install at calm-suite/calm-studio/node_modules rather than at apps/studio/node_modules, which is outside Vite's default fs.allow root. Without this, Playwright's dev server boots but every page request fails with 'outside of Vite serving allow list', and all 14 e2e tests fail with timeouts on the first locator. Signed-off-by: Matthew Bain <66839492+rocketstack-matt@users.noreply.github.com>
Member
|
This had been left for a while with conflicts so I've fixed them up - given both @gjs-opsflo and myself have touched it, can @opsflowanoop @eddie-knight @jpgough-ms or @markscott-ms as other codeowners of calm-studio please review |
markscott-ms
pushed a commit
that referenced
this pull request
May 10, 2026
Removes the calmstudio-docs entry from root package.json workspaces (added by #2408) now that its content lives in the main docs site (see previous commit). Regenerates package-lock.json to drop the calmstudio-docs package and its transitive dependencies. Note: calm-suite/calm-studio/pnpm-workspace.yaml was already cleaned up in Phase 2 (d446522). No --filter '!calmstudio-docs' existed in build-calm-studio.yml on the Phase 2 branch (it was rewritten to use npm --workspace flags). Resolves #2331 (with previous commit). Signed-off-by: Gourav Shah <gjs@opsflow.sh>
# Conflicts: # package-lock.json # package.json
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.
Summary
Migrates
calm-suite/calm-studio(orchestration root + 7 packages + 1 SvelteKit/Tauri app + Docusaurus docs site) from a standalone pnpm workspace into the root npm workspaces. Second half of the pnpm→npm migration tracked by #2328 — companion to PR #2407 (calm-guard).Resolves #2328 (calm-studio portion).
Relationship to PR #2407 (calm-guard)
Independent of PR #2407. Lockfile and root
package.jsonoverlap:calm-suite/calm-studio(and globs for sub-packages/apps + docs-site)calm-suite/calm-guardandcalm-suite/calm-guard/docsWhichever PR merges second will need a trivial rebase (lockfile + workspaces array merge). No logical conflicts.
Changes
Workspaces
package.jsonworkspacesarray gains:calm-suite/calm-studio(orchestration root, declared ascalmstudio-workspace)calm-suite/calm-studio/packages/*(7 packages)calm-suite/calm-studio/apps/*(studio app)calm-suite/calm-studio/docs-site(Docusaurus docs)Internal dependency conversion (9 occurrences)
All
workspace:*references converted tofile:relative paths matching repo convention:apps/studio@calmstudio/calm-corefile:../../packages/calm-coreapps/studio@calmstudio/extensionsfile:../../packages/extensionspackages/github-action@calmstudio/calm-corefile:../calm-corepackages/github-action@calmstudio/mcpfile:../mcp-serverpackages/mcp-server(deps + devDeps)@calmstudio/calm-corefile:../calm-corepackages/vscode-extension@calmstudio/mcpfile:../mcp-serverpackages/web-component@calmstudio/calm-corefile:../calm-corepackages/web-component@calmstudio/extensionsfile:../extensionsVitest version alignment
packages/extensionshadvitest@^4.1.0and@vitest/coverage-v8@^4.1.0; all sibling packages used^3.x. pnpm's strict isolation hid the divergence; npm hoisting needs a single version. Aligned both to^3.2.4.Tauri / Vite config
apps/studio/src-tauri/tauri.conf.json:pnpm dev/pnpm build→npm run dev/npm run build.apps/studio/vite.config.ts: importdefineConfigfrom'vitest/config'(was'vite') so thetestfield typechecks. This was a latent bug.Removed
pnpmpackageManagerfield from migrated package.json files.pnpm.overridesblocks (merged into rootoverrides).calm-suite/calm-studio/pnpm-workspace.yaml.calm-suite/calm-studio/pnpm-lock.yaml.CI workflows
Three workflows rewritten:
.github/workflows/build-calm-studio.yml: removesdefaults.run.working-directory, switches toactions/setup-nodewithcache: npmandcache-dependency-path: package-lock.json, replacespnpm install --frozen-lockfilewithnpm ci, replacespnpm <script>withnpm run <script> --if-present --workspace=@calmstudio/<pkg>. Build runs for all 8 packages; lint/typecheck/test scoped to packages with the relevant scripts..github/workflows/build-calm-studio-desktop.yml: same npm setup;tauriScriptbecomesnpm run tauri --if-present --workspace=@calmstudio/studio..github/workflows/automated-release-calm-studio.yml: npm-based bootstrap beforemulti-semantic-release.Lockfile
Root
package-lock.jsonregenerated from a cleannpm install. Single source of truth.Docs sweep
Separate commit (
docs(calm-suite): instruct npm usage instead of pnpm...) updatescalm-studio/README.md,AGENTS.md,packages/calm-core/README.md, and the Docusaurus docs site (getting-started/quick-start.md,developer-guide/contributing.md,developer-guide/extension-packs.md,adrs/0008-docusaurus-for-documentation.md).Validation evidence
Local validation from a clean checkout (run from repo root):
rm -rf node_modules && CYPRESS_INSTALL_BINARY=0 npm ci— exits 0, noEUNSUPPORTEDPROTOCOL.calmstudio), calmscript.! rg 'pnpm' calm-suite/calm-studio/ -g '*.md' -g '*.mdx' -g 'package.json' -g '!**/node_modules/**'— zero matches.! rg 'workspace:' calm-suite/calm-studio/ -g 'package.json' -g '!**/node_modules/**'— zero matches.! rg "require\.resolve\(['\"]@" calm-suite/calm-studio/ -g '!**/node_modules/**' -g '!**/dist/**'— zero matches (no webpack-static-analysis traps to fix in calm-studio source).CI on this PR will run the rewritten Build CALM Studio workflow (build/lint/typecheck/test for the workspaces with the relevant scripts) and the desktop + release workflows (paths trigger only). All three must be green before merge.
Breaking-change notes
pnpmis no longer the package manager for calm-studio. Contributors must runnpm cifrom the repo root (notpnpm installinsidecalm-suite/calm-studio/).calm-suite/calm-studio/package.json(namedcalmstudio-workspace) is now an npm workspace member;npm run --workspaces --if-presentfrom the root fans out to the calm-studio orchestration scripts.package-lock.json.Out of scope (follow-up)
@calmstudio/diagramand@calmstudio/studio— pre-existing TS strictness errors that origin/main CI never ran. Not blocking; addressed separately if desired.