Skip to content

docs: adopt @btravstack/theme npm package (drop jsDelivr pin)#506

Merged
btravers merged 2 commits into
mainfrom
chore/adopt-btravstack-theme
Jun 28, 2026
Merged

docs: adopt @btravstack/theme npm package (drop jsDelivr pin)#506
btravers merged 2 commits into
mainfrom
chore/adopt-btravstack-theme

Conversation

@btravers

Copy link
Copy Markdown
Collaborator

Migrates the docs site onto the published @btravstack/theme@^1.2.0 package, replacing the old jsDelivr custom.css import that was pinned to a git tag.

What changed

  • docs/.vitepress/theme/index.ts now export defaults the shared theme (it extends VitePress's default theme and layers the btravstack design tokens).
  • Deleted docs/.vitepress/theme/custom.css (the @import "https://cdn.jsdelivr.net/.../theme/vitepress.css").
  • Added @btravstack/theme@^1.2.0 to @amqp-contract/docs.
  • Exempted @btravstack/theme from the minimumReleaseAge gate — it's a first-party btravstack package, so the supply-chain maturity delay doesn't apply.

Why

A versioned npm dependency replaces a CDN URL pinned to a tag: upstream token/theme changes now arrive via a normal version bump (and Renovate/Changesets), builds are reproducible, and there's no ~12h CDN cache lag or build-time SHA drift.

Verification

vitepress build emits the 1.2.0 design tokens in the output CSS — --accent #E0589A, --display-accent #E0589A, and --text-accent darkening to #D6246F in light mode / #E0589A in dark (the WCAG-AA fix).

🤖 Generated with Claude Code

Replace the jsDelivr-pinned `custom.css` import with the published
`@btravstack/theme` VitePress theme, keeping these docs in visual sync
with the landing page and the other btravstack projects through a
versioned package instead of a CDN URL pinned to a tag.

- docs/.vitepress/theme/index.ts: `export default` the shared theme
  (which extends VitePress's default theme + layers the design tokens)
- remove docs/.vitepress/theme/custom.css (the old jsDelivr @import)
- add @btravstack/theme ^1.2.0 to @amqp-contract/docs
- exempt @btravstack/theme from the release-age gate (first-party pkg)

Verified: vitepress build emits the 1.2.0 tokens
(--accent #E0589A, --display-accent #E0589A,
--text-accent #D6246F light / #E0589A dark).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 28, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the VitePress docs site styling from a jsDelivr-pinned CSS import to the published @btravstack/theme npm package so theme/token updates flow through normal dependency updates and builds remain reproducible.

Changes:

  • Switch docs/.vitepress/theme/index.ts to export the shared @btravstack/theme theme and delete the old CDN-based custom.css.
  • Add @btravstack/theme@^1.2.0 to the docs package and update the lockfile accordingly.
  • Exempt @btravstack/theme from the minimumReleaseAge gate in pnpm-workspace.yaml.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-workspace.yaml Excludes @btravstack/theme from minimum release age gating.
pnpm-lock.yaml Locks @btravstack/theme@1.2.0 and its VitePress peer resolution.
docs/package.json Adds @btravstack/theme to docs devDependencies.
docs/.vitepress/theme/index.ts Replaces local theme setup with the shared @btravstack/theme export.
docs/.vitepress/theme/custom.css Removes the jsDelivr-pinned CSS import.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread docs/package.json
Comment thread docs/package.json Outdated
Fixes the failing Build check and addresses review feedback.

- CI: `vitepress build` failed with `ERR_UNKNOWN_FILE_EXTENSION` on the
  default theme's `fonts.css`. `@btravstack/theme` imports `vitepress/theme`
  (side-effect CSS) plus its own `style.css`; VitePress externalized the
  package during the SSR build, so Node's ESM loader hit the raw `.css`. Add
  it to `vite.ssr.noExternal` so Vite processes the CSS for the server bundle.
- Review: move `@btravstack/theme` into the pnpm catalog as an exact pin
  (1.2.0) and reference `catalog:` from docs/package.json — single source of
  truth, consistent with the rest of the workspace.

Verified: docs build completes and the 1.2.0 tokens (--accent #E0589A,
--text-accent #D6246F) are emitted in the output CSS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@btravers btravers enabled auto-merge (rebase) June 28, 2026 22:29
@btravers btravers merged commit a739633 into main Jun 28, 2026
9 checks passed
@btravers btravers deleted the chore/adopt-btravstack-theme branch June 28, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants