Skip to content

chore(deps): upgrade dependencies for Astro 7 (DOCSDEV-75) - #119

Merged
Infi-Knight merged 2 commits into
mainfrom
chore/docsdev-75-styleguide-dep-upgrade
Sep 9, 2026
Merged

chore(deps): upgrade dependencies for Astro 7 (DOCSDEV-75)#119
Infi-Knight merged 2 commits into
mainfrom
chore/docsdev-75-styleguide-dep-upgrade

Conversation

@Infi-Knight

@Infi-Knight Infi-Knight commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

two shared migrations: the unified() markdown processor and the design system 0.14.0 component changes.

Dependency changes

  • astro 6.3.8 to 7.2.10
  • @astrojs/starlight 0.39.2 to 0.42.0
  • @astrojs/markdown-remark added at 7.3.0
  • @interledger/docs-design-system 0.13.0 to 0.14.0
  • starlight-links-validator 0.24.0 to 0.26.0
  • sharp 0.34.5 to 0.35.4

Tooling: eslint to 10.9.1, eslint-plugin-astro to 3.1.0, astro-eslint-parser to 3.1.0, typescript-eslint to 8.69.0, globals to 17.11.0, prettier to 3.9.6, eslint-plugin-jsx-a11y added at 6.10.2.

Markdown processor

Astro 7 makes Sätteri the default, and Sätteri does not run remark or rehype plugins. Starlight follows the same default.

This cycle keeps every Starlight site on the unified() processor, so all sites stay on the pipeline they run today. This repo uses remark-math and rehype-mathjax, which move inside the unified() call:

import { unified } from "@astrojs/markdown-remark"

markdown: {
  processor: unified({
    remarkPlugins: [remarkMath],
    rehypePlugins: [rehypeMathjax]
  })
}

Three of our repos depend on remark and rehype plugins, and the Sätteri ports of those plugins are 0.1.x packages with roughly 25 downloads per week. Astro documents both processors as officially supported and states they provide identical built-in features by default.

Accessibility rules

eslint-plugin-astro 3 exposes accessibility rule sets that version 1 did not. The config now extends flat/jsx-a11y-recommended, which turns on 31 rules. This repo reports 0 findings.

bun install prints one stale peer warning for eslint-plugin-jsx-a11y, which declares eslint ^3 to ^9 but runs correctly on ESLint 10. bun has no peerDependencyRules equivalent. That warning is expected.

Test plan

  • bun install clean, only the known stale jsx-a11y peer warning
  • bun run build passed, 34 pages
  • starlight-links-validator 0.26.0 reports all internal links valid
  • Pagefind index built, 34 HTML files
  • bun run lint exits 0 at --max-warnings=0
  • 0 accessibility findings with the 31 new rules active
  • Math renders through remark-math and rehype-mathjax under unified()
  • All 9 Mermaid diagrams render. Verified in a browser against the published design system
  • Diagram view and download buttons work from every click target, 12 of 12 paths. The 0.14.0 release fixes a pre-existing bug where a click on the button padding threw a TypeError
  • No console errors
  • Rendered output identical to production on all 9 component pages
  • Deploy preview verified

Refs: DOCSDEV-75

Phase 2b of DOCSDEV-75. This repo is the canary for the unified()
markdown migration and for the design system 0.14.0 component changes.

Dependency changes:

- astro 6.3.8 to 7.2.10
- @astrojs/starlight 0.39.2 to 0.42.0
- @astrojs/markdown-remark added at 7.3.0
- @interledger/docs-design-system 0.13.0 to 0.14.0
- starlight-links-validator 0.24.0 to 0.26.0
- sharp 0.34.5 to 0.35.4
- eslint 10.2.1 to 10.9.1
- eslint-plugin-astro 1.7.0 to 3.1.0
- astro-eslint-parser 1.4.0 to 3.1.0
- typescript-eslint and @typescript-eslint/parser 8.59.0 to 8.69.0
- globals 17.5.0 to 17.11.0
- prettier 3.8.3 to 3.9.6
- eslint-plugin-jsx-a11y added at 6.10.2

Astro 7 makes Sätteri the default markdown processor, and Sätteri does
not run remark or rehype plugins. Starlight follows the same default.
This cycle keeps every Starlight site on the unified processor, so the
remark-math and rehype-mathjax plugins move into unified().

Enabled the eslint-plugin-astro accessibility rules through
flat/jsx-a11y-recommended. This repo reports 0 findings.

mermaid 11.17 changes the default flowchart curve. No config change is
needed. This repo has no flowcharts. All 9 diagrams are sequence
diagrams.
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for styleguide-preview ready!

Name Link
🔨 Latest commit b4a6fb6
🔍 Latest deploy log https://app.netlify.com/projects/styleguide-preview/deploys/6a9fcd62199ede0008a56586
😎 Deploy Preview https://deploy-preview-119--styleguide-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@Infi-Knight

Copy link
Copy Markdown
Contributor Author

Thanks Anca, and good catch. It is not your local env. It is a real bug, and it only shows on the dev server.

I reproduced it here. On npm start the diagram at /shared/mermaid/ does not render and the raw sequenceDiagram source shows instead. On a production build it renders fine, which is why the deploy preview looks correct.

Cause. Design system 0.14.0 changed how it imports mermaid. The new form resolves to a mermaid build that expects a bundler to sort out its CommonJS dependencies, dayjs among them. A production build does that. The Vite dev server does not, so mermaid fails to load and never initializes.

Fix. docs-design-system#74 imports the pre-bundled mermaid build instead, which has its dependencies inlined and works in both dev and production. I verified it on the dev server and in a build. /shared/mermaid/ renders 1 of 1, and /shared/mermaidwrapper/ renders 3 of 3 with the view and download buttons working.

Scope. Four repos are affected on the dev server, with 63 diagrams between them: rafiki, open-payments, this repo, and rafiki-v2. No deployed site is affected.

Please hold off approving this PR. Once #74 merges and 0.14.1 publishes, I will refresh the lockfile here so it picks up the fix, and then it is ready for you.

0.14.0 imports mermaid with a bare specifier. That resolves to a build
which expects a bundler to fix the CommonJS interop for dayjs. The Vite
dev server does not do that, so the module throws and no diagram renders.
Production was never affected.

0.14.1 imports the pre-bundled mermaid build instead.

Verified on the dev server, not on astro preview.
@Infi-Knight

Copy link
Copy Markdown
Contributor Author

0.14.1 is published and the lockfile here now points at it (b4a6fb6).

Diagrams render on the dev server again, 4 of 4 across /shared/mermaid/ and /shared/mermaidwrapper/, with no console errors. This is ready for review now.

@Anca2022 Anca2022 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.

This is great! Thank you for the fix, Ravi! 😃

@Infi-Knight
Infi-Knight merged commit cf0859a into main Sep 9, 2026
5 checks passed
@Infi-Knight
Infi-Knight deleted the chore/docsdev-75-styleguide-dep-upgrade branch September 9, 2026 10:17
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