openwriter 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -562,6 +562,18 @@ export function buildFrontmatter(title, blogCtx, site, coverImagePath) {
562
562
  if (!fm[dateDest] && !(publishedDateDest && fm[publishedDateDest])) {
563
563
  fm[dateDest] = new Date().toISOString().slice(0, 10);
564
564
  }
565
+ // Date fields emit as UNQUOTED yaml scalars (pubDate: 2026-05-31), never
566
+ // quoted strings. Astro's z.date() rejects a quoted value — js-yaml parses it
567
+ // as a String, not a Date — which froze a live Netlify build (paybotapp.com,
568
+ // 2026-06-01). The unquoted form is ALSO accepted by z.coerce.date() and by
569
+ // Jekyll/Hugo/Next (gray-matter), so it is the universally-correct emit.
570
+ // adr: adr/blog-image-contract.md
571
+ const dateKeys = new Set([dateDest]);
572
+ if (publishedDateDest)
573
+ dateKeys.add(publishedDateDest);
574
+ const emitLine = (k, v) => dateKeys.has(k) && typeof v === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(v)
575
+ ? `${k}: ${v}`
576
+ : `${k}: ${yamlValue(v)}`;
565
577
  // Emit in stable order: defaults first (in their declared order),
566
578
  // then title, then any new keys we added
567
579
  const lines = [];
@@ -569,7 +581,7 @@ export function buildFrontmatter(title, blogCtx, site, coverImagePath) {
569
581
  if (site.frontmatter_defaults) {
570
582
  for (const k of Object.keys(site.frontmatter_defaults)) {
571
583
  if (k in fm) {
572
- lines.push(`${k}: ${yamlValue(fm[k])}`);
584
+ lines.push(emitLine(k, fm[k]));
573
585
  written.add(k);
574
586
  }
575
587
  }
@@ -581,7 +593,7 @@ export function buildFrontmatter(title, blogCtx, site, coverImagePath) {
581
593
  for (const [k, v] of Object.entries(fm)) {
582
594
  if (written.has(k))
583
595
  continue;
584
- lines.push(`${k}: ${yamlValue(v)}`);
596
+ lines.push(emitLine(k, v));
585
597
  written.add(k);
586
598
  }
587
599
  return `---\n${lines.join('\n')}\n---\n\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openwriter",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "The open-source writing surface for AI agents. Markdown-native editor with pending change review — your agent writes, you accept or reject.",
5
5
  "type": "module",
6
6
  "license": "MIT",