@rspress/core 2.0.0-beta.25 → 2.0.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/index.js +10 -5
- package/dist/processor.js +2 -3
- package/dist/renderPageWorker.js +1 -1
- package/package.json +14 -14
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import picocolors from "picocolors";
|
|
|
6
6
|
import { build, dev, serve } from "./index.js";
|
|
7
7
|
import node_fs from "node:fs";
|
|
8
8
|
import { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME } from "@rspress/shared/constants";
|
|
9
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
|
9
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.26"}');
|
|
10
10
|
const findConfig = (basePath)=>DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(node_fs.existsSync);
|
|
11
11
|
async function loadConfigFile(customConfigFile) {
|
|
12
12
|
const baseDir = process.cwd();
|
package/dist/index.js
CHANGED
|
@@ -151,7 +151,7 @@ function defineConfig(config) {
|
|
|
151
151
|
}
|
|
152
152
|
var external_node_path_ = __webpack_require__("node:path");
|
|
153
153
|
var external_node_url_ = __webpack_require__("node:url");
|
|
154
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
|
154
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.26"}');
|
|
155
155
|
const RSPRESS_VERSION = package_namespaceObject.i8;
|
|
156
156
|
const isProduction = ()=>'production' === process.env.NODE_ENV;
|
|
157
157
|
const importStatementRegex = /import\s+(.*?)\s+from\s+(['"])(.*?)(?:"|');?/gm;
|
|
@@ -821,6 +821,15 @@ async function walk(workDir, docsDir, extensions) {
|
|
|
821
821
|
const metaConfig = await utils_readJson(rootMetaJson);
|
|
822
822
|
hintNavJsonChangeThenPanic(metaConfig, workDir, docsDir);
|
|
823
823
|
}
|
|
824
|
+
if (isRootMetaJsonExist && isRootNavJsonExist) {
|
|
825
|
+
const navConfig = await scanNav(workDir, docsDir);
|
|
826
|
+
return {
|
|
827
|
+
nav: navConfig,
|
|
828
|
+
sidebar: {
|
|
829
|
+
'/': await scanSideMeta(workDir, docsDir, extensions)
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
}
|
|
824
833
|
if (isRootNavJsonExist) {
|
|
825
834
|
const navConfig = await scanNav(workDir, docsDir);
|
|
826
835
|
const subDirs = (await Promise.all((await node_fs_promises.readdir(workDir)).map((v)=>node_fs_promises.stat(external_node_path_["default"].join(workDir, v)).then((s)=>{
|
|
@@ -832,10 +841,6 @@ async function walk(workDir, docsDir, extensions) {
|
|
|
832
841
|
const sidebarGroupKey = addRoutePrefix(workDir, docsDir, subDir);
|
|
833
842
|
sidebarConfig[sidebarGroupKey] = await scanSideMeta(external_node_path_["default"].join(workDir, subDir), docsDir, extensions);
|
|
834
843
|
}));
|
|
835
|
-
if (isRootMetaJsonExist) {
|
|
836
|
-
const rootMetaConfig = await scanSideMeta(workDir, docsDir, extensions);
|
|
837
|
-
sidebarConfig['/'] = rootMetaConfig;
|
|
838
|
-
}
|
|
839
844
|
return {
|
|
840
845
|
nav: navConfig,
|
|
841
846
|
sidebar: sidebarConfig
|
package/dist/processor.js
CHANGED
|
@@ -754,10 +754,9 @@ async function compile(options) {
|
|
|
754
754
|
headingTitle,
|
|
755
755
|
frontmatter
|
|
756
756
|
};
|
|
757
|
-
const result =
|
|
758
|
-
${compileResult}
|
|
759
|
-
MDXContent.__RSPRESS_PAGE_META = {};
|
|
757
|
+
const result = `${compileResult}
|
|
760
758
|
|
|
759
|
+
MDXContent.__RSPRESS_PAGE_META = {};
|
|
761
760
|
MDXContent.__RSPRESS_PAGE_META["${encodeURIComponent(normalizePath(node_path.relative(docDirectory, filepath)))}"] = ${JSON.stringify(pageMeta)};
|
|
762
761
|
`;
|
|
763
762
|
return result;
|
package/dist/renderPageWorker.js
CHANGED
|
@@ -102,7 +102,7 @@ function hintSSGFailed() {
|
|
|
102
102
|
1. Fix code to make it SSR-compatible.
|
|
103
103
|
2. Set \`ssg: false\` if the code in node_modules may be difficult to fix, but the SSG feature will be lost.`);
|
|
104
104
|
}
|
|
105
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
|
105
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.26"}');
|
|
106
106
|
const RSPRESS_VERSION = package_namespaceObject.i8;
|
|
107
107
|
`{
|
|
108
108
|
const saved = localStorage.getItem('${APPEARANCE_KEY}')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.26",
|
|
4
4
|
"description": "The Rspress Documentation Framework",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
|
6
6
|
"repository": {
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"@mdx-js/loader": "^3.1.0",
|
|
55
55
|
"@mdx-js/mdx": "^3.1.0",
|
|
56
56
|
"@mdx-js/react": "^3.1.0",
|
|
57
|
-
"@rsbuild/core": "~1.4.
|
|
58
|
-
"@rsbuild/plugin-react": "~1.3.
|
|
57
|
+
"@rsbuild/core": "~1.4.15",
|
|
58
|
+
"@rsbuild/plugin-react": "~1.3.5",
|
|
59
59
|
"@rspress/mdx-rs": "0.6.6",
|
|
60
|
-
"@shikijs/rehype": "^3.
|
|
60
|
+
"@shikijs/rehype": "^3.9.2",
|
|
61
61
|
"@types/unist": "^3.0.3",
|
|
62
|
-
"@unhead/react": "^2.0.
|
|
62
|
+
"@unhead/react": "^2.0.14",
|
|
63
63
|
"cac": "^6.7.14",
|
|
64
64
|
"chokidar": "^3.6.0",
|
|
65
|
-
"enhanced-resolve": "5.18.
|
|
65
|
+
"enhanced-resolve": "5.18.3",
|
|
66
66
|
"github-slugger": "^2.0.0",
|
|
67
67
|
"hast-util-from-html": "^2.0.3",
|
|
68
68
|
"hast-util-heading-rank": "^3.0.0",
|
|
@@ -74,25 +74,25 @@
|
|
|
74
74
|
"react": "^19.1.1",
|
|
75
75
|
"react-dom": "^19.1.1",
|
|
76
76
|
"react-lazy-with-preload": "^2.2.1",
|
|
77
|
-
"react-router-dom": "^6.
|
|
77
|
+
"react-router-dom": "^6.30.1",
|
|
78
78
|
"rehype-external-links": "^3.0.0",
|
|
79
79
|
"rehype-raw": "^7.0.0",
|
|
80
80
|
"remark": "^15.0.1",
|
|
81
81
|
"remark-gfm": "^4.0.1",
|
|
82
82
|
"rspack-plugin-virtual-module": "1.0.1",
|
|
83
|
-
"shiki": "^3.
|
|
83
|
+
"shiki": "^3.9.2",
|
|
84
84
|
"tinyglobby": "^0.2.14",
|
|
85
85
|
"tinypool": "^1.1.1",
|
|
86
86
|
"unified": "^11.0.5",
|
|
87
87
|
"unist-util-visit": "^5.0.0",
|
|
88
88
|
"unist-util-visit-children": "^3.0.0",
|
|
89
|
-
"@rspress/runtime": "2.0.0-beta.
|
|
90
|
-
"@rspress/shared": "2.0.0-beta.
|
|
91
|
-
"@rspress/theme-default": "2.0.0-beta.
|
|
89
|
+
"@rspress/runtime": "2.0.0-beta.26",
|
|
90
|
+
"@rspress/shared": "2.0.0-beta.26",
|
|
91
|
+
"@rspress/theme-default": "2.0.0-beta.26"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@microsoft/api-extractor": "^7.52.10",
|
|
95
|
-
"@rslib/core": "0.11.
|
|
95
|
+
"@rslib/core": "0.11.2",
|
|
96
96
|
"@types/hast": "^3.0.4",
|
|
97
97
|
"@types/html-to-text": "^9.0.4",
|
|
98
98
|
"@types/jest": "~29.5.14",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"remark-rehype": "^11.1.2",
|
|
115
115
|
"remark-stringify": "^11.0.0",
|
|
116
116
|
"rimraf": "^6.0.1",
|
|
117
|
-
"rsbuild-plugin-publint": "^0.3.
|
|
118
|
-
"rsbuild-plugin-virtual-module": "0.3.
|
|
117
|
+
"rsbuild-plugin-publint": "^0.3.3",
|
|
118
|
+
"rsbuild-plugin-virtual-module": "0.3.1",
|
|
119
119
|
"tailwindcss": "^3.4.17",
|
|
120
120
|
"ts-json-schema-generator": "^2.4.0",
|
|
121
121
|
"typescript": "^5.8.2",
|