Repository navigation
Conversation
ref #29710 A public app's version lives in two halves: defaults.json pins the major.minor line Ghost core serves from jsDelivr, and npm holds the patch number since patches auto-publish on merge to main. Its package.json version was a third copy of the line that nothing read as authoritative — the publish job overwrites it before building — so it could only ever drift, and check-app-version-bump existed solely to police that drift. The stale patch digits it carried (sodo-search 1.8.31 against npm's 1.8.231) also read as a bug to anyone outside the release flow. - compute-next-app-version reads the line from defaults.json and is addressed by package name rather than cwd; converted to ESM so it can share scripts/lib - release-apps bumps the line in defaults.json alone - removed check-app-version-bump and its CI step; the job it shared with the changeset check is renamed for what it now does - public app package.json versions are 0.0.0 placeholders - portal only defines REACT_APP_VERSION when the placeholder has been replaced, so a local build falls back to the version Ghost reports
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:integration |
✅ Succeeded | 3m 30s | View ↗ |
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 5m 49s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 4s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 55s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 49s | View ↗ |
nx run @tryghost/koenig-lexical:test:acceptance |
✅ Succeeded | 2m 32s | View ↗ |
nx run @tryghost/comments-ui:test:acceptance |
✅ Succeeded | 42s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 40s | View ↗ |
Additional runs (8) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-03 16:17:20 UTC
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughPublic app packages now use Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29718 +/- ##
==========================================
+ Coverage 75.42% 75.44% +0.02%
==========================================
Files 1609 1611 +2
Lines 141448 141824 +376
Branches 17486 17541 +55
==========================================
+ Hits 106691 107005 +314
- Misses 33683 33768 +85
+ Partials 1074 1051 -23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ref #29710 Three places name the CI gate "Check app version bump" while describing what it actually does — fail a PR that changes a publishable package with no changeset. Dropping the version-bump step renames the job to match, so point them at the new name.
ref #29710 Defaults-only releases do not appear as affected public app projects in Nx, so the publish matrix must also compare version lines with its base revision.
ref #29710 Comparing version lines against the Nx base reads defaults.json at that revision, and throwing when it can't be read puts a git failure — a base force-pushed away, a blob the treeless job_setup checkout can't fetch — in the one job every other job depends on. A transient failure there fails the entire run for the repo rather than just skipping a publish. Fall back to no comparison instead, which selects on the affected set alone: exactly what this script did before version lines were considered.

ref #29710
Problem
A public UMD app's version lives in two halves, and neither of them is the app's
package.json:defaults.jsonpins themajor.minorline, because Ghost core serves each app from<pkg>@~<major.minor>on jsDelivr.main.package.json'sversionwas a third copy of the line that nothing reads as authoritative — the publish job overwrites it withnpm pkg setbefore building. So it could only ever drift, andcheck-app-version-bump.jsexisted solely to police that drift on every PR.It had already drifted in a visible way. Every app still carried the patch digit it happened to have when auto-publishing landed, which reads as a bug from outside the release flow — sodo-search sat at
1.8.31in the repo against1.8.231on npm, which is what prompted #29710.Approach
Make
defaults.jsonthe single source of the version line, and reducepackage.json'sversionto a0.0.0placeholder.What changed
compute-next-app-version— reads the line fromdefaults.jsoninstead ofpackage.json, and takes a package name rather than a working directory. A fresh line now starts at.0explicitly instead of echoing backpackage.json. Converted from CJS to ESM so it can sharescripts/lib/public-apps.js(the rest of that directory is already ESM).release-apps.js(pnpm ship) — bumps the line indefaults.jsonalone. It works on lines (1.8→1.9) rather than round-tripping through a full semver version.check-app-version-bump.js— removed, along with its CI step. Its one invariant waspackage.jsonmajor.minor ==defaults.json, which no longer has two sides. The job it shared with the changeset check is renamedjob_changeset_checkfor what it now does; it is not a required status check in the org ruleset, so nothing needs reconfiguring.lib/public-apps.js—majorMinor(version)(unused once the above went) replaced byparseVersionLine/bumpVersionLine/versionLineFor, which operate on lines.apps/*/package.json—versionset to0.0.0.Note for reviewers
Portal was the only app reading its own
package.jsonversion at build time, baking it intoREACT_APP_VERSIONfor its Sentry release tag. CI still sets the real version before building, so published bundles are unaffected. For local builds it now definesnullrather than a misleading0.0.0, which letsapp.jsxfall back to theportal_versionGhost reports — the fallback that was already written there but unreachable.This does not change how often the apps publish; that's #29710's other half and is a separate PR.
Verification
pnpm --filter @internal/scripts test— 63 pass, including new coverage forcomputeNextVersionand the line helpersnode scripts/compute-next-app-version.js @tryghost/sodo-searchagainst live npm →1.8.233(and@tryghost/portal→2.69.223), matching what the old script would have producedpnpm nx buildfor sodo-search and portal;pnpm --filter @tryghost/portal test— 583 passci.ymlparsed and asserted: renamed job present, old job gone, no danglingneedsin the rollup gatepnpm install --frozen-lockfileclean — workspace importers don't record versions, so the lockfile is untouched