diff --git a/package-lock.json b/package-lock.json index 949b342ea7a82e..62baadc1d97872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@astrojs/react": "^3.6.2", "@astrojs/rss": "^4.0.9", "@astrojs/sitemap": "^3.2.1", - "@astrojs/starlight": "^0.28.3", + "@astrojs/starlight": "^0.29.2", "@astrojs/starlight-docsearch": "^0.2.0", "@astrojs/starlight-tailwind": "^2.0.3", "@astrojs/tailwind": "^5.1.2", @@ -748,24 +748,24 @@ } }, "node_modules/@astrojs/starlight": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.28.3.tgz", - "integrity": "sha512-GXXIPKSu5d50mLVtgI4jf6pb3FPQm8n4MI6ZXuQQqqnA0xg7PJQ76WFSVyrICeqM5fKABSqcBksp/glyEJes/A==", + "version": "0.29.2", + "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.29.2.tgz", + "integrity": "sha512-xv9AhWkP3fxCB6EF6MlT4yEbxzye3aMSbuVbFEGbQh8G/w1MPhdNCnQakIHpmIwwyxwG9cW3mQdAZum4oOO39w==", "dev": true, - "license": "MIT", "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", "hast-util-to-string": "^3.0.0", "hastscript": "^9.0.0", "i18next": "^23.11.5", + "js-yaml": "^4.1.0", "mdast-util-directive": "^3.0.0", "mdast-util-to-markdown": "^2.1.0", "mdast-util-to-string": "^4.0.0", @@ -2885,9 +2885,9 @@ } }, "node_modules/@expressive-code/core": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.35.6.tgz", - "integrity": "sha512-xGqCkmfkgT7lr/rvmfnYdDSeTdCSp1otAHgoFS6wNEeO7wGDPpxdosVqYiIcQ8CfWUABh/pGqWG90q+MV3824A==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.38.3.tgz", + "integrity": "sha512-s0/OtdRpBONwcn23O8nVwDNQqpBGKscysejkeBkwlIeHRLZWgiTVrusT5Idrdz1d8cW5wRk9iGsAIQmwDPXgJg==", "dev": true, "dependencies": { "@ctrl/tinycolor": "^4.0.4", @@ -2902,31 +2902,31 @@ } }, "node_modules/@expressive-code/plugin-frames": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.35.6.tgz", - "integrity": "sha512-CqjSWjDJ3wabMJZfL9ZAzH5UAGKg7KWsf1TBzr4xvUbZvWoBtLA/TboBML0U1Ls8h/4TRCIvR4VEb8dv5+QG3w==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.38.3.tgz", + "integrity": "sha512-qL2oC6FplmHNQfZ8ZkTR64/wKo9x0c8uP2WDftR/ydwN/yhe1ed7ZWYb8r3dezxsls+tDokCnN4zYR594jbpvg==", "dev": true, "dependencies": { - "@expressive-code/core": "^0.35.6" + "@expressive-code/core": "^0.38.3" } }, "node_modules/@expressive-code/plugin-shiki": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.35.6.tgz", - "integrity": "sha512-xm+hzi9BsmhkDUGuyAWIydOAWer7Cs9cj8FM0t4HXaQ+qCubprT6wJZSKUxuvFJIUsIOqk1xXFaJzGJGnWtKMg==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.38.3.tgz", + "integrity": "sha512-kqHnglZeesqG3UKrb6e9Fq5W36AZ05Y9tCREmSN2lw8LVTqENIeCIkLDdWtQ5VoHlKqwUEQFTVlRehdwoY7Gmw==", "dev": true, "dependencies": { - "@expressive-code/core": "^0.35.6", - "shiki": "^1.1.7" + "@expressive-code/core": "^0.38.3", + "shiki": "^1.22.2" } }, "node_modules/@expressive-code/plugin-text-markers": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.35.6.tgz", - "integrity": "sha512-/k9eWVZSCs+uEKHR++22Uu6eIbHWEciVHbIuD8frT8DlqTtHYaaiwHPncO6KFWnGDz5i/gL7oyl6XmOi/E6GVg==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.38.3.tgz", + "integrity": "sha512-dPK3+BVGTbTmGQGU3Fkj3jZ3OltWUAlxetMHI6limUGCWBCucZiwoZeFM/WmqQa71GyKRzhBT+iEov6kkz2xVA==", "dev": true, "dependencies": { - "@expressive-code/core": "^0.35.6" + "@expressive-code/core": "^0.38.3" } }, "node_modules/@fastify/busboy": { @@ -5344,6 +5344,7 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-4.16.12.tgz", "integrity": "sha512-NnFeIKhGW6MdXCQT2hRariUwfxqJUIRs6qKqaovaQkTojzxh2r1L8C49qanKc+huH9wK2C94VZB2T/tosyRl1A==", "dev": true, + "license": "MIT", "dependencies": { "@astrojs/compiler": "^2.10.3", "@astrojs/internal-helpers": "0.4.1", @@ -5453,15 +5454,15 @@ } }, "node_modules/astro-expressive-code": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.35.6.tgz", - "integrity": "sha512-1U4KrvFuodaCV3z4I1bIR16SdhQlPkolGsYTtiANxPZUVv/KitGSCTjzksrkPonn1XuwVqvnwmUUVzTLWngnBA==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.38.3.tgz", + "integrity": "sha512-Tvdc7RV0G92BbtyEOsfJtXU35w41CkM94fOAzxbQP67Wj5jArfserJ321FO4XA7WG9QMV0GIBmQq77NBIRDzpQ==", "dev": true, "dependencies": { - "rehype-expressive-code": "^0.35.6" + "rehype-expressive-code": "^0.38.3" }, "peerDependencies": { - "astro": "^4.0.0-beta || ^3.3.0" + "astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0" } }, "node_modules/astro-icon": { @@ -8080,15 +8081,15 @@ } }, "node_modules/expressive-code": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.35.6.tgz", - "integrity": "sha512-+mx+TPTbMqgo0mL92Xh9QgjW0kSQIsEivMgEcOnaqKqL7qCw8Vkqc5Rg/di7ZYw4aMUSr74VTc+w8GQWu05j1g==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.38.3.tgz", + "integrity": "sha512-COM04AiUotHCKJgWdn7NtW2lqu8OW8owAidMpkXt1qxrZ9Q2iC7+tok/1qIn2ocGnczvr9paIySgGnEwFeEQ8Q==", "dev": true, "dependencies": { - "@expressive-code/core": "^0.35.6", - "@expressive-code/plugin-frames": "^0.35.6", - "@expressive-code/plugin-shiki": "^0.35.6", - "@expressive-code/plugin-text-markers": "^0.35.6" + "@expressive-code/core": "^0.38.3", + "@expressive-code/plugin-frames": "^0.38.3", + "@expressive-code/plugin-shiki": "^0.38.3", + "@expressive-code/plugin-text-markers": "^0.38.3" } }, "node_modules/extend": { @@ -9057,9 +9058,9 @@ } }, "node_modules/hast-util-select": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.2.tgz", - "integrity": "sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.3.tgz", + "integrity": "sha512-OVRQlQ1XuuLP8aFVLYmC2atrfWHS5UD3shonxpnyrjcCkwtvmt/+N6kYJdcY4mkMJhxp4kj2EFIxQ9kvkkt/eQ==", "dev": true, "dependencies": { "@types/hast": "^3.0.0", @@ -9072,7 +9073,6 @@ "hast-util-has-property": "^3.0.0", "hast-util-to-string": "^3.0.0", "hast-util-whitespace": "^3.0.0", - "not": "^0.1.0", "nth-check": "^2.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0", @@ -9198,9 +9198,9 @@ } }, "node_modules/hast-util-to-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz", - "integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz", + "integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==", "dev": true, "dependencies": { "@types/hast": "^3.0.0" @@ -12064,12 +12064,6 @@ "node": ">=0.10.0" } }, - "node_modules/not": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/not/-/not-0.1.0.tgz", - "integrity": "sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA==", - "dev": true - }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -13411,12 +13405,12 @@ } }, "node_modules/rehype-expressive-code": { - "version": "0.35.6", - "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.35.6.tgz", - "integrity": "sha512-pPdE+pRcRw01kxMOwHQjuRxgwlblZt5+wAc3w2aPGgmcnn57wYjn07iKO7zaznDxYVxMYVvYlnL+R3vWFQS4Gw==", + "version": "0.38.3", + "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.38.3.tgz", + "integrity": "sha512-RYSSDkMBikoTbycZPkcWp6ELneANT4eTpND1DSRJ6nI2eVFUwTBDCvE2vO6jOOTaavwnPiydi4i/87NRyjpdOA==", "dev": true, "dependencies": { - "expressive-code": "^0.35.6" + "expressive-code": "^0.38.3" } }, "node_modules/rehype-external-links": { diff --git a/package.json b/package.json index 119f91adc2b7b4..94db7e3ecb750c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@astrojs/react": "^3.6.2", "@astrojs/rss": "^4.0.9", "@astrojs/sitemap": "^3.2.1", - "@astrojs/starlight": "^0.28.3", + "@astrojs/starlight": "^0.29.2", "@astrojs/starlight-docsearch": "^0.2.0", "@astrojs/starlight-tailwind": "^2.0.3", "@astrojs/tailwind": "^5.1.2", diff --git a/patches/@astrojs+starlight+0.28.3.patch b/patches/@astrojs+starlight+0.28.3.patch deleted file mode 100644 index e3434e0e30039c..00000000000000 --- a/patches/@astrojs+starlight+0.28.3.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/node_modules/@astrojs/starlight/utils/navigation.ts b/node_modules/@astrojs/starlight/utils/navigation.ts -index 526d9f2..de8c64a 100644 ---- a/node_modules/@astrojs/starlight/utils/navigation.ts -+++ b/node_modules/@astrojs/starlight/utils/navigation.ts -@@ -360,8 +360,12 @@ export function getSidebarFromConfig( - locale: string | undefined - ): SidebarEntry[] { - const routes = getLocaleRoutes(locale); -+ const currentSection = pathname.split("/")[1]; - if (sidebarConfig) { -- return sidebarConfig.map((group) => configItemToEntry(group, pathname, locale, routes)); -+ return sidebarConfig.flatMap((group) => { -+ if (group.label !== currentSection) return []; -+ return configItemToEntry(group, pathname, locale, routes) -+ }); - } else { - const tree = treeify(routes, locale || ''); - return sidebarFromDir(tree, pathname, locale, false); diff --git a/src/components/ProductChangelog.astro b/src/components/ProductChangelog.astro index 14367b140752d0..734bc219c19c50 100644 --- a/src/components/ProductChangelog.astro +++ b/src/components/ProductChangelog.astro @@ -80,7 +80,7 @@ if (!changelogs) { `Changelog entry points to ${link.slice(1, -1)} but unable to find entry with that slug`, ); - description = (await entryToString(page)) ?? page.body; + description = (await entryToString(page, Astro.locals)) ?? page.body; return (
...
` element in the HTML, return that. 3. Return `undefined` to signal to consumers there is no suitable description. */ -export async function getPageDescription(entry: CollectionEntry<"docs">) { +export async function getPageDescription( + entry: CollectionEntry<"docs">, + locals: any, +) { if (entry.data.description) return entry.data.description; - const html = await entryToString(entry); + const html = await entryToString(entry, locals); if (!html) return undefined;