From a6573ff60c4b85d5473ea3903b223f8f1ee9f412 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Thu, 3 Sep 2026 14:02:14 +0800 Subject: [PATCH 1/4] feat(ssr): enable `throwUnhandledErrorInProduction` (#5419) --- src/client/app/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/app/index.ts b/src/client/app/index.ts index 952e52f5..a15e0684 100644 --- a/src/client/app/index.ts +++ b/src/client/app/index.ts @@ -98,6 +98,12 @@ export async function createApp() { } }) + // set before enhanceApp so users can still disable it or take over with their own errorHandler; + // unhandled errors then fail the build instead of silently shipping broken pages + if (import.meta.env.SSR) { + app.config.throwUnhandledErrorInProduction = true + } + if (Theme.enhanceApp) { await Theme.enhanceApp({ app, From dcf7fda29d6761969e30b98b10172b8d82e30358 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 4 Sep 2026 16:22:14 +0530 Subject: [PATCH 2/4] chore: named imports don't work with json natively --- docs/config.ts | 4 ++-- docs/es/config.ts | 4 ++-- docs/fa/config.ts | 4 ++-- docs/ja/config.ts | 4 ++-- docs/ko/config.ts | 4 ++-- docs/pt/config.ts | 4 ++-- docs/ru/config.ts | 4 ++-- docs/zh/config.ts | 4 ++-- scripts/release.ts | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/config.ts b/docs/config.ts index aa751983..1989a8e6 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -1,5 +1,5 @@ import { defineAdditionalConfig, type DefaultTheme } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export default defineAdditionalConfig({ description: 'Vite & Vue powered static site generator.', @@ -37,7 +37,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/es/config.ts b/docs/es/config.ts index 43b2dfb7..547182e0 100644 --- a/docs/es/config.ts +++ b/docs/es/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -89,7 +89,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/es/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/fa/config.ts b/docs/fa/config.ts index 2b7dcc1c..773571a9 100644 --- a/docs/fa/config.ts +++ b/docs/fa/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -97,7 +97,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/ja/config.ts b/docs/ja/config.ts index 3930ab7c..97a5deb2 100644 --- a/docs/ja/config.ts +++ b/docs/ja/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -60,7 +60,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/ko/config.ts b/docs/ko/config.ts index 2226254d..ef8f941b 100644 --- a/docs/ko/config.ts +++ b/docs/ko/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -89,7 +89,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/ko/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/pt/config.ts b/docs/pt/config.ts index 9b99bef3..f52eb484 100644 --- a/docs/pt/config.ts +++ b/docs/pt/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -89,7 +89,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/pt/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/ru/config.ts b/docs/ru/config.ts index 4a4fa3d7..ef695544 100644 --- a/docs/ru/config.ts +++ b/docs/ru/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -87,7 +87,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/ru/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/docs/zh/config.ts b/docs/zh/config.ts index 41a557a5..376736c4 100644 --- a/docs/zh/config.ts +++ b/docs/zh/config.ts @@ -3,7 +3,7 @@ import { type DefaultTheme, type MarkdownLocaleOptions } from 'vitepress' -import { version } from 'vitepress/package.json' with { type: 'json' } +import pkg from 'vitepress/package.json' with { type: 'json' } export const markdown: MarkdownLocaleOptions = { container: { @@ -89,7 +89,7 @@ function nav(): DefaultTheme.NavItem[] { activeMatch: '/zh/reference/' }, { - text: version, + text: pkg.version, items: [ { text: '1.6.4', diff --git a/scripts/release.ts b/scripts/release.ts index 3d861c1b..f6da9f84 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -8,7 +8,7 @@ import * as prompts from '@clack/prompts' import { spawn } from 'cross-spawn' import semver from 'semver' -import { version as currentVersion } from '../package.json' with { type: 'json' } +import pkg from '../package.json' with { type: 'json' } const { inc: _inc, valid } = semver @@ -17,7 +17,7 @@ const versionIncrements = ['patch', 'minor', 'major'] as const const tags = ['latest', 'next'] as const const dir = fileURLToPath(new URL('.', import.meta.url)) -const inc = (i: semver.ReleaseType) => _inc(currentVersion, i) +const inc = (i: semver.ReleaseType) => _inc(pkg.version, i) const run = async (bin: string, args: string[], opts: SpawnOptions = {}) => { const child = spawn(bin, args, { stdio: 'inherit', ...opts }) const [code, signal] = (await once(child, 'close')) as [ @@ -50,7 +50,7 @@ async function main() { if (release === 3) { const customVersion = await prompts.text({ message: 'Input custom version', - initialValue: currentVersion + initialValue: pkg.version }) if (prompts.isCancel(customVersion)) return cancel() targetVersion = customVersion From 22b64ff952851764e2ddd6b3ff0ad038c4e42c3d Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 4 Sep 2026 16:27:33 +0530 Subject: [PATCH 3/4] release: v2.0.0-alpha.20 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f150ae78..8958888b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +# [2.0.0-alpha.20](https://github.com/vuejs/vitepress/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2026-09-04) + +### Bug Fixes + +- harden eager frontmatter interpolation ([#5413](https://github.com/vuejs/vitepress/issues/5413)) ([09f9672](https://github.com/vuejs/vitepress/commit/09f9672ee108578808f793bb57e306bc92dff7bc)) +- key head entries by id and ignore meta content when deduping ([b18f306](https://github.com/vuejs/vitepress/commit/b18f30680b9bced83abd6eacb9417701298cb309)), closes [#5362](https://github.com/vuejs/vitepress/issues/5362) [#5363](https://github.com/vuejs/vitepress/issues/5363) [#5379](https://github.com/vuejs/vitepress/issues/5379) +- **search:** respect per-locale markdown options ([#5351](https://github.com/vuejs/vitepress/issues/5351)) ([27c4a1a](https://github.com/vuejs/vitepress/commit/27c4a1a2a3a098a00e332a5db26f3d2d79aa319a)) +- serialize config functions as code, not strings revived via new Function (close [#3685](https://github.com/vuejs/vitepress/issues/3685)) ([d3b2957](https://github.com/vuejs/vitepress/commit/d3b2957db000772a408943d01382650821ce0950)) +- **theme/regression:** fix misaligned external link icon ([2be52f0](https://github.com/vuejs/vitepress/commit/2be52f0657efb6e7e061cf29261158bd99f7ff86)) +- **theme:** adjust z-index for VPNavBar and simplify VPNavScreen styles ([#5374](https://github.com/vuejs/vitepress/issues/5374)) ([35cf647](https://github.com/vuejs/vitepress/commit/35cf6470d36bfea5f7c53de251382a19275f72a9)) +- **theme:** cover the external link icon's paint box with its mask ([39b8f9f](https://github.com/vuejs/vitepress/commit/39b8f9f00140cc3f4a60c9e1ffb0c142de5ea089)) +- **theme:** drop the -webkit-backdrop-filter fallbacks ([a2a0a92](https://github.com/vuejs/vitepress/commit/a2a0a923e5f468af1bb81023347c61513d6c408a)) +- **theme:** fix menu dropdown group dividers ([#5365](https://github.com/vuejs/vitepress/issues/5365)) ([49c84f5](https://github.com/vuejs/vitepress/commit/49c84f570a933a2b5a95411bfd419b7369ab02a7)) +- **theme:** fix nav screen and divider appearance ([#5369](https://github.com/vuejs/vitepress/issues/5369)) ([a0401ee](https://github.com/vuejs/vitepress/commit/a0401eed4b6aa70fcab7c2c9a2d2aeaa674f59bd)) +- **theme:** fix social links spacing in dropdown ([#5370](https://github.com/vuejs/vitepress/issues/5370)) ([cb636b2](https://github.com/vuejs/vitepress/commit/cb636b241075296910237d6c067cba8a9052683e)) +- **theme:** handle outline bottom overscroll ([#5375](https://github.com/vuejs/vitepress/issues/5375)) ([3fe901d](https://github.com/vuejs/vitepress/commit/3fe901dea973ce3b24c1f3d38f313ab40466357e)) +- **theme:** keep search beside the title without a nav menu ([14f4f09](https://github.com/vuejs/vitepress/commit/14f4f09d32a5325a33629b5911c714d44882a726)) +- **theme:** keep the search keycap glyphs out of the DOM text ([60f656b](https://github.com/vuejs/vitepress/commit/60f656b0ec46a4bbe61f877036385ec3af64a9ff)), closes [#5401](https://github.com/vuejs/vitepress/issues/5401) +- **theme:** mark current navigation links ([#5395](https://github.com/vuejs/vitepress/issues/5395)) ([0f0fe13](https://github.com/vuejs/vitepress/commit/0f0fe135762489f1a6c73348bd8b0a86db969248)) +- **theme:** paint the navbar divider on its own layer ([9bebd09](https://github.com/vuejs/vitepress/commit/9bebd092ebad1818e31cac8e86e5b03704554995)), closes [#5399](https://github.com/vuejs/vitepress/issues/5399) +- **theme:** prevent layout shifts when locking page scroll ([310679a](https://github.com/vuejs/vitepress/commit/310679a76c43b429dbe8b7127dc7e6bb3ec50569)), closes [#5386](https://github.com/vuejs/vitepress/issues/5386) +- **theme:** prevent scroll chaining in local nav outline dropdown ([#5367](https://github.com/vuejs/vitepress/issues/5367)) ([0a96bae](https://github.com/vuejs/vitepress/commit/0a96bae50b907b70a3cd712f98514ce77086496a)) +- **theme:** remove extra margins from first and last paragraph inside a list element ([8dbd782](https://github.com/vuejs/vitepress/commit/8dbd782c752ed510a11c04527bed974c122e8133)), closes [#5353](https://github.com/vuejs/vitepress/issues/5353) +- **theme:** render sidebar active state during ssr ([005aa5c](https://github.com/vuejs/vitepress/commit/005aa5c3e88d5d6a455bcc20b4c4e6f2c3a1abe9)) +- **theme:** render sidebar group toggles as native buttons ([ed2bfb2](https://github.com/vuejs/vitepress/commit/ed2bfb266ef788e86d1a73fe3cd7708a4cd5e260)), closes [#5366](https://github.com/vuejs/vitepress/issues/5366) [#5371](https://github.com/vuejs/vitepress/issues/5371) +- **theme:** rendering of sponsor and team components inside vp-doc containers ([#4493](https://github.com/vuejs/vitepress/issues/4493)) ([b7602df](https://github.com/vuejs/vitepress/commit/b7602df1cdee75d0814cf3f131b4906a31841851)) +- **theme:** treat negative scrollY as top ([#5368](https://github.com/vuejs/vitepress/issues/5368)) ([9d521db](https://github.com/vuejs/vitepress/commit/9d521db8671a53d5a5f23baf5226879ce2d25960)) +- **theme:** use a getter as VPSidebar's open watch source ([9aeeb4f](https://github.com/vuejs/vitepress/commit/9aeeb4fa31396040b6014af2b45111a05751547d)) +- **theme:** use relative length units to auto-close nav screen menu ([#5387](https://github.com/vuejs/vitepress/issues/5387)) ([c197979](https://github.com/vuejs/vitepress/commit/c1979799936f68443f150122d427fb26ff30e9ae)) + +### Features + +- **cli:** make shortcuts case-insensitive ([#5378](https://github.com/vuejs/vitepress/issues/5378)) ([4ffcdae](https://github.com/vuejs/vitepress/commit/4ffcdae825b7534c24bc9ab4473849c0b8d72669)) +- hashed icon styles, offline dev icons, arbitrary iconify collections ([#5407](https://github.com/vuejs/vitepress/issues/5407)) ([d00a5e0](https://github.com/vuejs/vitepress/commit/d00a5e0f8778923d7ef6adf97b5671e9d0f86be6)) +- relative base (`./`) and `assetsBase` (CDN prefix) ([#5406](https://github.com/vuejs/vitepress/issues/5406)) ([feadd9f](https://github.com/vuejs/vitepress/commit/feadd9fcc1519d52a74940f8cd15a71ffcc25fe8)) +- resolve `$frontmatter` expressions while rendering markdown ([#5412](https://github.com/vuejs/vitepress/issues/5412)) ([a1eb284](https://github.com/vuejs/vitepress/commit/a1eb28496e67f881fc50da776c11aa45a73c4f40)) +- **ssr:** enable `throwUnhandledErrorInProduction` ([#5419](https://github.com/vuejs/vitepress/issues/5419)) ([a6573ff](https://github.com/vuejs/vitepress/commit/a6573ff60c4b85d5473ea3903b223f8f1ee9f412)) +- **theme:** add --vp-local-nav-divider-color ([110209d](https://github.com/vuejs/vitepress/commit/110209dd32bd7b828abccfb773ae2207f36c1147)) +- **theme:** add opt-in severity-based colors for containers, alerts, and badges ([#5373](https://github.com/vuejs/vitepress/issues/5373)) ([45cb85e](https://github.com/vuejs/vitepress/commit/45cb85e5104346422e82f9cae96b0ce0afc690d8)) +- **theme:** redesign the navbar ([#5397](https://github.com/vuejs/vitepress/issues/5397)) ([26b76d6](https://github.com/vuejs/vitepress/commit/26b76d6d9e8fd3ae368c7a1e8ad6698cdeb73e7a)) +- **theme:** scroll toc if active item is out of view ([#5377](https://github.com/vuejs/vitepress/issues/5377)) ([72534af](https://github.com/vuejs/vitepress/commit/72534af30ebe25cfedf7c3ca6d7f9fbfbbaa487f)) +- **theme:** un-deprecate Theme.setup and compose it across extends ([#5404](https://github.com/vuejs/vitepress/issues/5404)) ([ebbd48c](https://github.com/vuejs/vitepress/commit/ebbd48c8c76a1f794ed52d8d4d9917f1bd52bea0)) +- **theme:** use relative length units ([#5323](https://github.com/vuejs/vitepress/issues/5323)) ([2a91caa](https://github.com/vuejs/vitepress/commit/2a91caa78e62227764e8714574b8367e0610e8ee)) + ## [2.0.0-alpha.19](https://github.com/vuejs/vitepress/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2026-08-02) ### Bug Fixes diff --git a/package.json b/package.json index 0942027e..a36f5a63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vitepress", - "version": "2.0.0-alpha.19", + "version": "2.0.0-alpha.20", "description": "Vite & Vue powered static site generator", "keywords": [ "vite", From 7cc14b240214e3d2707ad3cdf085ddeee09a6785 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 4 Sep 2026 16:30:08 +0530 Subject: [PATCH 4/4] chore: adjust changelog heading level --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8958888b..dc6adb3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# [2.0.0-alpha.20](https://github.com/vuejs/vitepress/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2026-09-04) +## [2.0.0-alpha.20](https://github.com/vuejs/vitepress/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2026-09-04) ### Bug Fixes