Skip to content

Commit 9b32c6a

Browse files
astrobot-houstongithub-actions[bot]delucis
authored
[ci] release (#2861)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
1 parent f493361 commit 9b32c6a

17 files changed

+114
-130
lines changed

‎.changeset/chatty-jars-flash.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.changeset/chilled-bees-pump.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

‎.changeset/dry-geese-pretend.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.changeset/large-balloons-compete.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎.changeset/loud-wolves-decide.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.changeset/nervous-mugs-begin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.changeset/polite-fishes-remain.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎.changeset/stupid-turkeys-appear.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎.changeset/wet-cherries-try.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎examples/basics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "^0.31.1",
14+
"@astrojs/starlight": "^0.32.0",
1515
"astro": "^5.1.5",
1616
"sharp": "^0.32.5"
1717
}

‎examples/markdoc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@astrojs/markdoc": "^0.12.4",
15-
"@astrojs/starlight": "^0.31.1",
15+
"@astrojs/starlight": "^0.32.0",
1616
"@astrojs/starlight-markdoc": "^0.2.0",
1717
"astro": "^5.1.5",
1818
"sharp": "^0.32.5"

‎examples/tailwind/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "^0.31.1",
14+
"@astrojs/starlight": "^0.32.0",
1515
"@astrojs/starlight-tailwind": "^3.0.0",
1616
"@astrojs/tailwind": "^5.1.4",
1717
"astro": "^5.1.5",

‎packages/docsearch/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# @astrojs/starlight-docsearch
22

3+
## 0.6.0
4+
5+
### Minor Changes
6+
7+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) and [#2390](https://github.com/withastro/starlight/pull/2390) [`f493361`](https://github.com/withastro/starlight/commit/f493361d7b64a3279980e0f046c3a52196ab94e0) Thanks [@HiDeoo](https://github.com/HiDeoo) and [@delucis](https://github.com/delucis)!
8+
⚠️ **BREAKING CHANGE:** The minimum supported version of Starlight is now 0.32.0
9+
10+
Please use the `@astrojs/upgrade` command to upgrade your project:
11+
12+
```sh
13+
npx @astrojs/upgrade
14+
```
15+
316
## 0.5.0
417

518
### Minor Changes

‎packages/docsearch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astrojs/starlight-docsearch",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "Algolia DocSearch plugin for the Starlight documentation theme for Astro",
55
"author": "Chris Swithinbank <swithinbank@gmail.com>",
66
"license": "MIT",

‎packages/starlight/CHANGELOG.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,98 @@
11
# @astrojs/starlight
22

3+
## 0.32.0
4+
5+
### Minor Changes
6+
7+
- [#2390](https://github.com/withastro/starlight/pull/2390) [`f493361`](https://github.com/withastro/starlight/commit/f493361d7b64a3279980e0f046c3a52196ab94e0) Thanks [@delucis](https://github.com/delucis)! - Moves route data to `Astro.locals` instead of passing it down via component props
8+
9+
⚠️ **Breaking change:**
10+
Previously, all of Starlight’s templating components, including user or plugin overrides, had access to a data object for the current route via `Astro.props`.
11+
This data is now available as `Astro.locals.starlightRoute` instead.
12+
13+
To update, refactor any component overrides you have:
14+
15+
- Remove imports of `@astrojs/starlight/props`, which is now deprecated.
16+
- Update code that accesses `Astro.props` to use `Astro.locals.starlightRoute` instead.
17+
- Remove any spreading of `{...Astro.props}` into child components, which is no longer required.
18+
19+
In the following example, a custom override for Starlight’s `LastUpdated` component is updated for the new style:
20+
21+
```diff
22+
---
23+
import Default from '@astrojs/starlight/components/LastUpdated.astro';
24+
- import type { Props } from '@astrojs/starlight/props';
25+
26+
- const { lastUpdated } = Astro.props;
27+
+ const { lastUpdated } = Astro.locals.starlightRoute;
28+
29+
const updatedThisYear = lastUpdated?.getFullYear() === new Date().getFullYear();
30+
---
31+
32+
{updatedThisYear && (
33+
- <Default {...Astro.props}><slot /></Default>
34+
+ <Default><slot /></Default>
35+
)}
36+
```
37+
38+
_Community Starlight plugins may also need to be manually updated to work with Starlight 0.32. If you encounter any issues, please reach out to the plugin author to see if it is a known issue or if an updated version is being worked on._
39+
40+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Deprecates the Starlight plugin `setup` hook in favor of the new `config:setup` hook which provides the same functionality.
41+
42+
⚠️ **BREAKING CHANGE:**
43+
44+
The Starlight plugin `setup` hook is now deprecated and will be removed in a future release. Please update your plugins to use the new `config:setup` hook instead.
45+
46+
```diff
47+
export default {
48+
name: 'plugin-with-translations',
49+
hooks: {
50+
- 'setup'({ config }) {
51+
+ 'config:setup'({ config }) {
52+
// Your plugin configuration setup code
53+
},
54+
},
55+
};
56+
```
57+
58+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Exposes the built-in localization system in the Starlight plugin `config:setup` hook.
59+
60+
⚠️ **BREAKING CHANGE:**
61+
62+
This addition changes how Starlight plugins add or update translation strings used in Starlight’s localization APIs.
63+
Plugins previously using the [`injectTranslations()`](https://starlight.astro.build/reference/plugins/#injecttranslations) callback function from the plugin [`config:setup`](https://starlight.astro.build/reference/plugins/#configsetup) hook should now use the same function available in the [`i18n:setup`](https://starlight.astro.build/reference/plugins/#i18nsetup) hook.
64+
65+
```diff
66+
export default {
67+
name: 'plugin-with-translations',
68+
hooks: {
69+
- 'config:setup'({ injectTranslations }) {
70+
+ 'i18n:setup'({ injectTranslations }) {
71+
injectTranslations({
72+
en: {
73+
'myPlugin.doThing': 'Do the thing',
74+
},
75+
fr: {
76+
'myPlugin.doThing': 'Faire le truc',
77+
},
78+
});
79+
},
80+
},
81+
};
82+
```
83+
84+
- [#2858](https://github.com/withastro/starlight/pull/2858) [`2df9d05`](https://github.com/withastro/starlight/commit/2df9d05fe7b61282809aa85a1d77662fdd3b748f) Thanks [@XREvo](https://github.com/XREvo)! - Adds support for Pagefind’s multisite search features
85+
86+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds a new [`HookParameters`](https://starlight.astro.build/reference/plugins/#hooks) utility type to get the type of a plugin hook’s arguments.
87+
88+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds a new [`useTranslations()`](https://starlight.astro.build/reference/plugins/#usetranslations) callback function to the Starlight plugin `config:setup` hook to generate a utility function to access UI strings for a given language.
89+
90+
- [#2578](https://github.com/withastro/starlight/pull/2578) [`f895f75`](https://github.com/withastro/starlight/commit/f895f75b17f36c826cc871ba1826e5ae1dff44ca) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds a new [`absolutePathToLang()`](https://starlight.astro.build/reference/plugins/#absolutepathtolang) callback function to the Starlight plugin `config:setup` to get the language for a given absolute file path.
91+
92+
### Patch Changes
93+
94+
- [#2848](https://github.com/withastro/starlight/pull/2848) [`9b32ba9`](https://github.com/withastro/starlight/commit/9b32ba967c5741354bc99ba0bcff3f454b8117ad) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes styling of [filter](https://pagefind.app/docs/filtering/) and [metadata](https://pagefind.app/docs/metadata/) elements in Pagefind search UI.
95+
396
## 0.31.1
497

598
### Patch Changes

‎packages/starlight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astrojs/starlight",
3-
"version": "0.31.1",
3+
"version": "0.32.0",
44
"description": "Build beautiful, high-performance documentation websites with Astro",
55
"scripts": {
66
"test": "vitest",

‎pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)