Skip to content

Commit 830592f

Browse files
ssilviusclaude
andauthored
release v0.4.0 (#60)
Widens peerDependencies.astro to ^6.0.0 || ^7.0.0, adds the llms-full.txt markdown contract, makes sitemap sources accept site-relative URLs, makes source collect() failures legible, and fixes SiteMetaOptions under exactOptionalPropertyTypes. Verified on main before cutting: install --frozen-lockfile, typecheck, lint, format:check, and 170 unit tests all clean, and pnpm build (the step the release workflow runs before publishing) emits dist. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent e3e5dd1 commit 830592f

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @rafters/astro-meta
22

3+
## 0.4.0
4+
5+
Consumer-reported correctness across three surfaces, plus the first CI that actually exercises Astro. Every item here was found dogfooding the package on the rafters-studio sites rather than by reading the code.
6+
7+
The headline for anyone upgrading: `peerDependencies.astro` widens to `^6.0.0 || ^7.0.0`. Astro 7 was already the current major and this package formally excluded it, which nothing in CI would have caught, because the entire suite tests pure functions that never import `astro`.
8+
9+
- `llmsTxt.onNonMarkdownBody` enforces the markdown contract that `LlmsTxtEntry.body` always documented. A consumer feeding page source instead of rendered content publishes component tags to every crawler, and the build said nothing: smugglr.dev's homepage entry was literally `<SiteHeader /> <VoiceHero /> <MrsBlock />`, zero content, shipped to everyone reading the artifact. Bodies are now sniffed per entry and routed through `"warn"` (default, report and emit anyway), `"error"` (throw at `build:done` naming every failing entry rather than the first), or `"drop"` (omit the body, keep the entry in the index). `buildLlmsTxt` returns `nonMarkdownBodies` alongside `index` and `full`. The sniff is a heuristic that masks fenced code blocks and inline code spans first, because a page documenting a component is the likeliest false positive and JSX inside a fence is documentation, not a defect.
10+
- `SitemapSource.collect()` now accepts site-relative URLs, matching `LlmsTxtSource`. The two present the same authoring surface and did not accept the same inputs: llms-txt resolved `/path/`, sitemap threw at `build:done`, so the same map function worked for one and failed for the other. Both resolve through one helper now, since storing the rule twice is how they drifted apart. Sitemap deduplication happens after resolution, so `/a` and its own absolute form collapse to one entry instead of emitting a duplicate. Additive: absolute URLs behave exactly as before.
11+
- Source `collect()` failures are legible. `astro:content` is unreachable from a source module, because source modules are imported by `astro.config.*`, which Node's ESM loader evaluates outside Vite's module graph. This is not a hook-timing problem: measured at `config:setup`, `build:setup`, `build:generated`, and `build:done`, all four fail identically. That case is now rewritten into a message naming the cause and the working alternative instead of Node's raw `Received protocol 'astro:'`; every other failure keeps its own message with the source key prefixed. The README's source example is replaced with the filesystem pattern that actually works.
12+
- `SiteMetaOptions` and `SiteMeta`'s props accept explicit `undefined` on every optional field. Astro's own strict tsconfig enables `exactOptionalPropertyTypes`, under which `title?: string` accepts an absent property but rejects an explicitly undefined one, so a layout forwarding its own optional prop -- the pattern this README documents in its quickstart -- did not compile. Found by running `astro check` on the example app for the first time.
13+
- CI builds the example app against Astro 6 and 7 and asserts the emitted artifacts have the right content, not merely that the build exits zero. A source pipeline that silently stopped running still writes a well-formed, empty `<urlset>`. A floating `latest` leg runs non-blocking so the next major surfaces early.
14+
315
## 0.3.0
416

517
Content-signals correctness and enforcement. Found dogfooding the package across the rafters-studio sites: the emitted policy was a soft hint with two real bugs, and a single malformed page could silently drop the sitemap. There is no finished standard here (Cloudflare's Content Signals draft has expired; the IETF AIPREF drafts are not yet RFCs), so this release implements the production-deployed Cloudflare `Content-Signal` form correctly, labels it honestly, and makes enforcement a configured choice rather than an opinion.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rafters/astro-meta",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Build-time artifacts for crawlers and LLMs on Astro 6 and 7: JSON-LD, llms.txt, robots, sitemap, OG images, and build-time GEO readability scoring. Composes with @rafters/astro-data.",
55
"keywords": [
66
"aeo",

0 commit comments

Comments
 (0)