Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe changes enhance date variable formatting in the formatter by supporting multiple input types (strings, Date objects) through coercion pathways. Type handling is relaxed with strengthened guards, allowing safe fallback to string conversion while maintaining backward compatibility. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Deploying quickadd with
|
| Latest commit: |
3da8cde
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2dcb3fe0.quickadd.pages.dev |
| Branch Preview URL: | https://1074-bug-the-date-passed-as.quickadd.pages.dev |
|
🎉 This PR is included in version 2.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What
Fixes VDATE formatting when template variables are provided via the QuickAdd JS API or
obsidian://quickaddURL params. Previously, passing a date like2026-12-31would be rendered as the raw string (e.g.2026-12-31) even when the template used a formatted VDATE token like{{VDATE:date,DD MMMM YYYY}}.Fixes #1074
Why
VDATE formatting only kicked in when a variable was stored in QuickAdd’s internal date encoding (
@date:<ISO>), which is normally created when the user is prompted for a date. Values passed in via API/URL are plain strings, so they never got parsed/coerced into the date form and the formatter fell back to echoing the original value.How
When a VDATE token is processed and the variable already exists:
@date:), normalize + parse it using the date parser and, if successful, coerce it into@date:<ISO>so the existing formatting path is used.Dateobject, coerce it into@date:<ISO>as well.Validation
{{VDATE:...}}is parsed + formatted).bun run testbun run lintbun run build