Removed @tryghost/parse-email-address from pnpm dev fan-out#28969
Conversation
|
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 (2)
WalkthroughA 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 ghost:test:legacy |
✅ Succeeded | 1m 24s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-29 19:59:19 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28969 +/- ##
==========================================
+ Coverage 74.28% 74.31% +0.03%
==========================================
Files 1562 1562
Lines 135348 135348
Branches 16447 16450 +3
==========================================
+ Hits 100548 100589 +41
+ Misses 33802 33761 -41
Partials 998 998
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:
|
parse-email-address is a 20-line workspace package wrapping the npm parse-email-address module. Its dev script ran tsc --watch continuously (~145 MB RSS, plus another ~145 MB of Nx run-executor + pnpm wrapper overhead) to emit build/index.js + build/index.d.ts. ghost/core runs with node --conditions=source --import=tsx (see ghost/core/nodemon.json), so its runtime imports resolve through the source export condition and load src/index.ts directly via tsx — build/ is never read at runtime. But ghost/core type-checks against the package types field, which points at build/index.d.ts, so a fresh clone with no build/ would break editor type resolution. Added a prepare script to parse-email-address so pnpm install builds build/ once. tsconfig.tsbuildinfo and build/ are both gitignored, so a true fresh clone always triggers the build. Source edits to this package require a manual rebuild (or pnpm --filter @tryghost/parse-email-address dev) — acceptable for a tiny rarely-touched package. Net savings: 1 host process and ~290 MB RSS per dev session. no ref
88d356b to
b0009a0
Compare
|
I think this breaks Docker build as-is. Looking. edit: specifically the prepare, but I don't think we need that since the lint command runs build for this package... |
…28972) ref #28969 Removed the prepare hook. The `prepare: pnpm build` script added in #28969 runs during `pnpm install`, including inside the ghost-dev Docker image build. That build stage only copies workspace `package.json` files into the image (not `src/` directories), so `tsc` finds no input files, prints help output, and exits 1. Docker build fails, `pnpm dev` cannot start.

@tryghost/parse-email-addressis a 20-line workspace package wrapping the npmparse-email-addressmodule. Itsdevscript runstsc --watchcontinuously, emittingbuild/index.jsandbuild/index.d.ts(~145 MB RSS for the tsc process, plus ~145 MB of Nx run-executor + pnpm wrapper overhead).None of that output is consumed in dev. The package's
package.jsonexports declares:ghost/coreruns withnode --conditions=source --import=tsx(seeghost/core/nodemon.json), so thesourcecondition wins and ghost/core imports the.tssource directly via tsx. Thebuild/output is purely a production artifact, never read at dev time.tsc --watchwas running for nothing.Change
Drop
@tryghost/parse-email-addressfromdocker:dev'sdependsOnlist in the rootpackage.json. Saves ~290 MB RSS and one process perpnpm devsession.pnpm --filter @tryghost/parse-email-address devstill works for solo work on the package itself. CI builds (which needbuild/) are unaffected since they invokebuildtargets directly.