refactor(template): upgrade the base to astro 7 and exact pins - #45
Open
mimukit wants to merge 2 commits into
Open
refactor(template): upgrade the base to astro 7 and exact pins#45mimukit wants to merge 2 commits into
mimukit wants to merge 2 commits into
Conversation
Upgrade the base template to Astro 7 (from 5) and migrate all remaining semver ranges to exact version pins for reproducible scaffolds. - Bump astro from ^5 to 7.1.6 and @astrojs/react from ^5 to 6.0.2 - Update react and react-dom to exact 19.2.8 - Update @types/node to 24.13.3, @types/react to 19.2.17, @types/react-dom to 19.2.3 - Update wrangler to 4.115.0 and compatibility_date to 2026-07-22 - Pin turbo to 2.10.7 and typescript to 5.9.3 in workspace root - Pin react and @types/react to exact versions in packages/ui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 0 of the UI blocks plan (
docs/plans/plan-ui-blocks-2026-08-01.md): move the base template from Astro 5 to Astro 7 before the new design layer lands on it, so the foundation gets built once rather than twice. Behavior-preserving and independent of the rest of epic #40.Two majors of Astro were skipped by design, not neglect — ADR 0016's resolver caps within the current major, so this is the deliberate
--allow-majorcrossing. Alongside the bump, every remaining^range in the template is migrated to an exact pin, which is what the pin-style convention already calls for (deps:updatetreats surviving ranges as pending migrations).The v6/v7 breaking-change surface was surveyed on the issue and each item verified against the actual template:
Astro.glob()is unused (index.astroalready usesimport.meta.glob),src/fetch.tsdoesn't exist, and the@webVite alias is a plain string entry, so nothing inastro.config.mjsneeded to change. The two behavioral risks — v7's mandatory strict Rust compiler and thecompressHTMLdefault flippingtrue→'jsx'— were both cleared empirically: all three pages compile with no strict-HTML errors, and an Astro 5 vs Astro 7 built-HTML diff showed every whitespace delta sitting between block elements. The one inline hotspot,<a>Terms</a> · <a>Privacy</a>, survives intact, so no{" "}fixes were needed.Closes #41
Changes
apps/webon the Astro 7 line.astro@7.1.6,@astrojs/react@6.0.2(the 6.x line is the one that targets Astro 7 / Vite 8 — 5.x mismatches),react/react-dom@19.2.8, plus matching@types/react@19.2.17and@types/react-dom@19.2.3. Transitive Vite resolves to 8.2.0, confirming the Rolldown line actually installed rather than falling back to Vite 7.^range in the template is now an exact pin.@types/node@24.13.3,wrangler@4.115.0inapps/web;turbo@2.10.7,typescript@5.9.3at the template root;@types/react@19.2.17andreact@19.2.8inpackages/ui, including itspeerDependencies.react.wrangler.jsonccompatibility_date→2026-07-22, matching workerd1.20260722.1as bundled with wrangler 4.115.0. Cosmetic for a pure static-asset deployment, but it silences the fallback-date warning.docs(qa)— manual QA plan atdocs/qa/qa-astro-7-base-template-2026-08-01.md: 7 cases (4 critical) plus the automated checks already run.astro.config.mjsis untouched — no v7 config-shape change affects it, and the@webalias and its explanatory comment are preserved verbatim.Assumptions worth a reviewer's eye
astro@7.1.6was published 2026-07-29, so it sits just inside the repo's own 3-day ADR-0016 cooldown (clears 2026-08-03) — but comfortably outside pnpm's 1-day install-time cooldown, so downstreamsaasaloy initis unaffected.turbo,wrangler, and the@types/*pins are the resolver's cooldown-eligible versions, deliberately not absolute npm latest. A first pass pinning absolute latest (turbo@2.10.8,wrangler@4.118.0— both under a day old) causedpnpm installin the playground to silently append 8minimumReleaseAgeExcludeentries to the generated project's ownpnpm-workspace.yaml. That mutation would land on every downstreamsaasaloy init. The pins as merged leavepnpm-workspace.yamluntouched — verified explicitly.@types/nodestays on major 24 andtypescripton major 5. Majors deliberately not crossed; the issue scopes the major bump to the Astro line only. Both surface as informationalmajor-availablerows indeps:check.peerDependencies.reactinpackages/uiis pinned exact, taking "every remaining^range" literally. Worth flagging thatpnpm deps:updatedoes not scan thepeerDependenciesbucket, so this one pin is maintained by hand.Known follow-ups (none introduced here)
deps:verify's typecheck leg is vacuous.templates/base/turbo.jsondeclares atypechecktask but no template package defines atypecheckscript, soturbo run typecheckexecutes 0 tasks. Pre-existing onmain; worth its own issue so the gate actually gates.4.115.0whilemodules/apiandmodules/databasestill pin4.113.0. Pre-existing drift already flagged bydeps:check; a routinepnpm deps:updateconverges it. Out of scope here.pnpm deps:checkexits non-zero, entirely from that pre-existing module drift plus natural aging past the pins chosen here. No template row is actionable — zerorange→exactrows remain.astro devinvocation (it returns to the prompt and printsStop: astro dev stop). The documented path is unaffected:pnpm dev→turbo run devkeepsastro devin the foreground and persistent, watching for changes.Test plan
Automated (all green — recorded in the QA doc's Automated verification section):
pnpm deps:verifygreen from a destroyed playground — install resolved 410 packages with no peer warnings, cache-bypassed Astro 7 build, all 3 pages built under the Rust compiler with no strict-HTML errorspnpm-workspace.yamlnot mutated by install (the main regression risk)<a>Terms</a> · <a>Privacy</a>intact@webalias resolves under Vite 8 (confirmed via a temporary probe island, since removed)astro devserves/,/terms,/privacy— all 200wrangler deploy --dry-runexits 0 with no compatibility-date warningManual (see
docs/qa/qa-astro-7-base-template-2026-08-01.md— 7 cases, 4 critical):/renders correctly in a browserTerms · Privacyseparator keeps its spaces undercompressHTML: 'jsx'/termsand/privacyrender and link back homesaasaloy init+ install leavespnpm-workspace.yamluntouched