diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 7ab3f617e829..d39ecc5a973c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -139,7 +139,7 @@ module.exports = { { paths: [ { - name: 'lodash', + name: 'lodash-es', importNames: [ // 'compact', // TODO: TS doesn't make Boolean a narrowing function yet, so filter(Boolean) is problematic type-wise 'filter', @@ -181,7 +181,7 @@ module.exports = { }, }, { - files: ['*.js'], + files: ['*.js', '*.cjs'], rules: { // Make JS code directly runnable in Node. '@typescript-eslint/no-var-requires': OFF, diff --git a/babel.config.cjs b/babel.config.cjs index 3e4ad9e80b29..67cf053df30d 100644 --- a/babel.config.cjs +++ b/babel.config.cjs @@ -18,10 +18,4 @@ module.exports = { '@babel/react', '@babel/preset-typescript', ], - plugins: [ - '@babel/plugin-proposal-class-properties', - '@babel/plugin-proposal-object-rest-spread', - '@babel/plugin-proposal-nullish-coalescing-operator', - '@babel/plugin-proposal-optional-chaining', - ], }; diff --git a/jest.config.cjs b/jest.config.cjs index cf48211fb2a6..8c5c4f6df65a 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -26,7 +26,7 @@ module.exports = { testPathIgnorePatterns: ignorePatterns, coveragePathIgnorePatterns: ignorePatterns, transform: { - '^.+\\.[jt]sx?$': 'babel-jest', + '^.+\\.[cm]?[jt]sx?$': 'babel-jest', }, setupFiles: ['./jest/stylelint-rule-test.js', './jest/polyfills.js'], moduleNameMapper: { diff --git a/package.json b/package.json index 3a6a840db3f0..8473a40fe39e 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@types/fs-extra": "^9.0.6", "@types/jest": "^26.0.20", "@types/loader-utils": "^2.0.3", - "@types/lodash": "^4.14.168", + "@types/lodash-es": "^4.17.5", "@types/node": "^14.14.22", "@types/prismjs": "^1.16.2", "@types/prompts": "^2.0.9", diff --git a/packages/create-docusaurus/package.json b/packages/create-docusaurus/package.json index 2060a767554c..effcb51cfe4b 100755 --- a/packages/create-docusaurus/package.json +++ b/packages/create-docusaurus/package.json @@ -27,7 +27,7 @@ "chalk": "^4.1.2", "commander": "^5.1.0", "fs-extra": "^10.0.0", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "prompts": "^2.4.1", "semver": "^7.3.4", "shelljs": "^0.8.4", diff --git a/packages/create-docusaurus/src/index.ts b/packages/create-docusaurus/src/index.ts index 0d89f263833d..1d4a24e87008 100755 --- a/packages/create-docusaurus/src/index.ts +++ b/packages/create-docusaurus/src/index.ts @@ -11,7 +11,7 @@ import {execSync} from 'child_process'; import prompts, {Choice} from 'prompts'; import path from 'path'; import shell from 'shelljs'; -import {kebabCase, sortBy} from 'lodash'; +import {kebabCase, sortBy} from 'lodash-es'; import supportsColor from 'supports-color'; const RecommendedTemplate = 'classic'; diff --git a/packages/docusaurus-plugin-client-redirects/package.json b/packages/docusaurus-plugin-client-redirects/package.json index 001b835bc491..4380a15b02e1 100644 --- a/packages/docusaurus-plugin-client-redirects/package.json +++ b/packages/docusaurus-plugin-client-redirects/package.json @@ -28,7 +28,7 @@ "eta": "^1.12.3", "fs-extra": "^10.0.0", "globby": "^11.0.2", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "tslib": "^2.3.1" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts index 55415dfa44a0..75fe039c9626 100644 --- a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts +++ b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {uniqBy, difference, groupBy} from 'lodash'; +import {uniqBy, difference, groupBy} from 'lodash-es'; import { PluginContext, RedirectMetadata, diff --git a/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts b/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts index 86f4060712d6..8d9461803156 100644 --- a/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts +++ b/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts @@ -7,7 +7,7 @@ import * as eta from 'eta'; import redirectPageTemplate from './templates/redirectPage.template.html'; -import {memoize} from 'lodash'; +import {memoize} from 'lodash-es'; type CreateRedirectPageOptions = { toUrl: string; diff --git a/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts b/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts index 44d7c851709f..052aec7e112d 100644 --- a/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts +++ b/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts @@ -7,7 +7,7 @@ import fs from 'fs-extra'; import path from 'path'; -import {memoize} from 'lodash'; +import {memoize} from 'lodash-es'; import {PluginContext, RedirectMetadata} from './types'; import createRedirectPageContent from './createRedirectPageContent'; diff --git a/packages/docusaurus-plugin-content-blog/package.json b/packages/docusaurus-plugin-content-blog/package.json index e04df8c23e1b..9ad4e4f802e8 100644 --- a/packages/docusaurus-plugin-content-blog/package.json +++ b/packages/docusaurus-plugin-content-blog/package.json @@ -31,7 +31,7 @@ "globby": "^11.0.2", "js-yaml": "^4.0.0", "loader-utils": "^2.0.0", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "reading-time": "^1.5.0", "remark-admonitions": "^1.2.1", "tslib": "^2.3.1", diff --git a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts index 39c98ecea3cb..c4b9420971b4 100644 --- a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts +++ b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts @@ -9,7 +9,7 @@ import fs from 'fs-extra'; import chalk from 'chalk'; import path from 'path'; import readingTime from 'reading-time'; -import {keyBy, mapValues} from 'lodash'; +import {keyBy, mapValues} from 'lodash-es'; import { PluginOptions, BlogPost, diff --git a/packages/docusaurus-plugin-content-docs/package.json b/packages/docusaurus-plugin-content-docs/package.json index e32344eca370..00658f5538a0 100644 --- a/packages/docusaurus-plugin-content-docs/package.json +++ b/packages/docusaurus-plugin-content-docs/package.json @@ -41,7 +41,7 @@ "import-fresh": "^3.2.2", "js-yaml": "^4.0.0", "loader-utils": "^2.0.0", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "remark-admonitions": "^1.2.1", "shelljs": "^0.8.4", "tslib": "^2.3.1", diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts index a17d351bcdc4..09521385d873 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts @@ -8,7 +8,7 @@ import path from 'path'; import {isMatch} from 'picomatch'; import commander from 'commander'; -import {kebabCase, orderBy} from 'lodash'; +import {kebabCase, orderBy} from 'lodash-es'; import fs from 'fs-extra'; import pluginContentDocs from '../index'; diff --git a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsClientUtils.test.ts b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsClientUtils.test.ts index 72a5020fdc7f..7aaa945abb03 100644 --- a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsClientUtils.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsClientUtils.test.ts @@ -14,7 +14,7 @@ import { getDocVersionSuggestions, } from '../docsClientUtils'; import {GlobalPluginData, GlobalVersion} from '../../types'; -import {shuffle} from 'lodash'; +import {shuffle} from 'lodash-es'; describe('docsClientUtils', () => { test('getActivePlugin', () => { diff --git a/packages/docusaurus-plugin-content-docs/src/docs.ts b/packages/docusaurus-plugin-content-docs/src/docs.ts index c2532d12ccc0..39cd68cffe00 100644 --- a/packages/docusaurus-plugin-content-docs/src/docs.ts +++ b/packages/docusaurus-plugin-content-docs/src/docs.ts @@ -8,7 +8,7 @@ import path from 'path'; import fs from 'fs-extra'; import chalk from 'chalk'; -import {keyBy} from 'lodash'; +import {keyBy} from 'lodash-es'; import { aliasedSitePath, getEditUrl, diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts index 74970360ecad..61e1c54a4e1c 100644 --- a/packages/docusaurus-plugin-content-docs/src/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/index.ts @@ -42,7 +42,7 @@ import { import {RuleSetRule} from 'webpack'; import {cliDocsVersionCommand} from './cli'; import {VERSIONS_JSON_FILE} from './constants'; -import {keyBy, mapValues} from 'lodash'; +import {keyBy, mapValues} from 'lodash-es'; import {toGlobalDataVersion} from './globalData'; import {toTagDocListProp, toVersionMetadataProp} from './props'; import { diff --git a/packages/docusaurus-plugin-content-docs/src/props.ts b/packages/docusaurus-plugin-content-docs/src/props.ts index d02342d44f2a..7f8245d215d6 100644 --- a/packages/docusaurus-plugin-content-docs/src/props.ts +++ b/packages/docusaurus-plugin-content-docs/src/props.ts @@ -18,7 +18,7 @@ import type { PropTagDocList, PropTagDocListDoc, } from '@docusaurus/plugin-content-docs-types'; -import {compact, keyBy, mapValues} from 'lodash'; +import {compact, keyBy, mapValues} from 'lodash-es'; export function toSidebarsProp(loadedVersion: LoadedVersion): PropSidebars { const docsById = keyBy(loadedVersion.docs, (doc) => doc.id); diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts index 49e551e9c68c..222209d8266d 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts @@ -12,7 +12,7 @@ import type { SidebarItemsGenerator, SidebarItemsGeneratorDoc, } from './types'; -import {keyBy, sortBy} from 'lodash'; +import {keyBy, sortBy} from 'lodash-es'; import {addTrailingSlash, posixPath} from '@docusaurus/utils'; import {Joi} from '@docusaurus/utils-validation'; import chalk from 'chalk'; diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts index 7e333d57d9de..b17145965c78 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts @@ -17,7 +17,7 @@ import { SidebarsConfig, isCategoriesShorthand, } from './types'; -import {mapValues} from 'lodash'; +import {mapValues} from 'lodash-es'; function normalizeCategoriesShorthand( sidebar: SidebarCategoriesShorthand, diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts index 3f229f177284..f5957a3bb94e 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts @@ -24,7 +24,7 @@ import type { } from './types'; import {transformSidebarItems} from './utils'; import {DefaultSidebarItemsGenerator} from './generator'; -import {mapValues, memoize, pick} from 'lodash'; +import {mapValues, memoize, pick} from 'lodash-es'; import combinePromises from 'combine-promises'; export type SidebarProcessorProps = { diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts index 465af0f9aa17..1cd941154e34 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts @@ -14,7 +14,7 @@ import type { SidebarItemDoc, SidebarItemType, } from './types'; -import {mapValues, difference} from 'lodash'; +import {mapValues, difference} from 'lodash-es'; import {getElementsAround, toMessageRelativeFilePath} from '@docusaurus/utils'; export function transformSidebarItems( diff --git a/packages/docusaurus-plugin-content-docs/src/tags.ts b/packages/docusaurus-plugin-content-docs/src/tags.ts index ec49a7e7318b..0953f67b1a7d 100644 --- a/packages/docusaurus-plugin-content-docs/src/tags.ts +++ b/packages/docusaurus-plugin-content-docs/src/tags.ts @@ -7,7 +7,7 @@ import {groupTaggedItems} from '@docusaurus/utils'; import {VersionTags, DocMetadata} from './types'; -import {mapValues} from 'lodash'; +import {mapValues} from 'lodash-es'; export function getVersionTags(docs: DocMetadata[]): VersionTags { const groups = groupTaggedItems(docs, (doc) => doc.tags); diff --git a/packages/docusaurus-plugin-content-docs/src/translations.ts b/packages/docusaurus-plugin-content-docs/src/translations.ts index 138deca2c2fd..ee1c92cbd824 100644 --- a/packages/docusaurus-plugin-content-docs/src/translations.ts +++ b/packages/docusaurus-plugin-content-docs/src/translations.ts @@ -7,8 +7,7 @@ import type {LoadedVersion, LoadedContent} from './types'; import type {Sidebar, Sidebars} from './sidebars/types'; - -import {chain, mapValues, keyBy} from 'lodash'; +import {mapValues, keyBy} from 'lodash-es'; import { collectSidebarCategories, transformSidebarItems, @@ -97,22 +96,25 @@ function getSidebarTranslationFileContent( sidebarName: string, ): TranslationFileContent { const categories = collectSidebarCategories(sidebar); - const categoryContent: TranslationFileContent = chain(categories) - .keyBy((category) => `sidebar.${sidebarName}.category.${category.label}`) - .mapValues((category) => ({ + const categoryContent: TranslationFileContent = mapValues( + keyBy( + categories, + (category) => `sidebar.${sidebarName}.category.${category.label}`, + ), + (category) => ({ message: category.label, description: `The label for category ${category.label} in sidebar ${sidebarName}`, - })) - .value(); + }), + ); const links = collectSidebarLinks(sidebar); - const linksContent: TranslationFileContent = chain(links) - .keyBy((link) => `sidebar.${sidebarName}.link.${link.label}`) - .mapValues((link) => ({ + const linksContent: TranslationFileContent = mapValues( + keyBy(links, (link) => `sidebar.${sidebarName}.link.${link.label}`), + (link) => ({ message: link.label, description: `The label for link ${link.label} in sidebar ${sidebarName}, linking to ${link.href}`, - })) - .value(); + }), + ); return mergeTranslations([categoryContent, linksContent]); } diff --git a/packages/docusaurus-plugin-content-docs/src/versions.ts b/packages/docusaurus-plugin-content-docs/src/versions.ts index 6495cec7e2b2..e05ac9d93476 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions.ts @@ -24,7 +24,7 @@ import { import {DEFAULT_PLUGIN_ID} from '@docusaurus/core/lib/constants'; import {LoadContext} from '@docusaurus/types'; import {getPluginI18nPath, normalizeUrl, posixPath} from '@docusaurus/utils'; -import {difference} from 'lodash'; +import {difference} from 'lodash-es'; import {resolveSidebarPathOption} from './sidebars'; // retro-compatibility: no prefix for the default plugin id diff --git a/packages/docusaurus-plugin-content-pages/package.json b/packages/docusaurus-plugin-content-pages/package.json index 7c00d66ccf9f..ab5c29741cb4 100644 --- a/packages/docusaurus-plugin-content-pages/package.json +++ b/packages/docusaurus-plugin-content-pages/package.json @@ -25,7 +25,7 @@ "@docusaurus/utils": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9", "globby": "^11.0.2", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "remark-admonitions": "^1.2.1", "tslib": "^2.3.1", "webpack": "^5.61.0" diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index 06bc72383042..0de8db736892 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -20,7 +20,7 @@ "babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files", "prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts,jsx,tsc}\"", "prettier:lib": "prettier --config ../../.prettierrc --write \"lib/**/*.{js,ts,jsx,tsx}\"", - "update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'" + "update-code-translations": "node -e 'require(\"./update-code-translations.cjs\").run()' --es-module-specifier-resolution=node" }, "dependencies": { "@docusaurus/core": "2.0.0-beta.9", @@ -40,7 +40,7 @@ "fs-extra": "^10.0.0", "globby": "^11.0.2", "infima": "0.2.0-alpha.34", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "parse-numeric-range": "^1.3.0", "postcss": "^8.3.7", "prism-react-renderer": "^1.2.1", diff --git a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js index afea10a29f9a..c32385621be6 100644 --- a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js +++ b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {merge} from 'lodash'; +import {merge} from 'lodash-es'; const {ThemeConfigSchema, DEFAULT_CONFIG} = require('../validateThemeConfig'); diff --git a/packages/docusaurus-theme-classic/src/translations.ts b/packages/docusaurus-theme-classic/src/translations.ts index 2b7a3ab6ab82..fbb840321291 100644 --- a/packages/docusaurus-theme-classic/src/translations.ts +++ b/packages/docusaurus-theme-classic/src/translations.ts @@ -12,8 +12,7 @@ import { NavbarItem, Footer, } from '@docusaurus/theme-common'; - -import {keyBy, chain} from 'lodash'; +import {keyBy, mapValues} from 'lodash-es'; import {mergeTranslations} from '@docusaurus/utils'; function getNavbarTranslationFile(navbar: Navbar): TranslationFileContent { @@ -28,15 +27,16 @@ function getNavbarTranslationFile(navbar: Navbar): TranslationFileContent { const allNavbarItems = flattenNavbarItems(navbar.items); - const navbarItemsTranslations: TranslationFileContent = chain( - allNavbarItems.filter((navbarItem) => !!navbarItem.label), - ) - .keyBy((navbarItem) => `item.label.${navbarItem.label}`) - .mapValues((navbarItem) => ({ + const navbarItemsTranslations: TranslationFileContent = mapValues( + keyBy( + allNavbarItems.filter((navbarItem) => !!navbarItem.label), + (navbarItem) => `item.label.${navbarItem.label}`, + ), + (navbarItem) => ({ message: navbarItem.label!, description: `Navbar item with label ${navbarItem.label}`, - })) - .value(); + }), + ); const titleTranslations: TranslationFileContent = navbar.title ? {title: {message: navbar.title, description: 'The title in the navbar'}} @@ -71,27 +71,29 @@ function translateNavbar( function getFooterTranslationFile(footer: Footer): TranslationFileContent { // TODO POC code - const footerLinkTitles: TranslationFileContent = chain( - footer.links.filter((link) => !!link.title), - ) - .keyBy((link) => `link.title.${link.title}`) - .mapValues((link) => ({ + const footerLinkTitles: TranslationFileContent = mapValues( + keyBy( + footer.links.filter((link) => !!link.title), + (link) => `link.title.${link.title}`, + ), + (link) => ({ message: link.title!, description: `The title of the footer links column with title=${link.title} in the footer`, - })) - .value(); - - const footerLinkLabels: TranslationFileContent = chain( - footer.links.flatMap((link) => link.items).filter((link) => !!link.label), - ) - .keyBy((linkItem) => `link.item.label.${linkItem.label}`) - .mapValues((linkItem) => ({ + }), + ); + + const footerLinkLabels: TranslationFileContent = mapValues( + keyBy( + footer.links.flatMap((link) => link.items).filter((link) => !!link.label), + (linkItem) => `link.item.label.${linkItem.label}`, + ), + (linkItem) => ({ message: linkItem.label!, description: `The label of footer link with label=${ linkItem.label } linking to ${linkItem.to ?? linkItem.href}`, - })) - .value(); + }), + ); const copyright: TranslationFileContent = footer.copyright ? { diff --git a/packages/docusaurus-theme-classic/update-code-translations.js b/packages/docusaurus-theme-classic/update-code-translations.cjs similarity index 86% rename from packages/docusaurus-theme-classic/update-code-translations.js rename to packages/docusaurus-theme-classic/update-code-translations.cjs index 9c75bd2435ff..ab9852a10da2 100644 --- a/packages/docusaurus-theme-classic/update-code-translations.js +++ b/packages/docusaurus-theme-classic/update-code-translations.cjs @@ -5,19 +5,18 @@ * LICENSE file in the root directory of this source tree. */ -import chalk from 'chalk'; -import path from 'path'; -import fs from 'fs-extra'; -import globby from 'globby'; -import {mapValues, pickBy, difference, orderBy} from 'lodash'; +const chalk = require('chalk'); +const path = require('path'); +const fs = require('fs-extra'); +const globby = require('globby'); const CodeDirPaths = [ - new URL('lib', import.meta.url).pathname, + path.join(__dirname, 'lib-next'), // TODO other themes should rather define their own translations in the future? - new URL('../docusaurus-theme-common/lib', import.meta.url).pathname, - new URL('../docusaurus-theme-search-algolia/lib', import.meta.url).pathname, - new URL('../docusaurus-theme-live-codeblock/lib', import.meta.url).pathname, - new URL('../docusaurus-plugin-pwa/lib', import.meta.url).pathname, + path.join(__dirname, '..', 'docusaurus-theme-common', 'lib'), + path.join(__dirname, '..', 'docusaurus-theme-search-algolia', 'src', 'theme'), + path.join(__dirname, '..', 'docusaurus-theme-live-codeblock', 'src', 'theme'), + path.join(__dirname, '..', 'docusaurus-plugin-pwa', 'src', 'theme'), ]; console.log('Will scan folders for code translations:', CodeDirPaths); @@ -29,7 +28,8 @@ function removeDescriptionSuffix(key) { return key; } -function sortObjectKeys(obj) { +async function sortObjectKeys(obj) { + const {orderBy} = await import('lodash-es'); let keys = Object.keys(obj); keys = orderBy(keys, [(k) => removeDescriptionSuffix(k)]); return keys.reduce((acc, key) => { @@ -55,9 +55,7 @@ async function extractThemeCodeMessages() { globSourceCodeFilePaths, extractAllSourceCodeFileTranslations, // eslint-disable-next-line global-require - } = await import( - '@docusaurus/core/lib/server/translations/translationsExtractor' - ); + } = await import('@docusaurus/core/lib/server/translations/translationsExtractor'); const filePaths = (await globSourceCodeFilePaths(CodeDirPaths)).filter( (filePath) => ['.js', '.jsx'].includes(path.extname(filePath)), @@ -66,7 +64,7 @@ async function extractThemeCodeMessages() { const filesExtractedTranslations = await extractAllSourceCodeFileTranslations( filePaths, { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], + presets: [require.resolve('@docusaurus/core/lib/babel/preset.cjs')], }, ); @@ -96,7 +94,7 @@ async function readMessagesFile(filePath) { } async function writeMessagesFile(filePath, messages) { - const sortedMessages = sortObjectKeys(messages); + const sortedMessages = await sortObjectKeys(messages); const content = `${JSON.stringify(sortedMessages, null, 2)}\n`; // \n makes prettier happy await fs.writeFile(filePath, content); @@ -108,8 +106,7 @@ async function writeMessagesFile(filePath, messages) { } async function getCodeTranslationFiles() { - const codeTranslationsDir = new URL('codeTranslations', import.meta.url) - .pathname; + const codeTranslationsDir = path.join(__dirname, 'codeTranslations'); const baseFile = path.join(codeTranslationsDir, 'base.json'); const localesFiles = (await globby(codeTranslationsDir)).filter( (filepath) => @@ -121,6 +118,7 @@ async function getCodeTranslationFiles() { const DescriptionSuffix = '___DESCRIPTION'; async function updateBaseFile(baseFile) { + const {mapValues, pickBy, difference} = await import('lodash-es'); const baseMessagesWithDescriptions = await readMessagesFile(baseFile); const baseMessages = pickBy( baseMessagesWithDescriptions, @@ -175,6 +173,7 @@ ${logKeys(unknownMessages)}`), } async function updateLocaleCodeTranslations(localeFile, baseFileMessages) { + const {difference} = await import('lodash-es'); const localeFileMessages = await readMessagesFile(localeFile); const unknownMessages = difference( @@ -242,4 +241,5 @@ function run() { ); } -export {run, extractThemeCodeMessages}; +exports.run = run; +exports.extractThemeCodeMessages = extractThemeCodeMessages; diff --git a/packages/docusaurus-theme-classic/update-code-translations.test.js b/packages/docusaurus-theme-classic/update-code-translations.test.js index 5e25a843b863..5bd3d8ed0583 100644 --- a/packages/docusaurus-theme-classic/update-code-translations.test.js +++ b/packages/docusaurus-theme-classic/update-code-translations.test.js @@ -5,9 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import {extractThemeCodeMessages} from './update-code-translations'; -import fs from 'fs-extra'; -import {mapValues, pickBy} from 'lodash'; +const {extractThemeCodeMessages} = require('./update-code-translations'); +const path = require('path'); +const fs = require('fs-extra'); +const {mapValues, pickBy} = require('lodash-es'); // Seems the 5s default timeout fails sometimes jest.setTimeout(15000); @@ -17,7 +18,7 @@ describe('update-code-translations', () => { const baseMessages = pickBy( JSON.parse( await fs.readFile( - new URL('./codeTranslations/base.json', import.meta.url).pathname, + path.join(__dirname, 'codeTranslations', 'base.json'), ), ), (_, key) => !key.endsWith('___DESCRIPTION'), diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json index 6025feacbdf3..1c72a66923c7 100644 --- a/packages/docusaurus-theme-common/package.json +++ b/packages/docusaurus-theme-common/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@docusaurus/module-type-aliases": "2.0.0-beta.9", - "lodash": "^4.17.20" + "lodash-es": "^4.17.20" }, "peerDependencies": { "prism-react-renderer": "^1.2.1", diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/tagUtils.test.ts b/packages/docusaurus-theme-common/src/utils/__tests__/tagUtils.test.ts index 028ad4f0be2a..512f8eb01976 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/tagUtils.test.ts +++ b/packages/docusaurus-theme-common/src/utils/__tests__/tagUtils.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {shuffle} from 'lodash'; +import {shuffle} from 'lodash-es'; import {listTagsByLetters} from '../tagsUtils'; describe('listTagsByLetters', () => { diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index 74b8bb750858..e7bc517a1562 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -23,7 +23,7 @@ "algoliasearch-helper": "^3.5.5", "clsx": "^1.1.1", "eta": "^1.12.3", - "lodash": "^4.17.20" + "lodash-es": "^4.17.20" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-theme-search-algolia/src/index.js b/packages/docusaurus-theme-search-algolia/src/index.js index 725ca2b9e116..206cb01c85f5 100644 --- a/packages/docusaurus-theme-search-algolia/src/index.js +++ b/packages/docusaurus-theme-search-algolia/src/index.js @@ -11,7 +11,7 @@ import {compile, defaultConfig} from 'eta'; import {normalizeUrl, getSwizzledComponent} from '@docusaurus/utils'; import {trim} from './templates/opensearch'; import {validateThemeConfig} from './validateThemeConfig'; -import {memoize} from 'lodash'; +import {memoize} from 'lodash-es'; const getCompiledOpenSearchTemplate = memoize(() => { return compile(trim()); diff --git a/packages/docusaurus-utils/package.json b/packages/docusaurus-utils/package.json index 22b5b5fe5ebb..d08cbebd5b3d 100644 --- a/packages/docusaurus-utils/package.json +++ b/packages/docusaurus-utils/package.json @@ -27,7 +27,7 @@ "fs-extra": "^10.0.0", "globby": "^11.0.4", "gray-matter": "^4.0.3", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "micromatch": "^4.0.4", "remark-mdx-remove-exports": "^1.6.22", "remark-mdx-remove-imports": "^1.6.22", diff --git a/packages/docusaurus-utils/src/__tests__/index.test.ts b/packages/docusaurus-utils/src/__tests__/index.test.ts index ea626caa42a8..825dc6ed86c2 100644 --- a/packages/docusaurus-utils/src/__tests__/index.test.ts +++ b/packages/docusaurus-utils/src/__tests__/index.test.ts @@ -30,7 +30,7 @@ import { updateTranslationFileMessages, parseMarkdownHeadingId, } from '../index'; -import {sum} from 'lodash'; +import {sum} from 'lodash-es'; describe('load utils', () => { test('aliasedSitePath', () => { diff --git a/packages/docusaurus-utils/src/hashUtils.ts b/packages/docusaurus-utils/src/hashUtils.ts index 40b9bde44691..fded43188002 100644 --- a/packages/docusaurus-utils/src/hashUtils.ts +++ b/packages/docusaurus-utils/src/hashUtils.ts @@ -6,7 +6,7 @@ */ import {createHash} from 'crypto'; -import {kebabCase} from 'lodash'; +import {kebabCase} from 'lodash-es'; import {shortName, isNameTooLong} from './pathUtils'; export function md5Hash(str: string): string { diff --git a/packages/docusaurus-utils/src/index.ts b/packages/docusaurus-utils/src/index.ts index e21f77c13123..625f3904a9de 100644 --- a/packages/docusaurus-utils/src/index.ts +++ b/packages/docusaurus-utils/src/index.ts @@ -8,7 +8,7 @@ import chalk from 'chalk'; import path from 'path'; import {createHash} from 'crypto'; -import {camelCase, mapValues} from 'lodash'; +import {camelCase, mapValues} from 'lodash-es'; import escapeStringRegexp from 'escape-string-regexp'; import fs from 'fs-extra'; import {URL} from 'url'; diff --git a/packages/docusaurus-utils/src/tags.ts b/packages/docusaurus-utils/src/tags.ts index 3a0aa3bb10fb..6728f8da7bda 100644 --- a/packages/docusaurus-utils/src/tags.ts +++ b/packages/docusaurus-utils/src/tags.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {kebabCase, uniq, uniqBy} from 'lodash'; +import {kebabCase, uniq, uniqBy} from 'lodash-es'; import {normalizeUrl} from './normalizeUrl'; export type Tag = { diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 1eda2d014930..9b7140ac737c 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -90,7 +90,7 @@ "import-fresh": "^3.3.0", "is-root": "^2.1.0", "leven": "^3.1.0", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "mini-css-extract-plugin": "^1.6.0", "nprogress": "^0.2.0", "postcss": "^8.3.7", diff --git a/packages/docusaurus/src/babel/preset.js b/packages/docusaurus/src/babel/preset.cjs similarity index 100% rename from packages/docusaurus/src/babel/preset.js rename to packages/docusaurus/src/babel/preset.cjs diff --git a/packages/docusaurus/src/client/.eslintrc.cjs b/packages/docusaurus/src/client/.eslintrc.cjs index 0a60804545c0..72046eb023d7 100644 --- a/packages/docusaurus/src/client/.eslintrc.cjs +++ b/packages/docusaurus/src/client/.eslintrc.cjs @@ -13,7 +13,7 @@ module.exports = { patterns: [ // prevent importing lodash in client bundle // prefer shipping vanilla JS - 'lodash', + 'lodash-es', 'lodash.**', 'lodash/**', // prevent importing server code in client bundle diff --git a/packages/docusaurus/src/client/serverEntry.js b/packages/docusaurus/src/client/serverEntry.js index ea74e0516c62..fa630de49d3e 100644 --- a/packages/docusaurus/src/client/serverEntry.js +++ b/packages/docusaurus/src/client/serverEntry.js @@ -26,7 +26,7 @@ import { } from './LinksCollector'; import chalk from 'chalk'; // eslint-disable-next-line no-restricted-imports -import {memoize} from 'lodash'; +import {memoize} from 'lodash-es'; const getCompiledSSRTemplate = memoize((template) => { return eta.compile(template.trim(), { diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 446b8fbd3a47..9aeae7e2d1f3 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -11,7 +11,7 @@ import chokidar from 'chokidar'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import path from 'path'; -import {debounce} from 'lodash'; +import {debounce} from 'lodash-es'; import openBrowser from 'react-dev-utils/openBrowser'; import {prepareUrls} from 'react-dev-utils/WebpackDevServerUtils'; import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; diff --git a/packages/docusaurus/src/commands/swizzle.ts b/packages/docusaurus/src/commands/swizzle.ts index c78cdaedad03..b7003b356b9e 100644 --- a/packages/docusaurus/src/commands/swizzle.ts +++ b/packages/docusaurus/src/commands/swizzle.ts @@ -11,7 +11,7 @@ import importFresh from 'import-fresh'; import path from 'path'; import {ImportedPluginModule, PluginConfig} from '@docusaurus/types'; import leven from 'leven'; -import {partition} from 'lodash'; +import {partition} from 'lodash-es'; import {THEME_PATH} from '../constants'; import {loadContext, loadPluginConfigs} from '../server'; import initPlugins from '../server/plugins/init'; diff --git a/packages/docusaurus/src/server/__tests__/i18n.test.ts b/packages/docusaurus/src/server/__tests__/i18n.test.ts index 6c2a30e5856a..90527f29dcb4 100644 --- a/packages/docusaurus/src/server/__tests__/i18n.test.ts +++ b/packages/docusaurus/src/server/__tests__/i18n.test.ts @@ -13,14 +13,11 @@ import { } from '../i18n'; import {DEFAULT_I18N_CONFIG} from '../configValidation'; import path from 'path'; -import {chain, identity} from 'lodash'; +import {mapValues, keyBy, identity} from 'lodash-es'; import {I18nConfig} from '@docusaurus/types'; function testLocaleConfigsFor(locales: string[]) { - return chain(locales) - .keyBy(identity) - .mapValues(getDefaultLocaleConfig) - .value(); + return mapValues(keyBy(locales, identity), getDefaultLocaleConfig); } function loadI18nTest(i18nConfig: I18nConfig, locale?: string) { diff --git a/packages/docusaurus/src/server/brokenLinks.ts b/packages/docusaurus/src/server/brokenLinks.ts index 62a7557c811e..181fcc05f1fa 100644 --- a/packages/docusaurus/src/server/brokenLinks.ts +++ b/packages/docusaurus/src/server/brokenLinks.ts @@ -8,7 +8,7 @@ import {matchRoutes, RouteConfig as RRRouteConfig} from 'react-router-config'; import resolvePathname from 'resolve-pathname'; import fs from 'fs-extra'; -import {mapValues, pickBy, countBy} from 'lodash'; +import {mapValues, pickBy, countBy} from 'lodash-es'; import {RouteConfig, ReportingSeverity} from '@docusaurus/types'; import {removePrefix, removeSuffix, reportMessage} from '@docusaurus/utils'; import {getAllFinalRoutes} from './utils'; diff --git a/packages/docusaurus/src/server/html-tags/htmlTags.ts b/packages/docusaurus/src/server/html-tags/htmlTags.ts index a1d063d460de..35a9ec254bf4 100644 --- a/packages/docusaurus/src/server/html-tags/htmlTags.ts +++ b/packages/docusaurus/src/server/html-tags/htmlTags.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {isPlainObject} from 'lodash'; +import {isPlainObject} from 'lodash-es'; import {HtmlTagObject} from '@docusaurus/types'; import htmlTags from 'html-tags'; import voidHtmlTags from 'html-tags/void'; diff --git a/packages/docusaurus/src/server/index.ts b/packages/docusaurus/src/server/index.ts index f26b974e7140..86bbad0e52b8 100644 --- a/packages/docusaurus/src/server/index.ts +++ b/packages/docusaurus/src/server/index.ts @@ -37,7 +37,7 @@ import { readCodeTranslationFileContent, getPluginsDefaultCodeTranslationMessages, } from './translations/translations'; -import {mapValues} from 'lodash'; +import {mapValues} from 'lodash-es'; import {RuleSetRule} from 'webpack'; import admonitions from 'remark-admonitions'; diff --git a/packages/docusaurus/src/server/plugins/index.ts b/packages/docusaurus/src/server/plugins/index.ts index 8dd25771e027..ac22c0ccf8d6 100644 --- a/packages/docusaurus/src/server/plugins/index.ts +++ b/packages/docusaurus/src/server/plugins/index.ts @@ -22,7 +22,7 @@ import { import initPlugins from './init'; import chalk from 'chalk'; import {DEFAULT_PLUGIN_ID} from '../../constants'; -import {chain} from 'lodash'; +import {mapValues, groupBy} from 'lodash-es'; import {localizePluginTranslationFile} from '../translations/translations'; import applyRouteTrailingSlash from './applyRouteTrailingSlash'; @@ -122,15 +122,15 @@ export async function loadPlugins({ }), ); - const allContent: AllContent = chain(loadedPlugins) - .groupBy((item) => item.name) - .mapValues((nameItems) => { - return chain(nameItems) - .groupBy((item) => item.options.id ?? DEFAULT_PLUGIN_ID) - .mapValues((idItems) => idItems[0].content) - .value(); - }) - .value(); + const allContent: AllContent = mapValues( + groupBy(loadedPlugins, (item) => item.name), + (nameItems) => { + return mapValues( + groupBy(nameItems, (item) => item.options.id ?? DEFAULT_PLUGIN_ID), + (idItems) => idItems[0].content, + ); + }, + ); // 3. Plugin Lifecycle - contentLoaded. const pluginsRouteConfigs: RouteConfig[] = []; diff --git a/packages/docusaurus/src/server/plugins/pluginIds.ts b/packages/docusaurus/src/server/plugins/pluginIds.ts index 1f4941a3ae95..2dc31ee2d53d 100644 --- a/packages/docusaurus/src/server/plugins/pluginIds.ts +++ b/packages/docusaurus/src/server/plugins/pluginIds.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {groupBy} from 'lodash'; +import {groupBy} from 'lodash-es'; import {DEFAULT_PLUGIN_ID} from '../../constants'; import {InitializedPlugin} from '@docusaurus/types'; diff --git a/packages/docusaurus/src/server/routes.ts b/packages/docusaurus/src/server/routes.ts index 91740d8df1ef..28c0cac54c67 100644 --- a/packages/docusaurus/src/server/routes.ts +++ b/packages/docusaurus/src/server/routes.ts @@ -11,7 +11,7 @@ import { removeSuffix, simpleHash, } from '@docusaurus/utils'; -import {has, isPlainObject, isString} from 'lodash'; +import {has, isPlainObject, isString} from 'lodash-es'; import {stringify} from 'querystring'; import { ChunkRegistry, diff --git a/packages/docusaurus/src/server/themes/alias.ts b/packages/docusaurus/src/server/themes/alias.ts index e743b96084fd..de8e68248439 100644 --- a/packages/docusaurus/src/server/themes/alias.ts +++ b/packages/docusaurus/src/server/themes/alias.ts @@ -9,7 +9,7 @@ import fs from 'fs-extra'; import path from 'path'; import {fileToPath, posixPath, normalizeUrl, Globby} from '@docusaurus/utils'; import {ThemeAliases} from '@docusaurus/types'; -import {sortBy} from 'lodash'; +import {sortBy} from 'lodash-es'; // Order of Webpack aliases is important because one alias can shadow another // This ensure @theme/NavbarItem alias is after @theme/NavbarItem/LocaleDropdown diff --git a/packages/docusaurus/src/server/translations/translations.ts b/packages/docusaurus/src/server/translations/translations.ts index 780cafc7de33..657f89e8b17f 100644 --- a/packages/docusaurus/src/server/translations/translations.ts +++ b/packages/docusaurus/src/server/translations/translations.ts @@ -6,7 +6,7 @@ */ import path from 'path'; import fs from 'fs-extra'; -import {mapValues, difference} from 'lodash'; +import {mapValues, difference} from 'lodash-es'; import { TranslationFileContent, TranslationFile, diff --git a/packages/docusaurus/src/webpack/__tests__/base.test.ts b/packages/docusaurus/src/webpack/__tests__/base.test.ts index 6f9dd9821f66..87d57a9d6522 100644 --- a/packages/docusaurus/src/webpack/__tests__/base.test.ts +++ b/packages/docusaurus/src/webpack/__tests__/base.test.ts @@ -14,7 +14,7 @@ import { createBaseConfig, } from '../base'; import * as utils from '../utils'; -import {mapValues} from 'lodash'; +import {mapValues} from 'lodash-es'; import {posixPath} from '@docusaurus/utils'; import {Props, ThemeAliases} from '@docusaurus/types'; diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index a4bc7bce1449..de794f86a404 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -34,7 +34,7 @@ import { OUTPUT_STATIC_ASSETS_DIR_NAME, WEBPACK_URL_LOADER_LIMIT, } from '../constants'; -import {memoize} from 'lodash'; +import {memoize} from 'lodash-es'; // Utility method to get style loaders export function getStyleLoaders( diff --git a/packages/docusaurus/test.js b/packages/docusaurus/test.js new file mode 100644 index 000000000000..59d5524077cf --- /dev/null +++ b/packages/docusaurus/test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import traverse from '@babel/traverse'; + +console.log(traverse); diff --git a/packages/lqip-loader/package.json b/packages/lqip-loader/package.json index 613a78491535..bed47a07c6be 100644 --- a/packages/lqip-loader/package.json +++ b/packages/lqip-loader/package.json @@ -19,7 +19,7 @@ "license": "MIT", "dependencies": { "file-loader": "^6.2.0", - "lodash": "^4.17.20", + "lodash-es": "^4.17.20", "node-vibrant": "^3.1.5", "sharp": "^0.29.1" }, diff --git a/packages/lqip-loader/src/utils.ts b/packages/lqip-loader/src/utils.ts index a4120ca2b624..c9665a71a026 100644 --- a/packages/lqip-loader/src/utils.ts +++ b/packages/lqip-loader/src/utils.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {sortBy} from 'lodash'; +import {sortBy} from 'lodash-es'; import type {Palette} from 'node-vibrant/lib/color'; /** diff --git a/yarn.lock b/yarn.lock index ac83f91ddb10..be376c3d3fe5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4257,10 +4257,17 @@ "@types/node" "*" "@types/webpack" "^4" -"@types/lodash@^4.14.168", "@types/lodash@^4.14.53": - version "4.14.174" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.174.tgz#b4b06b6eced9850eed6b6a8f1abdd0f5192803c1" - integrity sha512-KMBLT6+g9qrGXpDt7ohjWPUD34WA/jasrtjTEHStF0NPdEwJ1N9SZ+4GaMVDeuk/y0+X5j9xFm6mNiXS7UoaLQ== +"@types/lodash-es@^4.17.5": + version "4.17.5" + resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.5.tgz#1c3fdd16849d84aea43890b1c60da379fb501353" + integrity sha512-SHBoI8/0aoMQWAgUHMQ599VM6ZiSKg8sh/0cFqqlQQMyY9uEplc0ULU5yQNzcvdR4ZKa0ey8+vFmahuRbOCT1A== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*", "@types/lodash@^4.14.53": + version "4.14.176" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.176.tgz#641150fc1cda36fbfa329de603bbb175d7ee20c0" + integrity sha512-xZmuPTa3rlZoIbtDUyJKZQimJV3bxCmzMIO2c9Pz9afyDro6kr7R79GwcB6mRhuoPmV2p1Vb66WOJH7F886WKQ== "@types/mdast@^3.0.0", "@types/mdast@^3.0.7": version "3.0.10" @@ -12931,6 +12938,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash-es@^4.17.20: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"