Added source export condition so ghost/core reads Koenig packages build-free - #29198
Conversation
…ld-free no ref - cross-workspace requires forced a tsc build of every kg-* package before ghost/core could require them; a source change meant rebuilding before it was visible in dev - adds a "source" exports condition pointing at src/*.ts to the 10 kg-* packages in ghost/core's runtime closure, ahead of types/import/require - ghost/core already runs its dev + test lanes with --conditions=source --import=tsx (nodemon.json + vitest configs), so it now resolves these packages to raw TS with no build step; plain node in prod/CI ignores the condition and uses build/, and src/ stays out of each package's files array - drops the now-redundant kg-* build list from the docker:up nx target so pnpm dev boots without building Koenig - mirrors the existing ghost/parse-email-address setup; documented in AGENTS.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
WalkthroughThis PR adds a Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 10m 36s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 47s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
nx run-many -t test:unit -p @tryghost/kg-card-f... |
✅ Succeeded | 5m 33s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 43s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 55s | View ↗ |
nx run @tryghost/koenig-lexical:test:acceptance |
✅ Succeeded | 2m 23s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 23s | View ↗ |
Additional runs (9) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-09 14:04:26 UTC
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29198 +/- ##
==========================================
- Coverage 74.07% 74.04% -0.04%
==========================================
Files 1570 1570
Lines 136621 136621
Branches 16524 16519 -5
==========================================
- Hits 101199 101155 -44
- Misses 34419 34463 +44
Partials 1003 1003
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:
|

Cross-workspace requires forced a
tscbuild of everykg-*package beforeghost/corecouldrequirethem — a source change in a Koenig package wasn't visible in dev until you rebuilt it. This wires up the same build-free dev pattern already used byghost/parse-email-address.What changed
Adds a
"source"exports condition pointing at./src/*.tsto the 10kg-*packages inghost/core's runtime closure, ahead oftypes/import/require:Drops the now-redundant hardcoded
kg-*build list from thedocker:upnx target in the rootpackage.json, sopnpm devboots without building Koenig.Documents the convention in
AGENTS.md.Why it's safe
ghost/corealready runs its dev + test lanes with--conditions=source --import=tsx(nodemon.json+vitest.config.ts/vitest.config.db.ts), so it now resolves these packages to raw TS with no build step.nodein prod/CI and the published npm tarball ignore thesourcecondition and usebuild/;src/stays out of each package'sfilesarray, so published output is unchanged.^buildnx graph is untouched (still needed fortsctype-checking and non-source-condition deps) — Koenig builds just become cache-hit no-ops for tests and are skipped forpnpm dev.Verification
kg-*deps resolve tosrc/*.tsunder the dev flags; the full lexical→HTML render chain executes correctly with everybuild/dir deleted.node(no flags) correctly falls back tobuild/— the two lanes are cleanly separated.pnpm dev: Ghost serves HTTP 200 and the running container resolves@tryghost/kg-default-nodestokoenig/kg-default-nodes/src/index.ts.🤖 Generated with Claude Code