mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 00:57:53 +02:00
fix: make Docusaurus PnP strict mode compatible (#6047)
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
This commit is contained in:
parent
68b75bf855
commit
e07ebadf6c
65 changed files with 304 additions and 269 deletions
|
@ -14,7 +14,7 @@ import {
|
|||
getVersionsFilePath,
|
||||
getVersionedSidebarsDirPath,
|
||||
} from '../versions';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
|
||||
const fixtureDir = path.join(__dirname, '__fixtures__');
|
||||
|
||||
|
|
|
@ -26,10 +26,9 @@ import type {
|
|||
DocNavLink,
|
||||
} from '../types';
|
||||
import type {LoadContext} from '@docusaurus/types';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {DEFAULT_OPTIONS} from '../options';
|
||||
import {Optional} from 'utility-types';
|
||||
import {createSlugger, posixPath} from '@docusaurus/utils';
|
||||
import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
import {createSidebarsUtils} from '../sidebars/utils';
|
||||
|
||||
const fixtureDir = path.join(__dirname, '__fixtures__');
|
||||
|
|
|
@ -15,9 +15,8 @@ import pluginContentDocs from '../index';
|
|||
import {loadContext} from '@docusaurus/core/src/server/index';
|
||||
import {applyConfigureWebpack} from '@docusaurus/core/src/webpack/utils';
|
||||
import type {RouteConfig} from '@docusaurus/types';
|
||||
import {posixPath} from '@docusaurus/utils';
|
||||
import {posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
import {sortConfig} from '@docusaurus/core/src/server/plugins';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
|
||||
import * as cliDocs from '../cli';
|
||||
import {OptionsSchema} from '../options';
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
readVersionsMetadata,
|
||||
} from '../versions';
|
||||
import {DEFAULT_OPTIONS} from '../options';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
import {PluginOptions, VersionMetadata} from '../types';
|
||||
import type {I18n} from '@docusaurus/types';
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import fs from 'fs-extra';
|
|||
import path from 'path';
|
||||
import type {PathOptions, SidebarOptions} from './types';
|
||||
import {loadSidebarsFile, resolveSidebarPathOption} from './sidebars';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||
|
||||
function createVersionedSidebarFile({
|
||||
siteDir,
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import path from 'path';
|
||||
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import {
|
||||
normalizeUrl,
|
||||
docuHash,
|
||||
|
@ -17,6 +16,7 @@ import {
|
|||
addTrailingPathSeparator,
|
||||
createAbsoluteFilePathMatcher,
|
||||
createSlugger,
|
||||
DEFAULT_PLUGIN_ID,
|
||||
} from '@docusaurus/utils';
|
||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||
import {loadSidebars} from './sidebars';
|
||||
|
|
|
@ -21,9 +21,13 @@ import {
|
|||
CURRENT_VERSION_NAME,
|
||||
} from './constants';
|
||||
|
||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants';
|
||||
import type {LoadContext} from '@docusaurus/types';
|
||||
import {getPluginI18nPath, normalizeUrl, posixPath} from '@docusaurus/utils';
|
||||
import {
|
||||
getPluginI18nPath,
|
||||
normalizeUrl,
|
||||
posixPath,
|
||||
DEFAULT_PLUGIN_ID,
|
||||
} from '@docusaurus/utils';
|
||||
import {difference} from 'lodash';
|
||||
import {resolveSidebarPathOption} from './sidebars';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue