Skipped unnecessary serialization of previous value in webhooks - #29166
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 (1)
WalkthroughThe webhook serializer in serialize.js now computes a 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 50s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 58s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 58s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 38s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
nx run-many -t lint -p ghost |
✅ Succeeded | 35s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 28s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 6s | View ↗ |
Additional runs (2) |
✅ 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 16:06:13 UTC
no ref This performance improvement should have no user impact. Webhook payloads have a `previous` value, which is the old state of the model. This only includes keys that have changed. Before this change, we'd compute it and then, sometimes, discard everything. After this change, we only compute it if there's anything to compute.
|
|
||
| const payload = { | ||
| [docName.replace(/s$/, '')]: { | ||
| current: current, |
There was a problem hiding this comment.
Minor: I only changed this line for consistency.
54303c4 to
adaa034
Compare

no ref
This performance improvement should have no user impact.
Webhook payloads have a
previousvalue, which is the old state of the model. This only includes keys that have changed.Before this change, we'd compute it and then, sometimes, discard everything.
After this change, we only compute it if there's anything to compute.