mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
refactor: ensure lodash is default-imported (#6716)
This commit is contained in:
parent
47c9a37c5f
commit
ea6ceaa371
44 changed files with 239 additions and 221 deletions
|
@ -28,7 +28,7 @@ import {
|
|||
posixPath,
|
||||
DEFAULT_PLUGIN_ID,
|
||||
} from '@docusaurus/utils';
|
||||
import {difference} from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import {resolveSidebarPathOption} from './sidebars';
|
||||
|
||||
// retro-compatibility: no prefix for the default plugin id
|
||||
|
@ -486,7 +486,7 @@ function checkVersionsOptions(
|
|||
`Docs option lastVersion: ${options.lastVersion} is invalid. ${availableVersionNamesMsg}`,
|
||||
);
|
||||
}
|
||||
const unknownVersionConfigNames = difference(
|
||||
const unknownVersionConfigNames = _.difference(
|
||||
Object.keys(options.versions),
|
||||
availableVersionNames,
|
||||
);
|
||||
|
@ -504,7 +504,7 @@ function checkVersionsOptions(
|
|||
`Invalid docs option "onlyIncludeVersions": an empty array is not allowed, at least one version is needed.`,
|
||||
);
|
||||
}
|
||||
const unknownOnlyIncludeVersionNames = difference(
|
||||
const unknownOnlyIncludeVersionNames = _.difference(
|
||||
options.onlyIncludeVersions,
|
||||
availableVersionNames,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue