-
#14
6122f6fThanks @diogoascarneiro! - Default Markdown and MDX parsing to Satteri, withmarkdown.parser: "remark"available as a legacy compatibility escape hatch. The parser choice is now part of the Markdown/MDX extraction policy hash, so Satteri and Remark outputs use separate cache entries.This release also updates the package and playground/docs fixtures for Astro 7, reconstructs missing Satteri MDX ESTree metadata needed by static-data extraction and MDX audits, rewrites relative MDX imports only in staged translated files, and refreshes the local staging-cache index version to avoid stale staged MDX output.
- #15
8120b2fThanks @diogoascarneiro! - Document the requirement to add a Changesets entry for package-affecting changes and record the docs migration to Nimbus.
All notable changes to PolyStella are tracked here. The format follows Keep a Changelog; published releases follow semver pre-1.0 versioning.
- Documentation site (Starlight) under
docs/. Configuration reference auto-generated from the zod schema; CI asserts every public export has a docs entry. reactdeclared as an optional peer dependency (^17.0.0 || ^18.0.0 || ^19.0.0). The@cloudflare/polystella/reactsubpath only importsuseMemo, which is stable across all three React majors. Marked optional so consumers that don't use the React hooks aren't pestered for the dep.@astrojs/sitemapdeclared as a dev dependency. Thepolystella/i18n/sitemaphelper produces options for@astrojs/sitemapbut doesn't import it at runtime; consumers wire their own@astrojs/sitemapinstall as usual.@cloudflare/polystella/clientexport — types-only entrypoint forenv.d.tsvirtual-module references.@cloudflare/polystella/runtime/middlewareexport — direct middleware entrypoint used byaddMiddleware. Rarely imported directly.r2.bulkListOnStartconfig option (defaulttrue). Issues oner2.list()per locale at the start of the live phase to populate an in-memory key set, replacing per-pair cache-check GETs with O(1) lookups.provider.batchInputTokenBudgetconfig option (default 4000). Soft cap on per-batch input tokens; the pipeline groups adapter segments into batches that fit under this budget.- Per-batch document-context block.
markdown.contextKeysdeclares frontmatter keys whose source-language values are injected into the system prompt to keep terminology consistent across batches when a long document is split. polystella check-ui,sync-ui,translate-uisubcommands for UI-string maintenance.PermanentProviderErrorclass. Translator implementations throw it on 401/403/404/422 to short-circuit the retry loop.AbortSignalthreading. Ctrl-C during a build cleanly aborts in-flight provider calls.- End-to-end smoke test (
tests/smoke.test.ts) that drives thepolystella(options)factory against a real temp project.
- Breaking: the CLI is now subcommand-based. Run
polystella --helpfor the menu. Subcommands own their own argv parsing. - The parser round-trip test runs over a bundled
tests/fixtures/parsing/round-trip/corpus. 15 fixtures cover the full feature surface ofremark-parse + remark-gfm + remark-frontmatter: frontmatter shapes, inline formatting, headings, lists (incl. task lists), code blocks, blockquotes, GFM tables, raw HTML, thematic breaks, empty frontmatter, no frontmatter, footnotes, images, and a punctuation-heavy edge- case file with Unicode + escapes. noUncheckedIndexedAccess,exactOptionalPropertyTypes,noImplicitReturns,noFallthroughCasesInSwitchenabled intsconfig.json.- Translation retries migrated from a hand-rolled loop to
p-retrywith exponential backoff and jitter. POLYSTELLA_VERSIONconstant now reads frompackage.jsonvia a JSON import, ensuring R2 metadata always reflects the actual published version.
- Dry-run and live passes merged. Live builds now do ONE
adapter.parseper source (was two). - R2 bulk pre-list (see Added). Replaces per-pair GETs with O(1) lookups; typically reduces cold-build network round-trips by 20–30x.
- Picomatch matcher caching.
WeakMappernoPrefixUrlsarray in the runtime hot paths; pattern-keyedMapper glob in the build hot paths. Compilation moves from per-call to first-call-only. - Glossary reuse between
runTranslationPassandpublishRuntimeBridge. Saves one FS read per locale per build.
extractSegmentsandselectTranslatableFrontmatterno longer crash on files with empty YAML frontmatter (---\n---). Theyamlparser returnsnullfor empty input, which the oldas Record<string, unknown>cast didn't guard against. Both functions now coerce non-object YAML to an empty record.publishRuntimeBridgeno longer loses itsstagingDirparameter on signature changes.- 6 non-null assertions (
!) and 4: anyannotations removed fromsrc/.
- New
ARCHITECTURE.mdcovers system-level design, hard invariants, domain glossary, and per-subsystem reference. - New
AGENTS.mdcovers agent-facing context. - New
skills/polystella-consumer/SKILL.mdandskills/polystella-contributor/SKILL.md— opt-in agent skills for consumer and contributor workflows. - New
llms.txtandllms-full.txtat the package root per the llmstxt.org convention.
Pre-0.1, breaking changes were rolled forward without a log because the package was internal-only. The git history is the authoritative record.