Repository navigation
test(cli): build a frozen v0.3.10 theme with today's packages - #81
Merged
Merged
Conversation
Sites copy the starter theme at `cloudhal init`, so its imports from @cloudhal/astro-renderer and @cloudhal/core-ts are a public API. 0.3.11 changed `entryPath`'s meaning under the same name and every older theme copy rendered empty pages until 0.3.13; CI only built the current starter. - packages/cli/test/fixtures/theme-v0.3.10/: the v0.3.10 starter `src/`, byte-identical to the tag, never to be updated (README says why); biome and the CLI tsconfig leave it alone. - old-theme-compat.test.ts: init a project, swap in the frozen theme, run `cloudhal build`; the home page, an article and an archive render with content and entry links, no page is empty, no errors. Without 0.3.13's one-argument fallback it fails with the 0.3.12 error; with it, it passes. - Renderer README: the theme-facing API rule; starter README: a short "Upgrading Cloudhal" note for site owners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
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.
Guards against the 0.3.12 incident, where cloudhal.com served blank pages.
Why:
cloudhal initcopies the starter theme into each project, so a site keeps calling@cloudhal/astro-renderer/@cloudhal/core-tsexports as they were then. 0.3.11 changedentryPath's meaning under the same name. Every older theme copy then rendered empty pages (200, no body) until 0.3.13 (#79). CI only ever built the current starter, which was updated in the same PR.What:
packages/cli/test/fixtures/theme-v0.3.10/: the v0.3.10 startersrc/, extracted withgit archiveand byte-identical to the tag, about 360 kB. No fonts and no configs. Its README says it must never be updated; new frozen copies go beside it and into the test'sFROZENlist. Biome and the CLI tsconfig ignore it, and it is not in the published package (files: ["dist", "README.md"]).old-theme-compat.test.ts(about 3.5 s):init, swap in the frozensrc/, then run the realcloudhal build. It asserts:/posts/hello-worldand/category/newsrender with the site title and real content in<main>, with entry links;TypeError: Cannot read properties of undefined (reading 'collection')fromEntryList, the exact 0.3.12 error.permalinks.tsis not in this diff.Checks: e2e 8/8; biome, the size ratchet, design lint and the CLI typecheck all pass.
🤖 Generated with Claude Code