@docusaurus/core 0.0.0-5552 → 0.0.0-5555
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 +15 -5
- package/package.json +10 -10
package/bin/beforeCli.mjs
CHANGED
|
@@ -104,10 +104,20 @@ export default async function beforeCli() {
|
|
|
104
104
|
.filter((p) => p.startsWith('@docusaurus'))
|
|
105
105
|
.map((p) => p.concat('@latest'))
|
|
106
106
|
.join(' ');
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
|
|
108
|
+
const getUpgradeCommand = async () => {
|
|
109
|
+
const isYarnUsed = await fs.pathExists(path.resolve('yarn.lock'));
|
|
110
|
+
if (!isYarnUsed) {
|
|
111
|
+
return `npm i ${siteDocusaurusPackagesForUpdate}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const isYarnClassicUsed = !(await fs.pathExists(
|
|
115
|
+
path.resolve('.yarnrc.yml'),
|
|
116
|
+
));
|
|
117
|
+
return isYarnClassicUsed
|
|
118
|
+
? `yarn upgrade ${siteDocusaurusPackagesForUpdate}`
|
|
119
|
+
: `yarn up ${siteDocusaurusPackagesForUpdate}`;
|
|
120
|
+
};
|
|
111
121
|
|
|
112
122
|
/** @type {import('boxen').Options} */
|
|
113
123
|
const boxenOptions = {
|
|
@@ -124,7 +134,7 @@ export default async function beforeCli() {
|
|
|
124
134
|
)} → ${logger.green(`${notifier.update.latest}`)}
|
|
125
135
|
|
|
126
136
|
To upgrade Docusaurus packages with the latest version, run the following command:
|
|
127
|
-
${logger.code(
|
|
137
|
+
${logger.code(await getUpgradeCommand())}`,
|
|
128
138
|
boxenOptions,
|
|
129
139
|
);
|
|
130
140
|
|
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": "0.0.0-
|
|
4
|
+
"version": "0.0.0-5555",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@babel/runtime": "^7.21.0",
|
|
44
44
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
45
45
|
"@babel/traverse": "^7.21.2",
|
|
46
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
47
|
-
"@docusaurus/logger": "0.0.0-
|
|
48
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
46
|
+
"@docusaurus/cssnano-preset": "0.0.0-5555",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5555",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5555",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "0.0.0-
|
|
51
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
52
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
50
|
+
"@docusaurus/utils": "0.0.0-5555",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5555",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5555",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.5.1",
|
|
55
55
|
"autoprefixer": "^10.4.13",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-5555",
|
|
110
|
+
"@docusaurus/types": "0.0.0-5555",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/react-dom": "^18.0.11",
|
|
113
113
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "f665597881e6070ac67a5568470e33d4ee7b1346"
|
|
131
131
|
}
|