Skip to content

Commit cf044cb

Browse files
authored
chore: bump @rspress/core to v2.0.0-beta.7 (#30)
1 parent 4f10952 commit cf044cb

File tree

17 files changed

+504
-515
lines changed

17 files changed

+504
-515
lines changed

.changeset/config.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3-
"changelog": ["@changesets/changelog-github", { "repo": "alauda/Doom" }],
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "alauda/Doom"
7+
}
8+
],
49
"commit": false,
510
"fixed": [],
611
"linked": [],
7-
"access": "restricted",
12+
"access": "public",
813
"baseBranch": "main",
914
"updateInternalDependencies": "patch",
1015
"ignore": []

.changeset/eight-cougars-agree.md

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

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"node": "18",
2+
"node": "20",
33
"sandboxes": []
44
}

.prettierignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
.yarn
2-
dist
3-
lib
4-
node_modules
52
pyodide
63
# too big
74
fixture-docs/shared/crds/operator.tekton.dev_*.yaml

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import eslint from '@eslint/js'
44
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
5-
import importX from 'eslint-plugin-import-x'
5+
import { importX } from 'eslint-plugin-import-x'
66
import { config, configs } from 'typescript-eslint'
77

88
export default config(

package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
},
5858
"dependencies": {
5959
"@cspell/eslint-plugin": "^9.0.2",
60-
"@eslint-react/eslint-plugin": "^1.49.0",
61-
"@inquirer/prompts": "^7.5.1",
60+
"@eslint-react/eslint-plugin": "^1.50.0",
61+
"@inquirer/prompts": "^7.5.3",
6262
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
6363
"@playwright/browser-chromium": "^1.52.0",
6464
"@rsbuild/plugin-sass": "^1.3.1",
6565
"@rsbuild/plugin-yaml": "^1.0.2",
66-
"@rspress/core": "2.0.0-beta.6",
66+
"@rspress/core": "2.0.0-beta.7",
6767
"@shikijs/transformers": "^3.4.2",
6868
"chokidar": "^4.0.3",
6969
"cli-progress": "^3.12.0",
@@ -94,7 +94,7 @@
9494
"shiki": "^3.4.2",
9595
"simple-git": "^3.27.0",
9696
"swagger2openapi": "^7.0.8",
97-
"tinyglobby": "^0.2.13",
97+
"tinyglobby": "^0.2.14",
9898
"type-fest": "^4.41.0",
9999
"typescript-eslint": "^8.32.1",
100100
"x-fetch": "^0.2.6",
@@ -106,21 +106,21 @@
106106
"@changesets/cli": "^2.29.4",
107107
"@eslint/js": "^9.27.0",
108108
"@swc-node/register": "^1.10.10",
109-
"@swc/core": "1.11.24",
109+
"@swc/core": "1.11.29",
110110
"@total-typescript/ts-reset": "^0.6.1",
111111
"@types/cli-progress": "^3.11.6",
112112
"@types/ejs": "^3.1.5",
113113
"@types/node": "^22.15.21",
114114
"@types/picomatch": "^4.0.0",
115-
"@types/react": "^19.1.4",
115+
"@types/react": "^19.1.5",
116116
"@types/react-dom": "^19.1.5",
117117
"@types/swagger2openapi": "^7.0.4",
118118
"@unts/patch-package": "^8.1.1",
119119
"clean-pkg-json": "^1.3.0",
120-
"eslint-import-resolver-typescript": "^4.3.5",
121-
"eslint-plugin-import-x": "^4.12.2",
120+
"eslint-import-resolver-typescript": "^4.4.1",
121+
"eslint-plugin-import-x": "^4.13.3",
122122
"nano-staged": "^0.8.0",
123-
"npm-run-all2": "^8.0.3",
123+
"npm-run-all2": "^8.0.4",
124124
"prettier": "^3.5.3",
125125
"prettier-plugin-pkg": "^0.19.1",
126126
"prettier-plugin-properties": "^0.3.0",
@@ -130,7 +130,6 @@
130130
"yarn-berry-deduplicate": "^6.1.3"
131131
},
132132
"publishConfig": {
133-
"access": "public",
134133
"registry": "https://registry.npmjs.org"
135134
},
136135
"typeCoverage": {

src/runtime/components/JsonViewer.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { getCustomMDXComponent, Tab, Tabs } from '@rspress/core/theme'
2-
import { useState } from 'react'
1+
import { CodeBlockRuntime, Tab, Tabs } from '@rspress/core/theme'
32
import type { JsonValue } from 'type-fest'
43
import { stringify } from 'yaml'
54

@@ -8,20 +7,15 @@ export interface JsonViewerProps {
87
}
98

109
export const JsonViewer = ({ value }: JsonViewerProps) => {
11-
const [X] = useState(getCustomMDXComponent)
1210
return (
1311
<Tabs>
1412
<Tab label="yaml">
15-
<X.pre>
16-
<X.code className="language-yaml">{stringify(value)}</X.code>
17-
</X.pre>
13+
{/* @ts-expect-error -- https://github.com/web-infra-dev/rspress/pull/2205 */}
14+
<CodeBlockRuntime lang="yaml" code={stringify(value)} />
1815
</Tab>
1916
<Tab label="json">
20-
<X.pre>
21-
<X.code className="language-json">
22-
{JSON.stringify(value, null, 2)}
23-
</X.code>
24-
</X.pre>
17+
{/* @ts-expect-error -- https://github.com/web-infra-dev/rspress/pull/2205 */}
18+
<CodeBlockRuntime lang="json" code={JSON.stringify(value, null, 2)} />
2519
</Tab>
2620
</Tabs>
2721
)

src/runtime/components/K8sCrd.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* modified based on @see https://github.com/crdsdev/doc/blob/main/template/doc.html
33
*/
44

5-
import { Badge, Button, getCustomMDXComponent } from '@rspress/core/theme'
5+
import { Badge, Button } from '@rspress/core/theme'
66
import crdsMap from 'doom-@api-crdsMap'
77
import type { OpenAPIV3_1 } from 'openapi-types'
88
import { useCallback, useEffect, useMemo, useState } from 'react'
@@ -11,6 +11,7 @@ import { useIsPrint, useTranslation } from '../hooks/index.js'
1111

1212
import { Directive } from './Directive.js'
1313
import { Markdown } from './_Markdown.js'
14+
import { X } from './_X.js'
1415

1516
export interface K8sCrdProps {
1617
/**
@@ -162,8 +163,6 @@ export const K8sCrdSchema = ({
162163
}
163164

164165
export const K8sCrd = ({ name, crdPath }: K8sCrdProps) => {
165-
const [X] = useState(getCustomMDXComponent)
166-
167166
const [, crd] = useMemo(
168167
() =>
169168
Object.entries(crdsMap).find(([pathname, crd]) => {

src/runtime/components/K8sPermissionTable.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { useLang } from '@rspress/core/runtime'
2-
import { getCustomMDXComponent } from '@rspress/core/theme'
32
import functionResourcesMap from 'doom-@permission-functionResourcesMap'
43
import roleTemplatesMap from 'doom-@permission-roleTemplatesMap'
54
import { intersection, sortBy } from 'es-toolkit'
6-
import { Fragment, useMemo, useState } from 'react'
5+
import { Fragment, useMemo } from 'react'
76

87
import type {
98
FunctionResource,
@@ -12,6 +11,8 @@ import type {
1211
} from '../../plugins/index.js'
1312
import { useTranslation } from '../hooks/index.js'
1413

14+
import { X } from './_X.js'
15+
1516
export interface K8sPermissionTableProps {
1617
functions: string[]
1718
}
@@ -47,7 +48,6 @@ const RolesPermission = ({
4748
roleTemplates: RoleTemplate[]
4849
verb: Verb
4950
}) => {
50-
const [X] = useState(getCustomMDXComponent)
5151
const functionResourceName = functionResource.metadata.name
5252
const actions = functionResource.metadata.annotations['auth.cpaas.io/actions']
5353
return roleTemplates.map(({ metadata: { name }, spec: { rules } }) => {
@@ -85,8 +85,6 @@ const RolesPermission = ({
8585
}
8686

8787
export const K8sPermissionTable = ({ functions }: K8sPermissionTableProps) => {
88-
const [X] = useState(getCustomMDXComponent)
89-
9088
const allFunctionResources = useMemo(
9189
() =>
9290
Object.values(functionResourcesMap).reduce<

src/runtime/components/OpenAPIPath.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import { usePageData } from '@rspress/core/runtime'
2-
import { Badge, getCustomMDXComponent } from '@rspress/core/theme'
2+
import { Badge } from '@rspress/core/theme'
33
import openapisMap from 'doom-@api-openapisMap'
44
import virtual from 'doom-@api-virtual'
55
import BananaSlug from 'github-slugger'
66
import { OpenAPIV3, type OpenAPIV3_1 } from 'openapi-types'
7-
import { Fragment, useMemo, useState, type ReactNode } from 'react'
7+
import { Fragment, useMemo, type ReactNode } from 'react'
88

99
import { omitRoutePathRefs, resolveRef } from '../utils.js'
1010

1111
import { OpenAPIProperties, OpenAPIProperty, OpenAPIRef } from './OpenAPIRef.js'
1212
import { HeadingTitle } from './_HeadingTitle.js'
1313
import { Markdown } from './_Markdown.js'
1414
import { RefLink } from './_RefLink.js'
15+
import { X } from './_X.js'
1516

1617
export interface OpenAPIPathProps {
1718
/**
@@ -35,7 +36,6 @@ export const OpenAPIParameters = ({
3536
parameters: Array<OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject>
3637
openapi: OpenAPIV3_1.Document
3738
}) => {
38-
const [X] = useState(getCustomMDXComponent)
3939
return (
4040
<X.ul>
4141
{parameters.map((param, index) => {
@@ -71,7 +71,6 @@ export const OpenAPIResponses = ({
7171
responses: OpenAPIV3_1.ResponsesObject
7272
openapi: OpenAPIV3_1.Document
7373
}) => {
74-
const [X] = useState(getCustomMDXComponent)
7574
return (
7675
<X.ul>
7776
{Object.entries(responses).map(([code, response]) => {
@@ -172,7 +171,6 @@ export const OpenAPIPath = ({
172171
openapiPath: openapiPath_,
173172
pathPrefix: pathPrefix_,
174173
}: OpenAPIPathProps) => {
175-
const [X] = useState(getCustomMDXComponent)
176174
const { page } = usePageData()
177175

178176
const pathPrefix = pathPrefix_ ?? (virtual.pathPrefix || '')

0 commit comments

Comments
 (0)