chore(calm-suite): migrate calm-studio to npm workspaces#2408
Open
gjs-opsflo wants to merge 2 commits intofinos:mainfrom
Open
chore(calm-suite): migrate calm-studio to npm workspaces#2408gjs-opsflo wants to merge 2 commits intofinos:mainfrom
gjs-opsflo wants to merge 2 commits intofinos:mainfrom
Conversation
- Add calm-suite/calm-studio (orchestration root) and all sub-packages/apps to root npm workspaces: - calm-suite/calm-studio - calm-suite/calm-studio/packages/* (calm-core, extensions, mcp-server, github-action, vscode-extension, web-component, calmscript) - calm-suite/calm-studio/apps/* (studio) - calm-suite/calm-studio/docs-site - Convert all 9 workspace:* references to file: relative paths (apps/studio, packages/github-action, packages/mcp-server, packages/vscode-extension, packages/web-component dependencies) - Remove "packageManager: pnpm@..." from migrated package.json files - Merge pnpm.overrides into root package.json overrides - Align extensions vitest from ^4.1.0 to ^3.2.4 + @vitest/coverage-v8 to ^3.2.4 (pnpm strict isolation hid the version drift; npm requires alignment to single hoisted version) - Fix apps/studio/vite.config.ts to import defineConfig from 'vitest/config' instead of 'vite' (test field was incompatible with vite's UserConfigExport type) - Update apps/studio/src-tauri/tauri.conf.json beforeDevCommand/beforeBuildCommand to use "npm run dev"/"npm run build" instead of "pnpm dev"/"pnpm build" - Delete calm-suite/calm-studio/pnpm-workspace.yaml and pnpm-lock.yaml - Rewrite three CI workflows to use npm: - build-calm-studio.yml: actions/setup-node with cache: npm, npm ci, npm run --workspace=... --if-present for build/lint/typecheck/test across all 8 packages - build-calm-studio-desktop.yml: same setup pattern; tauriScript "npm run tauri --workspace=@calmstudio/studio" - automated-release-calm-studio.yml: npm-based bootstrap before multi-semantic-release - Regenerate root package-lock.json (single source of truth) Independent of finos#2407 (calm-guard half). Lockfile and root package.json overlap with finos#2407 will need rebase on whichever PR merges second. Refs finos#2328 (calm-studio half). Signed-off-by: Gourav Shah <gjs@opsflow.sh>
Sweep calm-studio README, AGENTS.md, package READMEs, and the docs-site for pnpm references and replace them with npm workspace equivalents. - calm-studio/README.md and AGENTS.md: install/build/test/dev commands rewritten as npm with --workspace=@calmstudio/... - calm-studio/packages/calm-core/README.md: install instructions - calm-studio/docs-site/docs/getting-started/quick-start.md: prereqs + commands - calm-studio/docs-site/docs/developer-guide/contributing.md: install + check suite - calm-studio/docs-site/docs/developer-guide/extension-packs.md: pack scaffolding commands - calm-studio/docs-site/docs/adrs/0008-docusaurus-for-documentation.md: update consequences note about workspace integration Refs finos#2328. Signed-off-by: Gourav Shah <gjs@opsflow.sh>
6 tasks
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.