Moved 29 base-level and first-party deps into the pnpm catalog#27886
Conversation
- 28 deps were already declared at the same version across 2-3 workspaces and were prime candidates for centralization (mocha, chai, msw, @types/jest, @types/express, @types/validator, storybook + 3 storybook plugins, react-router, cross-fetch, fs-extra, jsonc-parser, dotenv, dompurify, @tryghost/logging plus 10 other @tryghost/* first-party packages) - @vitest/coverage-v8 was drifted across 8 workspaces (4.1.5 / 4.1.2); unified all consumers on 4.1.5 to match @vitest/coverage-v8 tracking vitest itself, then catalogized in the same step - selection rule: catalog deps that are either base-level functionality (test runners, routing, build/config helpers) or in the @TryGhost first-party namespace (alignment matters more for in-house packages); kept the same drifted-cohort exclusions as the existing eslint9 named catalog (react/tailwind/etc. remain split)
WalkthroughThis PR centralizes dependency version management across the Ghost monorepo by migrating package.json files from pinned semver versions to catalog-sourced references. The pnpm-workspace.yaml catalog defines all pinned versions for Storybook packages, Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm-workspace.yaml`:
- Line 36: The catalog pins vitest to 4.1.2 while `@vitest/coverage-v8`@4.1.5
requires vitest@4.1.5 as a peer; update the pinned vitest entry in the pnpm
workspace/catalog to 4.1.5 so the peer dependency is satisfied (locate the
vitest version string in pnpm-workspace.yaml and change the version from 4.1.2
to 4.1.5), then run the lockfile install/update to regenerate the lockfile.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ea70ae15-374a-4642-badd-88aa0d823e27
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
apps/activitypub/package.jsonapps/admin-x-design-system/package.jsonapps/admin-x-framework/package.jsonapps/admin-x-settings/package.jsonapps/admin/package.jsonapps/announcement-bar/package.jsonapps/comments-ui/package.jsonapps/portal/package.jsonapps/posts/package.jsonapps/shade/package.jsonapps/signup-form/package.jsonapps/sodo-search/package.jsonapps/stats/package.jsone2e/package.jsonghost/admin/package.jsonghost/core/package.jsonghost/i18n/package.jsonghost/parse-email-address/package.jsonpackage.jsonpnpm-workspace.yaml
| '@types/validator': 13.15.10 | ||
| '@typescript-eslint/parser': 8.49.0 | ||
| '@vitejs/plugin-react': 4.7.0 | ||
| '@vitest/coverage-v8': 4.1.5 |
There was a problem hiding this comment.
❓ Verification inconclusive
Script executed:
#!/bin/bash
set -euo pipefail
echo "coverage-v8@4.1.5 peerDependencies:"
curl -s https://registry.npmjs.org/@vitest%2Fcoverage-v8/4.1.5 | jq '.peerDependencies'
echo
echo "vitest@4.1.2 version payload:"
curl -s https://registry.npmjs.org/vitest/4.1.2 | jq '{name, version}'Repository: TryGhost/Ghost
Repository: TryGhost/Ghost
Exit code: 0
stdout:
coverage-v8@4.1.5 peerDependencies:
{
"vitest": "4.1.5",
"@vitest/browser": "4.1.5"
}
vitest@4.1.2 version payload:
{
"name": "vitest",
"version": "4.1.2"
}
Fix Vitest version mismatch in catalog.
@vitest/coverage-v8@4.1.5 declares vitest@4.1.5 as a peer dependency (per npm registry), but the catalog pins vitest to 4.1.2. Update vitest to 4.1.5 to satisfy the peer dependency constraint and prevent coverage failures.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pnpm-workspace.yaml` at line 36, The catalog pins vitest to 4.1.2 while
`@vitest/coverage-v8`@4.1.5 requires vitest@4.1.5 as a peer; update the pinned
vitest entry in the pnpm workspace/catalog to 4.1.5 so the peer dependency is
satisfied (locate the vitest version string in pnpm-workspace.yaml and change
the version from 4.1.2 to 4.1.5), then run the lockfile install/update to
regenerate the lockfile.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27886 +/- ##
=======================================
Coverage 73.81% 73.81%
=======================================
Files 1519 1519
Lines 128185 128185
Branches 15352 15352
=======================================
Hits 94615 94615
Misses 32616 32616
Partials 954 954
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Adds 29 dependencies to the default `catalog:` block in `pnpm-workspace.yaml`, following the precedent set by #27876. Selection criterion: deps that are either base-level functionality (test runners, routing, build/config helpers) or in the @TryGhost first-party namespace (alignment matters more for in-house packages).
* `@vitest/coverage-v8` was drifted across 8 workspaces (4.1.5 in admin-x-framework/posts/stats; 4.1.2 in announcement-bar/comments-ui/portal/shade/sodo-search). Bumped all consumers to 4.1.5 to track `vitest` itself, then catalogized in the same step.
Why
No resolved versions change (except the deliberate vitest-coverage bump)
Every catalog entry except `@vitest/coverage-v8` matches the version every consuming workspace already had pinned. The vitest-coverage bump is 5 workspaces moving from 4.1.2 → 4.1.5 (patch-level, same major/minor as the cohort already on 4.1.5).
Out of scope