@docusaurus/plugin-content-docs 0.0.0-4696 → 0.0.0-4699
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/lib/cli.js +2 -4
- package/package.json +9 -9
- package/src/cli.ts +2 -4
package/lib/cli.js
CHANGED
|
@@ -26,8 +26,7 @@ async function createVersionedSidebarFile({ siteDir, pluginId, sidebarPath, vers
|
|
|
26
26
|
if (shouldCreateVersionedSidebarFile) {
|
|
27
27
|
const versionedSidebarsDir = (0, versions_1.getVersionedSidebarsDirPath)(siteDir, pluginId);
|
|
28
28
|
const newSidebarFile = path_1.default.join(versionedSidebarsDir, `version-${version}-sidebars.json`);
|
|
29
|
-
await fs_extra_1.default.
|
|
30
|
-
await fs_extra_1.default.writeFile(newSidebarFile, `${JSON.stringify(sidebars, null, 2)}\n`, 'utf8');
|
|
29
|
+
await fs_extra_1.default.outputFile(newSidebarFile, `${JSON.stringify(sidebars, null, 2)}\n`, 'utf8');
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
// Tests depend on non-default export for mocking.
|
|
@@ -83,8 +82,7 @@ async function cliDocsVersionCommand(version, siteDir, pluginId, options) {
|
|
|
83
82
|
});
|
|
84
83
|
// Update versions.json file.
|
|
85
84
|
versions.unshift(version);
|
|
86
|
-
await fs_extra_1.default.
|
|
87
|
-
await fs_extra_1.default.writeFile(versionsJSONFile, `${JSON.stringify(versions, null, 2)}\n`);
|
|
85
|
+
await fs_extra_1.default.outputFile(versionsJSONFile, `${JSON.stringify(versions, null, 2)}\n`);
|
|
88
86
|
logger_1.default.success `name=${pluginIdLogPrefix}: version name=${version} created!`;
|
|
89
87
|
}
|
|
90
88
|
exports.cliDocsVersionCommand = cliDocsVersionCommand;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4699",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/logger": "0.0.0-
|
|
28
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
29
|
-
"@docusaurus/utils": "0.0.0-
|
|
30
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4699",
|
|
27
|
+
"@docusaurus/logger": "0.0.0-4699",
|
|
28
|
+
"@docusaurus/mdx-loader": "0.0.0-4699",
|
|
29
|
+
"@docusaurus/utils": "0.0.0-4699",
|
|
30
|
+
"@docusaurus/utils-validation": "0.0.0-4699",
|
|
31
31
|
"combine-promises": "^1.1.0",
|
|
32
32
|
"fs-extra": "^10.0.1",
|
|
33
33
|
"import-fresh": "^3.3.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"webpack": "^5.70.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
43
|
-
"@docusaurus/types": "0.0.0-
|
|
42
|
+
"@docusaurus/module-type-aliases": "0.0.0-4699",
|
|
43
|
+
"@docusaurus/types": "0.0.0-4699",
|
|
44
44
|
"@types/js-yaml": "^4.0.5",
|
|
45
45
|
"@types/picomatch": "^2.3.0",
|
|
46
46
|
"commander": "^5.1.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=14"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ae96a5ebd7fb6dde9af93742deb5c295bea4915d"
|
|
60
60
|
}
|
package/src/cli.ts
CHANGED
|
@@ -47,8 +47,7 @@ async function createVersionedSidebarFile({
|
|
|
47
47
|
versionedSidebarsDir,
|
|
48
48
|
`version-${version}-sidebars.json`,
|
|
49
49
|
);
|
|
50
|
-
await fs.
|
|
51
|
-
await fs.writeFile(
|
|
50
|
+
await fs.outputFile(
|
|
52
51
|
newSidebarFile,
|
|
53
52
|
`${JSON.stringify(sidebars, null, 2)}\n`,
|
|
54
53
|
'utf8',
|
|
@@ -140,8 +139,7 @@ export async function cliDocsVersionCommand(
|
|
|
140
139
|
|
|
141
140
|
// Update versions.json file.
|
|
142
141
|
versions.unshift(version);
|
|
143
|
-
await fs.
|
|
144
|
-
await fs.writeFile(
|
|
142
|
+
await fs.outputFile(
|
|
145
143
|
versionsJSONFile,
|
|
146
144
|
`${JSON.stringify(versions, null, 2)}\n`,
|
|
147
145
|
);
|