Skip to content

Use Sätteri 0.10 APIs - #4134

Merged
HiDeoo merged 16 commits into
withastro:mainfrom
HiDeoo:hd/feat-satteri-0-10
Sep 2, 2026
Merged

HiDeoo merged 16 commits into
withastro:mainfrom
HiDeoo:hd/feat-satteri-0-10

Conversation

@HiDeoo

@HiDeoo HiDeoo commented Aug 20, 2026

Copy link
Copy Markdown
Member

Description

This PR refactors some of the code to use the new Sätteri 0.10 APIs now available in Astro 7.2.4 (but technically 7.2.5 for a fix).

One of the most meaningful change is our components that were previously using rehype and creating processors to parse the default slot content are now using the new Sätteri htmlToHast() API.

Regarding the changeset, not quite sure yet the level of details we should use, e.g. should we just say we updated some deps or go as far as mentioning that we can now only check paths to transform once per plugin type thanks to Sätteri conditional plugin bundles.

Note that GitHub displays some renamed files as deletions + additions because they changed significantly (mostly indentations tho). The rename-only commit may be easier to review separately.

Remaining tasks

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a9e00b1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit a9e00b1
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/6a97f570d27efa0008685b37
😎 Deploy Preview https://deploy-preview-4134--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

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

@github-actions github-actions Bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Aug 20, 2026
* main:
  Use a page-specific counter for `<Tabs>`  IDs (withastro#4133)
  Add starlight-pydocs and starlight-quiz (withastro#4130)
nasyrov added a commit to withplumix/plumix that referenced this pull request Aug 22, 2026
## What does this PR do?

Brings `apps/docs` up to the dependency set the documentation work
assumes. Nothing behaves
differently — `astro.config.mjs` is untouched and the rendered site is
byte-identical apart from
Starlight dropping a dead `pageHide` listener (the DOM event is
`pagehide`, so it never fired).

Verified by snapshotting `dist/` before the change and diffing after a
forced rebuild: same file
set, and that one script line is the only delta across both pages,
modulo scoped-style and asset
hashes.

Closes #1852

### The Starlight range needs a note

The ticket asked for `>=0.41.5` "a patch bump inside the existing
range". The specifier is
`>=0.41.5 <0.41.7` rather than a caret, because `^0.41.5` floats to
`0.41.7`, which does not
type-check.

`0.41.7` shipped on 5 August with `@astrojs/markdown-satteri: ^0.3.5`
and its own `satteri: ^0.9.1`
— consistent then, since `0.3.5` and `0.3.6` were still on
`satteri@^0.9.1`. On 19 August
`@astrojs/markdown-satteri@0.3.7` moved to `satteri@^0.10.3` and that
range swallowed it. Two
Sätteri copies now meet inside Starlight's own
`integrations/markdown-plugins.ts`, which
`pnpm typecheck` compiles from source, so the docs app fails to
type-check on a dependency it never
imports.

Confirmed upstream rather than a local resolution artefact: it
reproduces on `0.41.6` and `0.41.7`
with `astro` at both `7.1.1` and `7.2.4`, and forcing `satteri` to
`0.10.5` through `pnpm.overrides`
only swaps it for a different genuine error in the same file, because
Starlight's code targets
satteri 0.9.

Starlight is migrating in
[withastro/starlight#4134](withastro/starlight#4134),
blocked on an Astro release carrying
[withastro/astro#17766](withastro/astro#17766)
(merged, unreleased).
`apps/docs/README.md` records the constraint; #1865 tracks lifting it.

### Knip

The five new dependencies have no consumer yet — that is the point of
the prefactor — so each is
listed in knip's `apps/docs` ignore set with a note on which ticket
wires it up.

### Reviewer notes

- `apps/docs` gets `vitest` without `@plumix/vitest-config`, coverage,
or a `test:unit` script,
unlike every other vitest-having package. Those belong with the
content-check suite ticket.
- The cap could alternatively live in root `pnpm.overrides`, the repo's
existing mechanism for
blocking a bad upstream version. I put it on the dependency so the
acceptance criterion's floor
and the upstream break sit where a reader is already looking; happy to
move it.
- No changeset: `apps/docs` is private.

## Type of change

- [ ] Bug fix
- [ ] Feature (requires [approved
Discussion](https://github.com/withplumix/plumix/discussions/categories/ideas))
- [ ] Refactor (no behavior change)
- [ ] Documentation
- [ ] Performance improvement
- [ ] Tests
- [x] Chore (dependencies, CI, tooling)

## Checklist

- [x] `pnpm typecheck` passes
- [x] `pnpm lint` passes
- [x] `pnpm build` passes
- [ ] I have added/updated tests for my changes (if applicable)

`pnpm format`, `pnpm knip`, `pnpm test` and `pnpm install
--frozen-lockfile` also pass. No tests
added: this change installs dependencies and wires nothing up. The suite
that exercises them lands
with the content-check ticket.

## AI-generated code disclosure

- [x] This PR includes AI-generated code

## Screenshots

No admin UI change.
HiDeoo added 4 commits August 25, 2026 09:05
* main:
  [ci] release (withastro#4137)
  Fix localisation of Expressive Code UI (withastro#4138)
  chore: migrate Changesets to v3 (withastro#4139)
  Add WhatsApp icon (withastro#4142)
  docs: add starlight-custom-navigation to plugins showcase (withastro#4141)
  [ci] format
  i18n(de): update plugins.mdx (withastro#4140)
  i18n(ko-KR): update `plugins` (withastro#4136)

@delucis delucis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great, @HiDeoo! Thanks for taking the time to bring these all up-to-date for the bright and glorious Sätteri future.

The diff is a little harder to read because Git doesn’t recognise things as renames that it probably should. For anyone else curious, I ended up copy-pasting the before/after processor files into https://www.diffchecker.com/ to visualise what actually changed (not much, very clean).

I guess we’ll probably be able to remove the TODO in pnpm-workspace.yaml by merge time given this will be in a minor, but everything else looks good to me here 🙌

Comment thread packages/starlight/__tests__/markdown-processor/code-rtl-support.test.ts Outdated
@delucis delucis added the 🌟 minor Change that triggers a minor release label Aug 25, 2026
@delucis delucis added this to the v0.42 milestone Aug 25, 2026
HiDeoo and others added 2 commits August 25, 2026 20:02
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* main:
  [ci] release (withastro#4153)
  i18n(fr): update `resources/plugins.mdx` (withastro#4147)
  Add Goodreads icon (withastro#4145)
  [i18nIgnore] docs: update theme links (withastro#4152)
  i18n(de): update plugins.mdx (withastro#4151)
  i18n(ko-KR): update `plugins.mdx` (withastro#4146)
@HiDeoo HiDeoo added the pr-preview Trigger a preview release for this PR using pkg.pr.new label Aug 26, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/@astrojs/starlight@4134

commit: 53e68de

@HiDeoo HiDeoo removed the pr-preview Trigger a preview release for this PR using pkg.pr.new label Aug 26, 2026
Comment thread pnpm-workspace.yaml Outdated
* main:
  [ci] release (withastro#4161)
  feat: add npmx icon (withastro#4159)
  Add Hypothesis icon (withastro#4156)
  Add Expressive Code missing translations based on Astro Docs (withastro#4160)
  docs: add herdr showcase (withastro#4158)
  [i18nIgnore] docs: reduce 3rd party content weight in search results (withastro#4143)
delucis
delucis previously approved these changes Sep 1, 2026
@delucis delucis added the ✅ approved Pull requests that have been approved and are ready to merge when next cutting a release label Sep 1, 2026
* main:
  [i18nIgnore] Transpile Starlight packages (withastro#3572)
  i18n(ru): update translations (withastro#4170)
  [ci] release (withastro#4169)
  Fix hidden heading anchor links (withastro#4167)
  perf: optimize route and sidebar lookups (withastro#4148)
  chore: add benchmarks (withastro#4157)
@HiDeoo
HiDeoo merged commit 6135f01 into withastro:main Sep 2, 2026
19 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Sep 2, 2026
dadezzz pushed a commit to dadezzz/university_notes that referenced this pull request Sep 6, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.41.11` → `0.42.0`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.41.11/0.42.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fstarlight/0.42.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fstarlight/0.41.11/0.42.0?slim=true) |

---

### Release Notes

<details>
<summary>withastro/starlight (@&#8203;astrojs/starlight)</summary>

### [`v0.42.0`](https://github.com/withastro/starlight/blob/HEAD/packages/starlight/CHANGELOG.md#0420)

[Compare Source](https://github.com/withastro/starlight/compare/@astrojs/starlight@0.41.11...@astrojs/starlight@0.42.0)

##### Minor Changes

- [#&#8203;3572](withastro/starlight#3572) [`292fb17`](withastro/starlight@292fb17) Thanks [@&#8203;HiDeoo](https://github.com/HiDeoo)! - Distributes package as JavaScript files with dedicated type declaration files instead of TypeScript source files.

- [#&#8203;4121](withastro/starlight#4121) [`2623ae6`](withastro/starlight@2623ae6) Thanks [@&#8203;delucis](https://github.com/delucis)! - Simplifies markup for Starlight’s mobile menu toggle

  **⚠️ Potentially breaking change:** If you use a theme plugin, custom styles, or component overrides targeting the `MobileMenuToggle` button or `PageFrame` components, you may need to adjust these for the new markup. The button is no longer wrapped in a `<starlight-menu-button>` custom element and no longer uses the `aria-expanded` attribute. Instead, you can use the `.sl-menu-button` class name to target the button and the `:popover-open` pseudo-class to style the menu open state specifically.

  In the following example, custom styles for the menu button are updated for the new approach:

  ```diff
  - starlight-menu-button button {
  + .sl-menu-button {
    color: var(--sl-color-text);
  }

  - starlight-menu-button[aria-expanded='true'] button {
  + .sl-menu-button:has(~ :popover-open) {
    color: var(--sl-color-text-accent-high);
  }
  ```

  See [`MobileMenuToggle.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileMenuToggle.astro) and [`PageFrame.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro) on GitHub for the full source code of the updated components.

- [#&#8203;3572](withastro/starlight#3572) [`292fb17`](withastro/starlight@292fb17) Thanks [@&#8203;HiDeoo](https://github.com/HiDeoo)! - Removes the `tagline` configuration option, which was never used.

  If your configuration included a `tagline` option, you can safely remove it without any replacement.

- [#&#8203;4134](withastro/starlight#4134) [`6135f01`](withastro/starlight@6135f01) Thanks [@&#8203;HiDeoo](https://github.com/HiDeoo)! - Updates internal `@astrojs/mdx`, `@astrojs/markdown-satteri`, and `satteri` dependencies.

  ⚠️ **BREAKING CHANGE:** The following minimum versions are now required:

  - `astro` v7.2.10 or later
  - `@astrojs/markdown-satteri` 0.4.0 or later (if you use it)
  - `@astrojs/markdown-remark` 7.3.0 or later (if you use it)

  Please update Starlight and Astro together:

  ```sh
  npx @astrojs/upgrade
  ```

- [#&#8203;4121](withastro/starlight#4121) [`2623ae6`](withastro/starlight@2623ae6) Thanks [@&#8203;delucis](https://github.com/delucis)! - Refactors Starlight’s mobile menu toggle to work when JavaScript fails or is disabled

  ⚠️ **BREAKING CHANGE:** This release drops official support for Chromium-based browsers prior to version 116 (released August 2023), Safari-based browsers prior to version 17.0 (released September 2023), and Firefox prior to version 125 (released April 2024). You can find a list of currently supported browsers and their versions using this [browserslist query](https://browsersl.ist/#q=%3E+0.5%25%2C+not+dead%2C+Chrome+%3E%3D+116%2C+Edge+%3E%3D+116%2C+Firefox+%3E%3D+125%2C+Safari+%3E%3D+17.0%2C+iOS+%3E%3D+17.0%2C+not+op_mini+all).

  This change also removes the `data-mobile-menu-expanded` attribute, which was previously added to `<body>` while the mobile menu is open. If you have custom code that was depending on this attribute, you will need to update it to use a new selector to check if the mobile menu is open.

  In the following example, a custom background colour for the site header while the menu is open is updated for the new approach:

  ```diff
  - [data-mobile-menu-expanded] header {
  + body:has(sl-sidebar-pane:popover-open) header {
    background-color: var(--sl-color-bg);
  }
  ```

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42NS4yIiwidXBkYXRlZEluVmVyIjoiNDQuNjUuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ approved Pull requests that have been approved and are ready to merge when next cutting a release 🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 minor Change that triggers a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants