Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/kind-ravens-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/starlight': minor
---

Updates the `astro-expressive-code` dependency to the latest version (0.38).

The new version allows using `ec.config.mjs` to selectively override individual Expressive Code styles and settings provided by Starlight themes and plugins, speeds up Shiki language loading, and adds the config option `expressiveCode.shiki.injectLangsIntoNestedCodeBlocks`. See the [Expressive Code release notes](https://expressive-code.com/releases/#0380) for full details.
6 changes: 5 additions & 1 deletion packages/starlight/integrations/expressive-code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { AstroIntegration } from 'astro';
import type { StarlightConfig } from '../../types';
import type { createTranslationSystemFromFs } from '../../utils/translations-fs';
import { pathToLocale } from '../shared/pathToLocale';
import { slugToLocale } from '../shared/slugToLocale';
import {
applyStarlightUiThemeColors,
preprocessThemes,
Expand Down Expand Up @@ -152,7 +153,10 @@ export function getStarlightEcConfigPreprocessor({
},
...otherStyleOverrides,
},
getBlockLocale: ({ file }) => pathToLocale(file.path, { starlightConfig, astroConfig }),
getBlockLocale: ({ file }) =>
file.url
? slugToLocale(file.url.pathname.slice(1), starlightConfig)
: pathToLocale(file.path, { starlightConfig, astroConfig }),
plugins,
...rest,
};
Expand Down
6 changes: 3 additions & 3 deletions packages/starlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@
"@types/node": "^18.16.19",
"@vitest/coverage-v8": "^1.6.0",
"astro": "^4.15.3",
"vitest": "^1.6.0",
"linkedom": "^0.18.4"
"linkedom": "^0.18.4",
"vitest": "^1.6.0"
},
"dependencies": {
"@astrojs/mdx": "^3.1.3",
"@astrojs/sitemap": "^3.1.6",
"@pagefind/default-ui": "^1.0.3",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"astro-expressive-code": "^0.35.6",
"astro-expressive-code": "^0.38.3",
"bcp-47": "^2.1.0",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
Expand Down
9 changes: 4 additions & 5 deletions packages/starlight/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ export default defineConfig({
'index.ts',
],
thresholds: {
autoUpdate: true,
lines: 89.26,
functions: 92.78,
branches: 92.48,
statements: 89.26,
lines: 88,
functions: 90,
branches: 90,
statements: 88,
},
},
},
Expand Down
130 changes: 102 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading