Skip to content

Unified @types/node on 22.19.17 and moved into the pnpm catalog#27889

Merged
9larsons merged 1 commit into
mainfrom
deps-unify-types-node
May 14, 2026
Merged

Unified @types/node on 22.19.17 and moved into the pnpm catalog#27889
9larsons merged 1 commit into
mainfrom
deps-unify-types-node

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

Summary

Six workspaces declared `@types/node` at two different majors:

Version Workspaces
`22.19.17` `admin-x-settings`, `shade`, `stats`, `ghost/core`
`25.6.0` `admin`, `parse-email-address`

Pinned all six to 22.19.17 and moved the entry into the default catalog.

Why 22 (not 25)

Ghost CI runs Node 22.18.0 (LTS). `@types/node` should match the runtime — types ahead of runtime risk autocomplete suggesting APIs that throw at runtime, and tsc happily compiling code that fails at execution.

Verification

  • `pnpm install` clean.
  • `tsc --noEmit` passes on both downgraded packages (`apps/admin` via root tsconfig, `ghost/parse-email-address` via its `test:types` script). Confirms neither was using v25-only declarations.
  • `pnpm nx build @tryghost/admin-x-settings` succeeds.

Why catalog

Six workspaces is well above the 3+ threshold; centralizing means future Node-version bumps update one entry instead of six, and prevents the same drift recurring.

- six workspaces declared @types/node, drifted across 22.19.17 (4 ws) and 25.6.0 (2 ws)
- pinned to 22.19.17 to match the Node 22.18.0 LTS that CI runs against; declaring types ahead of the actual runtime risks autocomplete suggesting APIs that throw at runtime
- bumped apps/admin and ghost/parse-email-address from 25.6.0 down to 22.19.17; tsc --noEmit passes cleanly on both, confirming neither was using v25-only declarations
- catalogized so future bumps land in one place and stay aligned with the runtime
@9larsons 9larsons requested a review from EvanHahn as a code owner May 14, 2026 01:27
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6c0f3653-2304-425a-b309-e6cd710a1897

📥 Commits

Reviewing files that changed from the base of the PR and between c5aa8c4 and 7edc0a2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • apps/admin-x-settings/package.json
  • apps/admin/package.json
  • apps/shade/package.json
  • apps/stats/package.json
  • ghost/core/package.json
  • ghost/parse-email-address/package.json
  • pnpm-workspace.yaml

Walkthrough

This pull request consolidates @types/node version management across the monorepo by introducing a pnpm workspace catalog entry and migrating six packages to reference it. The catalog is defined in pnpm-workspace.yaml with version 22.19.17 as the canonical version. Six package.json files in apps/admin-x-settings, apps/admin, apps/shade, apps/stats, ghost/core, and ghost/parse-email-address replace their pinned or misaligned @types/node versions with catalog: references, eliminating duplicate version declarations.

Possibly related PRs

  • TryGhost/Ghost#27870: Updates publish workflow to rewrite catalog: references before publishing, ensuring catalog-managed dependencies are resolved correctly in distributed packages.

Suggested reviewers

  • EvanHahn
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: unifying @types/node to version 22.19.17 and centralizing it in the pnpm catalog.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the rationale, verification steps, and reasoning for using the catalog approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deps-unify-types-node

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.80%. Comparing base (c5aa8c4) to head (7edc0a2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #27889   +/-   ##
=======================================
  Coverage   73.80%   73.80%           
=======================================
  Files        1519     1519           
  Lines      128187   128187           
  Branches    15354    15354           
=======================================
  Hits        94613    94613           
+ Misses      32642    32620   -22     
- Partials      932      954   +22     
Flag Coverage Δ
admin-tests 53.46% <ø> (+0.02%) ⬆️
e2e-tests 73.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons 9larsons enabled auto-merge (squash) May 14, 2026 01:51
@9larsons 9larsons merged commit 74aa985 into main May 14, 2026
46 checks passed
@9larsons 9larsons deleted the deps-unify-types-node branch May 14, 2026 01:51
@coderabbitai coderabbitai Bot mentioned this pull request May 14, 2026
2 tasks
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.

1 participant