@docusaurus/core 4.0.0-canary-7078 → 4.0.0-canary-7110
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/bin/beforeCli.mjs +21 -5
- package/lib/webpack/base.js +9 -3
- package/package.json +14 -13
package/bin/beforeCli.mjs
CHANGED
|
@@ -32,7 +32,7 @@ try {
|
|
|
32
32
|
|
|
33
33
|
const {
|
|
34
34
|
name,
|
|
35
|
-
engines: {node:
|
|
35
|
+
engines: {node: requiredNodeVersion, bun: requiredBunVersion},
|
|
36
36
|
} = packageJson;
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -165,10 +165,26 @@ export default async function beforeCli() {
|
|
|
165
165
|
console.log(docusaurusUpdateMessage);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
// Bun reports an older Node.js version than our requirement, like v26.12.1
|
|
169
|
+
// See https://github.com/meta/docusaurus/pull/13024
|
|
170
|
+
const bunVersion = process.versions.bun;
|
|
171
|
+
const isBun = bunVersion !== undefined;
|
|
172
|
+
const runtime = isBun
|
|
173
|
+
? {
|
|
174
|
+
name: 'Bun',
|
|
175
|
+
version: bunVersion,
|
|
176
|
+
requiredVersion: requiredBunVersion,
|
|
177
|
+
}
|
|
178
|
+
: {
|
|
179
|
+
name: 'Node.js',
|
|
180
|
+
version: process.version,
|
|
181
|
+
requiredVersion: requiredNodeVersion,
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// Notify user if the runtime version needs to be updated
|
|
185
|
+
if (!semver.satisfies(runtime.version, runtime.requiredVersion)) {
|
|
186
|
+
logger.error(`Minimum ${runtime.name} version not met :(`);
|
|
187
|
+
logger.info`You are using ${runtime.name} number=${runtime.version}, Requirement: ${runtime.name} number=${runtime.requiredVersion}.`;
|
|
172
188
|
process.exit(1);
|
|
173
189
|
}
|
|
174
190
|
}
|
package/lib/webpack/base.js
CHANGED
|
@@ -76,7 +76,11 @@ async function createBaseConfig({ props, isServer, minify, configureWebpackUtils
|
|
|
76
76
|
// Changing the target browsers or Node.js version must evict the cache
|
|
77
77
|
// The same Browserslist queries can match other browsers over time and
|
|
78
78
|
// after data upgrades, for example "baseline widely available"
|
|
79
|
-
|
|
79
|
+
// The client and server caches must be evicted together, or the MDX
|
|
80
|
+
// cross-compiler cache hangs the build
|
|
81
|
+
// See https://github.com/meta/docusaurus/pull/13035
|
|
82
|
+
(0, bundler_1.getTargets)({ isServer: false }),
|
|
83
|
+
(0, bundler_1.getTargets)({ isServer: true }),
|
|
80
84
|
// The plugin code computing loader options is not a build dependency
|
|
81
85
|
// Upgrading a third-party plugin must evict the cache
|
|
82
86
|
siteMetadata.pluginVersions,
|
|
@@ -84,14 +88,16 @@ async function createBaseConfig({ props, isServer, minify, configureWebpackUtils
|
|
|
84
88
|
// Changing the asset inline max size must evict the cache
|
|
85
89
|
utils_1.ASSET_INLINE_MAX_SIZE,
|
|
86
90
|
];
|
|
87
|
-
return (0, utils_1.
|
|
91
|
+
return (0, utils_1.hashString)(JSON.stringify(versionParts));
|
|
88
92
|
}
|
|
89
93
|
// When one of those modules/dependencies change (including transitive
|
|
90
94
|
// deps), cache is invalidated
|
|
91
95
|
function getCacheBuildDependencies() {
|
|
92
96
|
return [
|
|
93
97
|
__filename,
|
|
94
|
-
|
|
98
|
+
// Both: the client and server caches must be evicted together
|
|
99
|
+
node_path_1.default.join(__dirname, 'client.js'),
|
|
100
|
+
node_path_1.default.join(__dirname, 'server.js'),
|
|
95
101
|
// Docusaurus config changes can affect MDX/JSX compilation, so we'd
|
|
96
102
|
// rather evict the cache.
|
|
97
103
|
// See https://github.com/questdb/questdb.io/issues/493
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "4.0.0-canary-
|
|
4
|
+
"version": "4.0.0-canary-7110",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"url": "https://github.com/meta/docusaurus/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@docusaurus/babel": "4.0.0-canary-
|
|
31
|
-
"@docusaurus/bundler": "4.0.0-canary-
|
|
32
|
-
"@docusaurus/fs": "4.0.0-canary-
|
|
33
|
-
"@docusaurus/glob": "4.0.0-canary-
|
|
34
|
-
"@docusaurus/logger": "4.0.0-canary-
|
|
35
|
-
"@docusaurus/mdx-loader": "4.0.0-canary-
|
|
36
|
-
"@docusaurus/utils": "4.0.0-canary-
|
|
37
|
-
"@docusaurus/utils-common": "4.0.0-canary-
|
|
38
|
-
"@docusaurus/utils-validation": "4.0.0-canary-
|
|
30
|
+
"@docusaurus/babel": "4.0.0-canary-7110",
|
|
31
|
+
"@docusaurus/bundler": "4.0.0-canary-7110",
|
|
32
|
+
"@docusaurus/fs": "4.0.0-canary-7110",
|
|
33
|
+
"@docusaurus/glob": "4.0.0-canary-7110",
|
|
34
|
+
"@docusaurus/logger": "4.0.0-canary-7110",
|
|
35
|
+
"@docusaurus/mdx-loader": "4.0.0-canary-7110",
|
|
36
|
+
"@docusaurus/utils": "4.0.0-canary-7110",
|
|
37
|
+
"@docusaurus/utils-common": "4.0.0-canary-7110",
|
|
38
|
+
"@docusaurus/utils-validation": "4.0.0-canary-7110",
|
|
39
39
|
"@rspack/core": "^2.3.0",
|
|
40
40
|
"@rspack/dev-server": "^2.2.2",
|
|
41
41
|
"boxen": "^9.0.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"webpack-merge": "^6.0.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@docusaurus/module-type-aliases": "4.0.0-canary-
|
|
72
|
-
"@docusaurus/types": "4.0.0-canary-
|
|
71
|
+
"@docusaurus/module-type-aliases": "4.0.0-canary-7110",
|
|
72
|
+
"@docusaurus/types": "4.0.0-canary-7110",
|
|
73
73
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
74
74
|
"@types/escape-html": "^1.0.4",
|
|
75
75
|
"@types/history": "^4.7.11",
|
|
@@ -88,7 +88,8 @@
|
|
|
88
88
|
"react-dom": "^19.3.0"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
|
-
"node": ">=26.13"
|
|
91
|
+
"node": ">=26.13",
|
|
92
|
+
"bun": ">=1.4.3"
|
|
92
93
|
},
|
|
93
94
|
"scripts": {
|
|
94
95
|
"build": "tsc --build && copy-untyped-files",
|