@docusaurus/plugin-content-docs 4.0.0-canary-6869 → 4.0.0-canary-6872

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 CHANGED
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
10
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
11
- const path_1 = tslib_1.__importDefault(require("path"));
11
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
12
  const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
13
13
  const utils_1 = require("@docusaurus/utils");
14
14
  const files_1 = require("./versions/files");
@@ -49,10 +49,10 @@ async function cliDocsVersionCommand(version, { id: pluginId, path: docsPath, si
49
49
  logger_1.default.info `Versioned docs will be created for the following locales: name=${i18n.locales}`;
50
50
  }
51
51
  await Promise.all(i18n.locales.map(async (locale) => {
52
- const localizationDir = path_1.default.resolve(siteDir, i18n.path, (0, utils_1.getLocaleConfig)(i18n, locale).path);
52
+ const localizationDir = node_path_1.default.resolve(siteDir, i18n.path, (0, utils_1.getLocaleConfig)(i18n, locale).path);
53
53
  // Copy docs files.
54
54
  const docsDir = locale === i18n.defaultLocale
55
- ? path_1.default.resolve(siteDir, docsPath)
55
+ ? node_path_1.default.resolve(siteDir, docsPath)
56
56
  : (0, files_1.getDocsDirPathLocalized)({
57
57
  localizationDir,
58
58
  pluginId,
@@ -84,8 +84,8 @@ async function cliDocsVersionCommand(version, { id: pluginId, path: docsPath, si
84
84
  localizationDir,
85
85
  pluginId,
86
86
  });
87
- const sourceFile = path_1.default.join(dir, 'current.json');
88
- const dest = path_1.default.join(dir, `version-${version}.json`);
87
+ const sourceFile = node_path_1.default.join(dir, 'current.json');
88
+ const dest = node_path_1.default.join(dir, `version-${version}.json`);
89
89
  if (await fs_extra_1.default.pathExists(sourceFile)) {
90
90
  await fs_extra_1.default.copy(sourceFile, dest);
91
91
  }
package/lib/docs.js CHANGED
@@ -15,7 +15,7 @@ exports.getMainDocId = getMainDocId;
15
15
  exports.toCategoryIndexMatcherParam = toCategoryIndexMatcherParam;
16
16
  exports.createDocsByIdIndex = createDocsByIdIndex;
17
17
  const tslib_1 = require("tslib");
18
- const path_1 = tslib_1.__importDefault(require("path"));
18
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
19
19
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
20
20
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
21
21
  const utils_1 = require("@docusaurus/utils");
@@ -26,7 +26,7 @@ const numberPrefix_1 = require("./numberPrefix");
26
26
  const utils_2 = require("./sidebars/utils");
27
27
  async function readDocFile(versionMetadata, source) {
28
28
  const contentPath = await (0, utils_1.getFolderContainingFile)((0, utils_1.getContentPathList)(versionMetadata), source);
29
- const filePath = path_1.default.join(contentPath, source);
29
+ const filePath = node_path_1.default.join(contentPath, source);
30
30
  const content = await fs_extra_1.default.readFile(filePath, 'utf-8');
31
31
  return { source, content, contentPath, filePath };
32
32
  }
@@ -53,9 +53,9 @@ async function doProcessDocMetadata({ docFile, versionMetadata, context, options
53
53
  parse_number_prefixes: parseNumberPrefixes = true, last_update: lastUpdateFrontMatter, } = frontMatter;
54
54
  const lastUpdate = await (0, utils_1.readLastUpdateData)(filePath, options, lastUpdateFrontMatter, vcs);
55
55
  // E.g. api/plugins/myDoc -> myDoc; myDoc -> myDoc
56
- const sourceFileNameWithoutExtension = path_1.default.basename(source, path_1.default.extname(source));
56
+ const sourceFileNameWithoutExtension = node_path_1.default.basename(source, node_path_1.default.extname(source));
57
57
  // E.g. api/plugins/myDoc -> api/plugins; myDoc -> .
58
- const sourceDirName = path_1.default.dirname(source);
58
+ const sourceDirName = node_path_1.default.dirname(source);
59
59
  const { filename: unprefixedFileName, numberPrefix } = parseNumberPrefixes
60
60
  ? options.numberPrefixParser(sourceFileNameWithoutExtension)
61
61
  : { filename: sourceFileNameWithoutExtension, numberPrefix: undefined };
@@ -93,11 +93,11 @@ async function doProcessDocMetadata({ docFile, versionMetadata, context, options
93
93
  const description = frontMatter.description ?? excerpt ?? '';
94
94
  const permalink = (0, utils_1.normalizeUrl)([versionMetadata.path, docSlug]);
95
95
  function getDocEditUrl() {
96
- const relativeFilePath = path_1.default.relative(contentPath, filePath);
96
+ const relativeFilePath = node_path_1.default.relative(contentPath, filePath);
97
97
  if (typeof options.editUrl === 'function') {
98
98
  return options.editUrl({
99
99
  version: versionMetadata.versionName,
100
- versionDocsDirPath: (0, utils_1.posixPath)(path_1.default.relative(siteDir, versionMetadata.contentPath)),
100
+ versionDocsDirPath: (0, utils_1.posixPath)(node_path_1.default.relative(siteDir, versionMetadata.contentPath)),
101
101
  docPath: (0, utils_1.posixPath)(relativeFilePath),
102
102
  permalink,
103
103
  locale: context.i18n.currentLocale,
@@ -241,9 +241,9 @@ exports.isCategoryIndex = isCategoryIndex;
241
241
  function toCategoryIndexMatcherParam({ source, sourceDirName, }) {
242
242
  // source + sourceDirName are always posix-style
243
243
  return {
244
- fileName: path_1.default.posix.parse(source).name,
245
- extension: path_1.default.posix.parse(source).ext,
246
- directories: sourceDirName.split(path_1.default.posix.sep).reverse(),
244
+ fileName: node_path_1.default.posix.parse(source).name,
245
+ extension: node_path_1.default.posix.parse(source).ext,
246
+ directories: sourceDirName.split(node_path_1.default.posix.sep).reverse(),
247
247
  };
248
248
  }
249
249
  // Docs are indexed by their id
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.validateOptions = void 0;
10
10
  exports.default = pluginContentDocs;
11
11
  const tslib_1 = require("tslib");
12
- const path_1 = tslib_1.__importDefault(require("path"));
12
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
13
13
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
14
14
  const utils_1 = require("@docusaurus/utils");
15
15
  const glob_1 = require("@docusaurus/glob");
@@ -35,7 +35,7 @@ async function createMdxLoaderDependencyFile({ dataDir, options, versionsMetadat
35
35
  if (process.env.NODE_ENV === 'test') {
36
36
  return undefined;
37
37
  }
38
- const filePath = path_1.default.join(dataDir, '__mdx-loader-dependency.json');
38
+ const filePath = node_path_1.default.join(dataDir, '__mdx-loader-dependency.json');
39
39
  // the cache is invalidated whenever this file content changes
40
40
  const fileContent = {
41
41
  options,
@@ -51,12 +51,12 @@ async function pluginContentDocs(context, options) {
51
51
  options.sidebarPath = (0, sidebars_1.resolveSidebarPathOption)(siteDir, options.sidebarPath);
52
52
  const versionsMetadata = await (0, version_1.readVersionsMetadata)({ context, options });
53
53
  const pluginId = options.id;
54
- const pluginDataDirRoot = path_1.default.join(generatedFilesDir, 'docusaurus-plugin-content-docs');
55
- const dataDir = path_1.default.join(pluginDataDirRoot, pluginId);
54
+ const pluginDataDirRoot = node_path_1.default.join(generatedFilesDir, 'docusaurus-plugin-content-docs');
55
+ const dataDir = node_path_1.default.join(pluginDataDirRoot, pluginId);
56
56
  // TODO Docusaurus v4 breaking change
57
57
  // module aliasing should be automatic
58
58
  // we should never find local absolute FS paths in the codegen registry
59
- const aliasedSource = (source) => `~docs/${(0, utils_1.posixPath)(path_1.default.relative(pluginDataDirRoot, source))}`;
59
+ const aliasedSource = (source) => `~docs/${(0, utils_1.posixPath)(node_path_1.default.relative(pluginDataDirRoot, source))}`;
60
60
  // TODO env should be injected into all plugins
61
61
  const env = process.env.NODE_ENV;
62
62
  const contentHelpers = (0, contentHelpers_1.createContentHelpers)();
@@ -82,14 +82,14 @@ async function pluginContentDocs(context, options) {
82
82
  recmaPlugins,
83
83
  beforeDefaultRehypePlugins,
84
84
  beforeDefaultRemarkPlugins,
85
- staticDirs: siteConfig.staticDirectories.map((dir) => path_1.default.resolve(siteDir, dir)),
85
+ staticDirs: siteConfig.staticDirectories.map((dir) => node_path_1.default.resolve(siteDir, dir)),
86
86
  siteDir,
87
87
  isMDXPartial: (0, glob_1.createAbsoluteFilePathMatcher)(options.exclude, contentDirs),
88
88
  metadataPath: (mdxPath) => {
89
89
  // Note that metadataPath must be the same/in-sync as
90
90
  // the path from createData for each MDX.
91
91
  const aliasedPath = (0, utils_1.aliasedSitePath)(mdxPath, siteDir);
92
- return path_1.default.join(dataDir, `${(0, utils_1.docuHash)(aliasedPath)}.json`);
92
+ return node_path_1.default.join(dataDir, `${(0, utils_1.docuHash)(aliasedPath)}.json`);
93
93
  },
94
94
  // createAssets converts relative paths to require() calls
95
95
  createAssets: ({ frontMatter }) => ({
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.DefaultSidebarItemsGenerator = exports.CategoryMetadataFilenamePattern = exports.CategoryMetadataFilenameBase = void 0;
10
10
  const tslib_1 = require("tslib");
11
- const path_1 = tslib_1.__importDefault(require("path"));
11
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
12
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
13
13
  const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
14
14
  const utils_common_1 = require("@docusaurus/utils-common");
@@ -81,7 +81,7 @@ Available doc IDs:
81
81
  currentDir = currentDir[dir]; // Go into the subdirectory.
82
82
  });
83
83
  // We've walked through the path. Register the file in this directory.
84
- currentDir[path_1.default.basename(doc.source)] = doc.id;
84
+ currentDir[node_path_1.default.basename(doc.source)] = doc.id;
85
85
  });
86
86
  return treeRoot;
87
87
  }
@@ -106,7 +106,7 @@ Available doc IDs:
106
106
  };
107
107
  }
108
108
  function createCategoryItem(dir, fullPath, folderName) {
109
- const categoryMetadata = categoriesMetadata[path_1.default.posix.join(autogenDir, fullPath)];
109
+ const categoryMetadata = categoriesMetadata[node_path_1.default.posix.join(autogenDir, fullPath)];
110
110
  const allItems = Object.entries(dir).map(([key, content]) => dirToItem(content, key, `${fullPath}/${key}`));
111
111
  // Try to match a doc inside the category folder,
112
112
  // using the "local id" (myDoc) or "qualified id" (dirName/myDoc)
@@ -12,7 +12,7 @@ exports.loadSidebarsFile = loadSidebarsFile;
12
12
  exports.loadSidebars = loadSidebars;
13
13
  const tslib_1 = require("tslib");
14
14
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
15
- const path_1 = tslib_1.__importDefault(require("path"));
15
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
16
16
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
17
17
  const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
18
18
  const utils_1 = require("@docusaurus/utils");
@@ -35,20 +35,20 @@ exports.DisabledSidebars = {};
35
35
  // If a path is provided, make it absolute
36
36
  function resolveSidebarPathOption(siteDir, sidebarPathOption) {
37
37
  return sidebarPathOption
38
- ? path_1.default.resolve(siteDir, sidebarPathOption)
38
+ ? node_path_1.default.resolve(siteDir, sidebarPathOption)
39
39
  : sidebarPathOption;
40
40
  }
41
41
  async function readCategoriesMetadata(contentPath) {
42
42
  const categoryFiles = await (0, glob_1.glob)('**/_category_.{json,yml,yaml}', {
43
43
  cwd: contentPath,
44
44
  });
45
- const categoryToFile = lodash_1.default.groupBy(categoryFiles, path_1.default.dirname);
45
+ const categoryToFile = lodash_1.default.groupBy(categoryFiles, node_path_1.default.dirname);
46
46
  return (0, combine_promises_1.default)(lodash_1.default.mapValues(categoryToFile, async (files, folder) => {
47
47
  const filePath = files[0];
48
48
  if (files.length > 1) {
49
49
  logger_1.default.warn `There are more than one category metadata files for path=${folder}: ${files.join(', ')}. The behavior is undetermined.`;
50
50
  }
51
- const content = await fs_extra_1.default.readFile(path_1.default.join(contentPath, filePath), 'utf-8');
51
+ const content = await fs_extra_1.default.readFile(node_path_1.default.join(contentPath, filePath), 'utf-8');
52
52
  try {
53
53
  return (0, validation_1.validateCategoryMetadataFile)(Yaml.load(content));
54
54
  }
@@ -15,7 +15,7 @@ exports.readVersionsFile = readVersionsFile;
15
15
  exports.readVersionNames = readVersionNames;
16
16
  exports.getVersionMetadataPaths = getVersionMetadataPaths;
17
17
  const tslib_1 = require("tslib");
18
- const path_1 = tslib_1.__importDefault(require("path"));
18
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
19
19
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
20
20
  const utils_1 = require("@docusaurus/utils");
21
21
  const constants_1 = require("../constants");
@@ -28,11 +28,11 @@ function addPluginIdPrefix(fileOrDir, pluginId) {
28
28
  }
29
29
  /** `[siteDir]/community_versioned_docs/version-1.0.0` */
30
30
  function getVersionDocsDirPath(siteDir, pluginId, versionName) {
31
- return path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONED_DOCS_DIR, pluginId), `version-${versionName}`);
31
+ return node_path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONED_DOCS_DIR, pluginId), `version-${versionName}`);
32
32
  }
33
33
  /** `[siteDir]/community_versioned_sidebars/version-1.0.0-sidebars.json` */
34
34
  function getVersionSidebarsPath(siteDir, pluginId, versionName) {
35
- return path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONED_SIDEBARS_DIR, pluginId), `version-${versionName}-sidebars.json`);
35
+ return node_path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONED_SIDEBARS_DIR, pluginId), `version-${versionName}-sidebars.json`);
36
36
  }
37
37
  function getDocsDirPathLocalized({ localizationDir, pluginId, versionName, }) {
38
38
  return (0, utils_1.getPluginI18nPath)({
@@ -56,7 +56,7 @@ function getPluginDirPathLocalized({ localizationDir, pluginId, }) {
56
56
  }
57
57
  /** `community` => `[siteDir]/community_versions.json` */
58
58
  function getVersionsFilePath(siteDir, pluginId) {
59
- return path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONS_JSON_FILE, pluginId));
59
+ return node_path_1.default.join(siteDir, addPluginIdPrefix(constants_1.VERSIONS_JSON_FILE, pluginId));
60
60
  }
61
61
  /**
62
62
  * Reads the plugin's respective `versions.json` file, and returns its content.
@@ -102,7 +102,7 @@ async function readVersionNames(siteDir, options) {
102
102
  versions.unshift(constants_1.CURRENT_VERSION_NAME);
103
103
  }
104
104
  if (versions.length === 0) {
105
- throw new Error(`It is not possible to use docs without any version. No version is included because you have requested to not include ${path_1.default.resolve(options.path)} through "includeCurrentVersion: false", while ${options.disableVersioning
105
+ throw new Error(`It is not possible to use docs without any version. No version is included because you have requested to not include ${node_path_1.default.resolve(options.path)} through "includeCurrentVersion: false", while ${options.disableVersioning
106
106
  ? 'versioning is disabled with "disableVersioning: true"'
107
107
  : `the versions file is empty/non-existent`}.`);
108
108
  }
@@ -126,13 +126,13 @@ async function getVersionMetadataPaths({ versionName, context, options, }) {
126
126
  })
127
127
  : undefined;
128
128
  const contentPath = isCurrent
129
- ? path_1.default.resolve(context.siteDir, options.path)
129
+ ? node_path_1.default.resolve(context.siteDir, options.path)
130
130
  : getVersionDocsDirPath(context.siteDir, options.id, versionName);
131
131
  const sidebarFilePath = isCurrent
132
132
  ? options.sidebarPath
133
133
  : getVersionSidebarsPath(context.siteDir, options.id, versionName);
134
134
  if (!(await fs_extra_1.default.pathExists(contentPath))) {
135
- throw new Error(`The docs folder does not exist for version "${versionName}". A docs folder is expected to be found at ${path_1.default.relative(context.siteDir, contentPath)}.`);
135
+ throw new Error(`The docs folder does not exist for version "${versionName}". A docs folder is expected to be found at ${node_path_1.default.relative(context.siteDir, contentPath)}.`);
136
136
  }
137
137
  // If the current version defines a path to a sidebar file that does not
138
138
  // exist, we throw! Note: for versioned sidebars, the file may not exist (as
@@ -142,7 +142,7 @@ async function getVersionMetadataPaths({ versionName, context, options, }) {
142
142
  if (versionName === constants_1.CURRENT_VERSION_NAME &&
143
143
  typeof sidebarFilePath === 'string' &&
144
144
  !(await fs_extra_1.default.pathExists(sidebarFilePath))) {
145
- throw new Error(`The path to the sidebar file does not exist at "${path_1.default.relative(context.siteDir, sidebarFilePath)}".
145
+ throw new Error(`The path to the sidebar file does not exist at "${node_path_1.default.relative(context.siteDir, sidebarFilePath)}".
146
146
  Please set the docs "sidebarPath" field in your config file to:
147
147
  - a sidebars path that exists
148
148
  - false: to disable the sidebar
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.loadVersion = loadVersion;
10
10
  const tslib_1 = require("tslib");
11
- const path_1 = tslib_1.__importDefault(require("path"));
11
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
12
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
13
13
  const utils_1 = require("@docusaurus/utils");
14
14
  const utils_validation_1 = require("@docusaurus/utils-validation");
@@ -48,7 +48,7 @@ In case of conflict, you can rename the docs file, or use the ${logger_1.default
48
48
  async function loadVersionDocsBase({ tagsFile, context, options, versionMetadata, env, }) {
49
49
  const docFiles = await (0, docs_1.readVersionDocs)(versionMetadata, options);
50
50
  if (docFiles.length === 0) {
51
- throw new Error(`Docs version "${versionMetadata.versionName}" has no docs! At least one doc should exist at "${path_1.default.relative(context.siteDir, versionMetadata.contentPath)}".`);
51
+ throw new Error(`Docs version "${versionMetadata.versionName}" has no docs! At least one doc should exist at "${node_path_1.default.relative(context.siteDir, versionMetadata.contentPath)}".`);
52
52
  }
53
53
  function processVersionDoc(docFile) {
54
54
  return (0, docs_1.processDocMetadata)({
@@ -15,7 +15,7 @@ exports.readVersionsMetadata = readVersionsMetadata;
15
15
  exports.toFullVersion = toFullVersion;
16
16
  exports.getVersionFromSourceFilePath = getVersionFromSourceFilePath;
17
17
  const tslib_1 = require("tslib");
18
- const path_1 = tslib_1.__importDefault(require("path"));
18
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
19
19
  const utils_1 = require("@docusaurus/utils");
20
20
  const constants_1 = require("../constants");
21
21
  const validation_1 = require("./validation");
@@ -34,7 +34,7 @@ function getVersionEditUrls({ contentPath, contentPathLocalized, context, option
34
34
  const editDirPath = options.editCurrentVersion ? options.path : contentPath;
35
35
  return (0, utils_1.normalizeUrl)([
36
36
  editUrlOption,
37
- (0, utils_1.posixPath)(path_1.default.relative(context.siteDir, path_1.default.resolve(context.siteDir, editDirPath))),
37
+ (0, utils_1.posixPath)(node_path_1.default.relative(context.siteDir, node_path_1.default.resolve(context.siteDir, editDirPath))),
38
38
  ]);
39
39
  };
40
40
  const getEditUrlLocalized = () => {
@@ -50,7 +50,7 @@ function getVersionEditUrls({ contentPath, contentPathLocalized, context, option
50
50
  : contentPathLocalized;
51
51
  return (0, utils_1.normalizeUrl)([
52
52
  editUrlOption,
53
- (0, utils_1.posixPath)(path_1.default.relative(context.siteDir, path_1.default.resolve(context.siteDir, editDirPathLocalized))),
53
+ (0, utils_1.posixPath)(node_path_1.default.relative(context.siteDir, node_path_1.default.resolve(context.siteDir, editDirPathLocalized))),
54
54
  ]);
55
55
  };
56
56
  return { editUrl: getEditUrl(), editUrlLocalized: getEditUrlLocalized() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "4.0.0-canary-6869",
3
+ "version": "4.0.0-canary-6872",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": false,
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "license": "MIT",
37
37
  "dependencies": {
38
- "@docusaurus/core": "4.0.0-canary-6869",
39
- "@docusaurus/glob": "4.0.0-canary-6869",
40
- "@docusaurus/logger": "4.0.0-canary-6869",
41
- "@docusaurus/mdx-loader": "4.0.0-canary-6869",
42
- "@docusaurus/module-type-aliases": "4.0.0-canary-6869",
43
- "@docusaurus/theme-common": "4.0.0-canary-6869",
44
- "@docusaurus/types": "4.0.0-canary-6869",
45
- "@docusaurus/utils": "4.0.0-canary-6869",
46
- "@docusaurus/utils-common": "4.0.0-canary-6869",
47
- "@docusaurus/utils-validation": "4.0.0-canary-6869",
38
+ "@docusaurus/core": "4.0.0-canary-6872",
39
+ "@docusaurus/glob": "4.0.0-canary-6872",
40
+ "@docusaurus/logger": "4.0.0-canary-6872",
41
+ "@docusaurus/mdx-loader": "4.0.0-canary-6872",
42
+ "@docusaurus/module-type-aliases": "4.0.0-canary-6872",
43
+ "@docusaurus/theme-common": "4.0.0-canary-6872",
44
+ "@docusaurus/types": "4.0.0-canary-6872",
45
+ "@docusaurus/utils": "4.0.0-canary-6872",
46
+ "@docusaurus/utils-common": "4.0.0-canary-6872",
47
+ "@docusaurus/utils-validation": "4.0.0-canary-6872",
48
48
  "@types/react-router-config": "^5.0.11",
49
49
  "combine-promises": "^1.2.0",
50
50
  "fs-extra": "^11.4.0",
@@ -69,5 +69,5 @@
69
69
  "engines": {
70
70
  "node": ">=24.21"
71
71
  },
72
- "gitHead": "c5a66b0528810d8c3a2163d682722eb28ab10fe2"
72
+ "gitHead": "97ddb0451f086d8a1c20967f0d324d667dc58ebf"
73
73
  }
package/src/cli.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import fs from 'fs-extra';
9
- import path from 'path';
9
+ import path from 'node:path';
10
10
  import logger from '@docusaurus/logger';
11
11
  import {DEFAULT_PLUGIN_ID, getLocaleConfig} from '@docusaurus/utils';
12
12
  import {
package/src/docs.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import fs from 'fs-extra';
10
10
  import _ from 'lodash';
11
11
  import {
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import fs from 'fs-extra';
10
10
  import {
11
11
  normalizeUrl,
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import _ from 'lodash';
10
10
  import logger from '@docusaurus/logger';
11
11
  import {addTrailingSlash} from '@docusaurus/utils-common';
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import fs from 'fs-extra';
9
- import path from 'path';
9
+ import path from 'node:path';
10
10
  import _ from 'lodash';
11
11
  import logger from '@docusaurus/logger';
12
12
  import {loadFreshModule} from '@docusaurus/utils';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import fs from 'fs-extra';
10
10
  import {
11
11
  getPluginI18nPath,
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import _ from 'lodash';
10
10
  import {aliasedSitePathToRelativePath, createSlugger} from '@docusaurus/utils';
11
11
  import {getTagsFile} from '@docusaurus/utils-validation';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import path from 'path';
8
+ import path from 'node:path';
9
9
  import {getContentPathList, normalizeUrl, posixPath} from '@docusaurus/utils';
10
10
  import {CURRENT_VERSION_NAME} from '../constants';
11
11
  import {validateVersionsOptions} from './validation';