Skip to content

chore: sync create-effex template versions with workspace#19

Merged
jonlaing merged 2 commits into
mainfrom
chore/sync-template-versions
Jun 25, 2026
Merged

chore: sync create-effex template versions with workspace#19
jonlaing merged 2 commits into
mainfrom
chore/sync-template-versions

Conversation

@jonlaing

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/sync-template-versions.mjs — reads each @effex/* workspace package's version, rewrites matching dependency entries in packages/create-effex/templates/*/package.json to ^MAJOR.MINOR.PATCH
  • Wires the script into the existing Changesets flow via the root version script: "version": "changeset version && pnpm sync-template-versions" — so template versions track workspace versions automatically every release
  • Also runs once now to bring the templates up to current state:
    • @effex/dom ^0.0.1 → ^1.1.0
    • @effex/router ^0.0.1 → ^1.2.0
    • @effex/platform ^0.0.1 → ^1.2.0
    • @effex/vite-plugin ^0.0.1 → ^1.1.0

Implementation notes

  • Script is idempotent — re-running is a no-op once everything's in sync.
  • Only rewrites @effex/* entries; leaves effect, @effect/platform, and other ecosystem deps alone (those have their own update cadence).
  • Walks every directory under templates/ so a future template (e.g. templates/ssr-postgres) gets the same treatment automatically.
  • Preserves trailing newlines in package.json files to match prettier's expectations.

Test plan

  • Ran node scripts/sync-template-versions.mjs — updated 3 templates as expected
  • Ran again immediately — reported "All templates already in sync" (idempotent)
  • Run pnpm version locally with a dummy changeset to confirm the hook fires
  • Verify a pnpm create effex generated project installs cleanly against the latest published versions after the next release

Closes #18

🤖 Generated with Claude Code

Adds scripts/sync-template-versions.mjs which reads the current version
of every @effex/* workspace package and rewrites matching dependency
entries in packages/create-effex/templates/*/package.json to
^MAJOR.MINOR.PATCH.

Wired into the existing Changesets version flow:

  "version": "changeset version && pnpm sync-template-versions"

So template versions get bumped automatically alongside workspace
versions every release. The script is idempotent.

Also runs once now to bring existing templates up to current versions:
  @effex/dom ^0.0.1 -> ^1.1.0
  @effex/router ^0.0.1 -> ^1.2.0
  @effex/platform ^0.0.1 -> ^1.2.0
  @effex/vite-plugin ^0.0.1 -> ^1.1.0

Closes #18

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploying effex with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3b696c
Status: ✅  Deploy successful!
Preview URL: https://722f2f10.effex.pages.dev
Branch Preview URL: https://chore-sync-template-versions.effex.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploying effex-api with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3b696c
Status: ✅  Deploy successful!
Preview URL: https://c7d083c5.effex-api.pages.dev
Branch Preview URL: https://chore-sync-template-versions.effex-api.pages.dev

View logs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jonlaing jonlaing merged commit 3726891 into main Jun 25, 2026
4 checks passed
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.

Sync create-effex template versions with workspace at release time

1 participant