Skip to content

Conversation

@JumpLink
Copy link
Contributor

@JumpLink JumpLink commented Sep 9, 2025

Make gettext outputs deterministic; add commit rules doc; bump packages to 0.2.5

Improve reproducibility of POT/PO generation to reduce noisy diffs and make CI stable. Add concise commit best practices doc leveraging conversation context. Bump package versions.

Changes

  • Docs: Add /.cursor/rules/git-commit-best-practices.mdc with high‑density rules and a conversation‑driven commit template.
  • Gettext plugin (@gjsify/vite-plugin-gettext)
    • Add options: noLocation, deterministic, sourceDateEpoch, fixedCreationDate, sortOutput, msgcatOptions, preserveCreationDate.
    • Pass through xgettextOptions and propagate new flags to xgettext, msgcat, msgmerge.
    • Set SOURCE_DATE_EPOCH for reproducible timestamps when deterministic is true.
    • Normalize POT-Creation-Date via fixedCreationDate, preserved previous value when available, or formatted epoch.
    • Update updatePoFiles to accept options and respect noLocation/deterministic.
    • Add helper formatSourceDateEpoch.
    • Update README.md examples and option docs to reflect new flags.
  • Version bumps
    • packages/vite-plugin-gettext/package.json: 0.2.2 → 0.2.5
    • packages/vite-plugin-blueprint/package.json: 0.2.2 → 0.2.5

Why

  • Stabilize outputs for CI, make diffs predictable, and improve developer experience.
  • Ensure commit history captures intent and progress so work can be resumed easily.

Impact

  • Default behavior unchanged; new options are opt‑in.
  • Enables reproducible POT/PO generation when deterministic (and related flags) are set.
  • When preserveCreationDate is enabled and a prior POT exists, header date remains stable.

Notes

  • Consider enabling noLocation, deterministic, sourceDateEpoch: 0, sortOutput, and preserveCreationDate in CI configs for stable archives and diffs.

…narratives

Why: Improve commit quality and make history a resumable work log.
What: Simplified rules, removed duplicates, clarified validation and consistency, added "Conversation-Driven Commit Narratives" with template.
Progress: 1/1 complete — Next: adopt template in future commits.
Why: ensure correct metadata for npm and linkbacks to project.
What: add repository, bugs, homepage fields to root and both plugin packages.
Progress: 1/1 complete — Next: publish when ready.
Why: provide direct package landing pages for users.
What: update homepage URLs in blueprint/gettext package.json to tree/main package paths.
Progress: 1/1 complete — Next: push branch.
Why: Reduce noisy diffs and stabilize headers by keeping existing POT Creation-Date when available, while supporting deterministic builds.
What: Add preserveCreationDate option; read previous POT to capture existing Creation-Date; normalize header with precedence: fixedCreationDate > preserveCreationDate > deterministic epoch.
Progress: 1/1 complete — Next: document option and usage in README.
@JumpLink JumpLink changed the title Make gettext outputs deterministic; add commit rules doc; bump packages to 0.2.3 Make gettext outputs deterministic Sep 9, 2025
… to 0.2.4; update dependencies for @types/node and vite
…-read value

Why: Previously re-reading the freshly generated POT could override the preserved value; use pre-read date to ensure stability.
What: Use prevPotCreationDate captured before extraction when preserveCreationDate is enabled.
Progress: 1/1 complete — Next: verify on downstream project.
@JumpLink JumpLink merged commit fa37a95 into main Sep 9, 2025
1 check passed
@JumpLink JumpLink deleted the feat/no-location branch September 9, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants