Repository navigation
feat(template-generator): upgrade template deps to latest and harden docker templates - #1098
Conversation
…docker templates Dependency upgrades: - react-router v7 -> v8 (imports unchanged; drop v8_middleware future flag, now default) - react-router-devtools ^1 -> ^6, @clerk/react-router ^3.5 (RR8-compatible) - vite-plus 0.1.24 -> 0.2.2; drop discontinued vite-plus-test vitest override - @tanstack/svelte-query v5 -> v6: thunk options + runes results in svelte templates - @hono/node-server ^2, stripe SDKs (^9/^6), shiki ^4, nx ^23 - ~140 minor/patch bumps across dependencyVersionMap and template pins - expo/native pins left untouched (verified against SDK 57 bundledNativeModules) - remove unused @types/three from electrobun desktop template Docker template fixes: - block webDeploy=docker with tauri/electrobun on next/svelte/astro (desktop addons force static export, breaking the SSR docker images) - copy public/ into next standalone runner when pwa addon emits it - generate root .env for compose build-arg interpolation (CONVEX_URL, CLERK_PUBLISHABLE_KEY were silently baked empty) - pin db images (postgres:18, mysql:8.4, mongo:8) and pnpm@11 in Dockerfiles - add web service healthcheck to generated docker-compose
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbd68da6ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThis PR adds a Docker web-deploy compatibility check, updates template-generator dependency pins and tests, changes Docker template outputs, generates root ChangesDocker Web Deploy Compatibility Validation
Template Generator Updates
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
packages/template-generator/templates/deploy/docker/web/astro/Dockerfile.hbs (1)
6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider pinning an exact pnpm patch version rather than just the major.
pnpm@11floats to the latest 11.x release on every build, which can silently break reproducibility if a future 11.x patch introduces a behavior change (pnpm 11 already required config migrations from v10). Pinning an exact version (e.g.pnpm@11.9.0) would make builds fully reproducible while still getting the intended major-version behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 66d8b9fb-965d-4076-a696-e7a8d785e434
📒 Files selected for processing (39)
apps/cli/src/utils/compatibility-rules.tsapps/cli/src/utils/config-validation.tsapps/cli/test/addons.test.tsapps/cli/test/auth.test.tsapps/cli/test/clerk-matrix.test.tsapps/cli/test/electrobun-addon.test.tsapps/cli/test/external-commands.test.tspackages/template-generator/src/post-process/package-configs.tspackages/template-generator/src/processors/env-vars.tspackages/template-generator/src/templates.generated.tspackages/template-generator/src/utils/add-deps.tspackages/template-generator/templates/addons/electrobun/apps/desktop/package.json.hbspackages/template-generator/templates/auth/better-auth/web/svelte/src/routes/dashboard/+page.svelte.hbspackages/template-generator/templates/db-setup/docker-compose/mongodb/docker-compose.yml.hbspackages/template-generator/templates/db-setup/docker-compose/mysql/docker-compose.yml.hbspackages/template-generator/templates/db-setup/docker-compose/postgres/docker-compose.yml.hbspackages/template-generator/templates/deploy/docker/compose/docker-compose.yml.hbspackages/template-generator/templates/deploy/docker/server/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/astro/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/nuxt/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/react/next/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/react/react-router/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/react/tanstack-router/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/react/tanstack-start/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/solid/Dockerfile.hbspackages/template-generator/templates/deploy/docker/web/svelte/Dockerfile.hbspackages/template-generator/templates/examples/todo/web/svelte/src/routes/todos/+page.svelte.hbspackages/template-generator/templates/frontend/astro/package.json.hbspackages/template-generator/templates/frontend/native/uniwind/package.json.hbspackages/template-generator/templates/frontend/nuxt/package.json.hbspackages/template-generator/templates/frontend/react/next/package.json.hbspackages/template-generator/templates/frontend/react/react-router/package.json.hbspackages/template-generator/templates/frontend/react/react-router/react-router.config.tspackages/template-generator/templates/frontend/react/tanstack-router/package.json.hbspackages/template-generator/templates/frontend/react/tanstack-start/package.json.hbspackages/template-generator/templates/frontend/solid/package.json.hbspackages/template-generator/templates/frontend/svelte/package.json.hbspackages/template-generator/templates/frontend/svelte/src/routes/+page.svelte.hbspackages/template-generator/templates/packages/ui/package.json.hbs
💤 Files with no reviewable changes (3)
- apps/cli/test/electrobun-addon.test.ts
- packages/template-generator/templates/frontend/react/react-router/react-router.config.ts
- packages/template-generator/templates/addons/electrobun/apps/desktop/package.json.hbs
…t public dir - compose build args now interpolate the same frontend-prefixed env names users fill in apps/web/.env (NEXT_PUBLIC_/VITE_/PUBLIC_ variants), and the generated root .env mirrors those names - next docker runner always copies public/ (user-added static assets), with mkdir -p in the builder so the copy never fails when the dir is absent
|
Addressed review comments in 1d21818:
|
…in peer ranges Codex review findings, verified against npm peer metadata and proven with strict-peer npm installs: - @polar-sh/better-auth@1.8.4 peers @polar-sh/sdk ^0.47.0 and @polar-sh/checkout@0.4.0 peers stripe react <=^5.6.1 / stripe-js <=^8.11.0, so the ^0.48.1/^6.7.0/^9.9.0 bumps made fresh polar scaffolds fail npm installs with ERESOLVE; pins now sit at the top of the supported ranges (^0.47.1/^5.6.1/^8.11.0) - react-router-devtools@6.2.1 (latest) depends on @tanstack/devtools-vite ^0.4.1, which peers vite ^6||^7 only, so the react-router template pins vite ^7.3.6 (RR8 supports ^7||^8) until a devtools release supports vite 8 Both combos re-verified: npm installs clean, react-router app builds on vite 7.
Dependency upgrades
Majors (with required code migrations)
@react-router/*packages bumped; removed thev8_middlewarefuture flag (default in v8). Template code needed no changes: imports already come fromreact-routeronly, andmeta()doesn't use the removeddataarg.react-router-devtools^1 → ^6 and@clerk/react-router→ ^3.5.4 (both RR8-compatible).@voidzero-dev/vite-plus-test(stopped at 0.1.24), so thevitestoverride alias is removed; thevite→vite-plus-corealias stays.rolldown→ 1.1.4.createQuery(() => opts)) and results drop the$store prefix.QueryClientProvider/QueryClientusage unchanged.serve), stripe SDKs ^9/^6 (no template code touches them), shiki ^4, nx ^23 (generated nx.json schema unchanged).Minors
~140 minor/patch bumps across
dependencyVersionMapand hbs template pins (vite 8.1.3, heroui-native 1.0.5, uniwind 1.10, SvelteKit 2.69, @nuxt/ui 4.9, TanStack Router 1.170/Start 1.168, tRPC 11.18, hono 4.12, clerk, react-query unified at ^5.101.2, oxlint/oxfmt, wrangler, zod, …).Deliberately untouched
All Expo/native pins — verified against Expo SDK 57's
bundledNativeModules.json(incl.react-native-gesture-handler ~2.32.0; v3 is not supported by SDK 57).@babel/corestays on 7 forbabel-preset-expo. Also removed an orphaned@types/threefrom the electrobun desktop template.Docker template fixes (from a full combination audit)
--web-deploy docker— tauri/electrobun switch next/svelte/astro to static export, which broke the SSR docker images at build time. New CLI validation rejects the combo (keeps the working next+electrobun+convex+better-auth case).public/when the pwa addon emits it (standalone output excludes it → manifest/icons 404'd in-container)..envgenerated for compose build args —${CONVEX_URL:-}/${CLERK_PUBLISHABLE_KEY:-}interpolate from the project root, but onlyapps/web/.envwas scaffolded, so images were silently built with empty values.postgres:18,mysql:8.4,mongo:8) in deploy + db-setup composes —postgres:18also matches the/var/lib/postgresqlvolume layout the templates use. Pinnedpnpm@11in Dockerfiles to avoid lockfile-format drift.Verification
bun run generate-templatesregenerated (506 templates)bun run checkcleantsc --noEmitcleanNot addressed (follow-up candidate): single-stage server/web images ship the full monorepo + dev deps (size/hygiene, not correctness).
Summary by CodeRabbit
New Features
.envcontaining compose build-arg values when applicable.Bug Fixes
Chores
Tests