Skip to content

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

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

docs: adopt @btravstack/theme npm package (drop jsDelivr pin)#267
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 jsDelivr @import).
  • Added @btravstack/theme@^1.2.0 to @temporal-contract/docs.
  • Exempted @btravstack/theme from the minimumReleaseAge gate (7-day maturity delay) — it's a first-party btravstack package.

Why

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

Verification

vitepress build emits the 1.2.0 design tokens — --accent #E0589A, --display-accent #E0589A, --text-accent darkening to #D6246F in light / #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
- remove docs/.vitepress/theme/custom.css (the old jsDelivr @import)
- add @btravstack/theme ^1.2.0 to @temporal-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:55

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

This PR migrates the VitePress docs site from a jsDelivr-pinned CSS import to the published @btravstack/theme npm package, aiming for reproducible builds and normal semver-based updates.

Changes:

  • Switches the docs theme entrypoint to export default the shared @btravstack/theme.
  • Removes the old custom.css file that imported the theme CSS from jsDelivr.
  • Adds @btravstack/theme@^1.2.0 to the docs workspace and exempts it from pnpm’s minimumReleaseAge gate.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Excludes @btravstack/theme from minimumReleaseAge maturity delay.
pnpm-lock.yaml Locks the newly added @btravstack/theme dependency and updates the resolved graph.
docs/package.json Adds @btravstack/theme to docs devDependencies.
docs/.vitepress/theme/index.ts Replaces local theme wiring with the shared theme package default export.
docs/.vitepress/theme/custom.css Deletes the jsDelivr @import-based stylesheet.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread docs/package.json
Comment thread pnpm-lock.yaml Outdated
Comment thread docs/package.json Outdated
- Fix the failing docs build: `@btravstack/theme` re-exports VitePress's
  default theme (which imports `.css`); externalizing it during SSR made Node
  throw `ERR_UNKNOWN_FILE_EXTENSION`. Add `vite.ssr.noExternal` for the theme
  so Vite transforms it and handles the CSS imports.
- Move `@btravstack/theme` into the pnpm `catalog` (exact `1.2.0`) and
  reference it as `catalog:` in `docs/package.json`, matching how every other
  third-party dep is pinned.
- `pnpm dedupe` to collapse the duplicate `@types/node@24.13.1` peer back onto
  the catalog-pinned `24.13.2`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@btravers btravers enabled auto-merge (rebase) June 28, 2026 22:25
@btravers btravers merged commit d8c3a08 into main Jun 28, 2026
9 checks passed
@btravers btravers deleted the chore/adopt-btravstack-theme branch June 28, 2026 22:26
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