Skip to content

Commit 2e3453c

Browse files
chore: bump rspress to v2.0.0-rc.2 (#219)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent e238c4b commit 2e3453c

40 files changed

+2119
-2061
lines changed

.changeset/green-cobras-dress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": minor
3+
---
4+
5+
chore: bump rspress to v2.0.0-rc.2

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.11.0
1+
24.11.1

docs/en/usage/markdown.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,3 @@ graph TD;
8686
```
8787

8888
With [Markdown Preview Mermaid](https://github.com/mjbvz/vscode-markdown-mermaid), you can preview in real time in VSCode.
89-
90-
## Attribute Extensions {#attributes}
91-
92-
:::warning
93-
Currently only supported in `.md` files, see [related issue](https://github.com/web-infra-dev/rspress/issues/2215#issuecomment-3018371927)
94-
:::
95-
96-
```md
97-
![](/logo.svg){width="100" height="100"}
98-
```
99-
100-
![](/logo.svg){width="100" height="100"}

docs/zh/usage/markdown.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,3 @@ graph TD;
8585
```
8686

8787
配合 [Markdown Preview Mermaid](https://github.com/mjbvz/vscode-markdown-mermaid) 可以在 VSCode 中实时预览。
88-
89-
## 属性扩展 \{#attributes}
90-
91-
:::warning
92-
当前仅支持在 `.md` 文件中使用,参考[相关 issue](https://github.com/web-infra-dev/rspress/issues/2215#issuecomment-3018371927)
93-
:::
94-
95-
```md
96-
![](/logo.svg){width="100" height="100"}
97-
```
98-
99-
![](/logo.svg){width="100" height="100"}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,28 @@
3131
"version": "changeset version && yarn --no-immutable"
3232
},
3333
"devDependencies": {
34-
"@changesets/changelog-github": "^0.5.1",
35-
"@changesets/cli": "^2.29.7",
36-
"@eslint/js": "^9.38.0",
34+
"@changesets/changelog-github": "^0.5.2",
35+
"@changesets/cli": "^2.29.8",
36+
"@eslint/js": "^9.39.2",
3737
"@swc-node/register": "^1.11.1",
38-
"@swc/core": "^1.14.0",
38+
"@swc/core": "^1.15.4",
3939
"@types/cli-progress": "^3.11.6",
4040
"@types/ejs": "^3.1.5",
4141
"@types/mdast": "^4.0.4",
42-
"@types/node": "^24.0.0",
42+
"@types/node": "^24.10.4",
4343
"@types/picomatch": "^4.0.2",
4444
"@types/pluralize": "^0.0.33",
45-
"@types/react-dom": "^19.2.2",
45+
"@types/react-dom": "^19.2.3",
4646
"@types/swagger2openapi": "^7.0.4",
4747
"@unts/patch-package": "^8.1.1",
48-
"eslint": "^9.38.0",
48+
"eslint": "^9.39.2",
4949
"eslint-import-resolver-typescript": "^4.4.4",
5050
"eslint-plugin-import-x": "^4.16.1",
5151
"eslint-plugin-react-hooks": "^7.0.1",
5252
"eslint-plugin-regexp": "^2.10.0",
53-
"nano-staged": "^0.8.0",
53+
"nano-staged": "^0.9.0",
5454
"npm-run-all2": "^8.0.4",
55-
"prettier": "^3.6.2",
55+
"prettier": "^3.7.4",
5656
"prettier-plugin-pkg": "^0.21.2",
5757
"prettier-plugin-properties": "^0.3.0",
5858
"simple-git-hooks": "^2.13.1",

packages/doom/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,40 +41,40 @@
4141
],
4242
"dependencies": {
4343
"@alauda/doom-export": "^0.2.1",
44-
"@cspell/eslint-plugin": "^9.2.2",
45-
"@eslint-react/eslint-plugin": "^2.2.4",
46-
"@inquirer/prompts": "^7.9.0",
44+
"@cspell/eslint-plugin": "^9.4.0",
45+
"@eslint-react/eslint-plugin": "^2.3.13",
46+
"@inquirer/prompts": "^8.1.0",
4747
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
48-
"@rsbuild/plugin-react": "^1.4.1",
48+
"@rsbuild/plugin-react": "^1.4.2",
4949
"@rsbuild/plugin-sass": "^1.4.0",
50-
"@rsbuild/plugin-svgr": "^1.2.2",
50+
"@rsbuild/plugin-svgr": "^1.2.3",
5151
"@rsbuild/plugin-yaml": "^1.0.3",
52-
"@rspress/core": "2.0.0-beta.34",
53-
"@rspress/plugin-algolia": "2.0.0-beta.34",
54-
"@rspress/plugin-llms": "2.0.0-beta.34",
55-
"@rspress/plugin-sitemap": "2.0.0-beta.34",
56-
"@rspress/shared": "2.0.0-beta.34",
57-
"@shikijs/transformers": "^3.14.0",
52+
"@rspress/core": "2.0.0-rc.2",
53+
"@rspress/plugin-algolia": "2.0.0-rc.2",
54+
"@rspress/plugin-llms": "2.0.0-rc.2",
55+
"@rspress/plugin-sitemap": "2.0.0-rc.2",
56+
"@rspress/shared": "2.0.0-rc.2",
57+
"@shikijs/transformers": "^3.20.0",
5858
"@total-typescript/ts-reset": "^0.6.1",
59-
"@types/react": "^19.2.2",
59+
"@types/react": "^19.2.7",
6060
"ab64": "^0.1.6",
61-
"chokidar": "^4.0.3",
61+
"chokidar": "^5.0.0",
6262
"clsx": "^2.1.1",
6363
"commander": "^14.0.2",
6464
"ejs": "^3.1.10",
65-
"es-toolkit": "^1.41.0",
66-
"eslint": "^9.38.0",
65+
"es-toolkit": "^1.43.0",
66+
"eslint": "^9.39.2",
6767
"eslint-plugin-mdx": "^3.6.2",
68-
"globals": "^16.4.0",
68+
"globals": "^16.5.0",
6969
"html-tag-names": "^2.1.0",
7070
"jsencrypt": "^3.5.4",
7171
"mdast-util-mdx": "^3.0.0",
7272
"mdast-util-mdx-jsx": "^3.2.0",
7373
"mdast-util-phrasing": "^4.1.0",
7474
"mdast-util-to-markdown": "^2.1.2",
7575
"mdast-util-to-string": "^4.0.0",
76-
"mermaid": "^11.12.1",
77-
"openai": "^6.7.0",
76+
"mermaid": "^11.12.2",
77+
"openai": "^6.10.0",
7878
"openapi-types": "^12.1.3",
7979
"p-ratelimit": "^1.0.1",
8080
"picomatch": "^4.0.3",
@@ -95,20 +95,20 @@
9595
"remark-mdx": "^3.1.1",
9696
"remark-message-control": "^8.0.0",
9797
"remark-stringify": "^11.0.0",
98-
"shiki": "^3.14.0",
99-
"simple-git": "^3.28.0",
98+
"shiki": "^3.20.0",
99+
"simple-git": "^3.30.0",
100100
"string-width": "^8.1.0",
101101
"swagger2openapi": "^7.0.8",
102102
"tinyglobby": "^0.2.15",
103-
"type-fest": "^5.1.0",
103+
"type-fest": "^5.3.1",
104104
"typescript": "^5.9.3",
105-
"typescript-eslint": "^8.46.2",
105+
"typescript-eslint": "^8.49.0",
106106
"unified": "^11.0.5",
107107
"unified-lint-rule": "^3.0.1",
108108
"unist-util-position": "^5.0.0",
109109
"unist-util-visit-parents": "^6.0.2",
110110
"x-fetch": "^0.2.6",
111-
"yaml": "^2.8.1",
111+
"yaml": "^2.8.2",
112112
"yoctocolors": "^2.1.2"
113113
}
114114
}

packages/doom/src/cli/load-config.ts

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -63,41 +63,16 @@ import { defaultGitHubUrl, isDoc } from './helpers.ts'
6363
const DEFAULT_LOGO = '/logo.svg'
6464

6565
const KNOWN_LOCALE_CONFIGS: Partial<
66-
Record<
67-
string,
68-
Omit<LocaleConfig, 'lang' | 'editLink'> & { editLink: { text: string } }
69-
>
66+
Record<string, Omit<LocaleConfig, 'lang'>>
7067
> = {
7168
en: {
7269
label: 'English',
73-
editLink: {
74-
text: '📝 Edit this page on GitHub',
75-
},
7670
},
7771
zh: {
7872
label: '简体中文',
79-
searchPlaceholderText: '搜索文档',
80-
searchNoResultsText: '未搜索到相关结果',
81-
searchSuggestedQueryText: '可更换不同的关键字后重试',
82-
outlineTitle: '本页概览',
83-
prevPageText: '上一页',
84-
nextPageText: '下一页',
85-
editLink: {
86-
text: '📝 在 GitHub 上编辑此页',
87-
},
8873
},
8974
ru: {
9075
label: 'Русский',
91-
searchPlaceholderText: 'Поиск документов',
92-
searchNoResultsText: 'Не найдено соответствующих результатов',
93-
searchSuggestedQueryText:
94-
'Попробуйте изменить ключевые слова и повторить поиск',
95-
outlineTitle: 'Обзор страницы',
96-
prevPageText: 'Предыдущая страница',
97-
nextPageText: 'Следующая страница',
98-
editLink: {
99-
text: '📝 Редактировать эту страницу на GitHub',
100-
},
10176
},
10277
}
10378

@@ -221,14 +196,6 @@ const getCommonConfig = async ({
221196
lang: name,
222197
label: name,
223198
...KNOWN_LOCALE_CONFIGS[name],
224-
editLink:
225-
editRepoEnabled && editRepoBaseUrl
226-
? {
227-
docRepoBaseUrl: editRepoBaseUrl,
228-
...KNOWN_LOCALE_CONFIGS.en!.editLink,
229-
...KNOWN_LOCALE_CONFIGS[name]?.editLink,
230-
}
231-
: undefined,
232199
})
233200
}
234201
}
@@ -238,7 +205,7 @@ const getCommonConfig = async ({
238205
locales.map(({ lang }) => lang),
239206
)
240207

241-
const { editLink, ...zhLocale } = KNOWN_LOCALE_CONFIGS.zh!
208+
const zhLocale = KNOWN_LOCALE_CONFIGS.zh!
242209

243210
const algoliaOptions =
244211
((algolia && config.algolia) ??
@@ -300,17 +267,12 @@ const getCommonConfig = async ({
300267
},
301268
themeConfig: {
302269
enableScrollToTop: true,
303-
// https://github.com/web-infra-dev/rspress/issues/2011
304-
outline: true,
305270
localeRedirect: redirect,
306-
...(fallbackToZh
307-
? editRepoEnabled && editRepoBaseUrl
308-
? {
309-
...zhLocale,
310-
editLink: { ...editLink, docRepoBaseUrl: editRepoBaseUrl },
311-
}
312-
: zhLocale
313-
: { locales }),
271+
...(editRepoEnabled &&
272+
editRepoBaseUrl && {
273+
editLink: { docRepoBaseUrl: editRepoBaseUrl },
274+
}),
275+
...(fallbackToZh ? zhLocale : { locales }),
314276
},
315277
plugins: [
316278
algoliaOptions && pluginAlgolia(),
@@ -361,6 +323,11 @@ const getCommonConfig = async ({
361323
tools: {
362324
rspack(rspackConfig, { mergeConfig, rspack }) {
363325
return mergeConfig(rspackConfig, {
326+
ignoreWarnings: [
327+
{
328+
module: /\bflexsearch\b/,
329+
},
330+
],
364331
resolve: {
365332
extensionAlias: {
366333
'.js': ['.ts', '.tsx', '.js'],
@@ -383,6 +350,11 @@ const getCommonConfig = async ({
383350
},
384351
},
385352
},
353+
ssg: {
354+
experimentalWorker: true,
355+
},
356+
// https://github.com/web-infra-dev/rspress/issues/2894
357+
// llms: true,
386358
}
387359
}
388360

packages/doom/src/global/AuthCheck/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const AuthCheck = () => {
3535
) {
3636
return
3737
}
38-
navigate(
38+
void navigate(
3939
`${lang === site.lang ? '' : `/${lang}`}/login.html?from=${encodeURIComponent(`${pathname}${search}${hash}`)}`,
4040
)
4141
})

packages/doom/src/global/SiteOverrides/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useEffect } from 'react'
44
import { useSiteOverrides } from '@alauda/doom/runtime'
55

66
const setNavBarSpans = (logoText: string) => {
7-
const navBarLinks = document.querySelectorAll('[class^=navBarTitle] > a')
7+
const navBarLinks = document.querySelectorAll('.rp-nav__title__link')
88

99
if (!navBarLinks.length) {
1010
return

packages/doom/src/login/Button/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { clsx } from 'clsx'
22
import type { ButtonHTMLAttributes } from 'react'
33

4-
export interface ButtonProps
5-
extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
4+
export interface ButtonProps extends Omit<
5+
ButtonHTMLAttributes<HTMLButtonElement>,
6+
'type'
7+
> {
68
type?: 'primary'
79
htmlType?: 'submit' | 'reset' | 'button'
810
block?: boolean

0 commit comments

Comments
 (0)