diff --git a/.eslintignore b/.eslintignore index e58be97cbaf51..b0c14dbeea5fe 100644 --- a/.eslintignore +++ b/.eslintignore @@ -11,10 +11,8 @@ examples/ packages/lqip-loader/lib/ packages/docusaurus/lib/ packages/docusaurus-*/lib/* -packages/docusaurus-*/lib-next/ packages/eslint-plugin/lib/ packages/stylelint-copyright/lib/ -copyUntypedFiles.mjs packages/create-docusaurus/lib/* packages/create-docusaurus/templates/facebook diff --git a/.eslintrc.js b/.eslintrc.js index d8b7a4584e11e..4dc985f0d9f9e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -220,7 +220,35 @@ module.exports = { ], }, ], - 'import/order': OFF, + 'import/order': [ + WARNING, + { + groups: [ + 'builtin', + 'external', + 'internal', + ['parent', 'sibling', 'index'], + 'type', + ], + pathGroups: [ + {pattern: '@jest/globals', group: 'builtin', position: 'before'}, + {pattern: 'react', group: 'builtin', position: 'before'}, + {pattern: 'fs-extra', group: 'builtin'}, + {pattern: 'lodash', group: 'external', position: 'before'}, + {pattern: 'clsx', group: 'external', position: 'before'}, + // 'Bit weird to not use the `import/internal-regex` option, but this + // way, we can make `import type { Props } from "@theme/*"` appear + // before `import styles from "styles.module.css"`, which is what we + // always did. This should be removable once we stop using ambient + // module declarations for theme aliases. + {pattern: '@theme/**', group: 'internal'}, + {pattern: '@site/**', group: 'internal'}, + {pattern: '@theme-init/**', group: 'internal'}, + {pattern: '@theme-original/**', group: 'internal'}, + ], + pathGroupsExcludedImportTypes: [], + }, + ], 'import/prefer-default-export': OFF, 'jest/consistent-test-it': WARNING, diff --git a/.gitattributes b/.gitattributes index 4bbe761c210d1..6ab8de85c3e5b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -31,8 +31,10 @@ # Make GitHub not index certain files in the languages overview # See https://github.com/github/linguist/blob/master/docs/overrides.md # generated files' diff will be minimized -**/__fixtures__/** linguist-generated -.husky/** linguist-vendored -jest/** linguist-vendored -admin/** linguist-documentation -website/** linguist-documentation +**/__fixtures__/** linguist-generated +examples/** linguist-generated +.husky/** linguist-vendored +jest/** linguist-vendored +admin/** linguist-documentation +website/** linguist-documentation +packages/create-docusaurus/templates/** linguist-vendored diff --git a/.github/workflows/build-blog-only.yml b/.github/workflows/build-blog-only.yml index 8b16422415e0e..032f8ae3455f7 100644 --- a/.github/workflows/build-blog-only.yml +++ b/.github/workflows/build-blog-only.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/build-perf.yml b/.github/workflows/build-perf.yml index c7c99b0e782fd..2fa8b482a7fc3 100644 --- a/.github/workflows/build-perf.yml +++ b/.github/workflows/build-perf.yml @@ -35,7 +35,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + - uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: cache: yarn - name: Installation diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index f11d805b64613..23353fa1d9e15 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -20,7 +20,7 @@ jobs: with: fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD" - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4fb9c9ab407d7..91f6c42c4f643 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,9 +34,9 @@ jobs: uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Initialize CodeQL - uses: github/codeql-action/init@75b4f1c4669133dc294b06c2794e969efa2e5316 # v2 + uses: github/codeql-action/init@2f58583a1b24a7d3c7034f6bf9fa506d23b1183b # v2 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@75b4f1c4669133dc294b06c2794e969efa2e5316 # v2 + uses: github/codeql-action/analyze@2f58583a1b24a7d3c7034f6bf9fa506d23b1183b # v2 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index a8b388ccc1bda..32fc4d96a9972 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,4 +15,4 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3 - name: Dependency Review - uses: actions/dependency-review-action@3f943b86c9a289f4e632c632695e2e0898d9d67d # v1 + uses: actions/dependency-review-action@39e692fa323107ef86d8fdac0067ce647f239bd7 # v1 diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 3f57a9956b141..bbd6692d1e4a3 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -36,13 +36,13 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number}} - name: Format lighthouse score id: format_lighthouse_score - uses: actions/github-script@9ac08808f993958e9de277fe43a64532a609130e # v6 + uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const results = ${{ steps.lighthouse_audit.outputs.manifest }} const links = ${{ steps.lighthouse_audit.outputs.links }} - const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/format-lighthouse-score.mjs`)).default; + const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/formatLighthouseReport.js`)).default; const comment = createLighthouseReport({ results, links }); core.setOutput("comment", comment); diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a49bf9c280377..6162382297f64 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/showcase-test.yml b/.github/workflows/showcase-test.yml index 8bba764dd61ed..0403ea3fa1a2f 100644 --- a/.github/workflows/showcase-test.yml +++ b/.github/workflows/showcase-test.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index cfaff3b7749b7..f10f08f65786b 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: ${{ matrix.node }} cache: yarn @@ -73,7 +73,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js 16 - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn @@ -119,7 +119,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js 16 - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn @@ -149,7 +149,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js 16 - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/tests-swizzle.yml b/.github/workflows/tests-swizzle.yml index 4887565a4eb47..00a7f388a2ace 100644 --- a/.github/workflows/tests-swizzle.yml +++ b/.github/workflows/tests-swizzle.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Set up Node - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: '16' cache: yarn diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index ade80a4f646f4..186833e7d080a 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: ${{ matrix.node }} - name: Installation diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 89bb9fa13f003..a078a2bf3639e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3 - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3 + uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3 with: node-version: ${{ matrix.node }} cache: yarn diff --git a/.gitignore b/.gitignore index 0e0bd14648b02..1e612853226b9 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ packages/docusaurus/lib/ packages/docusaurus-*/lib/* packages/eslint-plugin/lib/ packages/stylelint-copyright/lib/ -packages/docusaurus-*/lib-next/ website/netlifyDeployPreview/* website/changelog diff --git a/.prettierignore b/.prettierignore index c7aec4e026432..5bfdf4925c04f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,7 +7,6 @@ coverage packages/lqip-loader/lib/ packages/docusaurus/lib/ packages/docusaurus-*/lib/* -packages/docusaurus-*/lib-next/ packages/create-docusaurus/lib/* packages/create-docusaurus/templates/*/docusaurus.config.js packages/eslint-plugin/lib/ diff --git a/.stylelintignore b/.stylelintignore index 951af3a16ea9e..15db7860ba7a9 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -10,7 +10,6 @@ examples/ packages/lqip-loader/lib/ packages/docusaurus/lib/ packages/docusaurus-*/lib/* -packages/docusaurus-*/lib-next/ packages/create-docusaurus/lib/* packages/create-docusaurus/templates/ website/static/katex/katex.min.css diff --git a/__tests__/validate-package-json.test.ts b/__tests__/validate-package-json.test.ts index 8598d7b892479..31bd4e8b5e8d8 100644 --- a/__tests__/validate-package-json.test.ts +++ b/__tests__/validate-package-json.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {Globby} from '@docusaurus/utils'; import fs from 'fs-extra'; +import {Globby} from '@docusaurus/utils'; type PackageJsonFile = { file: string; @@ -62,7 +62,9 @@ describe('packages', () => { const packageJsonFiles = await getPackagesJsonFiles(); packageJsonFiles - .filter((packageJsonFile) => packageJsonFile.content.name.startsWith('@')) + .filter((packageJsonFile) => + packageJsonFile.content.name?.startsWith('@'), + ) .forEach((packageJsonFile) => { if (packageJsonFile) { // Unfortunately jest custom message do not exist in loops, diff --git a/__tests__/validate-tsconfig.test.ts b/__tests__/validate-tsconfig.test.ts new file mode 100644 index 0000000000000..7a80816b7a98c --- /dev/null +++ b/__tests__/validate-tsconfig.test.ts @@ -0,0 +1,66 @@ +/** + * 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 fs from 'fs-extra'; +import {Globby} from '@docusaurus/utils'; +import {Joi} from '@docusaurus/utils-validation'; + +type TsconfigFile = { + file: string; + content: { + extends?: string; + compilerOptions: { + [key: string]: unknown; + }; + }; +}; + +async function getTsconfigFiles(): Promise { + const files = await Globby('packages/*/tsconfig.*'); + return Promise.all( + files.map((file) => fs.readJSON(file).then((content) => ({file, content}))), + ); +} + +const tsconfigSchema = Joi.object({ + extends: '../../tsconfig.json', + compilerOptions: Joi.alternatives().conditional( + Joi.object({noEmit: true}).unknown(), + { + then: Joi.object({ + noEmit: Joi.valid(true).required(), + incremental: Joi.forbidden(), + tsBuildInfoFile: Joi.forbidden(), + outDir: Joi.forbidden(), + module: Joi.valid('commonjs', 'es2020', 'esnext').required(), + }).unknown(), + otherwise: Joi.object({ + noEmit: Joi.valid(false).required(), + incremental: Joi.valid(true).required(), + rootDir: Joi.valid('src').required(), + outDir: Joi.valid('lib').required(), + module: Joi.valid('commonjs', 'es2020', 'esnext').required(), + }).unknown(), + }, + ), +}).unknown(); + +describe('tsconfig files', () => { + it('contain all required fields', async () => { + const tsconfigFiles = await getTsconfigFiles(); + tsconfigFiles.forEach((file) => { + try { + Joi.attempt(file.content, tsconfigSchema); + } catch (e) { + ( + e as Error + ).message += `\n${file.file} does not match the required schema.`; + throw e; + } + }); + }); +}); diff --git a/admin/new.docusaurus.io/functions/codesandbox.ts b/admin/new.docusaurus.io/functions/codesandbox.ts index 365ac26911f42..650c45727e6b5 100644 --- a/admin/new.docusaurus.io/functions/codesandbox.ts +++ b/admin/new.docusaurus.io/functions/codesandbox.ts @@ -5,9 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {Handler} from '@netlify/functions'; - import {createPlaygroundResponse} from '../functionUtils/playgroundUtils'; +import type {Handler} from '@netlify/functions'; export const handler: Handler = async function handler() { return createPlaygroundResponse('codesandbox'); diff --git a/admin/new.docusaurus.io/functions/index.ts b/admin/new.docusaurus.io/functions/index.ts index a137fecb41c3a..14a9df8c0632b 100644 --- a/admin/new.docusaurus.io/functions/index.ts +++ b/admin/new.docusaurus.io/functions/index.ts @@ -5,13 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import type {Handler} from '@netlify/functions'; - import { readPlaygroundName, createPlaygroundResponse, createPlaygroundDocumentationResponse, } from '../functionUtils/playgroundUtils'; +import type {Handler} from '@netlify/functions'; export const handler: Handler = async (event) => { const playgroundName = readPlaygroundName(event); diff --git a/admin/new.docusaurus.io/functions/stackblitz.ts b/admin/new.docusaurus.io/functions/stackblitz.ts index e7762f20dce05..bc6a84d31f5a1 100644 --- a/admin/new.docusaurus.io/functions/stackblitz.ts +++ b/admin/new.docusaurus.io/functions/stackblitz.ts @@ -5,9 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {Handler} from '@netlify/functions'; - import {createPlaygroundResponse} from '../functionUtils/playgroundUtils'; +import type {Handler} from '@netlify/functions'; export const handler: Handler = async function handler() { return createPlaygroundResponse('stackblitz'); diff --git a/admin/scripts/copyUntypedFiles.js b/admin/scripts/copyUntypedFiles.js new file mode 100644 index 0000000000000..59178146452a2 --- /dev/null +++ b/admin/scripts/copyUntypedFiles.js @@ -0,0 +1,36 @@ +/** + * 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 fs from 'fs-extra'; +import path from 'path'; +import chokidar from 'chokidar'; + +const srcDir = path.join(process.cwd(), 'src'); +const libDir = path.join(process.cwd(), 'lib'); + +const ignoredPattern = /(?:__tests__|\.tsx?$)/; + +async function copy() { + await fs.copy(srcDir, libDir, { + filter(testedPath) { + return !ignoredPattern.test(testedPath); + }, + }); +} + +if (process.argv.includes('--watch')) { + const watcher = chokidar.watch(srcDir, { + ignored: ignoredPattern, + ignoreInitial: true, + persistent: true, + }); + ['add', 'change', 'unlink', 'addDir', 'unlinkDir'].forEach((event) => + watcher.on(event, copy), + ); +} else { + await copy(); +} diff --git a/admin/scripts/format-lighthouse-score.mjs b/admin/scripts/formatLighthouseReport.js similarity index 100% rename from admin/scripts/format-lighthouse-score.mjs rename to admin/scripts/formatLighthouseReport.js diff --git a/admin/scripts/generateExamples.mjs b/admin/scripts/generateExamples.js similarity index 100% rename from admin/scripts/generateExamples.mjs rename to admin/scripts/generateExamples.js diff --git a/admin/scripts/package.json b/admin/scripts/package.json new file mode 100644 index 0000000000000..03df6476e25f1 --- /dev/null +++ b/admin/scripts/package.json @@ -0,0 +1,7 @@ +{ + "name": "docu-scripts", + "description": "These are the scripts used in various places of Docusaurus maintenance", + "private": true, + "license": "MIT", + "type": "module" +} diff --git a/admin/scripts/image-resize.mjs b/admin/scripts/resizeImage.js similarity index 100% rename from admin/scripts/image-resize.mjs rename to admin/scripts/resizeImage.js index cea298ef8038e..ce3d11f976800 100644 --- a/admin/scripts/image-resize.mjs +++ b/admin/scripts/resizeImage.js @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import sharp from 'sharp'; import fs from 'fs-extra'; import path from 'path'; -import imageSize from 'image-size'; import {fileURLToPath} from 'url'; import logger from '@docusaurus/logger'; +import sharp from 'sharp'; +import imageSize from 'image-size'; const allImages = ( await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url)) diff --git a/jest.config.mjs b/jest.config.mjs index 39c7f9c7c6596..5e7200416b7b0 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -23,7 +23,6 @@ const ignorePatterns = [ '/packages/docusaurus-plugin-content-docs/lib', '/packages/docusaurus-plugin-content-pages/lib', '/packages/docusaurus-theme-classic/lib', - '/packages/docusaurus-theme-classic/lib-next', '/packages/docusaurus-theme-common/lib', '/packages/docusaurus-migrate/lib', '/jest', @@ -43,7 +42,18 @@ export default { '/packages/docusaurus-utils/src/index.ts', ], transform: { - '^.+\\.[jt]sx?$': '@swc/jest', + '^.+\\.[jt]sx?$': [ + '@swc/jest', + { + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + target: 'es2020', + }, + }, + ], }, errorOnDeprecated: true, reporters: ['default', 'github-actions'], diff --git a/jest/snapshotPathNormalizer.ts b/jest/snapshotPathNormalizer.ts index 957aef8c40bc6..a0e9a3f4d38d8 100644 --- a/jest/snapshotPathNormalizer.ts +++ b/jest/snapshotPathNormalizer.ts @@ -8,13 +8,13 @@ // Forked from https://github.com/tribou/jest-serializer-path/blob/master/lib/index.js // Added some project-specific handlers -import _ from 'lodash'; -import {escapePath} from '@docusaurus/utils'; -import stripAnsi from 'strip-ansi'; -import {version} from '@docusaurus/core/package.json'; import os from 'os'; import path from 'path'; import fs from 'fs'; +import _ from 'lodash'; +import {escapePath} from '@docusaurus/utils'; +import {version} from '@docusaurus/core/package.json'; +import stripAnsi from 'strip-ansi'; export function print( val: unknown, diff --git a/package.json b/package.json index 16f2f3be15ba7..ec51b53832d67 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "start:website:baseUrl": "yarn workspace website start:baseUrl", "start:website:blogOnly": "yarn workspace website start:blogOnly", "start:website:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace website start", - "examples:generate": "node admin/scripts/generateExamples.mjs", + "examples:generate": "node admin/scripts/generateExamples.js", "build": "yarn build:packages && yarn build:website", "build:packages": "lerna run build --no-private", "build:website": "yarn workspace website build", @@ -54,7 +54,7 @@ "test": "jest", "test:build:website": "./admin/scripts/test-release.sh", "watch": "yarn lerna run --parallel watch", - "clear": "(yarn workspace website clear || echo 'Failure while running docusaurus clear') && yarn lerna exec --ignore docusaurus yarn rimraf lib lib-next", + "clear": "(yarn workspace website clear || echo 'Failure while running docusaurus clear') && yarn lerna exec --ignore docusaurus yarn rimraf lib", "test:baseUrl": "yarn build:website:baseUrl && yarn serve:website:baseUrl", "lock:update": "npx yarn-deduplicate" }, @@ -63,22 +63,21 @@ }, "devDependencies": { "@crowdin/cli": "^3.7.8", - "@swc/core": "^1.2.181", + "@swc/core": "^1.2.185", "@swc/jest": "^0.2.21", "@testing-library/react-hooks": "^8.0.0", "@types/fs-extra": "^9.0.13", - "@types/jest": "^27.5.0", + "@types/jest": "^27.5.1", "@types/lodash": "^4.14.182", - "@types/node": "^17.0.31", + "@types/node": "^17.0.34", "@types/prompts": "^2.0.14", "@types/react": "^18.0.9", "@types/react-dev-utils": "^9.0.10", "@types/react-test-renderer": "^18.0.0", "@types/semver": "^7.3.9", "@types/shelljs": "^0.8.11", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", - "concurrently": "^7.1.0", + "@typescript-eslint/eslint-plugin": "^5.24.0", + "@typescript-eslint/parser": "^5.24.0", "cross-env": "^7.0.3", "cspell": "^5.20.0", "eslint": "^8.15.0", @@ -86,7 +85,7 @@ "eslint-config-prettier": "^8.5.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jest": "^26.1.5", + "eslint-plugin-jest": "^26.2.2", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.5.0", @@ -99,6 +98,7 @@ "lerna": "^4.0.0", "lerna-changelog": "^2.2.0", "lint-staged": "^12.4.1", + "npm-run-all": "^4.1.5", "prettier": "^2.6.2", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/create-docusaurus/.npmignore b/packages/create-docusaurus/.npmignore index 1edc83766ff5a..1f851e4a70c0b 100644 --- a/packages/create-docusaurus/.npmignore +++ b/packages/create-docusaurus/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* __tests__ node_modules diff --git a/packages/create-docusaurus/bin/index.js b/packages/create-docusaurus/bin/index.js index 7673e0025a0f8..b4b6d47c5ec9a 100755 --- a/packages/create-docusaurus/bin/index.js +++ b/packages/create-docusaurus/bin/index.js @@ -8,11 +8,11 @@ // @ts-check +import path from 'path'; +import {createRequire} from 'module'; import logger from '@docusaurus/logger'; import semver from 'semver'; -import path from 'path'; import {program} from 'commander'; -import {createRequire} from 'module'; const packageJson = createRequire(import.meta.url)('../package.json'); const requiredVersion = packageJson.engines.node; diff --git a/packages/create-docusaurus/package.json b/packages/create-docusaurus/package.json index 8c715fc339e3e..d7a60dba1c133 100755 --- a/packages/create-docusaurus/package.json +++ b/packages/create-docusaurus/package.json @@ -13,8 +13,8 @@ }, "scripts": { "create-docusaurus": "create-docusaurus", - "build": "tsc -p tsconfig.build.json", - "watch": "tsc -p tsconfig.build.json --watch" + "build": "tsc --build", + "watch": "tsc --build --watch" }, "bin": "bin/index.js", "publishConfig": { diff --git a/packages/create-docusaurus/src/index.ts b/packages/create-docusaurus/src/index.ts index b35e653b0a813..cc9c9408ec301 100755 --- a/packages/create-docusaurus/src/index.ts +++ b/packages/create-docusaurus/src/index.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import fs from 'fs-extra'; import {fileURLToPath} from 'url'; -import prompts, {type Choice} from 'prompts'; import path from 'path'; -import shell from 'shelljs'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import shell from 'shelljs'; +import prompts, {type Choice} from 'prompts'; import supportsColor from 'supports-color'; type CLIOptions = { diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index 3f98e42c9f79d..22520824356d0 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -19,7 +19,7 @@ "@docusaurus/preset-classic": "2.0.0-beta.20", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", - "prism-react-renderer": "^1.3.1", + "prism-react-renderer": "^1.3.3", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx b/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx index 3408a41e7f231..305139fba0092 100644 --- a/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx +++ b/packages/create-docusaurus/templates/classic-typescript/src/pages/index.tsx @@ -1,11 +1,12 @@ import React from 'react'; import clsx from 'clsx'; -import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import styles from './index.module.css'; +import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import styles from './index.module.css'; + function HomepageHeader() { const {siteConfig} = useDocusaurusContext(); return ( diff --git a/packages/create-docusaurus/templates/classic/package.json b/packages/create-docusaurus/templates/classic/package.json index bc39e6d4c02b9..c7be6e72caaab 100644 --- a/packages/create-docusaurus/templates/classic/package.json +++ b/packages/create-docusaurus/templates/classic/package.json @@ -18,7 +18,7 @@ "@docusaurus/preset-classic": "2.0.0-beta.20", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", - "prism-react-renderer": "^1.3.1", + "prism-react-renderer": "^1.3.3", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/create-docusaurus/templates/classic/src/pages/index.js b/packages/create-docusaurus/templates/classic/src/pages/index.js index a4fc2d3f03e6f..affcd9099c28f 100644 --- a/packages/create-docusaurus/templates/classic/src/pages/index.js +++ b/packages/create-docusaurus/templates/classic/src/pages/index.js @@ -1,11 +1,12 @@ import React from 'react'; import clsx from 'clsx'; -import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import styles from './index.module.css'; +import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import styles from './index.module.css'; + function HomepageHeader() { const {siteConfig} = useDocusaurusContext(); return ( diff --git a/packages/create-docusaurus/tsconfig.build.json b/packages/create-docusaurus/tsconfig.build.json index 41b40e7cf697c..6f46335ae9d0a 100644 --- a/packages/create-docusaurus/tsconfig.build.json +++ b/packages/create-docusaurus/tsconfig.build.json @@ -1,12 +1,14 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, "module": "es2020", "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "rootDir": "src", "outDir": "lib" }, - "include": ["src/"], - "exclude": ["templates/"] + "include": ["src"], + "exclude": ["templates/", "**/__tests__/**"] } diff --git a/packages/create-docusaurus/tsconfig.json b/packages/create-docusaurus/tsconfig.json index edb2c88e1daf7..ef9bff21668e9 100644 --- a/packages/create-docusaurus/tsconfig.json +++ b/packages/create-docusaurus/tsconfig.json @@ -1,10 +1,12 @@ -// For editor typechecking; includes bin { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.build.json"}], "compilerOptions": { "noEmit": true, "allowJs": true, + "module": "esnext", "rootDir": "." }, - "include": ["src", "bin"] + "include": ["bin"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-cssnano-preset/.npmignore b/packages/docusaurus-cssnano-preset/.npmignore index c912533dd7d2d..03c9ae1e1b54f 100644 --- a/packages/docusaurus-cssnano-preset/.npmignore +++ b/packages/docusaurus-cssnano-preset/.npmignore @@ -1 +1,3 @@ +.tsbuildinfo* +tsconfig* __tests__ diff --git a/packages/docusaurus-cssnano-preset/index.js b/packages/docusaurus-cssnano-preset/index.js deleted file mode 100644 index cac7eda8999df..0000000000000 --- a/packages/docusaurus-cssnano-preset/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -const advancedBasePreset = require('cssnano-preset-advanced'); -const postCssSortMediaQueries = require('postcss-sort-media-queries'); -const postCssRemoveOverriddenCustomProperties = require('./src/remove-overridden-custom-properties'); - -module.exports = function docusaurusCssnanoPreset(opts) { - const advancedPreset = advancedBasePreset({ - autoprefixer: {add: false}, - discardComments: {removeAll: true}, - ...opts, - }); - - advancedPreset.plugins.unshift( - [postCssSortMediaQueries], - [postCssRemoveOverriddenCustomProperties], - ); - - return advancedPreset; -}; diff --git a/packages/docusaurus-cssnano-preset/package.json b/packages/docusaurus-cssnano-preset/package.json index 48b9c5697748a..0fa9229f07a99 100644 --- a/packages/docusaurus-cssnano-preset/package.json +++ b/packages/docusaurus-cssnano-preset/package.json @@ -2,20 +2,25 @@ "name": "@docusaurus/cssnano-preset", "version": "2.0.0-beta.20", "description": "Advanced cssnano preset for maximum optimization.", - "main": "index.js", + "main": "lib/index.js", "license": "MIT", "publishConfig": { "access": "public" }, + "scripts": { + "build": "tsc", + "watch": "tsc --watch" + }, "repository": { "type": "git", "url": "https://github.com/facebook/docusaurus.git", "directory": "packages/docusaurus-cssnano-preset" }, "dependencies": { - "cssnano-preset-advanced": "^5.3.3", + "cssnano-preset-advanced": "^5.3.4", "postcss": "^8.4.13", - "postcss-sort-media-queries": "^4.2.1" + "postcss-sort-media-queries": "^4.2.1", + "tslib": "^2.4.0" }, "devDependencies": { "to-vfile": "^6.1.0" diff --git a/packages/docusaurus-cssnano-preset/src/deps.d.ts b/packages/docusaurus-cssnano-preset/src/deps.d.ts new file mode 100644 index 0000000000000..f508fb9197d5f --- /dev/null +++ b/packages/docusaurus-cssnano-preset/src/deps.d.ts @@ -0,0 +1,11 @@ +/** + * 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. + */ + +declare module 'postcss-sort-media-queries' { + const plugin: import('postcss').PluginCreator; + export default plugin; +} diff --git a/packages/docusaurus-cssnano-preset/src/index.ts b/packages/docusaurus-cssnano-preset/src/index.ts new file mode 100644 index 0000000000000..6bae42c6f8c74 --- /dev/null +++ b/packages/docusaurus-cssnano-preset/src/index.ts @@ -0,0 +1,27 @@ +/** + * 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 advancedBasePreset from 'cssnano-preset-advanced'; +import postCssSortMediaQueries from 'postcss-sort-media-queries'; +import postCssRemoveOverriddenCustomProperties from './remove-overridden-custom-properties'; + +const preset: typeof advancedBasePreset = function preset(opts) { + const advancedPreset = advancedBasePreset({ + autoprefixer: {add: false}, + discardComments: {removeAll: true}, + ...opts, + }); + + advancedPreset.plugins.unshift( + [postCssSortMediaQueries, undefined], + [postCssRemoveOverriddenCustomProperties, undefined], + ); + + return advancedPreset; +}; + +export = preset; diff --git a/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/__snapshots__/index.test.js.snap b/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/__snapshots__/index.test.ts.snap similarity index 100% rename from packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/__snapshots__/index.test.js.snap rename to packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/__snapshots__/index.test.ts.snap diff --git a/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.js b/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.ts similarity index 78% rename from packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.js rename to packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.ts index b544461797969..8e50db5a74bdf 100644 --- a/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.js +++ b/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/__tests__/index.test.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -const path = require('path'); -const vfile = require('to-vfile'); -const postcss = require('postcss'); -const postCssRemoveOverriddenCustomProperties = require('../index'); +import path from 'path'; +import vfile from 'to-vfile'; +import postcss from 'postcss'; +import postCssRemoveOverriddenCustomProperties from '../index'; -const processFixture = (name) => { +const processFixture = (name: string) => { const input = vfile.readSync( path.join(__dirname, '__fixtures__', `${name}.css`), 'utf8', diff --git a/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.js b/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.ts similarity index 69% rename from packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.js rename to packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.ts index 51eb53b353270..a7dbba88f3ce8 100644 --- a/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.js +++ b/packages/docusaurus-cssnano-preset/src/remove-overridden-custom-properties/index.ts @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import type {Plugin, Rule, Node} from 'postcss'; + +const isRule = (node: Node | undefined): node is Rule => node?.type === 'rule'; + /** * This PostCSS plugin will remove duplicate/same custom properties (which are * actually overridden ones) **only** from `:root` selector. @@ -17,32 +21,31 @@ * applied). * - If the same custom properties have at least one `!important` rule, then * only those properties that do not have this rule will be removed. - * @returns {import('postcss').Plugin} */ -module.exports = function creator() { +function creator(): Plugin { return { postcssPlugin: 'postcss-remove-overridden-custom-properties', Declaration(decl) { - if (decl.parent.selector !== ':root') { + if (!isRule(decl.parent) || decl.parent.selector !== ':root') { return; } const sameProperties = decl.parent.nodes.filter( - (n) => n.prop === decl.prop, + (n) => 'prop' in n && n.prop === decl.prop, ); - const hasImportantProperties = sameProperties.some((p) => - Object.prototype.hasOwnProperty.call(p, 'important'), + const hasImportantProperties = sameProperties.some( + (p) => 'important' in p, ); const overriddenProperties = hasImportantProperties - ? sameProperties.filter( - (p) => !Object.prototype.hasOwnProperty.call(p, 'important'), - ) + ? sameProperties.filter((p) => !('important' in p)) : sameProperties.slice(0, -1); overriddenProperties.map((p) => p.remove()); }, }; -}; +} + +creator.postcss = true as const; -module.exports.postcss = true; +export default creator; diff --git a/packages/docusaurus-cssnano-preset/tsconfig.json b/packages/docusaurus-cssnano-preset/tsconfig.json new file mode 100644 index 0000000000000..80e43e9813efd --- /dev/null +++ b/packages/docusaurus-cssnano-preset/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-logger/.npmignore b/packages/docusaurus-logger/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-logger/.npmignore +++ b/packages/docusaurus-logger/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-logger/tsconfig.json b/packages/docusaurus-logger/tsconfig.json index aee99fc0f38ef..7807612b51a56 100644 --- a/packages/docusaurus-logger/tsconfig.json +++ b/packages/docusaurus-logger/tsconfig.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-mdx-loader/.npmignore b/packages/docusaurus-mdx-loader/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-mdx-loader/.npmignore +++ b/packages/docusaurus-mdx-loader/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-mdx-loader/package.json b/packages/docusaurus-mdx-loader/package.json index c05708cd9f4bd..4d1d2ca70b266 100644 --- a/packages/docusaurus-mdx-loader/package.json +++ b/packages/docusaurus-mdx-loader/package.json @@ -18,8 +18,8 @@ }, "license": "MIT", "dependencies": { - "@babel/parser": "^7.17.10", - "@babel/traverse": "^7.17.10", + "@babel/parser": "^7.17.12", + "@babel/traverse": "^7.17.12", "@docusaurus/logger": "2.0.0-beta.20", "@docusaurus/utils": "2.0.0-beta.20", "@mdx-js/mdx": "^1.6.22", diff --git a/packages/docusaurus-mdx-loader/src/loader.ts b/packages/docusaurus-mdx-loader/src/loader.ts index 68c3f55f904b2..06daefccf3238 100644 --- a/packages/docusaurus-mdx-loader/src/loader.ts +++ b/packages/docusaurus-mdx-loader/src/loader.ts @@ -6,21 +6,23 @@ */ import fs from 'fs-extra'; -import {createCompiler} from '@mdx-js/mdx'; import logger from '@docusaurus/logger'; -import emoji from 'remark-emoji'; import { parseFrontMatter, parseMarkdownContentTitle, escapePath, getFileLoaderUtils, } from '@docusaurus/utils'; +import {createCompiler} from '@mdx-js/mdx'; +import emoji from 'remark-emoji'; import stringifyObject from 'stringify-object'; + import headings from './remark/headings'; import toc from './remark/toc'; import unwrapMdxCodeBlocks from './remark/unwrapMdxCodeBlocks'; import transformImage from './remark/transformImage'; import transformLinks from './remark/transformLinks'; + import type {LoaderContext} from 'webpack'; import type {Processor, Plugin} from 'unified'; diff --git a/packages/docusaurus-mdx-loader/src/remark/toc/index.ts b/packages/docusaurus-mdx-loader/src/remark/toc/index.ts index b0a888c0790d5..1850a2b9c7a47 100644 --- a/packages/docusaurus-mdx-loader/src/remark/toc/index.ts +++ b/packages/docusaurus-mdx-loader/src/remark/toc/index.ts @@ -6,13 +6,13 @@ */ import {parse, type ParserOptions} from '@babel/parser'; -import type {Identifier} from '@babel/types'; import traverse from '@babel/traverse'; import stringifyObject from 'stringify-object'; import toString from 'mdast-util-to-string'; import visit from 'unist-util-visit'; import {toValue} from '../utils'; +import type {Identifier} from '@babel/types'; import type {TOCItem} from '../..'; import type {Node, Parent} from 'unist'; import type {Heading, Literal} from 'mdast'; diff --git a/packages/docusaurus-mdx-loader/src/remark/transformImage/index.ts b/packages/docusaurus-mdx-loader/src/remark/transformImage/index.ts index 691c42703922d..d9608d13ed073 100644 --- a/packages/docusaurus-mdx-loader/src/remark/transformImage/index.ts +++ b/packages/docusaurus-mdx-loader/src/remark/transformImage/index.ts @@ -5,6 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; +import url from 'url'; +import fs from 'fs-extra'; +import {promisify} from 'util'; +import logger from '@docusaurus/logger'; import { toMessageRelativeFilePath, posixPath, @@ -13,15 +18,10 @@ import { findAsyncSequential, } from '@docusaurus/utils'; import visit from 'unist-util-visit'; -import path from 'path'; -import url from 'url'; -import fs from 'fs-extra'; import escapeHtml from 'escape-html'; import sizeOf from 'image-size'; -import {promisify} from 'util'; import type {Transformer} from 'unified'; import type {Image, Literal} from 'mdast'; -import logger from '@docusaurus/logger'; const { loaders: {inlineMarkdownImageFileLoader}, diff --git a/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts b/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts index 24a04805a89b5..22d52587e1fbe 100644 --- a/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts +++ b/packages/docusaurus-mdx-loader/src/remark/transformLinks/index.ts @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; +import url from 'url'; +import fs from 'fs-extra'; import { toMessageRelativeFilePath, posixPath, @@ -13,9 +16,6 @@ import { findAsyncSequential, } from '@docusaurus/utils'; import visit from 'unist-util-visit'; -import path from 'path'; -import url from 'url'; -import fs from 'fs-extra'; import escapeHtml from 'escape-html'; import {stringifyContent} from '../utils'; import type {Transformer} from 'unified'; diff --git a/packages/docusaurus-mdx-loader/tsconfig.json b/packages/docusaurus-mdx-loader/tsconfig.json index 4cc153c7f1589..7807612b51a56 100644 --- a/packages/docusaurus-mdx-loader/tsconfig.json +++ b/packages/docusaurus-mdx-loader/tsconfig.json @@ -1,12 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" }, - "include": ["src"] + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-migrate/.npmignore b/packages/docusaurus-migrate/.npmignore index ba8304029eb76..e4132af421720 100644 --- a/packages/docusaurus-migrate/.npmignore +++ b/packages/docusaurus-migrate/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-migrate/bin/index.mjs b/packages/docusaurus-migrate/bin/index.mjs index baf72762aeb7d..769c5e9e3c081 100755 --- a/packages/docusaurus-migrate/bin/index.mjs +++ b/packages/docusaurus-migrate/bin/index.mjs @@ -8,11 +8,11 @@ // @ts-check +import path from 'path'; +import {createRequire} from 'module'; import logger from '@docusaurus/logger'; import semver from 'semver'; import cli from 'commander'; -import path from 'path'; -import {createRequire} from 'module'; const moduleRequire = createRequire(import.meta.url); const requiredVersion = moduleRequire('../package.json').engines.node; diff --git a/packages/docusaurus-migrate/package.json b/packages/docusaurus-migrate/package.json index 475dd592c6adb..9e980899705f6 100644 --- a/packages/docusaurus-migrate/package.json +++ b/packages/docusaurus-migrate/package.json @@ -7,8 +7,8 @@ "node": ">=14" }, "scripts": { - "build": "tsc -p tsconfig.build.json", - "watch": "tsc -p tsconfig.build.json --watch" + "build": "tsc --build", + "watch": "tsc --build --watch" }, "repository": { "type": "git", @@ -22,7 +22,7 @@ "docusaurus-migrate": "bin/index.mjs" }, "dependencies": { - "@babel/preset-env": "^7.17.10", + "@babel/preset-env": "^7.17.12", "@docusaurus/logger": "2.0.0-beta.20", "@docusaurus/utils": "2.0.0-beta.20", "@mapbox/hast-util-to-jsx": "^2.0.0", diff --git a/packages/docusaurus-migrate/src/__tests__/index.test.ts b/packages/docusaurus-migrate/src/__tests__/index.test.ts index f4516276d2d9d..8eea0cd15849a 100644 --- a/packages/docusaurus-migrate/src/__tests__/index.test.ts +++ b/packages/docusaurus-migrate/src/__tests__/index.test.ts @@ -6,10 +6,10 @@ */ import {jest} from '@jest/globals'; -import {migrateDocusaurusProject} from '../index'; import path from 'path'; import fs from 'fs-extra'; import {posixPath} from '@docusaurus/utils'; +import {migrateDocusaurusProject} from '../index'; async function testMigration(siteDir: string, newDir: string) { const writeMock = jest.spyOn(fs, 'outputFile').mockImplementation(() => {}); diff --git a/packages/docusaurus-migrate/src/index.ts b/packages/docusaurus-migrate/src/index.ts index e1e0bcf4d6653..81f31e6b874c7 100644 --- a/packages/docusaurus-migrate/src/index.ts +++ b/packages/docusaurus-migrate/src/index.ts @@ -5,22 +5,23 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; import fs from 'fs-extra'; -import importFresh from 'import-fresh'; import logger from '@docusaurus/logger'; import {Globby} from '@docusaurus/utils'; +import importFresh from 'import-fresh'; import Color from 'color'; +import extractMetadata, {shouldQuotifyFrontMatter} from './frontMatter'; +import migratePage from './transform'; +import sanitizeMD from './sanitizeMD'; + import type { SidebarEntry, SidebarEntries, VersionOneConfig, VersionTwoConfig, } from './types'; -import extractMetadata, {shouldQuotifyFrontMatter} from './frontMatter'; -import migratePage from './transform'; -import sanitizeMD from './sanitizeMD'; -import path from 'path'; const DOCUSAURUS_VERSION = (importFresh('../package.json') as {version: string}) .version; diff --git a/packages/docusaurus-migrate/tsconfig.build.json b/packages/docusaurus-migrate/tsconfig.build.json index 358fdb6f6e604..e43e58accad2e 100644 --- a/packages/docusaurus-migrate/tsconfig.build.json +++ b/packages/docusaurus-migrate/tsconfig.build.json @@ -1,10 +1,14 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" }, - "include": ["src"] + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-migrate/tsconfig.json b/packages/docusaurus-migrate/tsconfig.json index 419de04867a2f..4c04aae29fd95 100644 --- a/packages/docusaurus-migrate/tsconfig.json +++ b/packages/docusaurus-migrate/tsconfig.json @@ -1,11 +1,12 @@ -// For editor typechecking; includes bin { - "extends": "./tsconfig.build.json", + "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.build.json"}], "compilerOptions": { "noEmit": true, "module": "esnext", "allowJs": true, "rootDir": "." }, - "include": ["src", "bin"] + "include": ["bin"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-module-type-aliases/src/index.d.ts b/packages/docusaurus-module-type-aliases/src/index.d.ts index f1e4a003e0973..a000e03f2c355 100644 --- a/packages/docusaurus-module-type-aliases/src/index.d.ts +++ b/packages/docusaurus-module-type-aliases/src/index.d.ts @@ -136,8 +136,8 @@ declare module '@docusaurus/ErrorBoundary' { } declare module '@docusaurus/Head' { - import type {HelmetProps} from 'react-helmet-async'; import type {ReactNode} from 'react'; + import type {HelmetProps} from 'react-helmet-async'; export type Props = HelmetProps & {children: ReactNode}; diff --git a/packages/docusaurus-plugin-client-redirects/.npmignore b/packages/docusaurus-plugin-client-redirects/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-client-redirects/.npmignore +++ b/packages/docusaurus-plugin-client-redirects/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-client-redirects/src/__tests__/collectRedirects.test.ts b/packages/docusaurus-plugin-client-redirects/src/__tests__/collectRedirects.test.ts index 266b36911ee37..fc82c12a37fa3 100644 --- a/packages/docusaurus-plugin-client-redirects/src/__tests__/collectRedirects.test.ts +++ b/packages/docusaurus-plugin-client-redirects/src/__tests__/collectRedirects.test.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import type {PluginContext} from '../types'; -import collectRedirects from '../collectRedirects'; -import {validateOptions} from '../options'; import {removeTrailingSlash} from '@docusaurus/utils'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import collectRedirects from '../collectRedirects'; +import {validateOptions} from '../options'; import type {Options} from '../options'; +import type {PluginContext} from '../types'; function createTestPluginContext( options?: Options, diff --git a/packages/docusaurus-plugin-client-redirects/src/__tests__/options.test.ts b/packages/docusaurus-plugin-client-redirects/src/__tests__/options.test.ts index 3243076acba15..1d526c351b4d7 100644 --- a/packages/docusaurus-plugin-client-redirects/src/__tests__/options.test.ts +++ b/packages/docusaurus-plugin-client-redirects/src/__tests__/options.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {validateOptions, DEFAULT_OPTIONS} from '../options'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import {validateOptions, DEFAULT_OPTIONS} from '../options'; import type {Options} from '../options'; function testValidate(options: Options) { diff --git a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts index 8a62cae4f4ab2..fa4718eca32fc 100644 --- a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts +++ b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts @@ -6,19 +6,18 @@ */ import _ from 'lodash'; -import type {PluginOptions, RedirectOption} from './options'; -import type {PluginContext, RedirectMetadata} from './types'; +import logger from '@docusaurus/logger'; +import { + applyTrailingSlash, + type ApplyTrailingSlashParams, +} from '@docusaurus/utils-common'; import { createFromExtensionsRedirects, createToExtensionsRedirects, } from './extensionRedirects'; import {validateRedirect} from './redirectValidation'; -import { - applyTrailingSlash, - type ApplyTrailingSlashParams, -} from '@docusaurus/utils-common'; - -import logger from '@docusaurus/logger'; +import type {PluginOptions, RedirectOption} from './options'; +import type {PluginContext, RedirectMetadata} from './types'; export default function collectRedirects( pluginContext: PluginContext, diff --git a/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts b/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts index b7bdd7f61c6d9..b5d0a21141ff6 100644 --- a/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts +++ b/packages/docusaurus-plugin-client-redirects/src/createRedirectPageContent.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import * as eta from 'eta'; import redirectPageTemplate from './templates/redirectPage.template.html'; -import _ from 'lodash'; const getCompiledRedirectPageTemplate = _.memoize(() => eta.compile(redirectPageTemplate.trim()), diff --git a/packages/docusaurus-plugin-client-redirects/src/index.ts b/packages/docusaurus-plugin-client-redirects/src/index.ts index 9bfac10d94987..78d117c7ca281 100644 --- a/packages/docusaurus-plugin-client-redirects/src/index.ts +++ b/packages/docusaurus-plugin-client-redirects/src/index.ts @@ -5,16 +5,15 @@ * LICENSE file in the root directory of this source tree. */ -import type {LoadContext, Plugin} from '@docusaurus/types'; -import type {PluginContext, RedirectMetadata} from './types'; -import type {PluginOptions, Options} from './options'; - +import {removePrefix, addLeadingSlash} from '@docusaurus/utils'; import collectRedirects from './collectRedirects'; import writeRedirectFiles, { toRedirectFilesMetadata, type RedirectFileMetadata, } from './writeRedirectFiles'; -import {removePrefix, addLeadingSlash} from '@docusaurus/utils'; +import type {LoadContext, Plugin} from '@docusaurus/types'; +import type {PluginContext, RedirectMetadata} from './types'; +import type {PluginOptions, Options} from './options'; export default function pluginClientRedirectsPages( context: LoadContext, diff --git a/packages/docusaurus-plugin-client-redirects/src/options.ts b/packages/docusaurus-plugin-client-redirects/src/options.ts index 34891a1c9b706..72f3da3010bd6 100644 --- a/packages/docusaurus-plugin-client-redirects/src/options.ts +++ b/packages/docusaurus-plugin-client-redirects/src/options.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {OptionValidationContext} from '@docusaurus/types'; import {Joi, PathnameSchema} from '@docusaurus/utils-validation'; +import type {OptionValidationContext} from '@docusaurus/types'; export type RedirectOption = { to: string; diff --git a/packages/docusaurus-plugin-client-redirects/src/redirectValidation.ts b/packages/docusaurus-plugin-client-redirects/src/redirectValidation.ts index 5f0ce5b52b46c..334453274b1ee 100644 --- a/packages/docusaurus-plugin-client-redirects/src/redirectValidation.ts +++ b/packages/docusaurus-plugin-client-redirects/src/redirectValidation.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {RedirectMetadata} from './types'; import {Joi, PathnameSchema} from '@docusaurus/utils-validation'; +import type {RedirectMetadata} from './types'; const RedirectSchema = Joi.object({ from: PathnameSchema.required(), diff --git a/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts b/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts index 3924f602143c0..77a9316c829a0 100644 --- a/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts +++ b/packages/docusaurus-plugin-client-redirects/src/writeRedirectFiles.ts @@ -8,11 +8,12 @@ import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import {normalizeUrl} from '@docusaurus/utils'; -import type {PluginContext, RedirectMetadata} from './types'; import createRedirectPageContent from './createRedirectPageContent'; -import {normalizeUrl} from '@docusaurus/utils'; -import logger from '@docusaurus/logger'; + +import type {PluginContext, RedirectMetadata} from './types'; export type WriteFilesPluginContext = Pick; diff --git a/packages/docusaurus-plugin-client-redirects/tsconfig.json b/packages/docusaurus-plugin-client-redirects/tsconfig.json index 7b696ed3843d1..80e43e9813efd 100644 --- a/packages/docusaurus-plugin-client-redirects/tsconfig.json +++ b/packages/docusaurus-plugin-client-redirects/tsconfig.json @@ -1,10 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", - "outDir": "lib", - "typeRoots": ["./types", "./node_modules/@types"] - } + "outDir": "lib" + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-content-blog/.npmignore b/packages/docusaurus-plugin-content-blog/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-content-blog/.npmignore +++ b/packages/docusaurus-plugin-content-blog/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/authors.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/authors.test.ts index 67dd4571eae7b..19515459a6563 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/authors.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/authors.test.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; import { type AuthorsMap, getAuthorsMap, getBlogPostAuthors, validateAuthorsMap, } from '../authors'; -import path from 'path'; describe('getBlogPostAuthors', () => { it('can read no authors', () => { diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/blogUtils.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/blogUtils.test.ts index 5460a4440f9f1..1d9cafef920f0 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/blogUtils.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/blogUtils.test.ts @@ -6,6 +6,8 @@ */ import {jest} from '@jest/globals'; +import fs from 'fs-extra'; +import path from 'path'; import { truncate, parseBlogFileName, @@ -14,13 +16,8 @@ import { paginateBlogPosts, type LinkifyParams, } from '../blogUtils'; -import fs from 'fs-extra'; -import path from 'path'; -import type { - BlogBrokenMarkdownLink, - BlogContentPaths, - BlogPost, -} from '../types'; +import type {BlogBrokenMarkdownLink, BlogContentPaths} from '../types'; +import type {BlogPost} from '@docusaurus/plugin-content-blog'; describe('truncate', () => { it('truncates texts', () => { diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts index f7d31a7dbbb06..48c3395f728b1 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts @@ -8,11 +8,11 @@ import {jest} from '@jest/globals'; import path from 'path'; import fs from 'fs-extra'; +import {DEFAULT_OPTIONS} from '../options'; +import {generateBlogPosts} from '../blogUtils'; import {createBlogFeedFiles} from '../feed'; import type {LoadContext, I18n} from '@docusaurus/types'; import type {BlogContentPaths} from '../types'; -import {DEFAULT_OPTIONS} from '../options'; -import {generateBlogPosts} from '../blogUtils'; import type {PluginOptions} from '@docusaurus/plugin-content-blog'; const DefaultI18N: I18n = { diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts index cb1020c680ef7..36cc680df0e04 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {validateBlogPostFrontMatter} from '../frontMatter'; import escapeStringRegexp from 'escape-string-regexp'; +import {validateBlogPostFrontMatter} from '../frontMatter'; import type {BlogPostFrontMatter} from '@docusaurus/plugin-content-blog'; // TODO this abstraction reduce verbosity but it makes it harder to debug diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts index 7d47e0027ab69..11b33cd2a183f 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts @@ -7,13 +7,13 @@ import {jest} from '@jest/globals'; import path from 'path'; -import pluginContentBlog from '../index'; -import type {DocusaurusConfig, LoadContext, I18n} from '@docusaurus/types'; -import {validateOptions} from '../options'; -import type {BlogPost} from '../types'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; import {posixPath, getFileCommitDate} from '@docusaurus/utils'; +import pluginContentBlog from '../index'; +import {validateOptions} from '../options'; +import type {DocusaurusConfig, LoadContext, I18n} from '@docusaurus/types'; import type { + BlogPost, PluginOptions, EditUrlFunction, } from '@docusaurus/plugin-content-blog'; diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/options.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/options.test.ts index 8c8cbf92172cf..dd2e562bdabc6 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/options.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/options.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {validateOptions, DEFAULT_OPTIONS} from '../options'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import {validateOptions, DEFAULT_OPTIONS} from '../options'; import type {Options} from '@docusaurus/plugin-content-blog'; function testValidate(options: Options) { diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/translations.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/translations.test.ts index 840a3af4d359e..62442bbf81518 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/translations.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/translations.test.ts @@ -5,11 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -import type {BlogPost, BlogContent} from '../types'; +import {updateTranslationFileMessages} from '@docusaurus/utils'; import {getTranslationFiles, translateContent} from '../translations'; import {DEFAULT_OPTIONS} from '../options'; -import {updateTranslationFileMessages} from '@docusaurus/utils'; -import type {PluginOptions} from '@docusaurus/plugin-content-blog'; +import type { + PluginOptions, + BlogPost, + BlogContent, +} from '@docusaurus/plugin-content-blog'; const sampleBlogOptions: PluginOptions = { ...DEFAULT_OPTIONS, diff --git a/packages/docusaurus-plugin-content-blog/src/authors.ts b/packages/docusaurus-plugin-content-blog/src/authors.ts index e8e2be3231273..cf3bbe5c85229 100644 --- a/packages/docusaurus-plugin-content-blog/src/authors.ts +++ b/packages/docusaurus-plugin-content-blog/src/authors.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {BlogContentPaths} from './types'; import {getDataFileData} from '@docusaurus/utils'; import {Joi, URISchema} from '@docusaurus/utils-validation'; +import type {BlogContentPaths} from './types'; import type { Author, BlogPostFrontMatter, diff --git a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts index 5daf3983e09a6..370ddeb50aa33 100644 --- a/packages/docusaurus-plugin-content-blog/src/blogUtils.ts +++ b/packages/docusaurus-plugin-content-blog/src/blogUtils.ts @@ -7,9 +7,9 @@ import fs from 'fs-extra'; import path from 'path'; -import readingTime from 'reading-time'; import _ from 'lodash'; -import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types'; +import logger from '@docusaurus/logger'; +import readingTime from 'reading-time'; import { parseMarkdownString, normalizeUrl, @@ -24,10 +24,9 @@ import { getFileCommitDate, getContentPathList, } from '@docusaurus/utils'; -import type {LoadContext} from '@docusaurus/types'; import {validateBlogPostFrontMatter} from './frontMatter'; import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors'; -import logger from '@docusaurus/logger'; +import type {LoadContext} from '@docusaurus/types'; import type { PluginOptions, ReadingTimeFunction, @@ -35,6 +34,7 @@ import type { BlogTags, BlogPaginated, } from '@docusaurus/plugin-content-blog'; +import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types'; export function truncate(fileString: string, truncateMarker: RegExp): string { return fileString.split(truncateMarker, 1).shift()!; diff --git a/packages/docusaurus-plugin-content-blog/src/feed.ts b/packages/docusaurus-plugin-content-blog/src/feed.ts index 390d453f480cd..222fcb84b2b5f 100644 --- a/packages/docusaurus-plugin-content-blog/src/feed.ts +++ b/packages/docusaurus-plugin-content-blog/src/feed.ts @@ -5,20 +5,20 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; +import fs from 'fs-extra'; +import logger from '@docusaurus/logger'; import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed'; import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils'; +import {blogPostContainerID} from '@docusaurus/utils-common'; import {load as cheerioLoad} from 'cheerio'; import type {DocusaurusConfig} from '@docusaurus/types'; -import path from 'path'; -import fs from 'fs-extra'; import type { FeedType, PluginOptions, Author, BlogPost, } from '@docusaurus/plugin-content-blog'; -import {blogPostContainerID} from '@docusaurus/utils-common'; -import logger from '@docusaurus/logger'; async function generateBlogFeed({ blogPosts, diff --git a/packages/docusaurus-plugin-content-blog/src/index.ts b/packages/docusaurus-plugin-content-blog/src/index.ts index 3b19b9bbab2ef..a3dddc2404f5b 100644 --- a/packages/docusaurus-plugin-content-blog/src/index.ts +++ b/packages/docusaurus-plugin-content-blog/src/index.ts @@ -6,8 +6,6 @@ */ import path from 'path'; -import admonitions from 'remark-admonitions'; -import footnoteIDFixer from './remark/footnoteIDFixer'; import { normalizeUrl, docuHash, @@ -23,17 +21,19 @@ import { type TagsListItem, type TagModule, } from '@docusaurus/utils'; -import {translateContent, getTranslationFiles} from './translations'; - -import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types'; -import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types'; +import admonitions from 'remark-admonitions'; import { generateBlogPosts, getSourceToPermalink, getBlogTags, paginateBlogPosts, } from './blogUtils'; +import footnoteIDFixer from './remark/footnoteIDFixer'; +import {translateContent, getTranslationFiles} from './translations'; import {createBlogFeedFiles} from './feed'; + +import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types'; +import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types'; import type { PluginOptions, BlogPostFrontMatter, diff --git a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts index d74bba9fc2747..e8a8697fa8cd9 100644 --- a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts +++ b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts @@ -538,11 +538,11 @@ declare module '@theme/BlogTagsListPage' { } declare module '@theme/BlogTagsPostsPage' { + import type {Content} from '@theme/BlogPostPage'; import type { BlogSidebar, BlogPaginatedMetadata, } from '@docusaurus/plugin-content-blog'; - import type {Content} from '@theme/BlogPostPage'; import type {TagModule} from '@docusaurus/utils'; export interface Props { diff --git a/packages/docusaurus-plugin-content-blog/tsconfig.json b/packages/docusaurus-plugin-content-blog/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/docusaurus-plugin-content-blog/tsconfig.json +++ b/packages/docusaurus-plugin-content-blog/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-content-docs/.npmignore b/packages/docusaurus-plugin-content-docs/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-content-docs/.npmignore +++ b/packages/docusaurus-plugin-content-docs/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-content-docs/package.json b/packages/docusaurus-plugin-content-docs/package.json index 697fcf7224eac..bf59cd0200961 100644 --- a/packages/docusaurus-plugin-content-docs/package.json +++ b/packages/docusaurus-plugin-content-docs/package.json @@ -12,8 +12,8 @@ }, "types": "src/plugin-content-docs.d.ts", "scripts": { - "build": "tsc", - "watch": "tsc --watch" + "build": "tsc --build", + "watch": "tsc --build --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/cli.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/cli.test.ts index bd0db4e0ad5a9..ec29bdcf8b87e 100644 Binary files a/packages/docusaurus-plugin-content-docs/src/__tests__/cli.test.ts and b/packages/docusaurus-plugin-content-docs/src/__tests__/cli.test.ts differ diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts index bceca516cbfc7..3e0f090109251 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts @@ -8,6 +8,8 @@ import {jest} from '@jest/globals'; import path from 'path'; import {loadContext} from '@docusaurus/core/src/server/index'; +import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; +import {createSidebarsUtils} from '../sidebars/utils'; import { processDocMetadata, readVersionDocs, @@ -17,8 +19,9 @@ import { type DocEnv, } from '../docs'; import {loadSidebars} from '../sidebars'; -import type {Sidebars} from '../sidebars/types'; import {readVersionsMetadata} from '../versions'; +import {DEFAULT_OPTIONS} from '../options'; +import type {Sidebars} from '../sidebars/types'; import type {DocFile} from '../types'; import type { MetadataOptions, @@ -29,10 +32,7 @@ import type { PropNavigationLink, } from '@docusaurus/plugin-content-docs'; import type {LoadContext} from '@docusaurus/types'; -import {DEFAULT_OPTIONS} from '../options'; import type {Optional} from 'utility-types'; -import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; -import {createSidebarsUtils} from '../sidebars/utils'; jest.setTimeout(15000); diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts index 3a0855fe582ac..6612927c2d0cc 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import escapeStringRegexp from 'escape-string-regexp'; import {validateDocFrontMatter} from '../frontMatter'; import type {DocFrontMatter} from '@docusaurus/plugin-content-docs'; -import escapeStringRegexp from 'escape-string-regexp'; function testField(params: { prefix: string; 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 0a0627c735a20..0d54d4bc13080 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts @@ -7,32 +7,27 @@ import {jest} from '@jest/globals'; import path from 'path'; +import fs from 'fs-extra'; +import _ from 'lodash'; import {isMatch} from 'picomatch'; import commander from 'commander'; -import _ from 'lodash'; - -import fs from 'fs-extra'; -import pluginContentDocs from '../index'; +import webpack from 'webpack'; 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 {sortConfig} from '@docusaurus/core/src/server/plugins/routeConfig'; - -import * as cliDocs from '../cli'; -import {validateOptions} from '../options'; +import {posixPath} from '@docusaurus/utils'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; -import type {LoadedVersion} from '../types'; -import type { - SidebarItem, - SidebarItemsGeneratorOption, - SidebarItemsGeneratorOptionArgs, -} from '../sidebars/types'; -import {toSidebarsProp} from '../props'; -import webpack from 'webpack'; +import pluginContentDocs from '../index'; +import {toSidebarsProp} from '../props'; import {DefaultSidebarItemsGenerator} from '../sidebars/generator'; import {DisabledSidebars} from '../sidebars'; +import * as cliDocs from '../cli'; +import {validateOptions} from '../options'; + +import type {RouteConfig} from '@docusaurus/types'; +import type {LoadedVersion} from '@docusaurus/plugin-content-docs'; +import type {SidebarItem, SidebarItemsGeneratorOption} from '../sidebars/types'; function findDocById(version: LoadedVersion, unversionedId: string) { return version.docs.find((item) => item.unversionedId === unversionedId); @@ -768,14 +763,14 @@ describe('site with custom sidebar items generator', () => { const customSidebarItemsGeneratorMock = jest.fn(async () => []); const {siteDir} = await loadSite(customSidebarItemsGeneratorMock); - const generatorArg: SidebarItemsGeneratorOptionArgs = + const generatorArg: Parameters[0] = customSidebarItemsGeneratorMock.mock.calls[0][0]; // Make test pass even if docs are in different order and paths are // absolutes function makeDeterministic( - arg: SidebarItemsGeneratorOptionArgs, - ): SidebarItemsGeneratorOptionArgs { + arg: Parameters[0], + ): Parameters[0] { return { ...arg, docs: _.orderBy(arg.docs, 'id'), diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts index 7f3e41bd195c8..47aff760539e3 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/lastUpdate.test.ts @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -import {createTempRepo} from '@testing-utils/git'; import {jest} from '@jest/globals'; import fs from 'fs-extra'; import path from 'path'; import shell from 'shelljs'; +import {createTempRepo} from '@testing-utils/git'; import {getFileLastUpdate} from '../lastUpdate'; diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/options.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/options.test.ts index 5d5e330c50c85..bcbaccfe11442 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/options.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/options.test.ts @@ -5,14 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -import {validateOptions, DEFAULT_OPTIONS} from '../options'; +import {GlobExcludeDefault} from '@docusaurus/utils'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import {validateOptions, DEFAULT_OPTIONS} from '../options'; import {DefaultSidebarItemsGenerator} from '../sidebars/generator'; import { DefaultNumberPrefixParser, DisabledNumberPrefixParser, } from '../numberPrefix'; -import {GlobExcludeDefault} from '@docusaurus/utils'; import type {Options} from '@docusaurus/plugin-content-docs'; // The type of remark/rehype plugins can be function/object diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/translations.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/translations.test.ts index 85af2ef203e01..5d098e355fb7e 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/translations.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/translations.test.ts @@ -5,14 +5,17 @@ * LICENSE file in the root directory of this source tree. */ -import type {LoadedContent, LoadedVersion} from '../types'; +import {updateTranslationFileMessages} from '@docusaurus/utils'; import {CURRENT_VERSION_NAME} from '../constants'; import { getLoadedContentTranslationFiles, translateLoadedContent, } from '../translations'; -import type {DocMetadata} from '@docusaurus/plugin-content-docs'; -import {updateTranslationFileMessages} from '@docusaurus/utils'; +import type { + DocMetadata, + LoadedContent, + LoadedVersion, +} from '@docusaurus/plugin-content-docs'; function createSampleDoc(doc: Pick): DocMetadata { return { diff --git a/packages/docusaurus-plugin-content-docs/src/categoryGeneratedIndex.ts b/packages/docusaurus-plugin-content-docs/src/categoryGeneratedIndex.ts index 4c87e711a5156..6ae97213f1556 100644 --- a/packages/docusaurus-plugin-content-docs/src/categoryGeneratedIndex.ts +++ b/packages/docusaurus-plugin-content-docs/src/categoryGeneratedIndex.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ +import {type SidebarsUtils, toNavigationLink} from './sidebars/utils'; +import {createDocsByIdIndex} from './docs'; import type { CategoryGeneratedIndexMetadata, DocMetadataBase, } from '@docusaurus/plugin-content-docs'; import type {SidebarItemCategoryWithGeneratedIndex} from './sidebars/types'; -import {type SidebarsUtils, toNavigationLink} from './sidebars/utils'; -import {createDocsByIdIndex} from './docs'; function getCategoryGeneratedIndexMetadata({ category, diff --git a/packages/docusaurus-plugin-content-docs/src/cli.ts b/packages/docusaurus-plugin-content-docs/src/cli.ts index 4a84ea953089c..11fc39b2c4007 100644 --- a/packages/docusaurus-plugin-content-docs/src/cli.ts +++ b/packages/docusaurus-plugin-content-docs/src/cli.ts @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import fs from 'fs-extra'; +import path from 'path'; +import logger from '@docusaurus/logger'; +import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; import { getVersionsFilePath, getVersionDocsDirPath, @@ -12,13 +16,9 @@ import { getDocsDirPathLocalized, } from './versions/files'; import {validateVersionName} from './versions/validation'; -import fs from 'fs-extra'; -import path from 'path'; -import type {PluginOptions} from '@docusaurus/plugin-content-docs'; import {loadSidebarsFileUnsafe} from './sidebars'; import {CURRENT_VERSION_NAME} from './constants'; -import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; -import logger from '@docusaurus/logger'; +import type {PluginOptions} from '@docusaurus/plugin-content-docs'; import type {LoadContext} from '@docusaurus/types'; async function createVersionedSidebarFile({ 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 e663dbd433490..093aaad1db939 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 @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import { getActivePlugin, getLatestVersion, @@ -17,7 +18,6 @@ import type { GlobalVersion, ActivePlugin, } from '@docusaurus/plugin-content-docs/client'; -import _ from 'lodash'; describe('docsClientUtils', () => { it('getActivePlugin', () => { diff --git a/packages/docusaurus-plugin-content-docs/src/docs.ts b/packages/docusaurus-plugin-content-docs/src/docs.ts index 7f631f21c7814..2ea127f99fbbd 100644 --- a/packages/docusaurus-plugin-content-docs/src/docs.ts +++ b/packages/docusaurus-plugin-content-docs/src/docs.ts @@ -19,15 +19,12 @@ import { Globby, normalizeFrontMatterTags, } from '@docusaurus/utils'; -import type {LoadContext} from '@docusaurus/types'; import {getFileLastUpdate} from './lastUpdate'; -import type {DocFile} from './types'; import getSlug from './slug'; import {CURRENT_VERSION_NAME} from './constants'; import {stripPathNumberPrefixes} from './numberPrefix'; import {validateDocFrontMatter} from './frontMatter'; -import type {SidebarsUtils} from './sidebars/utils'; import {toDocNavigationLink, toNavigationLink} from './sidebars/utils'; import type { MetadataOptions, @@ -41,6 +38,9 @@ import type { DocFrontMatter, LoadedVersion, } from '@docusaurus/plugin-content-docs'; +import type {LoadContext} from '@docusaurus/types'; +import type {SidebarsUtils} from './sidebars/utils'; +import type {DocFile} from './types'; type LastUpdateOptions = Pick< PluginOptions, diff --git a/packages/docusaurus-plugin-content-docs/src/globalData.ts b/packages/docusaurus-plugin-content-docs/src/globalData.ts index c688ab2c00985..594e14c0f2009 100644 --- a/packages/docusaurus-plugin-content-docs/src/globalData.ts +++ b/packages/docusaurus-plugin-content-docs/src/globalData.ts @@ -6,7 +6,6 @@ */ import _ from 'lodash'; -import type {Sidebars} from './sidebars/types'; import {getMainDocId} from './docs'; import type {FullVersion} from './types'; import type { @@ -18,6 +17,7 @@ import type { GlobalSidebar, GlobalDoc, } from '@docusaurus/plugin-content-docs/client'; +import type {Sidebars} from './sidebars/types'; function toGlobalDataDoc(doc: DocMetadata): GlobalDoc { return { diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts index b4c72107f3129..422dfcbe3ea9f 100644 --- a/packages/docusaurus-plugin-content-docs/src/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/index.ts @@ -6,7 +6,8 @@ */ import path from 'path'; - +import _ from 'lodash'; +import logger from '@docusaurus/logger'; import { normalizeUrl, docuHash, @@ -19,20 +20,15 @@ import { createSlugger, DEFAULT_PLUGIN_ID, } from '@docusaurus/utils'; -import type {LoadContext, Plugin} from '@docusaurus/types'; import {loadSidebars, resolveSidebarPathOption} from './sidebars'; import {CategoryMetadataFilenamePattern} from './sidebars/generator'; -import type {DocEnv} from './docs'; -import {readVersionDocs, processDocMetadata, addDocNavigation} from './docs'; +import { + readVersionDocs, + processDocMetadata, + addDocNavigation, + type DocEnv, +} from './docs'; import {readVersionsMetadata} from './versions'; -import type { - SourceToPermalink, - DocFile, - DocsMarkdownOption, - VersionTag, - FullVersion, -} from './types'; -import type {RuleSetRule} from 'webpack'; import {cliDocsVersionCommand} from './cli'; import {VERSIONS_JSON_FILE} from './constants'; import {toGlobalDataVersion} from './globalData'; @@ -42,9 +38,10 @@ import { translateLoadedContent, getLoadedContentTranslationFiles, } from './translations'; -import logger from '@docusaurus/logger'; import {getVersionTags} from './tags'; import {createVersionRoutes} from './routes'; +import {createSidebarsUtils} from './sidebars/utils'; + import type { PropTagsListPage, PluginOptions, @@ -54,8 +51,15 @@ import type { LoadedContent, LoadedVersion, } from '@docusaurus/plugin-content-docs'; -import {createSidebarsUtils} from './sidebars/utils'; -import _ from 'lodash'; +import type {LoadContext, Plugin} from '@docusaurus/types'; +import type { + SourceToPermalink, + DocFile, + DocsMarkdownOption, + VersionTag, + FullVersion, +} from './types'; +import type {RuleSetRule} from 'webpack'; export default async function pluginContentDocs( context: LoadContext, diff --git a/packages/docusaurus-plugin-content-docs/src/markdown/__tests__/linkify.test.ts b/packages/docusaurus-plugin-content-docs/src/markdown/__tests__/linkify.test.ts index 0ca3678361573..864d5a39c2741 100644 --- a/packages/docusaurus-plugin-content-docs/src/markdown/__tests__/linkify.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/markdown/__tests__/linkify.test.ts @@ -9,13 +9,13 @@ import {jest} from '@jest/globals'; import fs from 'fs-extra'; import path from 'path'; import {linkify} from '../linkify'; +import {VERSIONED_DOCS_DIR, CURRENT_VERSION_NAME} from '../../constants'; import type { DocsMarkdownOption, SourceToPermalink, DocBrokenMarkdownLink, } from '../../types'; import type {VersionMetadata} from '@docusaurus/plugin-content-docs'; -import {VERSIONED_DOCS_DIR, CURRENT_VERSION_NAME} from '../../constants'; function createFakeVersion({ versionName, diff --git a/packages/docusaurus-plugin-content-docs/src/markdown/linkify.ts b/packages/docusaurus-plugin-content-docs/src/markdown/linkify.ts index 704bcbd4974fc..ae651cb316a06 100644 --- a/packages/docusaurus-plugin-content-docs/src/markdown/linkify.ts +++ b/packages/docusaurus-plugin-content-docs/src/markdown/linkify.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {DocsMarkdownOption} from '../types'; import {replaceMarkdownLinks, getContentPathList} from '@docusaurus/utils'; +import type {DocsMarkdownOption} from '../types'; function getVersion(filePath: string, options: DocsMarkdownOption) { const versionFound = options.versionsMetadata.find((version) => diff --git a/packages/docusaurus-plugin-content-docs/src/options.ts b/packages/docusaurus-plugin-content-docs/src/options.ts index 258236acaaea1..047f59ff3940a 100644 --- a/packages/docusaurus-plugin-content-docs/src/options.ts +++ b/packages/docusaurus-plugin-content-docs/src/options.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {PluginOptions, Options} from '@docusaurus/plugin-content-docs'; +import logger from '@docusaurus/logger'; import { Joi, RemarkPluginsSchema, @@ -14,15 +14,14 @@ import { URISchema, } from '@docusaurus/utils-validation'; import {GlobExcludeDefault} from '@docusaurus/utils'; - -import type {OptionValidationContext} from '@docusaurus/types'; -import logger from '@docusaurus/logger'; import admonitions from 'remark-admonitions'; import {DefaultSidebarItemsGenerator} from './sidebars/generator'; import { DefaultNumberPrefixParser, DisabledNumberPrefixParser, } from './numberPrefix'; +import type {OptionValidationContext} from '@docusaurus/types'; +import type {PluginOptions, Options} from '@docusaurus/plugin-content-docs'; export const DEFAULT_OPTIONS: Omit = { path: 'docs', // Path to data on filesystem, relative to site dir. diff --git a/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts b/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts index 412a08cdb08f6..1d7784c63fc72 100644 --- a/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts +++ b/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +/// + declare module '@docusaurus/plugin-content-docs' { import type {MDXOptions} from '@docusaurus/mdx-loader'; import type { diff --git a/packages/docusaurus-plugin-content-docs/src/props.ts b/packages/docusaurus-plugin-content-docs/src/props.ts index bf4393c631ffc..8505d5de2cd21 100644 --- a/packages/docusaurus-plugin-content-docs/src/props.ts +++ b/packages/docusaurus-plugin-content-docs/src/props.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import {createDocsByIdIndex} from './docs'; import type {VersionTag} from './types'; import type { SidebarItemDoc, @@ -24,8 +26,6 @@ import type { DocMetadata, LoadedVersion, } from '@docusaurus/plugin-content-docs'; -import _ from 'lodash'; -import {createDocsByIdIndex} from './docs'; export function toSidebarsProp(loadedVersion: LoadedVersion): PropSidebars { const docsById = createDocsByIdIndex(loadedVersion.docs); diff --git a/packages/docusaurus-plugin-content-docs/src/routes.ts b/packages/docusaurus-plugin-content-docs/src/routes.ts index 57f5722ba1db5..9a9205bee1c55 100644 --- a/packages/docusaurus-plugin-content-docs/src/routes.ts +++ b/packages/docusaurus-plugin-content-docs/src/routes.ts @@ -5,15 +5,15 @@ * LICENSE file in the root directory of this source tree. */ -import type {PluginContentLoadedActions, RouteConfig} from '@docusaurus/types'; +import logger from '@docusaurus/logger'; import {docuHash, createSlugger} from '@docusaurus/utils'; +import {toVersionMetadataProp} from './props'; +import type {PluginContentLoadedActions, RouteConfig} from '@docusaurus/types'; import type {FullVersion} from './types'; import type { CategoryGeneratedIndexMetadata, DocMetadata, } from '@docusaurus/plugin-content-docs'; -import {toVersionMetadataProp} from './props'; -import logger from '@docusaurus/logger'; export async function createCategoryGeneratedIndexRoutes({ version, diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/generator.test.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/generator.test.ts index 66281f746b68b..671c12cfe256d 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/generator.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/generator.test.ts @@ -7,9 +7,9 @@ import {jest} from '@jest/globals'; import {DefaultSidebarItemsGenerator} from '../generator'; -import type {SidebarItemsGenerator} from '../types'; import {DefaultNumberPrefixParser} from '../../numberPrefix'; import {isCategoryIndex} from '../../docs'; +import type {SidebarItemsGenerator} from '../types'; describe('DefaultSidebarItemsGenerator', () => { function testDefaultSidebarItemsGenerator( diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/index.test.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/index.test.ts index aedcfe0db3321..5a1eed4f1d1b4 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/index.test.ts @@ -9,8 +9,8 @@ import {jest} from '@jest/globals'; import path from 'path'; import {createSlugger} from '@docusaurus/utils'; import {loadSidebars, DisabledSidebars} from '../index'; -import type {SidebarProcessorParams} from '../types'; import {DefaultSidebarItemsGenerator} from '../generator'; +import type {SidebarProcessorParams} from '../types'; import type {DocMetadata} from '@docusaurus/plugin-content-docs'; describe('loadSidebars', () => { diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/processor.test.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/processor.test.ts index 079040879ac68..d0a530bbd7f22 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/processor.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/__tests__/processor.test.ts @@ -6,7 +6,11 @@ */ import {jest} from '@jest/globals'; +import {createSlugger} from '@docusaurus/utils'; import {processSidebars} from '../processor'; +import {DefaultSidebarItemsGenerator} from '../generator'; +import {DefaultNumberPrefixParser} from '../../numberPrefix'; +import {isCategoryIndex} from '../../docs'; import type { SidebarItem, SidebarItemsGenerator, @@ -16,11 +20,7 @@ import type { CategoryMetadataFile, ProcessedSidebars, } from '../types'; -import {DefaultSidebarItemsGenerator} from '../generator'; -import {createSlugger} from '@docusaurus/utils'; import type {VersionMetadata} from '@docusaurus/plugin-content-docs'; -import {DefaultNumberPrefixParser} from '../../numberPrefix'; -import {isCategoryIndex} from '../../docs'; describe('processSidebars', () => { function createStaticSidebarItemGenerator( diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts index 67320e7888d57..56e0025a81afc 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts @@ -5,6 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; +import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import {addTrailingSlash} from '@docusaurus/utils'; +import {createDocsByIdIndex, toCategoryIndexMatcherParam} from '../docs'; import type { SidebarItemDoc, SidebarItemsGenerator, @@ -13,11 +18,6 @@ import type { NormalizedSidebarItem, SidebarItemCategoryLinkConfig, } from './types'; -import _ from 'lodash'; -import {addTrailingSlash} from '@docusaurus/utils'; -import logger from '@docusaurus/logger'; -import path from 'path'; -import {createDocsByIdIndex, toCategoryIndexMatcherParam} from '../docs'; const BreadcrumbSeparator = '/'; diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/index.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/index.ts index f99b03374a041..36bd576f7f8a8 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/index.ts @@ -6,19 +6,19 @@ */ import fs from 'fs-extra'; +import path from 'path'; +import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import {Globby} from '@docusaurus/utils'; +import Yaml from 'js-yaml'; +import combinePromises from 'combine-promises'; import importFresh from 'import-fresh'; -import type {SidebarsConfig, Sidebars, SidebarProcessorParams} from './types'; import {validateSidebars, validateCategoryMetadataFile} from './validation'; import {normalizeSidebars} from './normalization'; import {processSidebars} from './processor'; import {postProcessSidebars} from './postProcessor'; -import path from 'path'; -import {Globby} from '@docusaurus/utils'; -import logger from '@docusaurus/logger'; import type {PluginOptions} from '@docusaurus/plugin-content-docs'; -import Yaml from 'js-yaml'; -import _ from 'lodash'; -import combinePromises from 'combine-promises'; +import type {SidebarsConfig, Sidebars, SidebarProcessorParams} from './types'; export const DefaultSidebars: SidebarsConfig = { defaultSidebar: [ diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts index d36be98fcd6a8..4d51e254443e8 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/normalization.ts @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import {isCategoriesShorthand} from './utils'; import type { NormalizedSidebarItem, NormalizedSidebar, @@ -16,9 +19,6 @@ import type { SidebarsConfig, NormalizedSidebarItemCategory, } from './types'; -import {isCategoriesShorthand} from './utils'; -import _ from 'lodash'; -import logger from '@docusaurus/logger'; function normalizeCategoriesShorthand( sidebar: SidebarCategoriesShorthand, diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/postProcessor.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/postProcessor.ts index 717db08605837..307ed9de86758 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/postProcessor.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/postProcessor.ts @@ -5,7 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import {normalizeUrl} from '@docusaurus/utils'; +import {getDocIds} from '../docs'; import type { SidebarItem, Sidebars, @@ -15,8 +17,6 @@ import type { ProcessedSidebars, SidebarItemCategoryLink, } from './types'; -import {getDocIds} from '../docs'; -import _ from 'lodash'; type SidebarPostProcessorParams = SidebarProcessorParams & { draftIds: Set; diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts index 7e83dd08a9217..7949ad2216fda 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/processor.ts @@ -5,6 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import combinePromises from 'combine-promises'; +import {DefaultSidebarItemsGenerator} from './generator'; +import {validateSidebars} from './validation'; +import {isCategoryIndex} from '../docs'; import type { DocMetadataBase, VersionMetadata, @@ -22,11 +27,6 @@ import type { SidebarProcessorParams, CategoryMetadataFile, } from './types'; -import {DefaultSidebarItemsGenerator} from './generator'; -import {validateSidebars} from './validation'; -import _ from 'lodash'; -import combinePromises from 'combine-promises'; -import {isCategoryIndex} from '../docs'; function toSidebarItemsGeneratorDoc( doc: DocMetadataBase, diff --git a/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts b/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts index ee27177c1e4a9..a213b2e7dedc4 100644 --- a/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts +++ b/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import {toMessageRelativeFilePath} from '@docusaurus/utils'; import type { Sidebars, Sidebar, @@ -18,9 +20,6 @@ import type { SidebarItemCategoryWithGeneratedIndex, SidebarNavigationItem, } from './types'; - -import _ from 'lodash'; -import {toMessageRelativeFilePath} from '@docusaurus/utils'; import type { DocMetadataBase, PropNavigationLink, diff --git a/packages/docusaurus-plugin-content-docs/src/tags.ts b/packages/docusaurus-plugin-content-docs/src/tags.ts index 1de963d81f56d..dfa0e3284587e 100644 --- a/packages/docusaurus-plugin-content-docs/src/tags.ts +++ b/packages/docusaurus-plugin-content-docs/src/tags.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import {groupTaggedItems} from '@docusaurus/utils'; import type {VersionTags} from './types'; import type {DocMetadata} from '@docusaurus/plugin-content-docs'; -import _ from 'lodash'; 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 f5f2f7e719164..abc56ac65b936 100644 --- a/packages/docusaurus-plugin-content-docs/src/translations.ts +++ b/packages/docusaurus-plugin-content-docs/src/translations.ts @@ -5,6 +5,14 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import {mergeTranslations} from '@docusaurus/utils'; +import {CURRENT_VERSION_NAME} from './constants'; +import { + collectSidebarCategories, + transformSidebarItems, + collectSidebarLinks, +} from './sidebars/utils'; import type { LoadedVersion, LoadedContent, @@ -15,20 +23,11 @@ import type { SidebarItemCategoryLink, Sidebars, } from './sidebars/types'; - -import _ from 'lodash'; -import { - collectSidebarCategories, - transformSidebarItems, - collectSidebarLinks, -} from './sidebars/utils'; import type { TranslationFileContent, TranslationFile, TranslationMessage, } from '@docusaurus/types'; -import {mergeTranslations} from '@docusaurus/utils'; -import {CURRENT_VERSION_NAME} from './constants'; function getVersionFileName(versionName: string): string { if (versionName === CURRENT_VERSION_NAME) { diff --git a/packages/docusaurus-plugin-content-docs/src/types.ts b/packages/docusaurus-plugin-content-docs/src/types.ts index df3579b856d86..cb4506b20d1a8 100644 --- a/packages/docusaurus-plugin-content-docs/src/types.ts +++ b/packages/docusaurus-plugin-content-docs/src/types.ts @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -/// - import type {BrokenMarkdownLink, Tag} from '@docusaurus/utils'; import type { VersionMetadata, diff --git a/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts b/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts index c019d8a3ae9a4..4a3448460a24a 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts @@ -7,9 +7,9 @@ import {jest} from '@jest/globals'; import path from 'path'; +import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; import {readVersionsMetadata} from '../index'; import {DEFAULT_OPTIONS} from '../../options'; -import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; import type {I18n} from '@docusaurus/types'; import type { PluginOptions, diff --git a/packages/docusaurus-plugin-content-docs/src/versions/files.ts b/packages/docusaurus-plugin-content-docs/src/versions/files.ts index 69660f34a9cc6..6b7464ee30496 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/files.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/files.ts @@ -7,6 +7,7 @@ import path from 'path'; import fs from 'fs-extra'; +import {getPluginI18nPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; import { VERSIONS_JSON_FILE, VERSIONED_DOCS_DIR, @@ -14,7 +15,6 @@ import { CURRENT_VERSION_NAME, } from '../constants'; import {validateVersionNames} from './validation'; -import {getPluginI18nPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; import type { PluginOptions, VersionMetadata, diff --git a/packages/docusaurus-plugin-content-docs/src/versions/index.ts b/packages/docusaurus-plugin-content-docs/src/versions/index.ts index cd85ddf2137d8..369e0fd6efc20 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/index.ts @@ -6,8 +6,8 @@ */ import path from 'path'; -import {CURRENT_VERSION_NAME} from '../constants'; import {normalizeUrl, posixPath} from '@docusaurus/utils'; +import {CURRENT_VERSION_NAME} from '../constants'; import {validateVersionsOptions} from './validation'; import { getDocsDirPathLocalized, diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.client.json b/packages/docusaurus-plugin-content-docs/tsconfig.client.json new file mode 100644 index 0000000000000..2741f3ca38909 --- /dev/null +++ b/packages/docusaurus-plugin-content-docs/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "module": "esnext", + "target": "esnext", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/client", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.json b/packages/docusaurus-plugin-content-docs/tsconfig.json index f5902ba1089bc..48e200409e4e6 100644 --- a/packages/docusaurus-plugin-content-docs/tsconfig.json +++ b/packages/docusaurus-plugin-content-docs/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/client", "**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-content-pages/.npmignore b/packages/docusaurus-plugin-content-pages/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-content-pages/.npmignore +++ b/packages/docusaurus-plugin-content-pages/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-content-pages/src/__tests__/index.test.ts b/packages/docusaurus-plugin-content-pages/src/__tests__/index.test.ts index 89221c819bc8a..f3b94d2df5f48 100644 --- a/packages/docusaurus-plugin-content-pages/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-pages/src/__tests__/index.test.ts @@ -7,10 +7,10 @@ import path from 'path'; import {loadContext} from '@docusaurus/core/lib/server'; +import {normalizePluginOptions} from '@docusaurus/utils-validation'; import pluginContentPages from '../index'; import {validateOptions} from '../options'; -import {normalizePluginOptions} from '@docusaurus/utils-validation'; describe('docusaurus-plugin-content-pages', () => { it('loads simple pages', async () => { diff --git a/packages/docusaurus-plugin-content-pages/src/__tests__/options.test.ts b/packages/docusaurus-plugin-content-pages/src/__tests__/options.test.ts index 9365b614cd9fa..d92d691e7dc09 100644 --- a/packages/docusaurus-plugin-content-pages/src/__tests__/options.test.ts +++ b/packages/docusaurus-plugin-content-pages/src/__tests__/options.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {validateOptions, DEFAULT_OPTIONS} from '../options'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import {validateOptions, DEFAULT_OPTIONS} from '../options'; import type {Options} from '@docusaurus/plugin-content-pages'; function testValidate(options: Options) { diff --git a/packages/docusaurus-plugin-content-pages/src/index.ts b/packages/docusaurus-plugin-content-pages/src/index.ts index 5bd819610ba1f..66bcb0d157121 100644 --- a/packages/docusaurus-plugin-content-pages/src/index.ts +++ b/packages/docusaurus-plugin-content-pages/src/index.ts @@ -21,10 +21,10 @@ import { DEFAULT_PLUGIN_ID, parseMarkdownString, } from '@docusaurus/utils'; -import type {LoadContext, Plugin} from '@docusaurus/types'; import admonitions from 'remark-admonitions'; import {validatePageFrontMatter} from './frontMatter'; +import type {LoadContext, Plugin} from '@docusaurus/types'; import type {PagesContentPaths} from './types'; import type { PluginOptions, diff --git a/packages/docusaurus-plugin-content-pages/src/options.ts b/packages/docusaurus-plugin-content-pages/src/options.ts index 9713fea810dd7..475ed8311060b 100644 --- a/packages/docusaurus-plugin-content-pages/src/options.ts +++ b/packages/docusaurus-plugin-content-pages/src/options.ts @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import type {PluginOptions, Options} from '@docusaurus/plugin-content-pages'; import { Joi, RemarkPluginsSchema, @@ -14,6 +13,7 @@ import { } from '@docusaurus/utils-validation'; import {GlobExcludeDefault} from '@docusaurus/utils'; import type {OptionValidationContext} from '@docusaurus/types'; +import type {PluginOptions, Options} from '@docusaurus/plugin-content-pages'; export const DEFAULT_OPTIONS: PluginOptions = { path: 'src/pages', // Path to data on filesystem, relative to site dir. diff --git a/packages/docusaurus-plugin-content-pages/tsconfig.json b/packages/docusaurus-plugin-content-pages/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/docusaurus-plugin-content-pages/tsconfig.json +++ b/packages/docusaurus-plugin-content-pages/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-debug/.npmignore b/packages/docusaurus-plugin-debug/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-debug/.npmignore +++ b/packages/docusaurus-plugin-debug/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-debug/copyUntypedFiles.mjs b/packages/docusaurus-plugin-debug/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-plugin-debug/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-plugin-debug/package.json b/packages/docusaurus-plugin-debug/package.json index 9d3f2fd58a351..3382fcab737a1 100644 --- a/packages/docusaurus-plugin-debug/package.json +++ b/packages/docusaurus-plugin-debug/package.json @@ -5,8 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-debug.d.ts", "scripts": { - "build": "tsc && node copyUntypedFiles.mjs", - "watch": "node copyUntypedFiles.mjs && tsc --watch" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-debug/src/index.ts b/packages/docusaurus-plugin-debug/src/index.ts index 62e650824f936..7ca3680678cb2 100644 --- a/packages/docusaurus-plugin-debug/src/index.ts +++ b/packages/docusaurus-plugin-debug/src/index.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {LoadContext, Plugin} from '@docusaurus/types'; -import {docuHash, normalizeUrl, posixPath} from '@docusaurus/utils'; import path from 'path'; +import {docuHash, normalizeUrl, posixPath} from '@docusaurus/utils'; +import type {LoadContext, Plugin} from '@docusaurus/types'; export default function pluginDebug({ siteConfig: {baseUrl}, diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx index 373fd530efff0..6b110b8ab1989 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx @@ -6,12 +6,10 @@ */ import React from 'react'; - +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; - export default function DebugMetadata(): JSX.Element { const {siteConfig} = useDocusaurusContext(); return ( diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx index 2a1b28b73fa8f..f66df5b7dd8d3 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx @@ -6,10 +6,9 @@ */ import React from 'react'; - +import useGlobalData from '@docusaurus/useGlobalData'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; -import useGlobalData from '@docusaurus/useGlobalData'; export default function DebugMetadata(): JSX.Element { const globalData = useGlobalData(); diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx index b937bf9040c4c..59cd4c7c21451 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx @@ -6,9 +6,8 @@ */ import React from 'react'; - -import DebugLayout from '@theme/DebugLayout'; import registry from '@generated/registry'; +import DebugLayout from '@theme/DebugLayout'; import styles from './styles.module.css'; export default function DebugRegistry(): JSX.Element { diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx index d9d3c5b5fa080..43b922ba91acd 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx @@ -6,10 +6,9 @@ */ import React from 'react'; - +import routes from '@generated/routes'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; -import routes from '@generated/routes'; import styles from './styles.module.css'; export default function DebugRoutes(): JSX.Element { diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx index a30cc3bbc6423..64d3954842c5b 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx @@ -6,9 +6,8 @@ */ import React from 'react'; - -import DebugLayout from '@theme/DebugLayout'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import DebugLayout from '@theme/DebugLayout'; import styles from './styles.module.css'; export default function DebugMetadata(): JSX.Element { diff --git a/packages/docusaurus-plugin-debug/tsconfig.client.json b/packages/docusaurus-plugin-debug/tsconfig.client.json new file mode 100644 index 0000000000000..2fd5ae7c4d297 --- /dev/null +++ b/packages/docusaurus-plugin-debug/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "module": "esnext", + "target": "esnext", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/theme", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-debug/tsconfig.json b/packages/docusaurus-plugin-debug/tsconfig.json index f5902ba1089bc..7c1bb85ac462b 100644 --- a/packages/docusaurus-plugin-debug/tsconfig.json +++ b/packages/docusaurus-plugin-debug/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/theme", "**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-google-analytics/.npmignore b/packages/docusaurus-plugin-google-analytics/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-google-analytics/.npmignore +++ b/packages/docusaurus-plugin-google-analytics/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-google-analytics/package.json b/packages/docusaurus-plugin-google-analytics/package.json index 77f5c813de983..f62db432005c1 100644 --- a/packages/docusaurus-plugin-google-analytics/package.json +++ b/packages/docusaurus-plugin-google-analytics/package.json @@ -8,8 +8,8 @@ "access": "public" }, "scripts": { - "build": "tsc", - "watch": "tsc --watch" + "build": "tsc --build", + "watch": "tsc --build --watch" }, "repository": { "type": "git", diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.client.json b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json new file mode 100644 index 0000000000000..766ffcc81d67a --- /dev/null +++ b/packages/docusaurus-plugin-google-analytics/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "module": "esnext", + "target": "esnext", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/analytics.ts", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-google-analytics/tsconfig.json b/packages/docusaurus-plugin-google-analytics/tsconfig.json index f5902ba1089bc..77a4365aedfe7 100644 --- a/packages/docusaurus-plugin-google-analytics/tsconfig.json +++ b/packages/docusaurus-plugin-google-analytics/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/analytics.ts", "**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-google-gtag/.npmignore b/packages/docusaurus-plugin-google-gtag/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-google-gtag/.npmignore +++ b/packages/docusaurus-plugin-google-gtag/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-google-gtag/package.json b/packages/docusaurus-plugin-google-gtag/package.json index 854f6d2e87f81..c353d7a1a28cc 100644 --- a/packages/docusaurus-plugin-google-gtag/package.json +++ b/packages/docusaurus-plugin-google-gtag/package.json @@ -5,8 +5,8 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "scripts": { - "build": "tsc", - "watch": "tsc --watch" + "build": "tsc --build", + "watch": "tsc --build --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json new file mode 100644 index 0000000000000..985b9a4580990 --- /dev/null +++ b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "module": "esnext", + "target": "esnext", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/gtag.ts", "src/options.ts", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-google-gtag/tsconfig.json b/packages/docusaurus-plugin-google-gtag/tsconfig.json index f5902ba1089bc..1b3271a718e6e 100644 --- a/packages/docusaurus-plugin-google-gtag/tsconfig.json +++ b/packages/docusaurus-plugin-google-gtag/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/gtag.ts", "**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-ideal-image/.npmignore b/packages/docusaurus-plugin-ideal-image/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-ideal-image/.npmignore +++ b/packages/docusaurus-plugin-ideal-image/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-ideal-image/copyUntypedFiles.mjs b/packages/docusaurus-plugin-ideal-image/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-plugin-ideal-image/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-plugin-ideal-image/package.json b/packages/docusaurus-plugin-ideal-image/package.json index 6f6c73d117c06..5bda29fd02038 100644 --- a/packages/docusaurus-plugin-ideal-image/package.json +++ b/packages/docusaurus-plugin-ideal-image/package.json @@ -5,11 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-ideal-image.d.ts", "scripts": { - "build": "yarn build:server && yarn build:browser && yarn build:copy && yarn build:format", - "build:server": "tsc --project tsconfig.server.json", - "build:browser": "tsc --project tsconfig.browser.json", - "build:copy": "node copyUntypedFiles.mjs", - "build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\"" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-ideal-image/src/index.ts b/packages/docusaurus-plugin-ideal-image/src/index.ts index 727eb1adc51c6..d650e33b10067 100644 --- a/packages/docusaurus-plugin-ideal-image/src/index.ts +++ b/packages/docusaurus-plugin-ideal-image/src/index.ts @@ -5,14 +5,14 @@ * LICENSE file in the root directory of this source tree. */ +import {Joi} from '@docusaurus/utils-validation'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; import type { LoadContext, Plugin, OptionValidationContext, } from '@docusaurus/types'; import type {PluginOptions} from '@docusaurus/plugin-ideal-image'; -import {Joi} from '@docusaurus/utils-validation'; -import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; export default function pluginIdealImage( context: LoadContext, diff --git a/packages/docusaurus-plugin-ideal-image/tsconfig.browser.json b/packages/docusaurus-plugin-ideal-image/tsconfig.browser.json deleted file mode 100644 index 3af8257cdf8d3..0000000000000 --- a/packages/docusaurus-plugin-ideal-image/tsconfig.browser.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "jsx": "react-native" - }, - "include": ["src/theme/", "src/*.d.ts"] -} diff --git a/packages/docusaurus-plugin-ideal-image/tsconfig.client.json b/packages/docusaurus-plugin-ideal-image/tsconfig.client.json new file mode 100644 index 0000000000000..2fd5ae7c4d297 --- /dev/null +++ b/packages/docusaurus-plugin-ideal-image/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "module": "esnext", + "target": "esnext", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src/theme", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-ideal-image/tsconfig.json b/packages/docusaurus-plugin-ideal-image/tsconfig.json index 51aec434b2578..7c1bb85ac462b 100644 --- a/packages/docusaurus-plugin-ideal-image/tsconfig.json +++ b/packages/docusaurus-plugin-ideal-image/tsconfig.json @@ -1,8 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "lib": ["DOM", "ES2019"], + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/theme", "**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-ideal-image/tsconfig.server.json b/packages/docusaurus-plugin-ideal-image/tsconfig.server.json deleted file mode 100644 index 1a463cd83a529..0000000000000 --- a/packages/docusaurus-plugin-ideal-image/tsconfig.server.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/*.ts"] -} diff --git a/packages/docusaurus-plugin-pwa/.npmignore b/packages/docusaurus-plugin-pwa/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-pwa/.npmignore +++ b/packages/docusaurus-plugin-pwa/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-pwa/copyUntypedFiles.mjs b/packages/docusaurus-plugin-pwa/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-plugin-pwa/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 3f0a4f8201c5d..4bc0e86f34d56 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-pwa.d.ts", "scripts": { - "build": "yarn build:server && yarn build:browser && yarn build:copy", - "build:server": "tsc --project tsconfig.server.json", - "build:browser": "tsc --project tsconfig.browser.json", - "build:copy": "node copyUntypedFiles.mjs" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" @@ -20,8 +20,8 @@ }, "license": "MIT", "dependencies": { - "@babel/core": "^7.17.10", - "@babel/preset-env": "^7.17.10", + "@babel/core": "^7.17.12", + "@babel/preset-env": "^7.17.12", "@docusaurus/core": "2.0.0-beta.20", "@docusaurus/theme-common": "2.0.0-beta.20", "@docusaurus/theme-translations": "2.0.0-beta.20", diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index 7150eae5f609b..7ec58b25f439a 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -5,18 +5,16 @@ * LICENSE file in the root directory of this source tree. */ -import type {HtmlTags, LoadContext, Plugin} from '@docusaurus/types'; -import type {PluginOptions} from '@docusaurus/plugin-pwa'; -import {normalizeUrl} from '@docusaurus/utils'; -import {compile} from '@docusaurus/core/lib/webpack/utils'; -import LogPlugin from '@docusaurus/core/lib/webpack/plugins/LogPlugin'; -import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; - import path from 'path'; import webpack, {type Configuration} from 'webpack'; import Terser from 'terser-webpack-plugin'; - import {injectManifest} from 'workbox-build'; +import {normalizeUrl} from '@docusaurus/utils'; +import {compile} from '@docusaurus/core/lib/webpack/utils'; +import LogPlugin from '@docusaurus/core/lib/webpack/plugins/LogPlugin'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; +import type {HtmlTags, LoadContext, Plugin} from '@docusaurus/types'; +import type {PluginOptions} from '@docusaurus/plugin-pwa'; const isProd = process.env.NODE_ENV === 'production'; diff --git a/packages/docusaurus-plugin-pwa/src/registerSw.js b/packages/docusaurus-plugin-pwa/src/registerSw.ts similarity index 93% rename from packages/docusaurus-plugin-pwa/src/registerSw.js rename to packages/docusaurus-plugin-pwa/src/registerSw.ts index 9226d9a6f0541..a215a656aa580 100644 --- a/packages/docusaurus-plugin-pwa/src/registerSw.js +++ b/packages/docusaurus-plugin-pwa/src/registerSw.ts @@ -7,6 +7,14 @@ import {createStorageSlot} from '@docusaurus/theme-common'; +declare global { + namespace NodeJS { + interface ProcessEnv { + PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES: (keyof typeof OfflineModeActivationStrategiesImplementations)[]; + } + } +} + // First: read the env variables (provided by Webpack) /* eslint-disable prefer-destructuring */ const PWA_SERVICE_WORKER_URL = process.env.PWA_SERVICE_WORKER_URL; @@ -34,7 +42,7 @@ async function clearRegistrations() { } await Promise.all( registrations.map(async (registration) => { - const result = await registration?.registration?.unregister(); + const result = await registration?.unregister(); if (debug) { console.log( `[Docusaurus-PWA][registerSw]: unregister() service worker registration`, @@ -65,6 +73,14 @@ https://stackoverflow.com/questions/51735869/check-if-user-has-already-installed async function isAppInstalledEventFired() { return AppInstalledEventFiredStorage.get() === 'true'; } + +declare global { + interface Navigator { + getInstalledRelatedApps: () => Promise<{platform: string}[]>; + connection: {saveData: boolean}; + } +} + async function isAppInstalledRelatedApps() { if ('getInstalledRelatedApps' in window.navigator) { const relatedApps = await navigator.getInstalledRelatedApps(); @@ -90,7 +106,9 @@ const OfflineModeActivationStrategiesImplementations = { new URLSearchParams(window.location.search).get('offlineMode') === 'true', }; -async function isStrategyActive(strategyName) { +async function isStrategyActive( + strategyName: keyof typeof OfflineModeActivationStrategiesImplementations, +) { return OfflineModeActivationStrategiesImplementations[strategyName](); } @@ -127,7 +145,7 @@ async function isOfflineModeEnabled() { return enabled; } -function createServiceWorkerUrl(params) { +function createServiceWorkerUrl(params: object) { const paramsQueryString = JSON.stringify(params); const url = `${PWA_SERVICE_WORKER_URL}?params=${encodeURIComponent( paramsQueryString, @@ -173,7 +191,7 @@ async function registerSW() { } }; - if (debug) { + if (debug && registration) { if (registration.active) { console.log( '[Docusaurus-PWA][registerSw]: registration.active', @@ -205,6 +223,7 @@ async function registerSW() { // Update current service worker if the next one finishes installing and // moves to waiting state in another tab. + // @ts-expect-error: not present in the API typings anymore wb.addEventListener('externalwaiting', (event) => { if (debug) { console.log('[Docusaurus-PWA][registerSw]: event externalwaiting', event); @@ -214,7 +233,7 @@ async function registerSW() { // Update service worker if the next one is already in the waiting state. // This happens when the user doesn't click on `reload` in the popup. - if (registration.waiting) { + if (registration?.waiting) { await handleServiceWorkerWaiting(); } } diff --git a/packages/docusaurus-plugin-pwa/src/renderReloadPopup.js b/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx similarity index 75% rename from packages/docusaurus-plugin-pwa/src/renderReloadPopup.js rename to packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx index b26202ac3c5b0..d4cac3601736e 100644 --- a/packages/docusaurus-plugin-pwa/src/renderReloadPopup.js +++ b/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import {render} from 'react-dom'; +import ReactDOM from 'react-dom'; const POPUP_CONTAINER_ID = 'pwa-popup-container'; @@ -19,8 +19,10 @@ const createContainer = () => { return container; }; -export default async function renderReloadPopup(props) { +export default async function renderReloadPopup(props: { + onReload: () => void; +}): Promise { const container = getContainer() || createContainer(); - const {default: ReloadPopup} = await import(process.env.PWA_RELOAD_POPUP); - render(, container); + const {default: ReloadPopup} = await import(process.env.PWA_RELOAD_POPUP!); + ReactDOM.render(, container); } diff --git a/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx b/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx index 20e8490fb82bc..66d63d70e0969 100644 --- a/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx +++ b/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx @@ -8,7 +8,6 @@ import React, {useState} from 'react'; import clsx from 'clsx'; import Translate, {translate} from '@docusaurus/Translate'; - import type {Props} from '@theme/PwaReloadPopup'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-plugin-pwa/tsconfig.browser.json b/packages/docusaurus-plugin-pwa/tsconfig.browser.json deleted file mode 100644 index 3af8257cdf8d3..0000000000000 --- a/packages/docusaurus-plugin-pwa/tsconfig.browser.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "jsx": "react-native" - }, - "include": ["src/theme/", "src/*.d.ts"] -} diff --git a/packages/docusaurus-plugin-pwa/tsconfig.client.json b/packages/docusaurus-plugin-pwa/tsconfig.client.json new file mode 100644 index 0000000000000..9404df7cd8869 --- /dev/null +++ b/packages/docusaurus-plugin-pwa/tsconfig.client.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "rootDir": "src", + "outDir": "lib", + "module": "esnext", + "target": "esnext" + }, + "include": [ + "src/theme/", + "src/*.d.ts", + "src/registerSw.ts", + "src/renderReloadPopup.tsx" + ], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-plugin-pwa/tsconfig.json b/packages/docusaurus-plugin-pwa/tsconfig.json index 51aec434b2578..5eb9d05af96b9 100644 --- a/packages/docusaurus-plugin-pwa/tsconfig.json +++ b/packages/docusaurus-plugin-pwa/tsconfig.json @@ -1,8 +1,19 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "lib": ["DOM", "ES2019"], + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": [ + "src/theme/", + "src/registerSw.ts", + "src/renderReloadPopup.tsx", + "**/__tests__/**" + ] } diff --git a/packages/docusaurus-plugin-pwa/tsconfig.server.json b/packages/docusaurus-plugin-pwa/tsconfig.server.json deleted file mode 100644 index 1a463cd83a529..0000000000000 --- a/packages/docusaurus-plugin-pwa/tsconfig.server.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/*.ts"] -} diff --git a/packages/docusaurus-plugin-sitemap/.npmignore b/packages/docusaurus-plugin-sitemap/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-plugin-sitemap/.npmignore +++ b/packages/docusaurus-plugin-sitemap/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-plugin-sitemap/src/__tests__/createSitemap.test.ts b/packages/docusaurus-plugin-sitemap/src/__tests__/createSitemap.test.ts index c9008bd310043..26fd096caf413 100644 --- a/packages/docusaurus-plugin-sitemap/src/__tests__/createSitemap.test.ts +++ b/packages/docusaurus-plugin-sitemap/src/__tests__/createSitemap.test.ts @@ -6,9 +6,9 @@ */ import React from 'react'; +import {EnumChangefreq} from 'sitemap'; import createSitemap from '../createSitemap'; import type {DocusaurusConfig} from '@docusaurus/types'; -import {EnumChangefreq} from 'sitemap'; describe('createSitemap', () => { it('simple site', async () => { diff --git a/packages/docusaurus-plugin-sitemap/src/__tests__/options.test.ts b/packages/docusaurus-plugin-sitemap/src/__tests__/options.test.ts index c581cbece0ec1..8d57746125b91 100644 --- a/packages/docusaurus-plugin-sitemap/src/__tests__/options.test.ts +++ b/packages/docusaurus-plugin-sitemap/src/__tests__/options.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {validateOptions, DEFAULT_OPTIONS, type Options} from '../options'; import {normalizePluginOptions} from '@docusaurus/utils-validation'; +import {validateOptions, DEFAULT_OPTIONS, type Options} from '../options'; function testValidate(options: Options) { return validateOptions({validate: normalizePluginOptions, options}); diff --git a/packages/docusaurus-plugin-sitemap/src/createSitemap.ts b/packages/docusaurus-plugin-sitemap/src/createSitemap.ts index 5e1b619d356f1..366714fd3f9b5 100644 --- a/packages/docusaurus-plugin-sitemap/src/createSitemap.ts +++ b/packages/docusaurus-plugin-sitemap/src/createSitemap.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ +import type {ReactElement} from 'react'; import {SitemapStream, streamToPromise} from 'sitemap'; import {applyTrailingSlash} from '@docusaurus/utils-common'; import {createMatcher} from '@docusaurus/utils'; import type {DocusaurusConfig} from '@docusaurus/types'; import type {HelmetServerState} from 'react-helmet-async'; import type {PluginOptions} from './options'; -import type {ReactElement} from 'react'; export default async function createSitemap( siteConfig: DocusaurusConfig, diff --git a/packages/docusaurus-plugin-sitemap/tsconfig.json b/packages/docusaurus-plugin-sitemap/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/docusaurus-plugin-sitemap/tsconfig.json +++ b/packages/docusaurus-plugin-sitemap/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-preset-classic/.npmignore b/packages/docusaurus-preset-classic/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-preset-classic/.npmignore +++ b/packages/docusaurus-preset-classic/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-preset-classic/tsconfig.json b/packages/docusaurus-preset-classic/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/docusaurus-preset-classic/tsconfig.json +++ b/packages/docusaurus-preset-classic/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-remark-plugin-npm2yarn/.npmignore b/packages/docusaurus-remark-plugin-npm2yarn/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/.npmignore +++ b/packages/docusaurus-remark-plugin-npm2yarn/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts index 6c6dc300e1768..2ed9613324638 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts +++ b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -import remark from 'remark'; -import npm2yarn from '../index'; -import vfile from 'to-vfile'; import path from 'path'; +import vfile from 'to-vfile'; import mdx from 'remark-mdx'; +import remark from 'remark'; +import npm2yarn from '../index'; const processFixture = async (name: string, options?: {sync?: boolean}) => { const filePath = path.join(__dirname, '__fixtures__', `${name}.md`); diff --git a/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts b/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts index 0764763e9540f..28b4c7e891502 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts +++ b/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import visit from 'unist-util-visit'; +import npmToYarn from 'npm-to-yarn'; import type {Code, Content, Literal} from 'mdast'; import type {Plugin} from 'unified'; import type {Node, Parent} from 'unist'; -import visit from 'unist-util-visit'; -import npmToYarn from 'npm-to-yarn'; type PluginOptions = { sync?: boolean; diff --git a/packages/docusaurus-remark-plugin-npm2yarn/tsconfig.json b/packages/docusaurus-remark-plugin-npm2yarn/tsconfig.json index aee99fc0f38ef..7807612b51a56 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/tsconfig.json +++ b/packages/docusaurus-remark-plugin-npm2yarn/tsconfig.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-theme-classic/.npmignore b/packages/docusaurus-theme-classic/.npmignore index 3e3575db0c5a7..03c9ae1e1b54f 100644 --- a/packages/docusaurus-theme-classic/.npmignore +++ b/packages/docusaurus-theme-classic/.npmignore @@ -1,10 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ - -lib/theme -lib-next/** -!lib-next/theme/** - -babel.config.js diff --git a/packages/docusaurus-theme-classic/babel.config.js b/packages/docusaurus-theme-classic/babel.config.js deleted file mode 100644 index 0bbcfe267e45b..0000000000000 --- a/packages/docusaurus-theme-classic/babel.config.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - */ - -module.exports = { - env: { - // USED FOR NODE/RUNTIME - // maybe we should differentiate both cases because - // we mostly need to transpile some features so that node does not crash... - lib: { - presets: [ - ['@babel/preset-env', {targets: {node: 14}, modules: 'commonjs'}], - ['@babel/preset-typescript', {isTSX: true, allExtensions: true}], - ], - }, - - // USED FOR JS SWIZZLE - // /lib-next folder is used as source to swizzle JS source code - // This JS code is created from TS source code - // This source code should look clean/human readable to be usable - 'lib-next': { - presets: [ - ['@babel/preset-typescript', {isTSX: true, allExtensions: true}], - ], - }, - }, -}; diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index e2b20b2381747..359930cbbc672 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -14,11 +14,10 @@ }, "license": "MIT", "scripts": { - "build": "tsc --noEmit && yarn babel:lib && yarn babel:lib-next && yarn format:lib-next", - "watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\"", - "babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files", - "babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files", - "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "dependencies": { "@docusaurus/core": "2.0.0-beta.20", @@ -37,22 +36,19 @@ "lodash": "^4.17.21", "nprogress": "^0.2.0", "postcss": "^8.4.13", - "prism-react-renderer": "^1.3.1", + "prism-react-renderer": "^1.3.3", "prismjs": "^1.28.0", "react-router-dom": "^5.2.0", - "rtlcss": "^3.5.0" + "rtlcss": "^3.5.0", + "tslib": "^2.4.0" }, "devDependencies": { - "@babel/cli": "^7.17.10", - "@babel/core": "^7.17.10", - "@babel/preset-typescript": "^7.16.7", "@docusaurus/module-type-aliases": "2.0.0-beta.20", "@docusaurus/types": "2.0.0-beta.20", "@types/mdx-js__react": "^1.5.5", "@types/nprogress": "^0.2.0", "@types/prismjs": "^1.26.0", "@types/rtlcss": "^3.1.4", - "cross-env": "^7.0.3", "fs-extra": "^10.1.0", "react-test-renderer": "^17.0.2", "utility-types": "^3.10.0" diff --git a/packages/docusaurus-theme-classic/src/__tests__/translations.test.ts b/packages/docusaurus-theme-classic/src/__tests__/translations.test.ts index 1c530f978e863..48a2c70f3ff7b 100644 --- a/packages/docusaurus-theme-classic/src/__tests__/translations.test.ts +++ b/packages/docusaurus-theme-classic/src/__tests__/translations.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import {updateTranslationFileMessages} from '@docusaurus/utils'; import {getTranslationFiles, translateThemeConfig} from '../translations'; import type {ThemeConfig} from '@docusaurus/theme-common'; -import {updateTranslationFileMessages} from '@docusaurus/utils'; const ThemeConfigSample: ThemeConfig = { colorMode: {}, diff --git a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.ts b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.ts index a4ca7e3460188..8d85a4d376aae 100644 --- a/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.ts +++ b/packages/docusaurus-theme-classic/src/__tests__/validateThemeConfig.test.ts @@ -6,11 +6,11 @@ */ import _ from 'lodash'; -import {ThemeConfigSchema, DEFAULT_CONFIG} from '../validateThemeConfig'; import {normalizeThemeConfig} from '@docusaurus/utils-validation'; import theme from 'prism-react-renderer/themes/github'; import darkTheme from 'prism-react-renderer/themes/dracula'; +import {ThemeConfigSchema, DEFAULT_CONFIG} from '../validateThemeConfig'; function testValidateThemeConfig(partialThemeConfig: {[key: string]: unknown}) { return normalizeThemeConfig(ThemeConfigSchema, { diff --git a/packages/docusaurus-theme-classic/src/index.ts b/packages/docusaurus-theme-classic/src/index.ts index 9fd370a2e5f8f..a0cb4629cb58f 100644 --- a/packages/docusaurus-theme-classic/src/index.ts +++ b/packages/docusaurus-theme-classic/src/index.ts @@ -6,13 +6,13 @@ */ import path from 'path'; -import type {LoadContext, Plugin} from '@docusaurus/types'; -import type {ThemeConfig} from '@docusaurus/theme-common'; -import {getTranslationFiles, translateThemeConfig} from './translations'; import {createRequire} from 'module'; -import type {Plugin as PostCssPlugin} from 'postcss'; import rtlcss from 'rtlcss'; import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; +import {getTranslationFiles, translateThemeConfig} from './translations'; +import type {LoadContext, Plugin} from '@docusaurus/types'; +import type {ThemeConfig} from '@docusaurus/theme-common'; +import type {Plugin as PostCssPlugin} from 'postcss'; import type {Options} from '@docusaurus/theme-classic'; import type webpack from 'webpack'; @@ -112,7 +112,7 @@ export default function themeClassic( name: 'docusaurus-theme-classic', getThemePath() { - return '../lib-next/theme'; + return '../lib/theme'; }, getTypeScriptThemePath() { diff --git a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx index a05afdf43fe87..763d0661e25fc 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx @@ -6,11 +6,11 @@ */ import React from 'react'; -import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; -import type {ArchiveBlogPost, Props} from '@theme/BlogArchivePage'; import {translate} from '@docusaurus/Translate'; import {PageMetadata} from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; +import type {ArchiveBlogPost, Props} from '@theme/BlogArchivePage'; type YearProp = { year: string; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx index 910328b214ceb..72270058d99d7 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx @@ -6,19 +6,19 @@ */ import React from 'react'; +import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import BlogLayout from '@theme/BlogLayout'; -import BlogPostItem from '@theme/BlogPostItem'; -import BlogListPaginator from '@theme/BlogListPaginator'; -import type {Props} from '@theme/BlogListPage'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, } from '@docusaurus/theme-common'; +import BlogLayout from '@theme/BlogLayout'; +import BlogPostItem from '@theme/BlogPostItem'; +import BlogListPaginator from '@theme/BlogListPaginator'; import SearchMetadata from '@theme/SearchMetadata'; -import clsx from 'clsx'; +import type {Props} from '@theme/BlogListPage'; function BlogListPageMetadata(props: Props): JSX.Element { const {metadata} = props; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostAuthors/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostAuthors/index.tsx index 4e36a71425535..99386d4ae9001 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostAuthors/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostAuthors/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import clsx from 'clsx'; -import type {Props} from '@theme/BlogPostAuthors'; import BlogPostAuthor from '@theme/BlogPostAuthor'; +import type {Props} from '@theme/BlogPostAuthors'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx index e531b8e9854b0..b0fcad3236b48 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx @@ -14,11 +14,11 @@ import {usePluralForm} from '@docusaurus/theme-common'; import {blogPostContainerID} from '@docusaurus/utils-common'; import MDXContent from '@theme/MDXContent'; import EditThisPage from '@theme/EditThisPage'; +import TagsListInline from '@theme/TagsListInline'; +import BlogPostAuthors from '@theme/BlogPostAuthors'; import type {Props} from '@theme/BlogPostItem'; import styles from './styles.module.css'; -import TagsListInline from '@theme/TagsListInline'; -import BlogPostAuthors from '@theme/BlogPostAuthors'; // Very simple pluralization: probably good enough for now function useReadingTimePlural() { diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx index c7b9ec88e5d39..3d47fc4dd3796 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx @@ -6,17 +6,17 @@ */ import React from 'react'; -import BlogLayout from '@theme/BlogLayout'; -import BlogPostItem from '@theme/BlogPostItem'; -import BlogPostPaginator from '@theme/BlogPostPaginator'; -import type {Props} from '@theme/BlogPostPage'; +import clsx from 'clsx'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, } from '@docusaurus/theme-common'; +import BlogLayout from '@theme/BlogLayout'; +import BlogPostItem from '@theme/BlogPostItem'; +import BlogPostPaginator from '@theme/BlogPostPaginator'; import TOC from '@theme/TOC'; -import clsx from 'clsx'; +import type {Props} from '@theme/BlogPostPage'; function BlogPostPageMetadata(props: Props): JSX.Element { const {content: BlogPostContents} = props; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx index ff74637e9ea5b..f010d2144836b 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx @@ -9,9 +9,9 @@ import React from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import {translate} from '@docusaurus/Translate'; +import type {Props} from '@theme/BlogSidebar/Desktop'; import styles from './styles.module.css'; -import type {Props} from '@theme/BlogSidebar/Desktop'; export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element { return ( diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx index 742f4bd427811..f8458777efdd0 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; +import {useWindowSize} from '@docusaurus/theme-common'; import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop'; import BlogSidebarMobile from '@theme/BlogSidebar/Mobile'; -import {useWindowSize} from '@docusaurus/theme-common'; import type {Props} from '@theme/BlogSidebar'; export default function BlogSidebar({sidebar}: Props): JSX.Element | null { diff --git a/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx index 2f53b6ee41fa9..017329d478b16 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx @@ -6,18 +6,17 @@ */ import React from 'react'; - -import BlogLayout from '@theme/BlogLayout'; -import TagsListByLetter from '@theme/TagsListByLetter'; -import type {Props} from '@theme/BlogTagsListPage'; +import clsx from 'clsx'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, translateTagsPageTitle, } from '@docusaurus/theme-common'; +import BlogLayout from '@theme/BlogLayout'; +import TagsListByLetter from '@theme/TagsListByLetter'; +import type {Props} from '@theme/BlogTagsListPage'; import SearchMetadata from '../SearchMetadata'; -import clsx from 'clsx'; export default function BlogTagsListPage({tags, sidebar}: Props): JSX.Element { const title = translateTagsPageTitle(); diff --git a/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx index fddda0795d755..312bc945e1071 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx @@ -6,11 +6,7 @@ */ import React from 'react'; - -import Link from '@docusaurus/Link'; -import BlogLayout from '@theme/BlogLayout'; -import BlogPostItem from '@theme/BlogPostItem'; -import type {Props} from '@theme/BlogTagsPostsPage'; +import clsx from 'clsx'; import Translate, {translate} from '@docusaurus/Translate'; import { PageMetadata, @@ -18,9 +14,12 @@ import { ThemeClassNames, usePluralForm, } from '@docusaurus/theme-common'; +import Link from '@docusaurus/Link'; +import BlogLayout from '@theme/BlogLayout'; +import BlogPostItem from '@theme/BlogPostItem'; import BlogListPaginator from '@theme/BlogListPaginator'; import SearchMetadata from '@theme/SearchMetadata'; -import clsx from 'clsx'; +import type {Props} from '@theme/BlogTagsPostsPage'; // Very simple pluralization: probably good enough for now function useBlogPostsPlural() { diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx index 3f130e80e6d66..a31cd85731acc 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import Container from '@theme/CodeBlock/Container'; import clsx from 'clsx'; +import Container from '@theme/CodeBlock/Container'; import type {Props} from '@theme/CodeBlock/Content/Element'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx index f73819a37f20d..5a9384f7b6380 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import clsx from 'clsx'; import { useThemeConfig, parseCodeBlockTitle, @@ -15,7 +16,6 @@ import { usePrismTheme, useCodeWordWrap, } from '@docusaurus/theme-common'; -import clsx from 'clsx'; import Highlight, {defaultProps, type Language} from 'prism-react-renderer'; import Line from '@theme/CodeBlock/Line'; import CopyButton from '@theme/CodeBlock/CopyButton'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx index e15d70abfa4eb..3b6a8a306b0a3 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx @@ -8,6 +8,7 @@ import React from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/CodeBlock/Line'; + import styles from './styles.module.css'; export default function CodeBlockLine({ diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx index 9565932fafcb6..e672185a515f5 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx @@ -7,9 +7,9 @@ import React, {isValidElement, type ReactNode} from 'react'; import useIsBrowser from '@docusaurus/useIsBrowser'; -import type {Props} from '@theme/CodeBlock'; import ElementContent from '@theme/CodeBlock/Content/Element'; import StringContent from '@theme/CodeBlock/Content/String'; +import type {Props} from '@theme/CodeBlock'; /** * Best attempt to make the children a plain string so it is copyable. If there diff --git a/packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx b/packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx index e119f2ae33ed7..2b0407a547bec 100644 --- a/packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx @@ -6,13 +6,13 @@ */ import React from 'react'; -import type {Props} from '@theme/ColorModeToggle'; +import clsx from 'clsx'; import useIsBrowser from '@docusaurus/useIsBrowser'; import {translate} from '@docusaurus/Translate'; import IconLightMode from '@theme/IconLightMode'; import IconDarkMode from '@theme/IconDarkMode'; +import type {Props} from '@theme/ColorModeToggle'; -import clsx from 'clsx'; import styles from './styles.module.css'; function ColorModeToggle({className, value, onChange}: Props): JSX.Element { diff --git a/packages/docusaurus-theme-classic/src/theme/Details/index.tsx b/packages/docusaurus-theme-classic/src/theme/Details/index.tsx index 188729351494b..b6e7b06f6bd75 100644 --- a/packages/docusaurus-theme-classic/src/theme/Details/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Details/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import clsx from 'clsx'; import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details'; import type {Props} from '@theme/Details'; + import styles from './styles.module.css'; // Should we have a custom details/summary comp in Infima instead of reusing diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx index 0ed00dc1f43a8..44200b2f329ac 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx @@ -6,18 +6,19 @@ */ import React, {type ReactNode} from 'react'; +import clsx from 'clsx'; import { ThemeClassNames, useSidebarBreadcrumbs, useHomePageRoute, } from '@docusaurus/theme-common'; -import styles from './styles.module.css'; -import clsx from 'clsx'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import {translate} from '@docusaurus/Translate'; import IconHome from '@theme/IconHome'; +import styles from './styles.module.css'; + // TODO move to design system folder function BreadcrumbsItemLink({ children, diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx index 15c8ac155d510..fc63f1949f473 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx @@ -6,17 +6,18 @@ */ import React, {type ReactNode} from 'react'; +import clsx from 'clsx'; import Link from '@docusaurus/Link'; +import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common'; +import isInternalUrl from '@docusaurus/isInternalUrl'; +import {translate} from '@docusaurus/Translate'; +import type {Props} from '@theme/DocCard'; + +import styles from './styles.module.css'; import type { PropSidebarItemCategory, PropSidebarItemLink, } from '@docusaurus/plugin-content-docs'; -import type {Props} from '@theme/DocCard'; -import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common'; -import clsx from 'clsx'; -import styles from './styles.module.css'; -import isInternalUrl from '@docusaurus/isInternalUrl'; -import {translate} from '@docusaurus/Translate'; function CardContainer({ href, diff --git a/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx index d2e61b8037c4c..3c105378ae812 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx @@ -7,11 +7,10 @@ import React from 'react'; import clsx from 'clsx'; - -import DocCard from '@theme/DocCard'; -import type {PropSidebarItem} from '@docusaurus/plugin-content-docs'; import {findFirstCategoryLink} from '@docusaurus/theme-common'; +import DocCard from '@theme/DocCard'; import type {Props} from '@theme/DocCardList'; +import type {PropSidebarItem} from '@docusaurus/plugin-content-docs'; // Filter categories that don't have a link. function filterItems(items: PropSidebarItem[]): PropSidebarItem[] { diff --git a/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx index a1b183f1705bd..0058b71596a51 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx @@ -10,14 +10,14 @@ import { PageMetadata, useCurrentSidebarCategory, } from '@docusaurus/theme-common'; -import type {Props} from '@theme/DocCategoryGeneratedIndexPage'; +import useBaseUrl from '@docusaurus/useBaseUrl'; import DocCardList from '@theme/DocCardList'; import DocPaginator from '@theme/DocPaginator'; import DocVersionBanner from '@theme/DocVersionBanner'; import DocVersionBadge from '@theme/DocVersionBadge'; import DocBreadcrumbs from '@theme/DocBreadcrumbs'; import Heading from '@theme/Heading'; -import useBaseUrl from '@docusaurus/useBaseUrl'; +import type {Props} from '@theme/DocCategoryGeneratedIndexPage'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx index 77265efccbd22..fa75f1c162e5b 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx @@ -7,23 +7,24 @@ import React from 'react'; import clsx from 'clsx'; +import { + PageMetadata, + HtmlClassNameProvider, + ThemeClassNames, + useWindowSize, +} from '@docusaurus/theme-common'; import DocPaginator from '@theme/DocPaginator'; import DocVersionBanner from '@theme/DocVersionBanner'; import DocVersionBadge from '@theme/DocVersionBadge'; -import type {Props} from '@theme/DocItem'; import DocItemFooter from '@theme/DocItemFooter'; import TOC from '@theme/TOC'; import TOCCollapsible from '@theme/TOCCollapsible'; import Heading from '@theme/Heading'; -import styles from './styles.module.css'; -import { - PageMetadata, - HtmlClassNameProvider, - ThemeClassNames, - useWindowSize, -} from '@docusaurus/theme-common'; import DocBreadcrumbs from '@theme/DocBreadcrumbs'; import MDXContent from '@theme/MDXContent'; +import type {Props} from '@theme/DocItem'; + +import styles from './styles.module.css'; function DocItemMetadata(props: Props): JSX.Element { const {content: DocContent} = props; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItemFooter/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItemFooter/index.tsx index 056391687cb0c..c6f998cb61c9c 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItemFooter/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItemFooter/index.tsx @@ -7,16 +7,15 @@ import React from 'react'; import clsx from 'clsx'; - +import {ThemeClassNames} from '@docusaurus/theme-common'; import LastUpdated from '@theme/LastUpdated'; -import type {Props} from '@theme/DocItem'; import EditThisPage from '@theme/EditThisPage'; import TagsListInline, { type Props as TagsListInlineProps, } from '@theme/TagsListInline'; +import type {Props} from '@theme/DocItem'; import styles from './styles.module.css'; -import {ThemeClassNames} from '@docusaurus/theme-common'; function TagsRow(props: TagsListInlineProps) { return ( diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Main/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Main/index.tsx index 3cc4f0479e008..61ccdafdb6cc3 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Main/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Main/index.tsx @@ -6,12 +6,11 @@ */ import React from 'react'; - +import clsx from 'clsx'; import {useDocsSidebar} from '@docusaurus/theme-common'; +import type {Props} from '@theme/DocPage/Layout/Main'; -import clsx from 'clsx'; import styles from './styles.module.css'; -import type {Props} from '@theme/DocPage/Layout/Main'; export default function DocPageLayoutMain({ hiddenSidebarContainer, diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx index 7d68031577fa9..0cf8896393216 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import IconArrow from '@theme/IconArrow'; import {translate} from '@docusaurus/Translate'; +import IconArrow from '@theme/IconArrow'; import type {Props} from '@theme/DocPage/Layout/Sidebar/ExpandButton'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx index 438d9f814e79b..150fd888a3efa 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx @@ -6,15 +6,14 @@ */ import React, {type ReactNode, useState, useCallback} from 'react'; -import DocSidebar from '@theme/DocSidebar'; +import clsx from 'clsx'; +import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common'; import {useLocation} from '@docusaurus/router'; -import type {Props} from '@theme/DocPage/Layout/Sidebar'; +import DocSidebar from '@theme/DocSidebar'; import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton'; +import type {Props} from '@theme/DocPage/Layout/Sidebar'; -import clsx from 'clsx'; -import styles from './index.module.css'; - -import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common'; +import styles from './styles.module.css'; // Reset sidebar state when sidebar changes // Use React key to unmount/remount the children diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.module.css rename to packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx index 8f95807481fde..d5a48c1a68b1b 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx @@ -6,15 +6,14 @@ */ import React, {useState} from 'react'; +import {useDocsSidebar} from '@docusaurus/theme-common'; import Layout from '@theme/Layout'; import BackToTopButton from '@theme/BackToTopButton'; -import type {Props} from '@theme/DocPage/Layout'; import DocPageLayoutSidebar from '@theme/DocPage/Layout/Sidebar'; import DocPageLayoutMain from '@theme/DocPage/Layout/Main'; +import type {Props} from '@theme/DocPage/Layout'; -import styles from './index.module.css'; - -import {useDocsSidebar} from '@docusaurus/theme-common'; +import styles from './styles.module.css'; export default function DocPageLayout({children}: Props): JSX.Element { const sidebar = useDocsSidebar(); diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.module.css rename to packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx index b1404be79846e..3e45dbbda3990 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx @@ -6,12 +6,7 @@ */ import React from 'react'; -import NotFound from '@theme/NotFound'; -import type {Props} from '@theme/DocPage'; -import DocPageLayout from '@theme/DocPage/Layout'; - import clsx from 'clsx'; - import { HtmlClassNameProvider, ThemeClassNames, @@ -20,7 +15,10 @@ import { DocsVersionProvider, useDocRouteMetadata, } from '@docusaurus/theme-common'; +import DocPageLayout from '@theme/DocPage/Layout'; +import NotFound from '@theme/NotFound'; import SearchMetadata from '@theme/SearchMetadata'; +import type {Props} from '@theme/DocPage'; export default function DocPage(props: Props): JSX.Element { const {versionMetadata} = props; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx index c902ac90d6ca5..f5d96d16481fa 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import clsx from 'clsx'; -import IconArrow from '@theme/IconArrow'; import {translate} from '@docusaurus/Translate'; +import IconArrow from '@theme/IconArrow'; import type {Props} from '@theme/DocSidebar/Desktop/CollapseButton'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx index 5bbd9e2eb7109..f057073d60dde 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx @@ -7,9 +7,9 @@ import React from 'react'; import {useWindowSize} from '@docusaurus/theme-common'; -import type {Props} from '@theme/DocSidebar'; import DocSidebarDesktop from '@theme/DocSidebar/Desktop'; import DocSidebarMobile from '@theme/DocSidebar/Mobile'; +import type {Props} from '@theme/DocSidebar'; export default function DocSidebar(props: Props): JSX.Element { const windowSize = useWindowSize(); diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx similarity index 94% rename from packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category.tsx rename to packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx index 7a9a52e0e884b..18047a9225ab8 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx @@ -20,30 +20,28 @@ import { } from '@docusaurus/theme-common'; import Link from '@docusaurus/Link'; import {translate} from '@docusaurus/Translate'; - +import useIsBrowser from '@docusaurus/useIsBrowser'; import DocSidebarItems from '@theme/DocSidebarItems'; import type {Props} from '@theme/DocSidebarItem/Category'; -import useIsBrowser from '@docusaurus/useIsBrowser'; - // If we navigate to a category and it becomes active, it should automatically // expand itself function useAutoExpandActiveCategory({ isActive, collapsed, - setCollapsed, + updateCollapsed, }: { isActive: boolean; collapsed: boolean; - setCollapsed: (b: boolean) => void; + updateCollapsed: (b: boolean) => void; }) { const wasActive = usePrevious(isActive); useEffect(() => { const justBecameActive = isActive && !wasActive; if (justBecameActive && collapsed) { - setCollapsed(false); + updateCollapsed(false); } - }, [isActive, wasActive, collapsed, setCollapsed]); + }, [isActive, wasActive, collapsed, updateCollapsed]); } /** @@ -105,6 +103,11 @@ export default function DocSidebarItemCategory({ ...props }: Props): JSX.Element { const {items, label, collapsible, className, href} = item; + const { + docs: { + sidebar: {autoCollapseCategories}, + }, + } = useThemeConfig(); const hrefWithSSRFallback = useCategoryHrefWithSSRFallback(item); const isActive = isActiveSidebarItem(item, activePath); @@ -121,17 +124,13 @@ export default function DocSidebarItemCategory({ }, }); - useAutoExpandActiveCategory({isActive, collapsed, setCollapsed}); const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState(); - function updateCollapsed(toCollapsed: boolean = !collapsed) { + // Use this instead of `setCollapsed`, because it is also reactive + const updateCollapsed = (toCollapsed: boolean = !collapsed) => { setExpandedItem(toCollapsed ? null : index); setCollapsed(toCollapsed); - } - const { - docs: { - sidebar: {autoCollapseCategories}, - }, - } = useThemeConfig(); + }; + useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}); useEffect(() => { if ( collapsible && diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx similarity index 95% rename from packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html.tsx rename to packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx index 0e97ec27788af..7f6bab8f6cc64 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx @@ -10,7 +10,7 @@ import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/DocSidebarItem/Html'; -import styles from './Html.module.css'; +import styles from './styles.module.css'; export default function DocSidebarItemHtml({ item, diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html.module.css b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html.module.css rename to packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx similarity index 97% rename from packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link.tsx rename to packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx index 28c481eed42f4..fc87268e01f00 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx @@ -11,10 +11,9 @@ import {isActiveSidebarItem, ThemeClassNames} from '@docusaurus/theme-common'; import Link from '@docusaurus/Link'; import isInternalUrl from '@docusaurus/isInternalUrl'; import IconExternalLink from '@theme/IconExternalLink'; - import type {Props} from '@theme/DocSidebarItem/Link'; -import styles from './Link.module.css'; +import styles from './styles.module.css'; export default function DocSidebarItemLink({ item, diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link.module.css b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link.module.css rename to packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx index fbced08e14164..041c553f284fb 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx @@ -6,8 +6,8 @@ */ import React, {memo} from 'react'; -import DocSidebarItem from '@theme/DocSidebarItem'; import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common'; +import DocSidebarItem from '@theme/DocSidebarItem'; import type {Props} from '@theme/DocSidebarItems'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx index 22cf3ff7ac9be..a928644a9bd6e 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; - -import Layout from '@theme/Layout'; +import clsx from 'clsx'; import Link from '@docusaurus/Link'; import { PageMetadata, @@ -16,9 +15,9 @@ import { usePluralForm, } from '@docusaurus/theme-common'; import Translate, {translate} from '@docusaurus/Translate'; -import type {Props} from '@theme/DocTagDocListPage'; +import Layout from '@theme/Layout'; import SearchMetadata from '@theme/SearchMetadata'; -import clsx from 'clsx'; +import type {Props} from '@theme/DocTagDocListPage'; // Very simple pluralization: probably good enough for now function useNDocsTaggedPlural() { diff --git a/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx index 5ab4f5a44db99..e848128fedf0e 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx @@ -6,18 +6,17 @@ */ import React from 'react'; - -import Layout from '@theme/Layout'; +import clsx from 'clsx'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, translateTagsPageTitle, } from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; import TagsListByLetter from '@theme/TagsListByLetter'; -import type {Props} from '@theme/DocTagsListPage'; import SearchMetadata from '@theme/SearchMetadata'; -import clsx from 'clsx'; +import type {Props} from '@theme/DocTagsListPage'; export default function DocTagsListPage({tags}: Props): JSX.Element { const title = translateTagsPageTitle(); diff --git a/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx index 862a33e5e543d..dc4a2c90bbb15 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; +import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import {ThemeClassNames, useDocsVersion} from '@docusaurus/theme-common'; -import clsx from 'clsx'; import type {Props} from '@theme/DocVersionBadge'; export default function DocVersionBadge({ diff --git a/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx index dd87a4d3673bb..979a4f2b90a78 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx @@ -6,6 +6,7 @@ */ import React, {type ComponentType} from 'react'; +import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Link from '@docusaurus/Link'; import Translate from '@docusaurus/Translate'; @@ -21,7 +22,6 @@ import { } from '@docusaurus/theme-common'; import type {Props} from '@theme/DocVersionBanner'; -import clsx from 'clsx'; import type { VersionBanner, PropVersionMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx index 5fda42f876b6d..f4b55187756f3 100644 --- a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx @@ -7,10 +7,9 @@ import React from 'react'; import Translate from '@docusaurus/Translate'; - -import type {Props} from '@theme/EditThisPage'; -import IconEdit from '@theme/IconEdit'; import {ThemeClassNames} from '@docusaurus/theme-common'; +import IconEdit from '@theme/IconEdit'; +import type {Props} from '@theme/EditThisPage'; export default function EditThisPage({editUrl}: Props): JSX.Element { return ( diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx index a2bad28d8682e..01b362e520c0e 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {Props} from '@theme/Footer/Links/MultiColumn'; import LinkItem from '@theme/Footer/LinkItem'; +import type {Props} from '@theme/Footer/Links/MultiColumn'; type ColumnType = Props['columns'][number]; type ColumnItemType = ColumnType['items'][number]; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Links/Simple/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Links/Simple/index.tsx index 72fcc0a74a535..e14b77f1f31df 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Links/Simple/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Links/Simple/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {Props} from '@theme/Footer/Links/Simple'; import LinkItem from '@theme/Footer/LinkItem'; +import type {Props} from '@theme/Footer/Links/Simple'; function Separator() { return ·; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx index 44e553e5390e8..a4b0f3354c237 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx @@ -8,9 +8,9 @@ import React from 'react'; import {isMultiColumnFooterLinks} from '@docusaurus/theme-common'; -import type {Props} from '@theme/Footer/Links'; import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn'; import FooterLinksSimple from '@theme/Footer/Links/Simple'; +import type {Props} from '@theme/Footer/Links'; export default function FooterLinks({links}: Props): JSX.Element { return isMultiColumnFooterLinks(links) ? ( diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx index f566555a17910..121e08f758a3d 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx @@ -6,13 +6,13 @@ */ import React from 'react'; - import Link from '@docusaurus/Link'; import {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; -import styles from './styles.module.css'; import ThemedImage from '@theme/ThemedImage'; import type {Props} from '@theme/Footer/Logo'; +import styles from './styles.module.css'; + function LogoImage({logo}: Props) { const {withBaseUrl} = useBaseUrlUtils(); const sources = { diff --git a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx index 7f8f80876475c..9969fdbb6e553 100644 --- a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx @@ -7,9 +7,9 @@ import React from 'react'; import clsx from 'clsx'; -import type {Props} from '@theme/Heading'; import {translate} from '@docusaurus/Translate'; import {useThemeConfig} from '@docusaurus/theme-common'; +import type {Props} from '@theme/Heading'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/IconEdit/index.tsx b/packages/docusaurus-theme-classic/src/theme/IconEdit/index.tsx index 76f8a8168b1ff..004c12216598a 100644 --- a/packages/docusaurus-theme-classic/src/theme/IconEdit/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/IconEdit/index.tsx @@ -7,7 +7,6 @@ import React from 'react'; import clsx from 'clsx'; - import type {Props} from '@theme/IconEdit'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx b/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx index 57937216285f5..5ba4c3e2f249b 100644 --- a/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import Translate from '@docusaurus/Translate'; -import type {Props} from '@theme/LastUpdated'; import {ThemeClassNames} from '@docusaurus/theme-common'; +import type {Props} from '@theme/LastUpdated'; function LastUpdatedAtDate({ lastUpdatedAt, diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx index 47ed451b55d9e..c5503edcaaa29 100644 --- a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx @@ -8,19 +8,19 @@ import React from 'react'; import clsx from 'clsx'; import ErrorBoundary from '@docusaurus/ErrorBoundary'; -import SkipToContent from '@theme/SkipToContent'; -import AnnouncementBar from '@theme/AnnouncementBar'; -import Navbar from '@theme/Navbar'; -import Footer from '@theme/Footer'; -import LayoutProviders from '@theme/LayoutProviders'; -import type {Props} from '@theme/Layout'; import { PageMetadata, ThemeClassNames, useKeyboardNavigation, } from '@docusaurus/theme-common'; +import SkipToContent from '@theme/SkipToContent'; +import AnnouncementBar from '@theme/AnnouncementBar'; +import Navbar from '@theme/Navbar'; +import Footer from '@theme/Footer'; +import LayoutProviders from '@theme/LayoutProviders'; import ErrorPageContent from '@theme/ErrorPageContent'; import './styles.css'; +import type {Props} from '@theme/Layout'; export default function Layout(props: Props): JSX.Element { const { diff --git a/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx b/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx index eaa89cc1e0cc4..13f4126198edf 100644 --- a/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import type {Props} from '@theme/Logo'; - import Link from '@docusaurus/Link'; -import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from '@docusaurus/useBaseUrl'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useThemeConfig} from '@docusaurus/theme-common'; +import ThemedImage from '@theme/ThemedImage'; +import type {Props} from '@theme/Logo'; export default function Logo(props: Props): JSX.Element { const { diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx similarity index 93% rename from packages/docusaurus-theme-classic/src/theme/MDXComponents/Img.tsx rename to packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx index a97bedc3e0286..c3b76dee9fc5b 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx @@ -6,9 +6,10 @@ */ import React from 'react'; -import type {Props} from '@theme/MDXComponents/Img'; -import styles from './Img.module.css'; import clsx from 'clsx'; +import type {Props} from '@theme/MDXComponents/Img'; + +import styles from './styles.module.css'; function transformImgClassName(className?: string): string { return clsx(className, styles.img); diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img.module.css b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/MDXComponents/Img.module.css rename to packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul.tsx index 8a0da274ec2cb..080ecaac2a1ab 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul.tsx @@ -12,8 +12,8 @@ import type {Props} from '@theme/MDXComponents/Ul'; function transformUlClassName(className?: string): string { return clsx( className, - // This class is set globally by GitHub/MDX - // We keep the global class, but add Infima class to get list without styling + // This class is set globally by GitHub/MDX. We keep the global class, and + // add another Infima class to get list without styling // See https://github.com/syntax-tree/mdast-util-to-hast/issues/28 className?.includes('contains-task-list') && 'clean-list', ); diff --git a/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx index 44ba2a5c0ffaf..64bb180a56345 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx @@ -7,15 +7,15 @@ import React from 'react'; import clsx from 'clsx'; -import Layout from '@theme/Layout'; -import MDXContent from '@theme/MDXContent'; -import type {Props} from '@theme/MDXPage'; -import TOC from '@theme/TOC'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, } from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; +import MDXContent from '@theme/MDXContent'; +import TOC from '@theme/TOC'; +import type {Props} from '@theme/MDXPage'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx index 5c33ac4a3bed5..d1fc9c3ffba1f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import React from 'react'; import {useColorMode, useThemeConfig} from '@docusaurus/theme-common'; import ColorModeToggle from '@theme/ColorModeToggle'; import type {Props} from '@theme/Navbar/ColorModeToggle'; -import React from 'react'; export default function NavbarColorModeToggle({ className, diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx index 9ab92085eca5e..89503a675dcbe 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx @@ -6,18 +6,19 @@ */ import React, {type ReactNode} from 'react'; -import type {Props as NavbarItemConfig} from '@theme/NavbarItem'; -import NavbarItem from '@theme/NavbarItem'; -import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; -import SearchBar from '@theme/SearchBar'; import { splitNavbarItems, useNavbarMobileSidebar, useThemeConfig, } from '@docusaurus/theme-common'; +import NavbarItem from '@theme/NavbarItem'; +import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; +import SearchBar from '@theme/SearchBar'; import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle'; import NavbarLogo from '@theme/Navbar/Logo'; import NavbarSearch from '@theme/Navbar/Search'; +import type {Props as NavbarItemConfig} from '@theme/NavbarItem'; + import styles from './styles.module.css'; function useNavbarItems() { diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx index 00e5736bd8fdd..b674fe7269856 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx @@ -7,13 +7,13 @@ import React, {type ComponentProps} from 'react'; import clsx from 'clsx'; -import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar'; -import type {Props} from '@theme/Navbar/Layout'; import { useThemeConfig, useHideableNavbar, useNavbarMobileSidebar, } from '@docusaurus/theme-common'; +import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar'; +import type {Props} from '@theme/Navbar/Layout'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx index c58b42eb014a2..139377115323f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; +import {useNavbarMobileSidebar} from '@docusaurus/theme-common'; import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; import IconClose from '@theme/IconClose'; import NavbarLogo from '@theme/Navbar/Logo'; -import {useNavbarMobileSidebar} from '@docusaurus/theme-common'; function CloseButton() { const mobileSidebar = useNavbarMobileSidebar(); diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx index 4fe7a4f9984c3..6d63029dbd31a 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import clsx from 'clsx'; -import type {Props} from '@theme/Navbar/MobileSidebar/Layout'; import {useNavbarSecondaryMenu} from '@docusaurus/theme-common'; +import type {Props} from '@theme/Navbar/MobileSidebar/Layout'; export default function NavbarMobileSidebarLayout({ header, diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx index dbde63edb558f..d8fa6524a6f09 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import {useNavbarMobileSidebar, useThemeConfig} from '@docusaurus/theme-common'; +import NavbarItem from '@theme/NavbarItem'; import type {Props as NavbarItemConfig} from '@theme/NavbarItem'; -import NavbarItem from '../../../NavbarItem'; function useNavbarItems() { // TODO temporary casting until ThemeConfig type is improved diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx index e4ac62a505848..6ac64154d36ca 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import IconMenu from '@theme/IconMenu'; import {useNavbarMobileSidebar} from '@docusaurus/theme-common'; +import IconMenu from '@theme/IconMenu'; export default function MobileSidebarToggle(): JSX.Element { const mobileSidebar = useNavbarMobileSidebar(); diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx index 4a29c49015251..4ee13c284efc3 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx @@ -6,12 +6,12 @@ */ import React from 'react'; -import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout'; -import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header'; import { useLockBodyScroll, useNavbarMobileSidebar, } from '@docusaurus/theme-common'; +import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout'; +import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header'; import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu'; import NavbarMobileSidebarSecondaryMenu from '@theme/Navbar/MobileSidebar/SecondaryMenu'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem.tsx index 2c5044682012a..7036b2b6c12e5 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem.tsx @@ -7,16 +7,13 @@ import React from 'react'; import clsx from 'clsx'; - import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; - +import {getInfimaActiveClassName} from '@theme/NavbarItem/utils'; import type { DesktopOrMobileNavBarItemProps, Props, } from '@theme/NavbarItem/DefaultNavbarItem'; -import {getInfimaActiveClassName} from '@theme/NavbarItem/utils'; - function DefaultNavbarItemDesktop({ className, isDropdownItem = false, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx index 1ed30afe4050e..797ef1ec2d505 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx @@ -6,12 +6,12 @@ */ import React from 'react'; -import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; -import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client'; import clsx from 'clsx'; +import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client'; +import {useLayoutDoc} from '@docusaurus/theme-common'; +import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; import {getInfimaActiveClassName} from '@theme/NavbarItem/utils'; import type {Props} from '@theme/NavbarItem/DocNavbarItem'; -import {useLayoutDoc} from '@docusaurus/theme-common'; export default function DocNavbarItem({ docId, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx index 965664855603f..874605bcf1a19 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx @@ -6,12 +6,11 @@ */ import React from 'react'; -import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; -import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client'; import clsx from 'clsx'; -import {getInfimaActiveClassName} from '@theme/NavbarItem/utils'; +import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client'; import {useLayoutDocsSidebar} from '@docusaurus/theme-common'; - +import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; +import {getInfimaActiveClassName} from '@theme/NavbarItem/utils'; import type {Props} from '@theme/NavbarItem/DocSidebarNavbarItem'; export default function DocSidebarNavbarItem({ diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx index 9624dc3ddedb6..b351eeeef1a85 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx @@ -6,8 +6,6 @@ */ import React from 'react'; -import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; -import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; import { useVersions, useActiveDocContext, @@ -17,8 +15,10 @@ import { useDocsVersionCandidates, } from '@docusaurus/theme-common'; import {translate} from '@docusaurus/Translate'; -import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client'; +import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; +import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; import type {Props} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem'; +import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client'; const getVersionMainDoc = (version: GlobalVersion) => version.docs.find((doc) => doc.id === version.mainDocId)!; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx index db68737643196..aade004e44d4f 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; import {useDocsVersionCandidates} from '@docusaurus/theme-common'; -import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client'; +import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; import type {Props} from '@theme/NavbarItem/DocsVersionNavbarItem'; +import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client'; const getVersionMainDoc = (version: GlobalVersion) => version.docs.find((doc) => doc.id === version.mainDocId)!; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem.tsx index 37dd486924520..ca5e03d92f120 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem.tsx @@ -14,15 +14,14 @@ import { isRegexpStringMatch, useLocalPathname, } from '@docusaurus/theme-common'; +import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; +import NavbarItem from '@theme/NavbarItem'; import type { DesktopOrMobileNavBarItemProps, Props, } from '@theme/NavbarItem/DropdownNavbarItem'; import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem'; -import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; -import NavbarItem from '@theme/NavbarItem'; - const dropdownLinkActiveClass = 'dropdown__link--active'; function isItemActive( diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx index 620a161b9dee2..2bb652c734ac2 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx @@ -6,13 +6,13 @@ */ import React from 'react'; -import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; -import IconLanguage from '@theme/IconLanguage'; -import type {Props} from '@theme/NavbarItem/LocaleDropdownNavbarItem'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useAlternatePageUtils} from '@docusaurus/theme-common'; import {translate} from '@docusaurus/Translate'; +import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; +import IconLanguage from '@theme/IconLanguage'; import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem'; +import type {Props} from '@theme/NavbarItem/LocaleDropdownNavbarItem'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx index e19758815f6dd..94157e97eec5e 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx @@ -8,10 +8,10 @@ import React from 'react'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import type {Props} from '@theme/NavbarItem/NavbarNavLink'; -import IconExternalLink from '@theme/IconExternalLink'; import isInternalUrl from '@docusaurus/isInternalUrl'; import {isRegexpStringMatch} from '@docusaurus/theme-common'; +import IconExternalLink from '@theme/IconExternalLink'; +import type {Props} from '@theme/NavbarItem/NavbarNavLink'; const dropdownLinkActiveClass = 'dropdown__link--active'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx index dfefa83dc154c..9e95436025b2d 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import type {Props} from '@theme/NavbarItem/SearchNavbarItem'; import SearchBar from '@theme/SearchBar'; import NavbarSearch from '@theme/Navbar/Search'; +import type {Props} from '@theme/NavbarItem/SearchNavbarItem'; export default function SearchNavbarItem({mobile}: Props): JSX.Element | null { if (mobile) { diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx index 7ae0d4990730d..ca3253143a16e 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx @@ -6,11 +6,10 @@ */ import React from 'react'; +import ComponentTypes from '@theme/NavbarItem/ComponentTypes'; import {type Props as DropdownNavbarItemProps} from '@theme/NavbarItem/DropdownNavbarItem'; import type {Types, Props} from '@theme/NavbarItem'; -import ComponentTypes from '@theme/NavbarItem/ComponentTypes'; - const getNavbarItemComponent = (type: NonNullable) => { const component = ComponentTypes[type]; if (!component) { diff --git a/packages/docusaurus-theme-classic/src/theme/NotFound.tsx b/packages/docusaurus-theme-classic/src/theme/NotFound.tsx index 2213158d52a6d..e6b9542f3d50d 100644 --- a/packages/docusaurus-theme-classic/src/theme/NotFound.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NotFound.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import Layout from '@theme/Layout'; import Translate, {translate} from '@docusaurus/Translate'; import {PageMetadata} from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; export default function NotFound(): JSX.Element { return ( diff --git a/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx index ce53ddf1d9e5a..5fa827569181b 100644 --- a/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx @@ -9,7 +9,6 @@ import React from 'react'; import Head from '@docusaurus/Head'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import SearchMetadata from '@theme/SearchMetadata'; import { PageMetadata, DEFAULT_SEARCH_TAG, @@ -18,6 +17,7 @@ import { keyboardFocusedClassName, } from '@docusaurus/theme-common'; import {useLocation} from '@docusaurus/router'; +import SearchMetadata from '@theme/SearchMetadata'; // TODO move to SiteMetadataDefaults or theme-common ? // Useful for i18n/SEO diff --git a/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx index 79ca736645e15..08b2ddb4c10c8 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx @@ -7,8 +7,9 @@ import React from 'react'; import clsx from 'clsx'; -import type {Props} from '@theme/TOC'; import TOCItems from '@theme/TOCItems'; +import type {Props} from '@theme/TOC'; + import styles from './styles.module.css'; // Using a custom className diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton.tsx b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx similarity index 94% rename from packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton.tsx rename to packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx index 48eeb3afdb195..54d9bf4155185 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx @@ -8,9 +8,10 @@ import React from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; -import styles from './CollapseButton.module.css'; import type {Props} from '@theme/TOCCollapsible/CollapseButton'; +import styles from './styles.module.css'; + export default function TOCCollapsibleCollapseButton({ collapsed, ...props diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton.module.css b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton.module.css rename to packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx index de818634329c9..19680832c205e 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx @@ -8,10 +8,11 @@ import React from 'react'; import clsx from 'clsx'; import {useCollapsible, Collapsible} from '@docusaurus/theme-common'; -import styles from './index.module.css'; import TOCItems from '@theme/TOCItems'; -import type {Props} from '@theme/TOCCollapsible'; import CollapseButton from '@theme/TOCCollapsible/CollapseButton'; +import type {Props} from '@theme/TOCCollapsible'; + +import styles from './styles.module.css'; export default function TOCCollapsible({ toc, diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.module.css b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/styles.module.css similarity index 100% rename from packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.module.css rename to packages/docusaurus-theme-classic/src/theme/TOCCollapsible/styles.module.css diff --git a/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx index b0bae1aafbc02..9864572f53593 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx @@ -6,9 +6,10 @@ */ import React from 'react'; +import TOCItems from '@theme/TOCItems'; import type {Props} from '@theme/TOCInline'; + import styles from './styles.module.css'; -import TOCItems from '@theme/TOCItems'; export default function TOCInline({ toc, diff --git a/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx index 544df3db72b61..3743706a44626 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx @@ -6,14 +6,14 @@ */ import React, {useMemo} from 'react'; -import type {Props} from '@theme/TOCItems'; -import TOCItemTree from '@theme/TOCItems/Tree'; import { type TOCHighlightConfig, useThemeConfig, useTOCHighlight, useFilteredAndTreeifiedTOC, } from '@docusaurus/theme-common'; +import TOCItemTree from '@theme/TOCItems/Tree'; +import type {Props} from '@theme/TOCItems'; export default function TOCItems({ toc, diff --git a/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx index 7b847dacc89e1..b0a6c3cdc0c2c 100644 --- a/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {Props} from '@theme/TabItem'; import clsx from 'clsx'; +import type {Props} from '@theme/TabItem'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx index b609058e80c6d..f5d4f2d7f58f0 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx @@ -7,12 +7,12 @@ import React from 'react'; import renderer from 'react-test-renderer'; -import Tabs from '../index'; -import TabItem from '../../TabItem'; import { TabGroupChoiceProvider, ScrollControllerProvider, } from '@docusaurus/theme-common'; +import Tabs from '../index'; +import TabItem from '../../TabItem'; describe('Tabs', () => { it('rejects bad Tabs child', () => { diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx index 2e64f414607c5..5ee9649ac2262 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx @@ -11,6 +11,7 @@ import React, { isValidElement, type ReactElement, } from 'react'; +import clsx from 'clsx'; import useIsBrowser from '@docusaurus/useIsBrowser'; import { useScrollPositionBlocker, @@ -20,8 +21,6 @@ import { import type {Props} from '@theme/Tabs'; import type {Props as TabItemProps} from '@theme/TabItem'; -import clsx from 'clsx'; - import styles from './styles.module.css'; // A very rough duck type, but good enough to guard against mistakes while diff --git a/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx b/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx index c301c12e1ac47..326efa0c77679 100644 --- a/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; +import {listTagsByLetters, type TagLetterEntry} from '@docusaurus/theme-common'; import Tag from '@theme/Tag'; import type {Props} from '@theme/TagsListByLetter'; -import {listTagsByLetters, type TagLetterEntry} from '@docusaurus/theme-common'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx b/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx index 0255e04805bbf..b0b938350278b 100644 --- a/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx @@ -7,7 +7,6 @@ import React from 'react'; import clsx from 'clsx'; - import useIsBrowser from '@docusaurus/useIsBrowser'; import {useColorMode} from '@docusaurus/theme-common'; import type {Props} from '@theme/ThemedImage'; diff --git a/packages/docusaurus-theme-classic/src/translations.ts b/packages/docusaurus-theme-classic/src/translations.ts index 8d8bd673b48df..cc087a87d85a7 100644 --- a/packages/docusaurus-theme-classic/src/translations.ts +++ b/packages/docusaurus-theme-classic/src/translations.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; +import {mergeTranslations} from '@docusaurus/utils'; import type {TranslationFile, TranslationFileContent} from '@docusaurus/types'; import type { ThemeConfig, @@ -15,9 +17,6 @@ import type { SimpleFooter, } from '@docusaurus/theme-common'; -import _ from 'lodash'; -import {mergeTranslations} from '@docusaurus/utils'; - function getNavbarTranslationFile(navbar: Navbar): TranslationFileContent { // TODO handle properly all the navbar item types here! function flattenNavbarItems(items: NavbarItem[]): NavbarItem[] { diff --git a/packages/docusaurus-theme-classic/tsconfig.client.json b/packages/docusaurus-theme-classic/tsconfig.client.json new file mode 100644 index 0000000000000..067fb209a75df --- /dev/null +++ b/packages/docusaurus-theme-classic/tsconfig.client.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "rootDir": "src", + "outDir": "lib", + "module": "esnext", + "target": "esnext" + }, + "include": [ + "src/nprogress.ts", + "src/prism-include-languages.ts", + "src/theme", + "src/*.d.ts" + ], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-theme-classic/tsconfig.json b/packages/docusaurus-theme-classic/tsconfig.json index 145e89f84a44d..9e41ec3ef68c0 100644 --- a/packages/docusaurus-theme-classic/tsconfig.json +++ b/packages/docusaurus-theme-classic/tsconfig.json @@ -1,10 +1,19 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "lib": ["DOM", "ES2019"], - "module": "esnext", - "noEmit": true, - "jsx": "react-native" + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", + "rootDir": "src", + "outDir": "lib" }, - "include": ["src/"] + "include": ["src"], + "exclude": [ + "src/nprogress.ts", + "src/prism-include-languages.ts", + "src/theme", + "**/__tests__/**" + ] } diff --git a/packages/docusaurus-theme-common/.npmignore b/packages/docusaurus-theme-common/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-theme-common/.npmignore +++ b/packages/docusaurus-theme-common/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-theme-common/copyUntypedFiles.mjs b/packages/docusaurus-theme-common/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-theme-common/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json index 7a72444294720..ff097aa08e952 100644 --- a/packages/docusaurus-theme-common/package.json +++ b/packages/docusaurus-theme-common/package.json @@ -13,8 +13,10 @@ "./Details": "./lib/components/Details/index.js" }, "scripts": { - "build": "node copyUntypedFiles.mjs && tsc", - "watch": "node copyUntypedFiles.mjs && tsc --watch" + "build": "tsc && node ../../admin/scripts/copyUntypedFiles.js", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" @@ -32,7 +34,7 @@ "@docusaurus/plugin-content-pages": "2.0.0-beta.20", "clsx": "^1.1.1", "parse-numeric-range": "^1.3.0", - "prism-react-renderer": "^1.3.1", + "prism-react-renderer": "^1.3.3", "tslib": "^2.4.0", "utility-types": "^3.10.0" }, diff --git a/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx b/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx index 48ff620fbab70..8b88da3c8cebc 100644 --- a/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx +++ b/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; import React, { useState, useEffect, @@ -17,6 +16,7 @@ import React, { type SetStateAction, type ReactNode, } from 'react'; +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; const DefaultAnimationEasing = 'ease-in-out'; diff --git a/packages/docusaurus-theme-common/src/components/Details/index.tsx b/packages/docusaurus-theme-common/src/components/Details/index.tsx index 0936ccf9db258..41c34097aa869 100644 --- a/packages/docusaurus-theme-common/src/components/Details/index.tsx +++ b/packages/docusaurus-theme-common/src/components/Details/index.tsx @@ -11,8 +11,8 @@ import React, { type ComponentProps, type ReactElement, } from 'react'; -import useIsBrowser from '@docusaurus/useIsBrowser'; import clsx from 'clsx'; +import useIsBrowser from '@docusaurus/useIsBrowser'; import {useCollapsible, Collapsible} from '../Collapsible'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-common/src/contexts/colorMode.tsx b/packages/docusaurus-theme-common/src/contexts/colorMode.tsx index a2347f1c0141f..8d0513278eb7d 100644 --- a/packages/docusaurus-theme-common/src/contexts/colorMode.tsx +++ b/packages/docusaurus-theme-common/src/contexts/colorMode.tsx @@ -14,9 +14,8 @@ import React, { useRef, type ReactNode, } from 'react'; -import {ReactContextError} from '../utils/reactUtils'; - import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; +import {ReactContextError} from '../utils/reactUtils'; import {createStorageSlot} from '../utils/storageUtils'; import {useThemeConfig} from '../utils/useThemeConfig'; diff --git a/packages/docusaurus-theme-common/src/contexts/docsPreferredVersion.tsx b/packages/docusaurus-theme-common/src/contexts/docsPreferredVersion.tsx index 0922c2c33c898..96e941143ff51 100644 --- a/packages/docusaurus-theme-common/src/contexts/docsPreferredVersion.tsx +++ b/packages/docusaurus-theme-common/src/contexts/docsPreferredVersion.tsx @@ -13,22 +13,20 @@ import React, { useCallback, type ReactNode, } from 'react'; -import { - useThemeConfig, - type DocsVersionPersistence, -} from '../utils/useThemeConfig'; -import {isDocsPluginEnabled} from '../utils/docsUtils'; -import {ReactContextError} from '../utils/reactUtils'; -import {createStorageSlot} from '../utils/storageUtils'; - import { useAllDocsData, useDocsData, type GlobalPluginData, type GlobalVersion, } from '@docusaurus/plugin-content-docs/client'; - import {DEFAULT_PLUGIN_ID} from '@docusaurus/constants'; +import { + useThemeConfig, + type DocsVersionPersistence, +} from '../utils/useThemeConfig'; +import {isDocsPluginEnabled} from '../utils/docsUtils'; +import {ReactContextError} from '../utils/reactUtils'; +import {createStorageSlot} from '../utils/storageUtils'; const storageKey = (pluginId: string) => `docs-preferred-version-${pluginId}`; diff --git a/packages/docusaurus-theme-common/src/contexts/docsSidebar.tsx b/packages/docusaurus-theme-common/src/contexts/docsSidebar.tsx index 6b0aab47622e9..43f109bf76987 100644 --- a/packages/docusaurus-theme-common/src/contexts/docsSidebar.tsx +++ b/packages/docusaurus-theme-common/src/contexts/docsSidebar.tsx @@ -6,8 +6,8 @@ */ import React, {useMemo, useContext, type ReactNode} from 'react'; -import type {PropSidebar} from '@docusaurus/plugin-content-docs'; import {ReactContextError} from '../utils/reactUtils'; +import type {PropSidebar} from '@docusaurus/plugin-content-docs'; // Using a Symbol because null is a valid context value (a doc with no sidebar) // Inspired by https://github.com/jamiebuilds/unstated-next/blob/master/src/unstated-next.tsx diff --git a/packages/docusaurus-theme-common/src/contexts/docsVersion.tsx b/packages/docusaurus-theme-common/src/contexts/docsVersion.tsx index efa8ffc147d67..4a3ad576f9171 100644 --- a/packages/docusaurus-theme-common/src/contexts/docsVersion.tsx +++ b/packages/docusaurus-theme-common/src/contexts/docsVersion.tsx @@ -6,8 +6,8 @@ */ import React, {type ReactNode, useContext} from 'react'; -import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs'; import {ReactContextError} from '../utils/reactUtils'; +import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs'; const Context = React.createContext(null); diff --git a/packages/docusaurus-theme-common/src/hooks/usePrismTheme.ts b/packages/docusaurus-theme-common/src/hooks/usePrismTheme.ts index b791d3119414c..df435eeedafd9 100644 --- a/packages/docusaurus-theme-common/src/hooks/usePrismTheme.ts +++ b/packages/docusaurus-theme-common/src/hooks/usePrismTheme.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {PrismTheme} from 'prism-react-renderer'; import {useColorMode} from '../contexts/colorMode'; import {useThemeConfig} from '../utils/useThemeConfig'; +import type {PrismTheme} from 'prism-react-renderer'; /** * Returns a color-mode-dependent Prism theme: whatever the user specified in diff --git a/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts b/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts index 36c1cdaacf0b0..10661b17f0d82 100644 --- a/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts +++ b/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import {useCallback, useEffect, useState} from 'react'; import {useHistory} from '@docusaurus/router'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import {useCallback, useEffect, useState} from 'react'; const SEARCH_PARAM_QUERY = 'q'; diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/docsUtils.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/docsUtils.test.tsx index 532fb20a0acfe..b8ac8fb9eeddb 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/docsUtils.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/docsUtils.test.tsx @@ -7,6 +7,8 @@ import React from 'react'; import {renderHook} from '@testing-library/react-hooks'; +import {StaticRouter} from 'react-router-dom'; +import {Context} from '@docusaurus/core/src/client/docusaurusContext'; import { findFirstCategoryLink, isActiveSidebarItem, @@ -17,8 +19,6 @@ import { } from '../docsUtils'; import {DocsSidebarProvider} from '../../contexts/docsSidebar'; import {DocsVersionProvider} from '../../contexts/docsVersion'; -import {StaticRouter} from 'react-router-dom'; -import {Context} from '@docusaurus/core/src/client/docusaurusContext'; import type { PropSidebar, PropSidebarItem, diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/generalUtils.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/generalUtils.test.tsx index 71c49527abada..6a2680fde148d 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/generalUtils.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/generalUtils.test.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import {useTitleFormatter} from '../generalUtils'; import {renderHook} from '@testing-library/react-hooks'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; +import {useTitleFormatter} from '../generalUtils'; import type {DocusaurusContext} from '@docusaurus/types'; describe('useTitleFormatter', () => { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/reactUtils.test.ts b/packages/docusaurus-theme-common/src/utils/__tests__/reactUtils.test.ts index 0b3e11fa1d437..3aaec1e34704e 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/reactUtils.test.ts +++ b/packages/docusaurus-theme-common/src/utils/__tests__/reactUtils.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {usePrevious} from '../reactUtils'; import {renderHook} from '@testing-library/react-hooks'; +import {usePrevious} from '../reactUtils'; describe('usePrevious', () => { it('returns the previous value of a variable', () => { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/routesUtils.test.ts b/packages/docusaurus-theme-common/src/utils/__tests__/routesUtils.test.ts index a226c13f1156a..3302107db2718 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/routesUtils.test.ts +++ b/packages/docusaurus-theme-common/src/utils/__tests__/routesUtils.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {RouteConfig} from 'react-router-config'; import {findHomePageRoute, isSamePath} from '../routesUtils'; +import type {RouteConfig} from 'react-router-config'; describe('isSamePath', () => { it('returns true for compared path without trailing slash', () => { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/tocUtils.test.ts b/packages/docusaurus-theme-common/src/utils/__tests__/tocUtils.test.ts index 0ae93d7024b65..6424f8d341a97 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/tocUtils.test.ts +++ b/packages/docusaurus-theme-common/src/utils/__tests__/tocUtils.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {TOCItem} from '@docusaurus/types'; import {renderHook} from '@testing-library/react-hooks'; import {useFilteredAndTreeifiedTOC, useTreeifiedTOC} from '../tocUtils'; +import type {TOCItem} from '@docusaurus/mdx-loader'; const mockTOC: TOCItem[] = [ { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx index 79ebd6cbca7f5..e10b938baa4ba 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import {useAlternatePageUtils} from '../useAlternatePageUtils'; import {renderHook} from '@testing-library/react-hooks'; import {StaticRouter} from 'react-router-dom'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; +import {useAlternatePageUtils} from '../useAlternatePageUtils'; import type {DocusaurusContext} from '@docusaurus/types'; describe('useAlternatePageUtils', () => { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx index 163e2f69bdb7d..f2f6e189393a6 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import {useLocalPathname} from '../useLocalPathname'; import {renderHook} from '@testing-library/react-hooks'; import {StaticRouter} from 'react-router-dom'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; +import {useLocalPathname} from '../useLocalPathname'; import type {DocusaurusContext} from '@docusaurus/types'; describe('useLocalPathname', () => { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx index 10c471d2eb1e6..f7618dbb258c2 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx @@ -7,9 +7,9 @@ import {jest} from '@jest/globals'; import React from 'react'; -import {usePluralForm} from '../usePluralForm'; import {renderHook} from '@testing-library/react-hooks'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; +import {usePluralForm} from '../usePluralForm'; import type {DocusaurusContext} from '@docusaurus/types'; describe('usePluralForm', () => { diff --git a/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts b/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts index fa091fe7a1b10..97c9056eb2970 100644 --- a/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts +++ b/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ +import type {CSSProperties} from 'react'; import rangeParser from 'parse-numeric-range'; import type {PrismTheme} from 'prism-react-renderer'; -import type {CSSProperties} from 'react'; const codeBlockTitleRegex = /title=(?["'])(?.*?)\1/; const metastringLinesRangeRegex = /\{(?<range>[\d,-]+)\}/; diff --git a/packages/docusaurus-theme-common/src/utils/docsUtils.tsx b/packages/docusaurus-theme-common/src/utils/docsUtils.tsx index 706504118b35b..fd9cfb7ab1415 100644 --- a/packages/docusaurus-theme-common/src/utils/docsUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/docsUtils.tsx @@ -6,6 +6,8 @@ */ import {useMemo} from 'react'; +import {matchPath, useLocation} from '@docusaurus/router'; +import renderRoutes from '@docusaurus/renderRoutes'; import { useAllDocsData, useActivePlugin, @@ -15,6 +17,12 @@ import { type GlobalSidebar, type GlobalDoc, } from '@docusaurus/plugin-content-docs/client'; +import type {Props as DocPageProps} from '@theme/DocPage'; +import {useDocsPreferredVersion} from '../contexts/docsPreferredVersion'; +import {useDocsVersion} from '../contexts/docsVersion'; +import {useDocsSidebar} from '../contexts/docsSidebar'; +import {uniq} from './jsUtils'; +import {isSamePath} from './routesUtils'; import type { PropSidebar, PropSidebarItem, @@ -22,14 +30,6 @@ import type { PropVersionDoc, PropSidebarBreadcrumbsItem, } from '@docusaurus/plugin-content-docs'; -import type {Props as DocPageProps} from '@theme/DocPage'; -import {useDocsPreferredVersion} from '../contexts/docsPreferredVersion'; -import {useDocsVersion} from '../contexts/docsVersion'; -import {useDocsSidebar} from '../contexts/docsSidebar'; -import {uniq} from './jsUtils'; -import {isSamePath} from './routesUtils'; -import {matchPath, useLocation} from '@docusaurus/router'; -import renderRoutes from '@docusaurus/renderRoutes'; // TODO not ideal, see also "useDocs" export const isDocsPluginEnabled: boolean = !!useAllDocsData; diff --git a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx index 9610faa2e40b2..af91c55a3a3cc 100644 --- a/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/metadataUtils.tsx @@ -6,8 +6,8 @@ */ import React, {type ReactNode} from 'react'; -import Head from '@docusaurus/Head'; import clsx from 'clsx'; +import Head from '@docusaurus/Head'; import useRouteContext from '@docusaurus/useRouteContext'; import {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; import {useTitleFormatter} from './generalUtils'; diff --git a/packages/docusaurus-theme-common/src/utils/scrollUtils.tsx b/packages/docusaurus-theme-common/src/utils/scrollUtils.tsx index 79799c37fc248..32095c3feac37 100644 --- a/packages/docusaurus-theme-common/src/utils/scrollUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/scrollUtils.tsx @@ -14,9 +14,9 @@ import React, { useRef, type ReactNode, } from 'react'; -import {useDynamicCallback, ReactContextError} from './reactUtils'; import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; import useIsBrowser from '@docusaurus/useIsBrowser'; +import {useDynamicCallback, ReactContextError} from './reactUtils'; type ScrollController = { /** A boolean ref tracking whether scroll events are enabled. */ diff --git a/packages/docusaurus-theme-common/src/utils/searchUtils.ts b/packages/docusaurus-theme-common/src/utils/searchUtils.ts index 463c69a90fa67..7f6fe91e48f03 100644 --- a/packages/docusaurus-theme-common/src/utils/searchUtils.ts +++ b/packages/docusaurus-theme-common/src/utils/searchUtils.ts @@ -9,8 +9,8 @@ import { useAllDocsData, useActivePluginAndVersion, } from '@docusaurus/plugin-content-docs/client'; -import {useDocsPreferredVersionByPluginId} from '../contexts/docsPreferredVersion'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import {useDocsPreferredVersionByPluginId} from '../contexts/docsPreferredVersion'; export const DEFAULT_SEARCH_TAG = 'default'; diff --git a/packages/docusaurus-theme-common/src/utils/useLocationChange.ts b/packages/docusaurus-theme-common/src/utils/useLocationChange.ts index dd8ec1d0249ce..515493996e268 100644 --- a/packages/docusaurus-theme-common/src/utils/useLocationChange.ts +++ b/packages/docusaurus-theme-common/src/utils/useLocationChange.ts @@ -7,8 +7,8 @@ import {useEffect} from 'react'; import {useLocation} from '@docusaurus/router'; -import type {Location} from 'history'; import {useDynamicCallback, usePrevious} from './reactUtils'; +import type {Location} from 'history'; /** * Fires an effect when the location changes (which includes hash, query, etc.). diff --git a/packages/docusaurus-theme-common/tsconfig.json b/packages/docusaurus-theme-common/tsconfig.json index 20c3d66f64116..ceffc5496b4b7 100644 --- a/packages/docusaurus-theme-common/tsconfig.json +++ b/packages/docusaurus-theme-common/tsconfig.json @@ -1,13 +1,16 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "module": "esnext", + "target": "esnext", "sourceMap": true, "declarationMap": true, "rootDir": "src", "outDir": "lib" }, - "include": ["src"] + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-theme-live-codeblock/.npmignore b/packages/docusaurus-theme-live-codeblock/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-theme-live-codeblock/.npmignore +++ b/packages/docusaurus-theme-live-codeblock/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-theme-live-codeblock/copyUntypedFiles.mjs b/packages/docusaurus-theme-live-codeblock/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-theme-live-codeblock/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json index 2e79749422412..f107b6b8b302a 100644 --- a/packages/docusaurus-theme-live-codeblock/package.json +++ b/packages/docusaurus-theme-live-codeblock/package.json @@ -11,11 +11,10 @@ "access": "public" }, "scripts": { - "build": "yarn build:server && yarn build:client && yarn build:copy && yarn build:format", - "build:server": "tsc --project tsconfig.server.json", - "build:client": "tsc --project tsconfig.client.json", - "build:copy": "node copyUntypedFiles.mjs", - "build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\"" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "repository": { "type": "git", diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx index 7ca4c62f326d9..64a6cc354517d 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx @@ -6,15 +6,16 @@ */ import React from 'react'; -import {LiveProvider, LiveEditor, LiveError, LivePreview} from 'react-live'; import clsx from 'clsx'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import {LiveProvider, LiveEditor, LiveError, LivePreview} from 'react-live'; import Translate from '@docusaurus/Translate'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import BrowserOnly from '@docusaurus/BrowserOnly'; import {usePrismTheme} from '@docusaurus/theme-common'; -import styles from './styles.module.css'; -import useIsBrowser from '@docusaurus/useIsBrowser'; import type {Props} from '@theme/Playground'; + +import styles from './styles.module.css'; import type {ThemeConfig} from '@docusaurus/theme-live-codeblock'; function Header({children}: {children: React.ReactNode}) { diff --git a/packages/docusaurus-theme-live-codeblock/tsconfig.client.json b/packages/docusaurus-theme-live-codeblock/tsconfig.client.json index 462a6376e3be0..222005186ea5e 100644 --- a/packages/docusaurus-theme-live-codeblock/tsconfig.client.json +++ b/packages/docusaurus-theme-live-codeblock/tsconfig.client.json @@ -1,8 +1,15 @@ { - "extends": "./tsconfig.json", + "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "rootDir": "src", + "outDir": "lib", "module": "esnext", - "jsx": "react-native" + "target": "esnext" }, - "include": ["src/theme/", "src/*.d.ts", "src/custom-buble.ts"] + "include": ["src/theme", "src/*.d.ts", "src/custom-buble.ts"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-theme-live-codeblock/tsconfig.json b/packages/docusaurus-theme-live-codeblock/tsconfig.json index f5902ba1089bc..c0b15f81fcc8f 100644 --- a/packages/docusaurus-theme-live-codeblock/tsconfig.json +++ b/packages/docusaurus-theme-live-codeblock/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/custom-buble.ts", "src/theme", "**/__tests__/**"] } diff --git a/packages/docusaurus-theme-live-codeblock/tsconfig.server.json b/packages/docusaurus-theme-live-codeblock/tsconfig.server.json deleted file mode 100644 index 2159e2ef8e200..0000000000000 --- a/packages/docusaurus-theme-live-codeblock/tsconfig.server.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/*.ts"], - "exclude": ["src/custom-buble.ts"] -} diff --git a/packages/docusaurus-theme-search-algolia/.npmignore b/packages/docusaurus-theme-search-algolia/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-theme-search-algolia/.npmignore +++ b/packages/docusaurus-theme-search-algolia/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-theme-search-algolia/copyUntypedFiles.mjs b/packages/docusaurus-theme-search-algolia/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus-theme-search-algolia/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index f1e3f6db96fb3..aaf040ba3c33b 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -21,11 +21,10 @@ }, "license": "MIT", "scripts": { - "build": "yarn build:server && yarn build:client && yarn build:copy && yarn build:format", - "build:server": "tsc --project tsconfig.server.json", - "build:client": "tsc --project tsconfig.client.json", - "build:copy": "node copyUntypedFiles.mjs", - "build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\"" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "dependencies": { "@docsearch/react": "^3.0.0", diff --git a/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts b/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts index 71c13896b4d38..23be336647ecf 100644 --- a/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts +++ b/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {Joi} from '@docusaurus/utils-validation'; import {validateThemeConfig, DEFAULT_CONFIG} from '../validateThemeConfig'; +import type {Joi} from '@docusaurus/utils-validation'; function testValidateThemeConfig(themeConfig: {[key: string]: unknown}) { function validate(schema: Joi.Schema, cfg: {[key: string]: unknown}) { diff --git a/packages/docusaurus-theme-search-algolia/src/index.ts b/packages/docusaurus-theme-search-algolia/src/index.ts index 46f80161652cd..dbd2a58db30c2 100644 --- a/packages/docusaurus-theme-search-algolia/src/index.ts +++ b/packages/docusaurus-theme-search-algolia/src/index.ts @@ -7,12 +7,12 @@ import path from 'path'; import fs from 'fs-extra'; +import _ from 'lodash'; +import logger from '@docusaurus/logger'; import {defaultConfig, compile} from 'eta'; import {normalizeUrl} from '@docusaurus/utils'; import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; -import logger from '@docusaurus/logger'; import openSearchTemplate from './templates/opensearch'; -import _ from 'lodash'; import type {LoadContext, Plugin} from '@docusaurus/types'; import type {ThemeConfig} from '@docusaurus/theme-search-algolia'; diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx index 6217dbf50b41a..217555ad316de 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx @@ -14,7 +14,6 @@ import Link from '@docusaurus/Link'; import Head from '@docusaurus/Head'; import {isRegexpStringMatch, useSearchPage} from '@docusaurus/theme-common'; import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react'; -import type {SearchClient} from 'algoliasearch/lite'; import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client'; import Translate, {translate} from '@docusaurus/Translate'; @@ -26,6 +25,7 @@ import type { InternalDocSearchHit, StoredDocSearchHit, } from '@docsearch/react/dist/esm/types'; +import type {SearchClient} from 'algoliasearch/lite'; import type {AutocompleteState} from '@algolia/autocomplete-core'; type DocSearchProps = Omit< diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx index 5a79ce31050fb..7be755278b12a 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx @@ -8,10 +8,10 @@ /* eslint-disable jsx-a11y/no-autofocus */ import React, {useEffect, useState, useReducer, useRef} from 'react'; +import clsx from 'clsx'; import algoliaSearch from 'algoliasearch/lite'; import algoliaSearchHelper from 'algoliasearch-helper'; -import clsx from 'clsx'; import Head from '@docusaurus/Head'; import Link from '@docusaurus/Link'; @@ -26,8 +26,9 @@ import { } from '@docusaurus/theme-common'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useAllDocsData} from '@docusaurus/plugin-content-docs/client'; -import Layout from '@theme/Layout'; import Translate, {translate} from '@docusaurus/Translate'; +import Layout from '@theme/Layout'; + import styles from './styles.module.css'; import type {ThemeConfig} from '@docusaurus/theme-search-algolia'; diff --git a/packages/docusaurus-theme-search-algolia/tsconfig.client.json b/packages/docusaurus-theme-search-algolia/tsconfig.client.json index 0ea16454ec40a..a8c1d3f7de501 100644 --- a/packages/docusaurus-theme-search-algolia/tsconfig.client.json +++ b/packages/docusaurus-theme-search-algolia/tsconfig.client.json @@ -1,8 +1,15 @@ { - "extends": "./tsconfig.json", + "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "rootDir": "src", + "outDir": "lib", "module": "esnext", - "jsx": "react-native" + "target": "esnext" }, - "include": ["src/theme/", "src/client/", "src/*.d.ts"] + "include": ["src/theme", "src/client", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-theme-search-algolia/tsconfig.json b/packages/docusaurus-theme-search-algolia/tsconfig.json index 51aec434b2578..3c8737f51c0d0 100644 --- a/packages/docusaurus-theme-search-algolia/tsconfig.json +++ b/packages/docusaurus-theme-search-algolia/tsconfig.json @@ -1,8 +1,14 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.client.json"}], "compilerOptions": { - "lib": ["DOM", "ES2019"], + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["src/client", "src/theme", "**/__tests__/**"] } diff --git a/packages/docusaurus-theme-search-algolia/tsconfig.server.json b/packages/docusaurus-theme-search-algolia/tsconfig.server.json deleted file mode 100644 index 3faf6c3e997bf..0000000000000 --- a/packages/docusaurus-theme-search-algolia/tsconfig.server.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src/*.ts", "src/templates/*.ts"] -} diff --git a/packages/docusaurus-theme-translations/.npmignore b/packages/docusaurus-theme-translations/.npmignore index 1b59b1ca638ca..7059569fc57d1 100644 --- a/packages/docusaurus-theme-translations/.npmignore +++ b/packages/docusaurus-theme-translations/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-theme-translations/locales/__tests__/locales.test.ts b/packages/docusaurus-theme-translations/locales/__tests__/locales.test.ts index 7bf0bf22a4308..3b7a611cbcd63 100644 --- a/packages/docusaurus-theme-translations/locales/__tests__/locales.test.ts +++ b/packages/docusaurus-theme-translations/locales/__tests__/locales.test.ts @@ -6,10 +6,10 @@ */ import {jest} from '@jest/globals'; -import {extractThemeCodeMessages} from '../../src/utils'; import path from 'path'; import fs from 'fs-extra'; import _ from 'lodash'; +import {extractThemeCodeMessages} from '../../src/utils'; // Seems the 5s default timeout fails sometimes jest.setTimeout(15000); diff --git a/packages/docusaurus-theme-translations/package.json b/packages/docusaurus-theme-translations/package.json index 5c27fb37c93c4..a296a446f3eb7 100644 --- a/packages/docusaurus-theme-translations/package.json +++ b/packages/docusaurus-theme-translations/package.json @@ -14,8 +14,8 @@ }, "license": "MIT", "scripts": { - "build": "tsc -p tsconfig.build.json", - "watch": "tsc -p tsconfig.build.json --watch", + "build": "tsc --build", + "watch": "tsc --build --watch", "update": "node ./update.mjs" }, "dependencies": { diff --git a/packages/docusaurus-theme-translations/src/utils.ts b/packages/docusaurus-theme-translations/src/utils.ts index beb1370817e19..da931ef454f84 100644 --- a/packages/docusaurus-theme-translations/src/utils.ts +++ b/packages/docusaurus-theme-translations/src/utils.ts @@ -25,10 +25,7 @@ async function getPackageCodePath(packageName: string) { const packageJsonPath = path.join(packagePath, 'package.json'); const {main} = await fs.readJSON(packageJsonPath); const packageSrcPath = path.join(packagePath, path.dirname(main)); - const packageLibNextPath = packageSrcPath.replace('lib', 'lib-next'); - return (await fs.pathExists(packageLibNextPath)) - ? packageLibNextPath - : packageSrcPath; + return packageSrcPath; } export async function getThemes(): Promise<{name: string; src: string[]}[]> { diff --git a/packages/docusaurus-theme-translations/tsconfig.build.json b/packages/docusaurus-theme-translations/tsconfig.build.json index aee99fc0f38ef..5370e86c56a56 100644 --- a/packages/docusaurus-theme-translations/tsconfig.build.json +++ b/packages/docusaurus-theme-translations/tsconfig.build.json @@ -1,11 +1,16 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-theme-translations/tsconfig.json b/packages/docusaurus-theme-translations/tsconfig.json index 59be626a2754c..667e74599697b 100644 --- a/packages/docusaurus-theme-translations/tsconfig.json +++ b/packages/docusaurus-theme-translations/tsconfig.json @@ -1,10 +1,11 @@ { "extends": "../../tsconfig.json", + "references": [{"path": "./tsconfig.build.json"}], "compilerOptions": { "module": "esnext", "noEmit": true, "checkJs": true, "allowJs": true }, - "include": ["update.mjs", "src"] + "include": ["update.mjs"] } diff --git a/packages/docusaurus-theme-translations/update.mjs b/packages/docusaurus-theme-translations/update.mjs index 85736bf696e4f..73fa9c6c5fe1f 100644 --- a/packages/docusaurus-theme-translations/update.mjs +++ b/packages/docusaurus-theme-translations/update.mjs @@ -7,11 +7,11 @@ // @ts-check -import logger from '@docusaurus/logger'; import path from 'path'; import {fileURLToPath} from 'url'; import fs from 'fs-extra'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; import {getThemes, extractThemeCodeMessages} from './lib/utils.js'; const LocalesDirPath = fileURLToPath(new URL('locales', import.meta.url)); diff --git a/packages/docusaurus-types/package.json b/packages/docusaurus-types/package.json index b50c2100a5af3..051f1625c8ffc 100644 --- a/packages/docusaurus-types/package.json +++ b/packages/docusaurus-types/package.json @@ -12,9 +12,6 @@ "directory": "packages/docusaurus-types" }, "license": "MIT", - "scripts": { - "test": "tsc -p ." - }, "dependencies": { "commander": "^5.1.0", "history": "^4.9.0", diff --git a/packages/docusaurus-utils-common/.npmignore b/packages/docusaurus-utils-common/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-utils-common/.npmignore +++ b/packages/docusaurus-utils-common/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-utils-common/tsconfig.json b/packages/docusaurus-utils-common/tsconfig.json index c28192960036b..f787010fcd78c 100644 --- a/packages/docusaurus-utils-common/tsconfig.json +++ b/packages/docusaurus-utils-common/tsconfig.json @@ -1,12 +1,16 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib", "noEmitHelpers": false - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-utils-validation/.npmignore b/packages/docusaurus-utils-validation/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-utils-validation/.npmignore +++ b/packages/docusaurus-utils-validation/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-utils-validation/src/validationSchemas.ts b/packages/docusaurus-utils-validation/src/validationSchemas.ts index f8e9a1c36e0c3..eea887bea2a57 100644 --- a/packages/docusaurus-utils-validation/src/validationSchemas.ts +++ b/packages/docusaurus-utils-validation/src/validationSchemas.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import Joi from './Joi'; import {isValidPathname, DEFAULT_PLUGIN_ID, type Tag} from '@docusaurus/utils'; +import Joi from './Joi'; import {JoiFrontMatter} from './JoiFrontMatter'; export const PluginIdSchema = Joi.string() diff --git a/packages/docusaurus-utils-validation/src/validationUtils.ts b/packages/docusaurus-utils-validation/src/validationUtils.ts index 33145624da4dd..5d87c1a5e8e46 100644 --- a/packages/docusaurus-utils-validation/src/validationUtils.ts +++ b/packages/docusaurus-utils-validation/src/validationUtils.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import type Joi from './Joi'; import logger from '@docusaurus/logger'; import Yaml from 'js-yaml'; import {PluginIdSchema} from './validationSchemas'; +import type Joi from './Joi'; /** Print warnings returned from Joi validation. */ export function printWarning(warning?: Joi.ValidationError): void { diff --git a/packages/docusaurus-utils-validation/tsconfig.json b/packages/docusaurus-utils-validation/tsconfig.json index aee99fc0f38ef..7807612b51a56 100644 --- a/packages/docusaurus-utils-validation/tsconfig.json +++ b/packages/docusaurus-utils-validation/tsconfig.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-utils/.npmignore b/packages/docusaurus-utils/.npmignore index f2b994d4e359b..03c9ae1e1b54f 100644 --- a/packages/docusaurus-utils/.npmignore +++ b/packages/docusaurus-utils/.npmignore @@ -1,4 +1,3 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus-utils/package.json b/packages/docusaurus-utils/package.json index cdddacda8d111..36dd648ff13d7 100644 --- a/packages/docusaurus-utils/package.json +++ b/packages/docusaurus-utils/package.json @@ -42,7 +42,7 @@ "@types/dedent": "^0.7.0", "@types/github-slugger": "^1.3.0", "@types/micromatch": "^4.0.2", - "@types/react-dom": "^18.0.3", + "@types/react-dom": "^18.0.4", "dedent": "^0.7.0" } } diff --git a/packages/docusaurus-utils/src/__tests__/emitUtils.test.ts b/packages/docusaurus-utils/src/__tests__/emitUtils.test.ts index 236d9c224dc8e..0e97013b9eceb 100644 --- a/packages/docusaurus-utils/src/__tests__/emitUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/emitUtils.test.ts @@ -6,9 +6,9 @@ */ import {jest} from '@jest/globals'; -import {readOutputHTMLFile, generate} from '../emitUtils'; import path from 'path'; import fs from 'fs-extra'; +import {readOutputHTMLFile, generate} from '../emitUtils'; describe('readOutputHTMLFile', () => { it('reads both files with trailing slash undefined', async () => { diff --git a/packages/docusaurus-utils/src/__tests__/gitUtils.test.ts b/packages/docusaurus-utils/src/__tests__/gitUtils.test.ts index 1d4519536cc46..d701b8bca347b 100644 --- a/packages/docusaurus-utils/src/__tests__/gitUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/gitUtils.test.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import {FileNotTrackedError, getFileCommitDate} from '../gitUtils'; import fs from 'fs-extra'; import path from 'path'; import {createTempRepo} from '@testing-utils/git'; +import {FileNotTrackedError, getFileCommitDate} from '../gitUtils'; /* eslint-disable no-restricted-properties */ function initializeTempRepo() { diff --git a/packages/docusaurus-utils/src/__tests__/jsUtils.test.ts b/packages/docusaurus-utils/src/__tests__/jsUtils.test.ts index 6db16ef20f318..ca7218ab02ad2 100644 --- a/packages/docusaurus-utils/src/__tests__/jsUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/jsUtils.test.ts @@ -6,6 +6,7 @@ */ import {jest} from '@jest/globals'; +import _ from 'lodash'; import { removeSuffix, removePrefix, @@ -13,7 +14,6 @@ import { findAsyncSequential, reportMessage, } from '../jsUtils'; -import _ from 'lodash'; describe('removeSuffix', () => { it("is no-op when suffix doesn't exist", () => { diff --git a/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts b/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts index 09488bc4a6c0e..2f4baa74ccd61 100644 --- a/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import dedent from 'dedent'; import { createExcerpt, parseMarkdownContentTitle, @@ -12,7 +13,6 @@ import { parseMarkdownHeadingId, writeMarkdownHeadingId, } from '../markdownUtils'; -import dedent from 'dedent'; describe('createExcerpt', () => { it('creates excerpt for text-only content', () => { diff --git a/packages/docusaurus-utils/src/__tests__/pathUtils.test.ts b/packages/docusaurus-utils/src/__tests__/pathUtils.test.ts index eaf2b61cd9067..eb6cc8d13f077 100644 --- a/packages/docusaurus-utils/src/__tests__/pathUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/pathUtils.test.ts @@ -6,6 +6,7 @@ */ import {jest} from '@jest/globals'; +import path from 'path'; import { isNameTooLong, shortName, @@ -15,7 +16,6 @@ import { toMessageRelativeFilePath, addTrailingPathSeparator, } from '../pathUtils'; -import path from 'path'; describe('isNameTooLong', () => { it('works', () => { diff --git a/packages/docusaurus-utils/src/dataFileUtils.ts b/packages/docusaurus-utils/src/dataFileUtils.ts index 34ed9befeb836..937d22b9cf2b4 100644 --- a/packages/docusaurus-utils/src/dataFileUtils.ts +++ b/packages/docusaurus-utils/src/dataFileUtils.ts @@ -6,11 +6,11 @@ */ import fs from 'fs-extra'; -import Yaml from 'js-yaml'; import path from 'path'; +import logger from '@docusaurus/logger'; +import Yaml from 'js-yaml'; import {findAsyncSequential} from './index'; import type {ContentPaths} from './markdownLinks'; -import logger from '@docusaurus/logger'; type DataFileParams = { /** Path to the potential data file, relative to `contentPaths` */ diff --git a/packages/docusaurus-utils/src/globUtils.ts b/packages/docusaurus-utils/src/globUtils.ts index 67af9051eeae9..d95fa35b54be4 100644 --- a/packages/docusaurus-utils/src/globUtils.ts +++ b/packages/docusaurus-utils/src/globUtils.ts @@ -7,8 +7,8 @@ // Globby/Micromatch are the 2 libs we use in Docusaurus consistently -import Micromatch from 'micromatch'; // Note: Micromatch is used by Globby import path from 'path'; +import Micromatch from 'micromatch'; // Note: Micromatch is used by Globby /** A re-export of the globby instance. */ export {default as Globby} from 'globby'; diff --git a/packages/docusaurus-utils/src/i18nUtils.ts b/packages/docusaurus-utils/src/i18nUtils.ts index e7e29815beb2f..a6d08cf83749e 100644 --- a/packages/docusaurus-utils/src/i18nUtils.ts +++ b/packages/docusaurus-utils/src/i18nUtils.ts @@ -7,13 +7,13 @@ import path from 'path'; import _ from 'lodash'; +import {DEFAULT_PLUGIN_ID, I18N_DIR_NAME} from './constants'; +import {normalizeUrl} from './urlUtils'; import type { TranslationFileContent, TranslationFile, I18n, } from '@docusaurus/types'; -import {DEFAULT_PLUGIN_ID, I18N_DIR_NAME} from './constants'; -import {normalizeUrl} from './urlUtils'; /** * Takes a list of translation file contents, and shallow-merges them into one. diff --git a/packages/docusaurus-utils/src/jsUtils.ts b/packages/docusaurus-utils/src/jsUtils.ts index 1e2858fe620ca..2d1f228f1eb7c 100644 --- a/packages/docusaurus-utils/src/jsUtils.ts +++ b/packages/docusaurus-utils/src/jsUtils.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {ReportingSeverity} from '@docusaurus/types'; import logger from '@docusaurus/logger'; +import type {ReportingSeverity} from '@docusaurus/types'; /** Removes a given string suffix from `str`. */ export function removeSuffix(str: string, suffix: string): string { diff --git a/packages/docusaurus-utils/src/urlUtils.ts b/packages/docusaurus-utils/src/urlUtils.ts index c6ad13d2d88e6..708d50dbfe571 100644 --- a/packages/docusaurus-utils/src/urlUtils.ts +++ b/packages/docusaurus-utils/src/urlUtils.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {removeSuffix} from './jsUtils'; import resolvePathnameUnsafe from 'resolve-pathname'; +import {removeSuffix} from './jsUtils'; /** * Much like `path.join`, but much better. Takes an array of URL segments, and diff --git a/packages/docusaurus-utils/src/webpackUtils.ts b/packages/docusaurus-utils/src/webpackUtils.ts index 4116867c9dffa..fa579e06b470b 100644 --- a/packages/docusaurus-utils/src/webpackUtils.ts +++ b/packages/docusaurus-utils/src/webpackUtils.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -import type {RuleSetRule} from 'webpack'; import path from 'path'; import {escapePath} from './pathUtils'; import { WEBPACK_URL_LOADER_LIMIT, OUTPUT_STATIC_ASSETS_DIR_NAME, } from './constants'; +import type {RuleSetRule} from 'webpack'; type AssetFolder = 'images' | 'files' | 'fonts' | 'medias'; diff --git a/packages/docusaurus-utils/tsconfig.json b/packages/docusaurus-utils/tsconfig.json index aee99fc0f38ef..7807612b51a56 100644 --- a/packages/docusaurus-utils/tsconfig.json +++ b/packages/docusaurus-utils/tsconfig.json @@ -1,11 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", "sourceMap": true, "declarationMap": true, + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus/.npmignore b/packages/docusaurus/.npmignore index ba8304029eb76..e4132af421720 100644 --- a/packages/docusaurus/.npmignore +++ b/packages/docusaurus/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/docusaurus/bin/beforeCli.mjs b/packages/docusaurus/bin/beforeCli.mjs index 0c374dba1722d..fa4cecdbc77c5 100644 --- a/packages/docusaurus/bin/beforeCli.mjs +++ b/packages/docusaurus/bin/beforeCli.mjs @@ -7,13 +7,13 @@ // @ts-check -import logger from '@docusaurus/logger'; import fs from 'fs-extra'; -import semver from 'semver'; import path from 'path'; +import {createRequire} from 'module'; +import logger from '@docusaurus/logger'; +import semver from 'semver'; import updateNotifier from 'update-notifier'; import boxen from 'boxen'; -import {createRequire} from 'module'; import {DOCUSAURUS_VERSION} from '@docusaurus/utils'; const packageJson = createRequire(import.meta.url)('../package.json'); diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index 759aad41cc98b..ec6a5cfffb882 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -8,8 +8,8 @@ // @ts-check -import logger from '@docusaurus/logger'; import fs from 'fs-extra'; +import logger from '@docusaurus/logger'; import cli from 'commander'; import {DOCUSAURUS_VERSION} from '@docusaurus/utils'; import { diff --git a/packages/docusaurus/copyUntypedFiles.mjs b/packages/docusaurus/copyUntypedFiles.mjs deleted file mode 100644 index 8b230152f1af6..0000000000000 --- a/packages/docusaurus/copyUntypedFiles.mjs +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 fs from 'fs-extra'; -import {fileURLToPath} from 'url'; - -/** - * Copy all untyped and static assets files to lib. - */ -const srcDir = fileURLToPath(new URL('src', import.meta.url)); -const libDir = fileURLToPath(new URL('lib', import.meta.url)); -await fs.copy(srcDir, libDir, { - filter(filepath) { - return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); - }, -}); diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 4019070675f01..85720169700d0 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -24,23 +24,25 @@ "docusaurus": "bin/docusaurus.mjs" }, "scripts": { - "build": "tsc -p tsconfig.server.json && tsc -p tsconfig.client.json && node copyUntypedFiles.mjs", - "watch": "node copyUntypedFiles.mjs && concurrently -n \"server,client\" --kill-others \"tsc -p tsconfig.server.json --watch\" \"tsc -p tsconfig.client.json --watch\"" + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js", + "watch": "run-p -c copy:watch build:watch", + "build:watch": "tsc --build --watch", + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "bugs": { "url": "https://github.com/facebook/docusaurus/issues" }, "dependencies": { - "@babel/core": "^7.17.10", - "@babel/generator": "^7.17.10", + "@babel/core": "^7.17.12", + "@babel/generator": "^7.17.12", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.17.10", - "@babel/preset-env": "^7.17.10", - "@babel/preset-react": "^7.16.7", - "@babel/preset-typescript": "^7.16.7", + "@babel/plugin-transform-runtime": "^7.17.12", + "@babel/preset-env": "^7.17.12", + "@babel/preset-react": "^7.17.12", + "@babel/preset-typescript": "^7.17.12", "@babel/runtime": "^7.17.9", "@babel/runtime-corejs3": "^7.17.9", - "@babel/traverse": "^7.17.10", + "@babel/traverse": "^7.17.12", "@docusaurus/cssnano-preset": "2.0.0-beta.20", "@docusaurus/logger": "2.0.0-beta.20", "@docusaurus/mdx-loader": "2.0.0-beta.20", @@ -63,8 +65,8 @@ "core-js": "^3.22.5", "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^3.4.1", - "cssnano": "^5.1.7", - "del": "^6.0.0", + "cssnano": "^5.1.8", + "del": "^6.1.0", "detect-port": "^1.3.0", "escape-html": "^1.0.3", "eta": "^1.12.3", @@ -107,7 +109,7 @@ "@docusaurus/module-type-aliases": "2.0.0-beta.20", "@docusaurus/types": "2.0.0-beta.20", "@types/detect-port": "^1.3.2", - "@types/react-dom": "^18.0.3", + "@types/react-dom": "^18.0.4", "@types/react-router-config": "^5.0.6", "@types/rtl-detect": "^1.0.0", "@types/serve-handler": "^6.1.1", diff --git a/packages/docusaurus/src/client/App.tsx b/packages/docusaurus/src/client/App.tsx index c709c2e8515f4..da3a1ef22f0ad 100644 --- a/packages/docusaurus/src/client/App.tsx +++ b/packages/docusaurus/src/client/App.tsx @@ -10,18 +10,20 @@ import '@generated/client-modules'; import routes from '@generated/routes'; import {useLocation} from '@docusaurus/router'; -import normalizeLocation from './normalizeLocation'; import renderRoutes from '@docusaurus/renderRoutes'; +import Root from '@theme/Root'; +import SiteMetadata from '@theme/SiteMetadata'; +import normalizeLocation from './normalizeLocation'; import {BrowserContextProvider} from './browserContext'; import {DocusaurusContextProvider} from './docusaurusContext'; import PendingNavigation from './PendingNavigation'; import BaseUrlIssueBanner from './BaseUrlIssueBanner'; import SiteMetadataDefaults from './SiteMetadataDefaults'; -import Root from '@theme/Root'; -import SiteMetadata from '@theme/SiteMetadata'; // TODO, quick fix for CSS insertion order +// eslint-disable-next-line import/order import ErrorBoundary from '@docusaurus/ErrorBoundary'; +// eslint-disable-next-line import/order import Error from '@theme/Error'; export default function App(): JSX.Element { diff --git a/packages/docusaurus/src/client/docusaurusContext.tsx b/packages/docusaurus/src/client/docusaurusContext.tsx index 5023b1eced705..5bed42737f373 100644 --- a/packages/docusaurus/src/client/docusaurusContext.tsx +++ b/packages/docusaurus/src/client/docusaurusContext.tsx @@ -6,13 +6,12 @@ */ import React, {type ReactNode} from 'react'; -import type {DocusaurusContext} from '@docusaurus/types'; - import siteConfig from '@generated/docusaurus.config'; import globalData from '@generated/globalData'; import i18n from '@generated/i18n'; import codeTranslations from '@generated/codeTranslations'; import siteMetadata from '@generated/site-metadata'; +import type {DocusaurusContext} from '@docusaurus/types'; // Static value on purpose: don't make it dynamic! // Using context is still useful for testability reasons. diff --git a/packages/docusaurus/src/client/exports/ComponentCreator.tsx b/packages/docusaurus/src/client/exports/ComponentCreator.tsx index 0caf13bebc398..77439b36425a9 100644 --- a/packages/docusaurus/src/client/exports/ComponentCreator.tsx +++ b/packages/docusaurus/src/client/exports/ComponentCreator.tsx @@ -7,9 +7,9 @@ import React from 'react'; import Loadable from 'react-loadable'; -import Loading from '@theme/Loading'; import routesChunkNames from '@generated/routesChunkNames'; import registry from '@generated/registry'; +import Loading from '@theme/Loading'; import flat from '../flat'; import {RouteContextProvider} from '../routeContext'; diff --git a/packages/docusaurus/src/client/exports/ErrorBoundary.tsx b/packages/docusaurus/src/client/exports/ErrorBoundary.tsx index 11880aa67f708..b8dd78fe1a78d 100644 --- a/packages/docusaurus/src/client/exports/ErrorBoundary.tsx +++ b/packages/docusaurus/src/client/exports/ErrorBoundary.tsx @@ -6,10 +6,9 @@ */ import React, {type ReactNode} from 'react'; - import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import type {Props} from '@docusaurus/ErrorBoundary'; import DefaultFallback from '@theme/Error'; +import type {Props} from '@docusaurus/ErrorBoundary'; type State = { error: Error | null; diff --git a/packages/docusaurus/src/client/exports/Link.tsx b/packages/docusaurus/src/client/exports/Link.tsx index 3628e74954391..78a3f91a6b7b1 100644 --- a/packages/docusaurus/src/client/exports/Link.tsx +++ b/packages/docusaurus/src/client/exports/Link.tsx @@ -11,15 +11,13 @@ import React, { useRef, type ComponentType, } from 'react'; - import {NavLink, Link as RRLink} from 'react-router-dom'; +import {applyTrailingSlash} from '@docusaurus/utils-common'; import useDocusaurusContext from './useDocusaurusContext'; import isInternalUrl from './isInternalUrl'; import ExecutionEnvironment from './ExecutionEnvironment'; import {useLinksCollector} from '../LinksCollector'; import {useBaseUrlUtils} from './useBaseUrl'; -import {applyTrailingSlash} from '@docusaurus/utils-common'; - import type {Props} from '@docusaurus/Link'; // TODO all this wouldn't be necessary if we used ReactRouter basename feature diff --git a/packages/docusaurus/src/client/exports/Translate.tsx b/packages/docusaurus/src/client/exports/Translate.tsx index 5cfbef7edb5c3..b886065638716 100644 --- a/packages/docusaurus/src/client/exports/Translate.tsx +++ b/packages/docusaurus/src/client/exports/Translate.tsx @@ -7,10 +7,9 @@ import React from 'react'; import {interpolate, type InterpolateValues} from '@docusaurus/Interpolate'; -import type {TranslateParam, TranslateProps} from '@docusaurus/Translate'; - // Can't read it from context, due to exposing imperative API import codeTranslations from '@generated/codeTranslations'; +import type {TranslateParam, TranslateProps} from '@docusaurus/Translate'; function getLocalizedMessage({ id, diff --git a/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx b/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx index 847fa52391f76..067fc9ea25ee8 100644 --- a/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import Head from '../Head'; import {type FilledContext, HelmetProvider} from 'react-helmet-async'; import renderer from 'react-test-renderer'; +import Head from '../Head'; describe('Head', () => { it('does exactly what Helmet does', () => { diff --git a/packages/docusaurus/src/client/exports/useRouteContext.tsx b/packages/docusaurus/src/client/exports/useRouteContext.tsx index 9ba1a1f570397..ea80925c3208d 100644 --- a/packages/docusaurus/src/client/exports/useRouteContext.tsx +++ b/packages/docusaurus/src/client/exports/useRouteContext.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {PluginRouteContext} from '@docusaurus/types'; import {Context} from '../routeContext'; +import type {PluginRouteContext} from '@docusaurus/types'; export default function useRouteContext(): PluginRouteContext { const context = React.useContext(Context); diff --git a/packages/docusaurus/src/client/serverEntry.tsx b/packages/docusaurus/src/client/serverEntry.tsx index 408bfee0e3dc0..27902e72e8729 100644 --- a/packages/docusaurus/src/client/serverEntry.tsx +++ b/packages/docusaurus/src/client/serverEntry.tsx @@ -5,26 +5,25 @@ * LICENSE file in the root directory of this source tree. */ -import * as eta from 'eta'; import React from 'react'; +import path from 'path'; +import fs from 'fs-extra'; +// eslint-disable-next-line no-restricted-imports +import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import * as eta from 'eta'; import {StaticRouter} from 'react-router-dom'; import ReactDOMServer from 'react-dom/server'; import {HelmetProvider, type FilledContext} from 'react-helmet-async'; import {getBundles, type Manifest} from 'react-loadable-ssr-addon-v5-slorber'; import Loadable from 'react-loadable'; - import {minify} from 'html-minifier-terser'; -import path from 'path'; -import fs from 'fs-extra'; import preload from './preload'; import App from './App'; import { createStatefulLinksCollector, LinksCollectorProvider, } from './LinksCollector'; -import logger from '@docusaurus/logger'; -// eslint-disable-next-line no-restricted-imports -import _ from 'lodash'; import type {Locals} from '@slorber/static-site-generator-webpack-plugin'; const getCompiledSSRTemplate = _.memoize((template: string) => diff --git a/packages/docusaurus/src/client/theme-fallback/Error/index.tsx b/packages/docusaurus/src/client/theme-fallback/Error/index.tsx index 3376d906eaee5..513348cce4d70 100644 --- a/packages/docusaurus/src/client/theme-fallback/Error/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/Error/index.tsx @@ -9,10 +9,10 @@ /* eslint-disable @docusaurus/no-untranslated-text */ import React from 'react'; -import Layout from '@theme/Layout'; +import Head from '@docusaurus/Head'; import ErrorBoundary from '@docusaurus/ErrorBoundary'; +import Layout from '@theme/Layout'; import type {Props} from '@theme/Error'; -import Head from '@docusaurus/Head'; function ErrorDisplay({error, tryAgain}: Props): JSX.Element { return ( diff --git a/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx b/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx index 78f83dcc2c05c..b7d5ea8b39ea4 100644 --- a/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx @@ -9,8 +9,8 @@ /* eslint-disable @docusaurus/no-untranslated-text */ import React from 'react'; -import Layout from '@theme/Layout'; import Head from '@docusaurus/Head'; +import Layout from '@theme/Layout'; export default function NotFound(): JSX.Element { return ( diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 555cb76bd66b1..d13d7039fec50 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -5,18 +5,17 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; -import CopyWebpackPlugin from 'copy-webpack-plugin'; import fs from 'fs-extra'; import path from 'path'; +import logger from '@docusaurus/logger'; +import {mapAsyncSequential} from '@docusaurus/utils'; +import CopyWebpackPlugin from 'copy-webpack-plugin'; import ReactLoadableSSRAddon from 'react-loadable-ssr-addon-v5-slorber'; -import type {Configuration} from 'webpack'; import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; import merge from 'webpack-merge'; import {load, loadContext, type LoadContextOptions} from '../server'; import {handleBrokenLinks} from '../server/brokenLinks'; -import type {Props} from '@docusaurus/types'; import createClientConfig from '../webpack/client'; import createServerConfig from '../webpack/server'; import { @@ -26,8 +25,9 @@ import { } from '../webpack/utils'; import CleanWebpackPlugin from '../webpack/plugins/CleanWebpackPlugin'; import {loadI18n} from '../server/i18n'; -import {mapAsyncSequential} from '@docusaurus/utils'; import type {HelmetServerState} from 'react-helmet-async'; +import type {Configuration} from 'webpack'; +import type {Props} from '@docusaurus/types'; export type BuildCLIOptions = Pick< LoadContextOptions, diff --git a/packages/docusaurus/src/commands/deploy.ts b/packages/docusaurus/src/commands/deploy.ts index 485c3940049df..e35783ddb745e 100644 --- a/packages/docusaurus/src/commands/deploy.ts +++ b/packages/docusaurus/src/commands/deploy.ts @@ -6,13 +6,13 @@ */ import fs from 'fs-extra'; -import shell from 'shelljs'; +import path from 'path'; +import os from 'os'; import logger from '@docusaurus/logger'; +import shell from 'shelljs'; import {hasSSHProtocol, buildSshUrl, buildHttpsUrl} from '@docusaurus/utils'; import {loadContext, type LoadContextOptions} from '../server'; import {build} from './build'; -import path from 'path'; -import os from 'os'; export type DeployCLIOptions = Pick< LoadContextOptions, diff --git a/packages/docusaurus/src/commands/external.ts b/packages/docusaurus/src/commands/external.ts index eb8c1b94f26bf..2a9f67ee288bb 100644 --- a/packages/docusaurus/src/commands/external.ts +++ b/packages/docusaurus/src/commands/external.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {CommanderStatic} from 'commander'; import {loadContext} from '../server'; import {initPlugins} from '../server/plugins/init'; +import type {CommanderStatic} from 'commander'; export async function externalCommand( cli: CommanderStatic, diff --git a/packages/docusaurus/src/commands/serve.ts b/packages/docusaurus/src/commands/serve.ts index 044bd04ee6849..da94dc86678df 100644 --- a/packages/docusaurus/src/commands/serve.ts +++ b/packages/docusaurus/src/commands/serve.ts @@ -6,14 +6,14 @@ */ import http from 'http'; -import serveHandler from 'serve-handler'; -import logger from '@docusaurus/logger'; import path from 'path'; -import type {LoadContextOptions} from '../server'; +import logger from '@docusaurus/logger'; +import {DEFAULT_BUILD_DIR_NAME} from '@docusaurus/utils'; +import serveHandler from 'serve-handler'; import {loadSiteConfig} from '../server/config'; import {build} from './build'; import {getHostPort, type HostPortOptions} from '../server/getHostPort'; -import {DEFAULT_BUILD_DIR_NAME} from '@docusaurus/utils'; +import type {LoadContextOptions} from '../server'; export type ServeCLIOptions = HostPortOptions & Pick<LoadContextOptions, 'config'> & { diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 8dee7788911b6..551bca65cc0e2 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import {normalizeUrl, posixPath} from '@docusaurus/utils'; +import path from 'path'; +import _ from 'lodash'; import logger from '@docusaurus/logger'; +import {normalizeUrl, posixPath} from '@docusaurus/utils'; import chokidar from 'chokidar'; import HtmlWebpackPlugin from 'html-webpack-plugin'; -import path from 'path'; -import _ from 'lodash'; 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/__tests__/__snapshots__/actions.test.ts.snap b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap index 3483ffb8a487b..2608fd7671726 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap @@ -44,8 +44,8 @@ export default function FirstLevelComponentWrapper(props) { exports[`wrap TypeScript wrap ComponentInFolder 2`] = ` "import React, {ComponentProps} from 'react'; -import type ComponentInFolderType from '@theme/ComponentInFolder'; import ComponentInFolder from '@theme-original/ComponentInFolder'; +import type ComponentInFolderType from '@theme/ComponentInFolder'; type Props = ComponentProps<typeof ComponentInFolderType>; @@ -61,8 +61,8 @@ export default function ComponentInFolderWrapper(props: Props): JSX.Element { exports[`wrap TypeScript wrap ComponentInFolder/ComponentInSubFolder 2`] = ` "import React, {ComponentProps} from 'react'; -import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; +import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; type Props = ComponentProps<typeof ComponentInSubFolderType>; @@ -78,8 +78,8 @@ export default function ComponentInSubFolderWrapper(props: Props): JSX.Element { exports[`wrap TypeScript wrap FirstLevelComponent 2`] = ` "import React, {ComponentProps} from 'react'; -import type FirstLevelComponentType from '@theme/FirstLevelComponent'; import FirstLevelComponent from '@theme-original/FirstLevelComponent'; +import type FirstLevelComponentType from '@theme/FirstLevelComponent'; type Props = ComponentProps<typeof FirstLevelComponentType>; diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap index 84e98d772af69..a686e30fae350 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap @@ -274,8 +274,8 @@ exports[`swizzle wrap ComponentInFolder JS: theme dir tree 1`] = ` exports[`swizzle wrap ComponentInFolder TS: ComponentInFolder/index.tsx 1`] = ` "import React, {ComponentProps} from 'react'; -import type ComponentInFolderType from '@theme/ComponentInFolder'; import ComponentInFolder from '@theme-original/ComponentInFolder'; +import type ComponentInFolderType from '@theme/ComponentInFolder'; type Props = ComponentProps<typeof ComponentInFolderType>; @@ -318,8 +318,8 @@ exports[`swizzle wrap ComponentInFolder/ComponentInSubFolder JS: theme dir tree exports[`swizzle wrap ComponentInFolder/ComponentInSubFolder TS: ComponentInFolder/ComponentInSubFolder/index.tsx 1`] = ` "import React, {ComponentProps} from 'react'; -import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; +import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; type Props = ComponentProps<typeof ComponentInSubFolderType>; @@ -362,8 +362,8 @@ exports[`swizzle wrap ComponentInFolder/Sibling JS: theme dir tree 1`] = ` exports[`swizzle wrap ComponentInFolder/Sibling TS: ComponentInFolder/Sibling.tsx 1`] = ` "import React, {ComponentProps} from 'react'; -import type SiblingType from '@theme/ComponentInFolder/Sibling'; import Sibling from '@theme-original/ComponentInFolder/Sibling'; +import type SiblingType from '@theme/ComponentInFolder/Sibling'; type Props = ComponentProps<typeof SiblingType>; @@ -404,8 +404,8 @@ exports[`swizzle wrap FirstLevelComponent JS: theme dir tree 1`] = ` exports[`swizzle wrap FirstLevelComponent TS: FirstLevelComponent.tsx 1`] = ` "import React, {ComponentProps} from 'react'; -import type FirstLevelComponentType from '@theme/FirstLevelComponent'; import FirstLevelComponent from '@theme-original/FirstLevelComponent'; +import type FirstLevelComponentType from '@theme/FirstLevelComponent'; type Props = ComponentProps<typeof FirstLevelComponentType>; diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts b/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts index d735210761605..d732805530850 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts +++ b/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts @@ -7,11 +7,11 @@ import path from 'path'; import fs from 'fs-extra'; -import {ThemePath, Components, createTempSiteDir} from './testUtils'; -import type {SwizzleAction} from '@docusaurus/types'; import tree from 'tree-node-cli'; -import {eject, wrap} from '../actions'; import {posixPath} from '@docusaurus/utils'; +import {eject, wrap} from '../actions'; +import {ThemePath, Components, createTempSiteDir} from './testUtils'; +import type {SwizzleAction} from '@docusaurus/types'; // Use relative paths and sort files for tests function stableCreatedFiles( diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/components.test.ts b/packages/docusaurus/src/commands/swizzle/__tests__/components.test.ts index eb0b284457086..c16a7a0d619ad 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/components.test.ts +++ b/packages/docusaurus/src/commands/swizzle/__tests__/components.test.ts @@ -7,8 +7,8 @@ import path from 'path'; import {getThemeComponents, readComponentNames} from '../components'; -import type {SwizzleConfig} from '@docusaurus/types'; import {Components} from './testUtils'; +import type {SwizzleConfig} from '@docusaurus/types'; const FixtureThemePath = path.join(__dirname, '__fixtures__/theme'); diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/config.test.ts b/packages/docusaurus/src/commands/swizzle/__tests__/config.test.ts index 7dd867a082703..cb924a626ffcc 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/config.test.ts +++ b/packages/docusaurus/src/commands/swizzle/__tests__/config.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {SwizzleConfig} from '@docusaurus/types'; import {normalizeSwizzleConfig} from '../config'; +import type {SwizzleConfig} from '@docusaurus/types'; describe('normalizeSwizzleConfig', () => { it(`validate no components config`, async () => { diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts b/packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts index 0f55edac837dd..c2317cb41c227 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts +++ b/packages/docusaurus/src/commands/swizzle/__tests__/index.test.ts @@ -8,10 +8,10 @@ import {jest} from '@jest/globals'; import path from 'path'; import fs from 'fs-extra'; -import {ThemePath, createTempSiteDir, Components} from './testUtils'; import tree from 'tree-node-cli'; -import {swizzle} from '../index'; import {escapePath, Globby, posixPath} from '@docusaurus/utils'; +import {ThemePath, createTempSiteDir, Components} from './testUtils'; +import {swizzle} from '../index'; const FixtureThemeName = 'fixture-theme-name'; diff --git a/packages/docusaurus/src/commands/swizzle/actions.ts b/packages/docusaurus/src/commands/swizzle/actions.ts index d6be9f9027310..e295f8c2bd2dc 100644 --- a/packages/docusaurus/src/commands/swizzle/actions.ts +++ b/packages/docusaurus/src/commands/swizzle/actions.ts @@ -5,14 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; import {Globby, posixPath, THEME_PATH} from '@docusaurus/utils'; +import {askSwizzleAction} from './prompts'; import type {SwizzleAction, SwizzleComponentConfig} from '@docusaurus/types'; import type {SwizzleCLIOptions} from './common'; -import {askSwizzleAction} from './prompts'; export const SwizzleActions: SwizzleAction[] = ['wrap', 'eject']; @@ -122,8 +122,8 @@ export async function wrap({ const content = typescript ? `import React, {ComponentProps} from 'react'; -import type ${componentName}Type from '@theme/${themeComponentName}'; import ${componentName} from '@theme-${importType}/${themeComponentName}'; +import type ${componentName}Type from '@theme/${themeComponentName}'; type Props = ComponentProps<typeof ${componentName}Type>; diff --git a/packages/docusaurus/src/commands/swizzle/common.ts b/packages/docusaurus/src/commands/swizzle/common.ts index 4fdf01e4f2a0a..fad472d6b1409 100644 --- a/packages/docusaurus/src/commands/swizzle/common.ts +++ b/packages/docusaurus/src/commands/swizzle/common.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import leven from 'leven'; import _ from 'lodash'; import logger from '@docusaurus/logger'; +import leven from 'leven'; import type {NormalizedPluginConfig} from '../../server/plugins/configs'; import type { InitializedPlugin, diff --git a/packages/docusaurus/src/commands/swizzle/components.ts b/packages/docusaurus/src/commands/swizzle/components.ts index f9dc0d7beb81c..9475ce33dbc97 100644 --- a/packages/docusaurus/src/commands/swizzle/components.ts +++ b/packages/docusaurus/src/commands/swizzle/components.ts @@ -5,21 +5,21 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import {posixPath} from '@docusaurus/utils'; +import {askComponentName} from './prompts'; +import {findClosestValue, findStringIgnoringCase} from './common'; +import {helpTables, themeComponentsTable} from './tables'; +import {SwizzleActions} from './actions'; import type { SwizzleAction, SwizzleActionStatus, SwizzleComponentConfig, SwizzleConfig, } from '@docusaurus/types'; -import {posixPath} from '@docusaurus/utils'; -import {askComponentName} from './prompts'; -import {findClosestValue, findStringIgnoringCase} from './common'; -import {helpTables, themeComponentsTable} from './tables'; -import {SwizzleActions} from './actions'; export type ThemeComponents = { themeName: string; diff --git a/packages/docusaurus/src/commands/swizzle/config.ts b/packages/docusaurus/src/commands/swizzle/config.ts index f62b0ad7959ec..83f0bbe751011 100644 --- a/packages/docusaurus/src/commands/swizzle/config.ts +++ b/packages/docusaurus/src/commands/swizzle/config.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ +import logger from '@docusaurus/logger'; import {Joi} from '@docusaurus/utils-validation'; -import type {SwizzleComponentConfig, SwizzleConfig} from '@docusaurus/types'; -import type {SwizzlePlugin} from './common'; import {SwizzleActions, SwizzleActionsStatuses} from './common'; import {getPluginByThemeName} from './themes'; -import logger from '@docusaurus/logger'; +import type {SwizzleComponentConfig, SwizzleConfig} from '@docusaurus/types'; +import type {SwizzlePlugin} from './common'; function getModuleSwizzleConfig( swizzlePlugin: SwizzlePlugin, diff --git a/packages/docusaurus/src/commands/swizzle/index.ts b/packages/docusaurus/src/commands/swizzle/index.ts index 0d13d7387aab9..9262e7d154f16 100644 --- a/packages/docusaurus/src/commands/swizzle/index.ts +++ b/packages/docusaurus/src/commands/swizzle/index.ts @@ -9,14 +9,14 @@ import logger from '@docusaurus/logger'; import {getThemeName, getThemePath, getThemeNames} from './themes'; import {getThemeComponents, getComponentName} from './components'; import {helpTables, themeComponentsTable} from './tables'; -import type {SwizzleAction, SwizzleComponentConfig} from '@docusaurus/types'; -import type {SwizzleCLIOptions, SwizzlePlugin} from './common'; import {normalizeOptions} from './common'; -import type {ActionResult} from './actions'; import {eject, getAction, wrap} from './actions'; import {getThemeSwizzleConfig} from './config'; import {askSwizzleDangerousComponent} from './prompts'; import {initSwizzleContext} from './context'; +import type {SwizzleAction, SwizzleComponentConfig} from '@docusaurus/types'; +import type {SwizzleCLIOptions, SwizzlePlugin} from './common'; +import type {ActionResult} from './actions'; async function listAllThemeComponents({ themeNames, diff --git a/packages/docusaurus/src/commands/swizzle/prompts.ts b/packages/docusaurus/src/commands/swizzle/prompts.ts index fb6ab4f13db98..6aa1d1e0e9f6a 100644 --- a/packages/docusaurus/src/commands/swizzle/prompts.ts +++ b/packages/docusaurus/src/commands/swizzle/prompts.ts @@ -7,9 +7,9 @@ import logger from '@docusaurus/logger'; import prompts from 'prompts'; +import {actionStatusSuffix, PartiallySafeHint} from './common'; import type {ThemeComponents} from './components'; import type {SwizzleAction, SwizzleComponentConfig} from '@docusaurus/types'; -import {actionStatusSuffix, PartiallySafeHint} from './common'; const ExitTitle = logger.yellow('[Exit]'); diff --git a/packages/docusaurus/src/commands/swizzle/tables.ts b/packages/docusaurus/src/commands/swizzle/tables.ts index 28b9b5188b420..73ccf077d865c 100644 --- a/packages/docusaurus/src/commands/swizzle/tables.ts +++ b/packages/docusaurus/src/commands/swizzle/tables.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import logger from '@docusaurus/logger'; import Table from 'cli-table3'; -import _ from 'lodash'; -import type {ThemeComponents} from './components'; import {SwizzleActions} from './actions'; -import type {SwizzleActionStatus} from '@docusaurus/types'; import {actionStatusColor, actionStatusLabel} from './common'; +import type {SwizzleActionStatus} from '@docusaurus/types'; +import type {ThemeComponents} from './components'; function tableStatusLabel(status: SwizzleActionStatus): string { return actionStatusColor(status, actionStatusLabel(status)); diff --git a/packages/docusaurus/src/commands/swizzle/themes.ts b/packages/docusaurus/src/commands/swizzle/themes.ts index 49381089dd18f..c31b0f28dd8bc 100644 --- a/packages/docusaurus/src/commands/swizzle/themes.ts +++ b/packages/docusaurus/src/commands/swizzle/themes.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import path from 'path'; -import leven from 'leven'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; +import leven from 'leven'; import {askThemeName} from './prompts'; import {findStringIgnoringCase, type SwizzlePlugin} from './common'; diff --git a/packages/docusaurus/src/commands/writeTranslations.ts b/packages/docusaurus/src/commands/writeTranslations.ts index 606c8447d6982..14ae1e64adc6b 100644 --- a/packages/docusaurus/src/commands/writeTranslations.ts +++ b/packages/docusaurus/src/commands/writeTranslations.ts @@ -5,11 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {InitializedPlugin} from '@docusaurus/types'; import path from 'path'; import {loadContext, type LoadContextOptions} from '../server'; import {initPlugins} from '../server/plugins/init'; - import { writePluginTranslations, writeCodeTranslations, @@ -22,6 +20,7 @@ import { globSourceCodeFilePaths, } from '../server/translations/translationsExtractor'; import {getCustomBabelConfigFilePath, getBabelOptions} from '../webpack/utils'; +import type {InitializedPlugin} from '@docusaurus/types'; export type WriteTranslationsCLIOptions = Pick< LoadContextOptions, diff --git a/packages/docusaurus/src/server/__tests__/siteMetadata.test.ts b/packages/docusaurus/src/server/__tests__/siteMetadata.test.ts index d33e301382be0..30a40bb7521df 100644 --- a/packages/docusaurus/src/server/__tests__/siteMetadata.test.ts +++ b/packages/docusaurus/src/server/__tests__/siteMetadata.test.ts @@ -6,8 +6,8 @@ */ import {jest} from '@jest/globals'; -import {getPluginVersion, loadSiteMetadata} from '../siteMetadata'; import path from 'path'; +import {getPluginVersion, loadSiteMetadata} from '../siteMetadata'; describe('getPluginVersion', () => { it('detects external packages plugins versions', async () => { diff --git a/packages/docusaurus/src/server/__tests__/utils.test.ts b/packages/docusaurus/src/server/__tests__/utils.test.ts index b8ef5b59faaa3..646657350522a 100644 --- a/packages/docusaurus/src/server/__tests__/utils.test.ts +++ b/packages/docusaurus/src/server/__tests__/utils.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {RouteConfig} from '@docusaurus/types'; import {getAllFinalRoutes} from '../utils'; +import type {RouteConfig} from '@docusaurus/types'; describe('getAllFinalRoutes', () => { it('gets final routes correctly', () => { diff --git a/packages/docusaurus/src/server/brokenLinks.ts b/packages/docusaurus/src/server/brokenLinks.ts index 4ce32b2deaf54..22f466772de56 100644 --- a/packages/docusaurus/src/server/brokenLinks.ts +++ b/packages/docusaurus/src/server/brokenLinks.ts @@ -5,10 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import {matchRoutes} from 'react-router-config'; import fs from 'fs-extra'; +import path from 'path'; import _ from 'lodash'; -import type {RouteConfig, ReportingSeverity} from '@docusaurus/types'; +import logger from '@docusaurus/logger'; +import combinePromises from 'combine-promises'; +import {matchRoutes} from 'react-router-config'; import { removePrefix, removeSuffix, @@ -16,9 +18,7 @@ import { resolvePathname, } from '@docusaurus/utils'; import {getAllFinalRoutes} from './utils'; -import path from 'path'; -import combinePromises from 'combine-promises'; -import logger from '@docusaurus/logger'; +import type {RouteConfig, ReportingSeverity} from '@docusaurus/types'; type BrokenLink = { link: string; diff --git a/packages/docusaurus/src/server/config.ts b/packages/docusaurus/src/server/config.ts index 84b4975f12495..13ab71215c257 100644 --- a/packages/docusaurus/src/server/config.ts +++ b/packages/docusaurus/src/server/config.ts @@ -9,8 +9,8 @@ import path from 'path'; import fs from 'fs-extra'; import importFresh from 'import-fresh'; import {DEFAULT_CONFIG_FILE_NAME} from '@docusaurus/utils'; -import type {LoadContext} from '@docusaurus/types'; import {validateConfig} from './configValidation'; +import type {LoadContext} from '@docusaurus/types'; export async function loadSiteConfig({ siteDir, diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index f8a0985903a86..d1c009ae66dd7 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -import type {DocusaurusConfig, I18nConfig} from '@docusaurus/types'; import { DEFAULT_CONFIG_FILE_NAME, DEFAULT_STATIC_DIR_NAME, } from '@docusaurus/utils'; import {Joi, URISchema, printWarning} from '@docusaurus/utils-validation'; +import type {DocusaurusConfig, I18nConfig} from '@docusaurus/types'; const DEFAULT_I18N_LOCALE = 'en'; diff --git a/packages/docusaurus/src/server/getHostPort.ts b/packages/docusaurus/src/server/getHostPort.ts index c9792a45ec653..40960bdfff9ac 100644 --- a/packages/docusaurus/src/server/getHostPort.ts +++ b/packages/docusaurus/src/server/getHostPort.ts @@ -6,8 +6,8 @@ */ import {execSync, type ExecSyncOptionsWithStringEncoding} from 'child_process'; -import detect from 'detect-port'; import logger from '@docusaurus/logger'; +import detect from 'detect-port'; import {DEFAULT_PORT} from '@docusaurus/utils'; import prompts from 'prompts'; diff --git a/packages/docusaurus/src/server/htmlTags.ts b/packages/docusaurus/src/server/htmlTags.ts index c1e67b23c191b..81cce416352ac 100644 --- a/packages/docusaurus/src/server/htmlTags.ts +++ b/packages/docusaurus/src/server/htmlTags.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +import _ from 'lodash'; import htmlTags from 'html-tags'; import voidHtmlTags from 'html-tags/void'; import escapeHTML from 'escape-html'; -import _ from 'lodash'; import type { Props, HtmlTagObject, diff --git a/packages/docusaurus/src/server/i18n.ts b/packages/docusaurus/src/server/i18n.ts index 57f639c14098c..cd9bbe4990ea5 100644 --- a/packages/docusaurus/src/server/i18n.ts +++ b/packages/docusaurus/src/server/i18n.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {getLangDir} from 'rtl-detect'; import logger from '@docusaurus/logger'; +import {getLangDir} from 'rtl-detect'; import type {I18n, DocusaurusConfig, I18nLocaleConfig} from '@docusaurus/types'; import type {LoadContextOptions} from './index'; diff --git a/packages/docusaurus/src/server/index.ts b/packages/docusaurus/src/server/index.ts index 55b2466d11c94..4417f0f7f5155 100644 --- a/packages/docusaurus/src/server/index.ts +++ b/packages/docusaurus/src/server/index.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import path from 'path'; +import _ from 'lodash'; import { generate, escapePath, @@ -13,8 +15,6 @@ import { DEFAULT_CONFIG_FILE_NAME, GENERATED_FILES_DIR_NAME, } from '@docusaurus/utils'; -import _ from 'lodash'; -import path from 'path'; import {loadSiteConfig} from './config'; import {loadClientModules} from './clientModules'; import {loadPlugins} from './plugins'; diff --git a/packages/docusaurus/src/server/plugins/__tests__/pluginIds.test.ts b/packages/docusaurus/src/server/plugins/__tests__/pluginIds.test.ts index 0c04a3fc03bdc..a6315f59a813d 100644 --- a/packages/docusaurus/src/server/plugins/__tests__/pluginIds.test.ts +++ b/packages/docusaurus/src/server/plugins/__tests__/pluginIds.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import type {InitializedPlugin} from '@docusaurus/types'; import {ensureUniquePluginInstanceIds} from '../pluginIds'; +import type {InitializedPlugin} from '@docusaurus/types'; function createTestPlugin(name: string, id?: string): InitializedPlugin { // @ts-expect-error: good enough for tests diff --git a/packages/docusaurus/src/server/plugins/index.ts b/packages/docusaurus/src/server/plugins/index.ts index 93553d18202d7..812ea7b2e80ed 100644 --- a/packages/docusaurus/src/server/plugins/index.ts +++ b/packages/docusaurus/src/server/plugins/index.ts @@ -5,8 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -import {docuHash, generate} from '@docusaurus/utils'; import path from 'path'; +import _ from 'lodash'; +import {docuHash, generate} from '@docusaurus/utils'; +import {initPlugins} from './init'; +import {createBootstrapPlugin, createMDXFallbackPlugin} from './synthetic'; +import {localizePluginTranslationFile} from '../translations/translations'; +import {applyRouteTrailingSlash, sortConfig} from './routeConfig'; import type { LoadContext, PluginContentLoadedActions, @@ -17,11 +22,6 @@ import type { InitializedPlugin, PluginRouteContext, } from '@docusaurus/types'; -import {initPlugins} from './init'; -import {createBootstrapPlugin, createMDXFallbackPlugin} from './synthetic'; -import _ from 'lodash'; -import {localizePluginTranslationFile} from '../translations/translations'; -import {applyRouteTrailingSlash, sortConfig} from './routeConfig'; /** * Initializes the plugins, runs `loadContent`, `translateContent`, diff --git a/packages/docusaurus/src/server/plugins/init.ts b/packages/docusaurus/src/server/plugins/init.ts index 4bc0aa92da425..771a407cccb5e 100644 --- a/packages/docusaurus/src/server/plugins/init.ts +++ b/packages/docusaurus/src/server/plugins/init.ts @@ -7,6 +7,14 @@ import {createRequire} from 'module'; import path from 'path'; +import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; +import { + normalizePluginOptions, + normalizeThemeConfig, +} from '@docusaurus/utils-validation'; +import {getPluginVersion} from '../siteMetadata'; +import {ensureUniquePluginInstanceIds} from './pluginIds'; +import {loadPluginConfigs, type NormalizedPluginConfig} from './configs'; import type { PluginVersionInformation, LoadContext, @@ -14,14 +22,6 @@ import type { PluginOptions, InitializedPlugin, } from '@docusaurus/types'; -import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils'; -import {getPluginVersion} from '../siteMetadata'; -import {ensureUniquePluginInstanceIds} from './pluginIds'; -import { - normalizePluginOptions, - normalizeThemeConfig, -} from '@docusaurus/utils-validation'; -import {loadPluginConfigs, type NormalizedPluginConfig} from './configs'; function getOptionValidationFunction( normalizedPluginConfig: NormalizedPluginConfig, diff --git a/packages/docusaurus/src/server/plugins/presets.ts b/packages/docusaurus/src/server/plugins/presets.ts index b45b06915b212..04b73357f38f0 100644 --- a/packages/docusaurus/src/server/plugins/presets.ts +++ b/packages/docusaurus/src/server/plugins/presets.ts @@ -7,13 +7,13 @@ import {createRequire} from 'module'; import importFresh from 'import-fresh'; +import {resolveModuleName} from './moduleShorthand'; import type { LoadContext, PluginConfig, PresetModule, DocusaurusConfig, } from '@docusaurus/types'; -import {resolveModuleName} from './moduleShorthand'; type ImportedPresetModule = PresetModule & {default?: PresetModule}; diff --git a/packages/docusaurus/src/server/plugins/routeConfig.ts b/packages/docusaurus/src/server/plugins/routeConfig.ts index e5664dd1693fa..e9b7c589408f1 100644 --- a/packages/docusaurus/src/server/plugins/routeConfig.ts +++ b/packages/docusaurus/src/server/plugins/routeConfig.ts @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -import type {RouteConfig} from '@docusaurus/types'; import { applyTrailingSlash, type ApplyTrailingSlashParams, } from '@docusaurus/utils-common'; +import type {RouteConfig} from '@docusaurus/types'; /** Recursively applies trailing slash config to all nested routes. */ export function applyRouteTrailingSlash( diff --git a/packages/docusaurus/src/server/routes.ts b/packages/docusaurus/src/server/routes.ts index 87cfedf87a825..ab97b1a7b9d78 100644 --- a/packages/docusaurus/src/server/routes.ts +++ b/packages/docusaurus/src/server/routes.ts @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import query from 'querystring'; +import _ from 'lodash'; import { docuHash, normalizeUrl, @@ -12,8 +14,6 @@ import { escapePath, reportMessage, } from '@docusaurus/utils'; -import _ from 'lodash'; -import query from 'querystring'; import {getAllFinalRoutes} from './utils'; import type { Module, diff --git a/packages/docusaurus/src/server/siteMetadata.ts b/packages/docusaurus/src/server/siteMetadata.ts index bde32ad967c3a..b442eed152927 100644 --- a/packages/docusaurus/src/server/siteMetadata.ts +++ b/packages/docusaurus/src/server/siteMetadata.ts @@ -5,15 +5,15 @@ * LICENSE file in the root directory of this source tree. */ +import fs from 'fs-extra'; +import path from 'path'; +import logger from '@docusaurus/logger'; +import {DOCUSAURUS_VERSION} from '@docusaurus/utils'; import type { LoadedPlugin, PluginVersionInformation, SiteMetadata, } from '@docusaurus/types'; -import {DOCUSAURUS_VERSION} from '@docusaurus/utils'; -import fs from 'fs-extra'; -import path from 'path'; -import logger from '@docusaurus/logger'; async function getPackageJsonVersion( packageJsonPath: string, diff --git a/packages/docusaurus/src/server/translations/__tests__/translations.test.ts b/packages/docusaurus/src/server/translations/__tests__/translations.test.ts index 89240e3ea05eb..f34318cd47074 100644 --- a/packages/docusaurus/src/server/translations/__tests__/translations.test.ts +++ b/packages/docusaurus/src/server/translations/__tests__/translations.test.ts @@ -6,6 +6,9 @@ */ import {jest} from '@jest/globals'; +import fs from 'fs-extra'; +import path from 'path'; +import tmp from 'tmp-promise'; import { writePluginTranslations, writeCodeTranslations, @@ -15,14 +18,11 @@ import { getPluginsDefaultCodeTranslationMessages, applyDefaultCodeTranslations, } from '../translations'; -import fs from 'fs-extra'; -import tmp from 'tmp-promise'; import type { InitializedPlugin, TranslationFile, TranslationFileContent, } from '@docusaurus/types'; -import path from 'path'; async function createTmpSiteDir() { const {path: siteDirPath} = await tmp.dir({ diff --git a/packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts b/packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts index 5b80021d70432..e06bc5f57d1fd 100644 --- a/packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts +++ b/packages/docusaurus/src/server/translations/__tests__/translationsExtractor.test.ts @@ -6,16 +6,16 @@ */ import {jest} from '@jest/globals'; +import path from 'path'; import fs from 'fs-extra'; import tmp from 'tmp-promise'; +import {SRC_DIR_NAME} from '@docusaurus/utils'; import { extractSourceCodeFileTranslations, extractSiteSourceCodeTranslations, } from '../translationsExtractor'; import {getBabelOptions} from '../../../webpack/utils'; -import path from 'path'; import type {InitializedPlugin} from '@docusaurus/types'; -import {SRC_DIR_NAME} from '@docusaurus/utils'; const TestBabelOptions = getBabelOptions({ isServer: true, diff --git a/packages/docusaurus/src/server/translations/translations.ts b/packages/docusaurus/src/server/translations/translations.ts index 3e768b8a9041f..fcbe5f5e11846 100644 --- a/packages/docusaurus/src/server/translations/translations.ts +++ b/packages/docusaurus/src/server/translations/translations.ts @@ -8,6 +8,7 @@ import path from 'path'; import fs from 'fs-extra'; import _ from 'lodash'; +import logger from '@docusaurus/logger'; import { getPluginI18nPath, toMessageRelativeFilePath, @@ -15,7 +16,6 @@ import { CODE_TRANSLATIONS_FILE_NAME, } from '@docusaurus/utils'; import {Joi} from '@docusaurus/utils-validation'; -import logger from '@docusaurus/logger'; import type { TranslationFileContent, TranslationFile, diff --git a/packages/docusaurus/src/server/translations/translationsExtractor.ts b/packages/docusaurus/src/server/translations/translationsExtractor.ts index 73a1a0cbfe7c0..569c3314b1128 100644 --- a/packages/docusaurus/src/server/translations/translationsExtractor.ts +++ b/packages/docusaurus/src/server/translations/translationsExtractor.ts @@ -5,23 +5,23 @@ * LICENSE file in the root directory of this source tree. */ +import nodePath from 'path'; import fs from 'fs-extra'; +import logger from '@docusaurus/logger'; import traverse, {type Node} from '@babel/traverse'; import generate from '@babel/generator'; -import logger from '@docusaurus/logger'; import { parse, type types as t, type NodePath, type TransformOptions, } from '@babel/core'; +import {SRC_DIR_NAME} from '@docusaurus/utils'; +import {safeGlobby} from '../utils'; import type { InitializedPlugin, TranslationFileContent, } from '@docusaurus/types'; -import nodePath from 'path'; -import {SRC_DIR_NAME} from '@docusaurus/utils'; -import {safeGlobby} from '../utils'; // We only support extracting source code translations from these kind of files const TranslatableSourceCodeExtension = new Set([ diff --git a/packages/docusaurus/src/server/utils.ts b/packages/docusaurus/src/server/utils.ts index e4e22df7d9daf..e0e67454c7ea5 100644 --- a/packages/docusaurus/src/server/utils.ts +++ b/packages/docusaurus/src/server/utils.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import type {RouteConfig} from '@docusaurus/types'; import path from 'path'; import {posixPath, Globby} from '@docusaurus/utils'; +import type {RouteConfig} from '@docusaurus/types'; // Recursively get the final routes (routes with no subroutes) export function getAllFinalRoutes(routeConfig: RouteConfig[]): RouteConfig[] { diff --git a/packages/docusaurus/src/webpack/__tests__/base.test.ts b/packages/docusaurus/src/webpack/__tests__/base.test.ts index 93b1de8c19d83..3e39adfda4355 100644 --- a/packages/docusaurus/src/webpack/__tests__/base.test.ts +++ b/packages/docusaurus/src/webpack/__tests__/base.test.ts @@ -7,11 +7,10 @@ import {jest} from '@jest/globals'; import path from 'path'; - -import {excludeJS, clientDir, createBaseConfig} from '../base'; +import _ from 'lodash'; import * as utils from '@docusaurus/utils/lib/webpackUtils'; import {posixPath} from '@docusaurus/utils'; -import _ from 'lodash'; +import {excludeJS, clientDir, createBaseConfig} from '../base'; import type {Props} from '@docusaurus/types'; describe('babel transpilation exclude logic', () => { diff --git a/packages/docusaurus/src/webpack/__tests__/utils.test.ts b/packages/docusaurus/src/webpack/__tests__/utils.test.ts index 664679e3f6895..411ed9180469e 100644 --- a/packages/docusaurus/src/webpack/__tests__/utils.test.ts +++ b/packages/docusaurus/src/webpack/__tests__/utils.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import webpack, {type Configuration, type RuleSetRule} from 'webpack'; import path from 'path'; +import webpack, {type Configuration, type RuleSetRule} from 'webpack'; import { getCustomizableJSLoader, diff --git a/packages/docusaurus/src/webpack/aliases/index.ts b/packages/docusaurus/src/webpack/aliases/index.ts index b48184b8ab8b3..dbade3a77e368 100644 --- a/packages/docusaurus/src/webpack/aliases/index.ts +++ b/packages/docusaurus/src/webpack/aliases/index.ts @@ -7,6 +7,7 @@ import fs from 'fs-extra'; import path from 'path'; +import _ from 'lodash'; import { THEME_PATH, fileToPath, @@ -14,7 +15,6 @@ import { normalizeUrl, Globby, } from '@docusaurus/utils'; -import _ from 'lodash'; import type {LoadedPlugin} from '@docusaurus/types'; /** diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 45a81c1031a45..4e00fecefaf1f 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -6,10 +6,9 @@ */ import fs from 'fs-extra'; -import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import path from 'path'; -import type {Configuration} from 'webpack'; -import type {Props} from '@docusaurus/types'; +import MiniCssExtractPlugin from 'mini-css-extract-plugin'; +import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; import { getCustomizableJSLoader, getStyleLoaders, @@ -17,7 +16,8 @@ import { getMinimizer, } from './utils'; import {loadThemeAliases, loadDocusaurusAliases} from './aliases'; -import {md5Hash, getFileLoaderUtils} from '@docusaurus/utils'; +import type {Configuration} from 'webpack'; +import type {Props} from '@docusaurus/types'; const CSS_REGEX = /\.css$/i; const CSS_MODULE_REGEX = /\.module\.css$/i; diff --git a/packages/docusaurus/src/webpack/client.ts b/packages/docusaurus/src/webpack/client.ts index f7ca7de770b25..cd2d59720a324 100644 --- a/packages/docusaurus/src/webpack/client.ts +++ b/packages/docusaurus/src/webpack/client.ts @@ -5,15 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import path from 'path'; -import type {Configuration} from 'webpack'; +import logger from '@docusaurus/logger'; import merge from 'webpack-merge'; - -import type {Props} from '@docusaurus/types'; import {createBaseConfig} from './base'; import ChunkAssetPlugin from './plugins/ChunkAssetPlugin'; import LogPlugin from './plugins/LogPlugin'; +import type {Props} from '@docusaurus/types'; +import type {Configuration} from 'webpack'; export default async function createClientConfig( props: Props, diff --git a/packages/docusaurus/src/webpack/plugins/CleanWebpackPlugin.ts b/packages/docusaurus/src/webpack/plugins/CleanWebpackPlugin.ts index 46b4ca424fde2..5a8f4770102a2 100644 --- a/packages/docusaurus/src/webpack/plugins/CleanWebpackPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/CleanWebpackPlugin.ts @@ -29,9 +29,9 @@ // Modified to optimize performance for Docusaurus specific use case // More context: https://github.com/facebook/docusaurus/pull/1839 -import type {Compiler, Stats} from 'webpack'; import path from 'path'; import {sync as delSync} from 'del'; +import type {Compiler, Stats} from 'webpack'; export type Options = { /** diff --git a/packages/docusaurus/src/webpack/plugins/LogPlugin.ts b/packages/docusaurus/src/webpack/plugins/LogPlugin.ts index e8e79b0080576..a1703d2bcac6d 100644 --- a/packages/docusaurus/src/webpack/plugins/LogPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/LogPlugin.ts @@ -6,8 +6,8 @@ */ import WebpackBar from 'webpackbar'; -import type {Compiler} from 'webpack'; import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; +import type {Compiler} from 'webpack'; function showError(arr: string[]) { console.log(`\n\n${arr.join('\n')}`); diff --git a/packages/docusaurus/src/webpack/server.ts b/packages/docusaurus/src/webpack/server.ts index c0aab9ed99d9f..7f93c86a4bb97 100644 --- a/packages/docusaurus/src/webpack/server.ts +++ b/packages/docusaurus/src/webpack/server.ts @@ -6,24 +6,22 @@ */ import path from 'path'; -import type {Configuration} from 'webpack'; import merge from 'webpack-merge'; - -import type {Props} from '@docusaurus/types'; -import {createBaseConfig} from './base'; -import WaitPlugin from './plugins/WaitPlugin'; -import LogPlugin from './plugins/LogPlugin'; import { NODE_MAJOR_VERSION, NODE_MINOR_VERSION, DOCUSAURUS_VERSION, } from '@docusaurus/utils'; -import ssrDefaultTemplate from './templates/ssr.html.template'; - // Forked for Docusaurus: https://github.com/slorber/static-site-generator-webpack-plugin import StaticSiteGeneratorPlugin, { type Locals, } from '@slorber/static-site-generator-webpack-plugin'; +import {createBaseConfig} from './base'; +import WaitPlugin from './plugins/WaitPlugin'; +import LogPlugin from './plugins/LogPlugin'; +import ssrDefaultTemplate from './templates/ssr.html.template'; +import type {Props} from '@docusaurus/types'; +import type {Configuration} from 'webpack'; export default async function createServerConfig({ props, diff --git a/packages/docusaurus/src/webpack/utils.ts b/packages/docusaurus/src/webpack/utils.ts index 8f32ddc277030..79362887679ee 100644 --- a/packages/docusaurus/src/webpack/utils.ts +++ b/packages/docusaurus/src/webpack/utils.ts @@ -5,6 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import fs from 'fs-extra'; +import path from 'path'; +import crypto from 'crypto'; +import logger from '@docusaurus/logger'; +import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { mergeWithCustomize, @@ -16,20 +21,15 @@ import webpack, { type RuleSetRule, type WebpackPluginInstance, } from 'webpack'; -import fs from 'fs-extra'; import TerserPlugin from 'terser-webpack-plugin'; -import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; -import path from 'path'; -import crypto from 'crypto'; -import logger from '@docusaurus/logger'; +import type {CustomOptions, CssNanoOptions} from 'css-minimizer-webpack-plugin'; import type {TransformOptions} from '@babel/core'; import type { Plugin, PostCssOptions, ConfigureWebpackUtils, } from '@docusaurus/types'; -import {BABEL_CONFIG_FILE_NAME} from '@docusaurus/utils'; // Utility method to get style loaders export function getStyleLoaders( diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index 66613cf7c22d2..2741f3ca38909 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -1,13 +1,15 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, "incremental": true, - "lib": ["DOM", "ES2019"], + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", "module": "esnext", - "tsBuildInfoFile": "./lib/client/.tsbuildinfo", - "rootDir": "src/client", - "outDir": "lib/client", - "jsx": "react-native" + "target": "esnext", + "rootDir": "src", + "outDir": "lib" }, - "include": ["src/client", "src/deps.d.ts"] + "include": ["src/client", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus/tsconfig.json b/packages/docusaurus/tsconfig.json index e467cc1955924..cf74f4e2b7a6f 100644 --- a/packages/docusaurus/tsconfig.json +++ b/packages/docusaurus/tsconfig.json @@ -1,10 +1,16 @@ -// For editor typechecking; includes bin { - "extends": "./tsconfig.server.json", + "extends": "../../tsconfig.json", + "references": [ + {"path": "./tsconfig.server.json"}, + {"path": "./tsconfig.client.json"} + ], "compilerOptions": { "noEmit": true, + "allowJs": true, + "checkJs": true, "rootDir": ".", "module": "esnext" }, - "include": ["src", "bin"] + "include": ["bin"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus/tsconfig.server.json b/packages/docusaurus/tsconfig.server.json index cabe532baa267..f800ce6a5fe55 100644 --- a/packages/docusaurus/tsconfig.server.json +++ b/packages/docusaurus/tsconfig.server.json @@ -1,12 +1,14 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, + "composite": true, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", - "outDir": "lib", - "allowJs": true + "outDir": "lib" }, "include": ["src"], - "exclude": ["**/__tests__/**/*", "src/client"] + "exclude": ["src/client", "**/__tests__/**"] } diff --git a/packages/eslint-plugin/.npmignore b/packages/eslint-plugin/.npmignore index 5f1c98c31f641..733c0b46e93a2 100644 --- a/packages/eslint-plugin/.npmignore +++ b/packages/eslint-plugin/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index e7b1e4b58cfb8..5d7aed9712b1a 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -21,11 +21,11 @@ "build": "tsc" }, "dependencies": { - "@typescript-eslint/utils": "^5.23.0", + "@typescript-eslint/utils": "^5.24.0", "tslib": "^2.4.0" }, "devDependencies": { - "eslint-plugin-eslint-plugin": "^4.1.0" + "eslint-plugin-eslint-plugin": "^4.2.0" }, "peerDependencies": { "eslint": ">=6" diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/lqip-loader/.npmignore b/packages/lqip-loader/.npmignore index ba8304029eb76..e4132af421720 100644 --- a/packages/lqip-loader/.npmignore +++ b/packages/lqip-loader/.npmignore @@ -1,5 +1,4 @@ -copyUntypedFiles.mjs -.tsbuildinfo +.tsbuildinfo* tsconfig* __tests__ diff --git a/packages/lqip-loader/src/lqip.ts b/packages/lqip-loader/src/lqip.ts index b6286872b44db..c26956f19e9c5 100644 --- a/packages/lqip-loader/src/lqip.ts +++ b/packages/lqip-loader/src/lqip.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import logger from '@docusaurus/logger'; import path from 'path'; +import logger from '@docusaurus/logger'; import sharp from 'sharp'; // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/packages/lqip-loader/tsconfig.json b/packages/lqip-loader/tsconfig.json index f5902ba1089bc..80e43e9813efd 100644 --- a/packages/lqip-loader/tsconfig.json +++ b/packages/lqip-loader/tsconfig.json @@ -1,9 +1,13 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "noEmit": false, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", "rootDir": "src", "outDir": "lib" - } + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] } diff --git a/packages/stylelint-copyright/index.js b/packages/stylelint-copyright/index.js deleted file mode 100644 index fdf2ab794ba9f..0000000000000 --- a/packages/stylelint-copyright/index.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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. - */ - -const stylelint = require('stylelint'); - -const ruleName = 'docusaurus/copyright-header'; -const messages = stylelint.utils.ruleMessages(ruleName, { - rejected: 'Missing copyright in the header comment', -}); - -const plugin = stylelint.createPlugin( - ruleName, - (primaryOption, secondaryOption, context) => (root, result) => { - stylelint.utils.validateOptions( - result, - ruleName, - { - actual: primaryOption, - possible: [true, false], - }, - { - actual: secondaryOption, - possible: (v) => typeof v.header === 'string', - }, - ); - - if ( - root.first && - root.first.type === 'comment' && - root.first.source.start.column === 1 - ) { - const {text} = root.first; - if (text === secondaryOption.header) { - return; - } - } - if (context.fix) { - root.first?.before(`/*${secondaryOption.header}\n */`); - return; - } - - stylelint.utils.report({ - message: messages.rejected, - node: root, - result, - ruleName, - }); - }, -); - -module.exports = plugin; -module.exports.ruleName = ruleName; -module.exports.messages = messages; diff --git a/packages/stylelint-copyright/package.json b/packages/stylelint-copyright/package.json index c1e0c0a11af91..1afb9807cdd6c 100644 --- a/packages/stylelint-copyright/package.json +++ b/packages/stylelint-copyright/package.json @@ -2,14 +2,19 @@ "name": "stylelint-copyright", "version": "2.0.0-beta.20", "description": "Stylelint plugin to check CSS files for a copyright header.", - "main": "index.js", + "main": "lib/index.js", "license": "MIT", + "scripts": { + "build": "tsc", + "watch": "tsc --watch" + }, "repository": { "type": "git", "url": "https://github.com/facebook/docusaurus.git", "directory": "packages/stylelint-copyright" }, "dependencies": { - "stylelint": "^14.8.2" + "stylelint": "^14.8.2", + "tslib": "^2.4.0" } } diff --git a/packages/stylelint-copyright/__tests__/index.test.js b/packages/stylelint-copyright/src/__tests__/index.test.ts similarity index 81% rename from packages/stylelint-copyright/__tests__/index.test.js rename to packages/stylelint-copyright/src/__tests__/index.test.ts index 20de7dbae8f2e..f48b0499c67e6 100644 --- a/packages/stylelint-copyright/__tests__/index.test.js +++ b/packages/stylelint-copyright/src/__tests__/index.test.ts @@ -6,13 +6,21 @@ */ /* eslint-disable jest/no-conditional-expect */ -const stylelint = require('stylelint'); -const path = require('path'); -const rule = require('..'); +import path from 'path'; +import stylelint, {type LinterResult} from 'stylelint'; +import rule from '../index'; -const {ruleName, messages} = rule; +const {ruleName} = rule; -function getOutputCss(output) { +declare global { + namespace jest { + interface Matchers<R> { + toHaveMessage: () => R; + } + } +} + +function getOutputCss(output: LinterResult) { // eslint-disable-next-line no-underscore-dangle const result = output.results[0]._postcssResult; return result.root.toString(result.opts.syntax); @@ -97,6 +105,8 @@ function testStylelintRule(config, tests) { } return { + message: () => + 'Expected "reject" test case to not have a "message" property', pass: true, }; }, @@ -106,7 +116,7 @@ function testStylelintRule(config, tests) { testStylelintRule( { - plugins: [path.join(__dirname, '..')], + plugins: [path.join(__dirname, '../../lib/index.js')], rules: { [ruleName]: [true, {header: '*\n * Copyright'}], }, @@ -143,7 +153,8 @@ testStylelintRule( * Copyright */ .foo {}`, - message: messages.rejected, + message: + 'Missing copyright in the header comment (docusaurus/copyright-header)', line: 1, column: 1, }, @@ -154,7 +165,8 @@ testStylelintRule( * Copyright */ .foo {}`, - message: messages.rejected, + message: + 'Missing copyright in the header comment (docusaurus/copyright-header)', line: 1, column: 1, }, @@ -173,7 +185,8 @@ testStylelintRule( */ .foo {}`, - message: messages.rejected, + message: + 'Missing copyright in the header comment (docusaurus/copyright-header)', line: 1, column: 1, }, @@ -192,7 +205,8 @@ testStylelintRule( */ .foo {}`, - message: messages.rejected, + message: + 'Missing copyright in the header comment (docusaurus/copyright-header)', line: 1, column: 1, }, @@ -217,7 +231,8 @@ testStylelintRule( * Copyright */ .foo {}`, - message: messages.rejected, + message: + 'Missing copyright in the header comment (docusaurus/copyright-header)', line: 1, column: 1, }, diff --git a/packages/stylelint-copyright/src/index.ts b/packages/stylelint-copyright/src/index.ts new file mode 100644 index 0000000000000..a620d184d0a0c --- /dev/null +++ b/packages/stylelint-copyright/src/index.ts @@ -0,0 +1,58 @@ +/** + * 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 stylelint from 'stylelint'; + +const ruleName = 'docusaurus/copyright-header'; +const messages = stylelint.utils.ruleMessages(ruleName, { + rejected: 'Missing copyright in the header comment', +}); + +type SecondaryOption = {header?: string}; + +const plugin = stylelint.createPlugin( + ruleName, + (primaryOption: boolean, secondaryOption: SecondaryOption, context) => + (root, result) => { + stylelint.utils.validateOptions( + result, + ruleName, + { + actual: primaryOption, + possible: [true, false], + }, + { + actual: secondaryOption, + possible: (v) => typeof (v as SecondaryOption)?.header === 'string', + }, + ); + + if ( + root.first && + root.first.type === 'comment' && + root.first.source?.start?.column === 1 + ) { + const {text} = root.first; + if (text === secondaryOption.header) { + return; + } + } + if (context.fix) { + root.first?.before(`/*${secondaryOption.header}\n */`); + return; + } + + stylelint.utils.report({ + message: messages.rejected, + node: root, + result, + ruleName, + }); + }, +); + +export = plugin; diff --git a/packages/stylelint-copyright/tsconfig.json b/packages/stylelint-copyright/tsconfig.json new file mode 100644 index 0000000000000..80e43e9813efd --- /dev/null +++ b/packages/stylelint-copyright/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "module": "commonjs", + "rootDir": "src", + "outDir": "lib" + }, + "include": ["src"], + "exclude": ["**/__tests__/**"] +} diff --git a/tsconfig.json b/tsconfig.json index cb10e8a5ccbc6..9b4ff3711eb33 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,13 +2,17 @@ "compilerOptions": { /* Emit */ "target": "ES2020", - "module": "commonjs", - "lib": ["ESNext", "DOM"], + "lib": ["ESNext"], "declaration": true, + // These two options will be selectively overridden in each project. + // Utility libraries will have source maps on, but plugins will not. "declarationMap": false, - "jsx": "react", + "sourceMap": false, + "jsx": "react-native", "importHelpers": true, "noEmitHelpers": true, + // Avoid accidentally using this config to build + "noEmit": true, /* Strict Type-Checking Options */ "allowUnreachableCode": false, @@ -44,5 +48,5 @@ "isolatedModules": true, "skipLibCheck": true // @types/webpack and webpack/types.d.ts are not the same thing }, - "exclude": ["node_modules", "**/__tests__/**/*", "**/lib/**/*"] + "exclude": ["node_modules", "**/lib/**/*"] } diff --git a/website/_dogfooding/_pages tests/error-boundary-tests.tsx b/website/_dogfooding/_pages tests/error-boundary-tests.tsx index a669c7f2afb36..100c7e6c0d2fd 100644 --- a/website/_dogfooding/_pages tests/error-boundary-tests.tsx +++ b/website/_dogfooding/_pages tests/error-boundary-tests.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import Layout from '@theme/Layout'; import Interpolate from '@docusaurus/Interpolate'; +import Layout from '@theme/Layout'; import ErrorBoundaryTestButton from '@site/src/components/ErrorBoundaryTestButton'; diff --git a/website/_dogfooding/_pages tests/link-tests.tsx b/website/_dogfooding/_pages tests/link-tests.tsx index d0afa2ef4f0a1..d1c7c448079c8 100644 --- a/website/_dogfooding/_pages tests/link-tests.tsx +++ b/website/_dogfooding/_pages tests/link-tests.tsx @@ -6,8 +6,8 @@ */ import React, {useRef} from 'react'; -import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; +import Layout from '@theme/Layout'; export default function LinkTest(): JSX.Element { const anchorRef = useRef<HTMLAnchorElement>(null); diff --git a/website/_dogfooding/testSwizzleThemeClassic.mjs b/website/_dogfooding/testSwizzleThemeClassic.mjs index b8b4a4cb1a762..ab75a7d1dafbb 100644 --- a/website/_dogfooding/testSwizzleThemeClassic.mjs +++ b/website/_dogfooding/testSwizzleThemeClassic.mjs @@ -31,7 +31,7 @@ const classicThemePathBase = path.join( const themePath = swizzleConfig ? path.join(classicThemePathBase, 'src/theme') - : path.join(classicThemePathBase, 'lib-next/theme'); + : path.join(classicThemePathBase, 'lib/theme'); const toPath = path.join(dirname, '_swizzle_theme_tests'); diff --git a/website/community/4-canary/Versions.tsx b/website/community/4-canary/Versions.tsx index 10e1fdd1ec25d..a36907b10cf43 100644 --- a/website/community/4-canary/Versions.tsx +++ b/website/community/4-canary/Versions.tsx @@ -8,8 +8,8 @@ import React, {useContext, useEffect, useState, type ReactNode} from 'react'; import {useDocsPreferredVersion} from '@docusaurus/theme-common'; import {useVersions} from '@docusaurus/plugin-content-docs/client'; -import CodeBlock from '@theme/CodeBlock'; import Translate from '@docusaurus/Translate'; +import CodeBlock from '@theme/CodeBlock'; type ContextValue = { name: string; diff --git a/website/docs/deployment.mdx b/website/docs/deployment.mdx index 9674693bce284..23ea588caf498 100644 --- a/website/docs/deployment.mdx +++ b/website/docs/deployment.mdx @@ -778,3 +778,7 @@ See [docs](https://docs.quantcdn.io/docs/cli/continuous-integration) and [blog]( ## Deploying to Cloudflare Pages {#deploying-to-cloudflare-pages} [Cloudflare Pages](https://pages.cloudflare.com/) is a Jamstack platform for frontend developers to collaborate and deploy websites. Get started within a few minutes by following [this article](https://dev.to/apidev234/deploying-docusaurus-to-cloudflare-pages-565g). + +## Deploying to Azure Static Web Apps {#deploying-to-azure-static-web-apps} + +[Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/overview) is a service that automatically builds and deploys full-stack web apps to Azure directly from the code repository, simplifying the developer experience for CI/CD. Static Web Apps separates the web application's static assets from its dynamic (API) endpoints. Static assets are served from globally-distributed content servers, making it faster for clients to retrieve files using servers nearby. Dynamic APIs are scaled with serverless architectures, using an event-driven functions-based approach that is more cost-effective and scales on demand. Get started in a few minutes by following [this step-by-step guide](https://dev.to/azure/11-share-content-with-docusaurus-azure-static-web-apps-30hc). diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 4c373b359cd16..27e3b73c556c7 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -7,14 +7,14 @@ // @ts-check const path = require('path'); -const versions = require('./versions.json'); const math = require('remark-math'); +const npm2yarn = require('@docusaurus/remark-plugin-npm2yarn'); +const versions = require('./versions.json'); const VersionsArchived = require('./versionsArchived.json'); const { dogfoodingPluginInstances, dogfoodingThemeInstances, } = require('./_dogfooding/dogfooding.config'); -const npm2yarn = require('@docusaurus/remark-plugin-npm2yarn'); const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice( 0, @@ -375,11 +375,7 @@ const config = { content: `⭐️ If you like Docusaurus, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/facebook/docusaurus">GitHub</a> and follow us on <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/docusaurus">Twitter ${TwitterSvg}</a>`, }, prism: { - // We need to load markdown again so that YAML is loaded before MD - // and the YAML front matter is highlighted correctly. - // TODO after we have forked prism-react-renderer, we should tweak the - // import order and fix it there - additionalLanguages: ['java', 'markdown', 'latex'], + additionalLanguages: ['java', 'latex'], magicComments: [ { className: 'theme-code-block-highlighted-line', diff --git a/website/package.json b/website/package.json index ee7a44bc87d4c..416bc81e47b1f 100644 --- a/website/package.json +++ b/website/package.json @@ -30,8 +30,7 @@ "netlify:crowdin:downloadTranslationsFailSafe": "yarn netlify:crowdin:wait && (yarn --cwd .. crowdin:download:website || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)')", "netlify:crowdin:uploadSources": "yarn --cwd .. crowdin:upload:website", "netlify:test": "yarn netlify:build:deployPreview && npx --package netlify-cli netlify dev -- --debug", - "typecheck": "tsc", - "watch": "tsc --watch" + "typecheck": "tsc" }, "dependencies": { "@crowdin/cli": "^3.7.8", @@ -49,7 +48,7 @@ "@docusaurus/utils": "2.0.0-beta.20", "@docusaurus/utils-common": "2.0.0-beta.20", "@popperjs/core": "^2.11.5", - "@swc/core": "^1.2.181", + "@swc/core": "^1.2.185", "clsx": "^1.1.1", "color": "^4.2.3", "fs-extra": "^10.1.0", @@ -58,11 +57,11 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-lite-youtube-embed": "^2.2.2", - "react-medium-image-zoom": "^4.3.7", + "react-medium-image-zoom": "^4.4.0", "react-popper": "^2.3.0", "rehype-katex": "^6.0.2", "remark-math": "^3.0.1", - "swc-loader": "^0.2.0", + "swc-loader": "^0.2.1", "unist-util-visit": "^2.0.3", "workbox-routing": "^6.5.3", "workbox-strategies": "^6.5.3" @@ -82,7 +81,7 @@ "devDependencies": { "@docusaurus/eslint-plugin": "2.0.0-beta.20", "@tsconfig/docusaurus": "^1.0.5", - "@types/jest": "^27.5.0", + "@types/jest": "^27.5.1", "cross-env": "^7.0.3", "rimraf": "^3.0.2" } diff --git a/website/src/components/ColorGenerator/index.tsx b/website/src/components/ColorGenerator/index.tsx index 0ce0d508e358a..2fba54627f996 100644 --- a/website/src/components/ColorGenerator/index.tsx +++ b/website/src/components/ColorGenerator/index.tsx @@ -8,12 +8,11 @@ import React, {useEffect, useState} from 'react'; import clsx from 'clsx'; import Color from 'color'; -import CodeBlock from '@theme/CodeBlock'; -import Admonition from '@theme/Admonition'; import Link from '@docusaurus/Link'; import Translate from '@docusaurus/Translate'; import {useColorMode} from '@docusaurus/theme-common'; - +import CodeBlock from '@theme/CodeBlock'; +import Admonition from '@theme/Admonition'; import { type ColorState, COLOR_SHADES, diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx index 45c4186fa3975..a661c965c270a 100644 --- a/website/src/components/Playground/index.tsx +++ b/website/src/components/Playground/index.tsx @@ -8,10 +8,10 @@ /* eslint-disable global-require */ import React from 'react'; +import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; import Image from '@theme/IdealImage'; -import clsx from 'clsx'; const Playgrounds = [ { diff --git a/website/src/components/UpgradeGuide/index.tsx b/website/src/components/UpgradeGuide/index.tsx index 0ba1913aae74d..01d1131cc9b52 100644 --- a/website/src/components/UpgradeGuide/index.tsx +++ b/website/src/components/UpgradeGuide/index.tsx @@ -11,11 +11,11 @@ import { useActiveDocContext, useVersions, } from '@docusaurus/plugin-content-docs/client'; -import Admonition from '@theme/Admonition'; import Link from '@docusaurus/Link'; -import CodeBlock from '@theme/CodeBlock'; import useIsBrowser from '@docusaurus/useIsBrowser'; import Translate from '@docusaurus/Translate'; +import Admonition from '@theme/Admonition'; +import CodeBlock from '@theme/CodeBlock'; function PackageJson() { const latestVersion = useLatestVersion(); diff --git a/website/src/data/__tests__/user.test.ts b/website/src/data/__tests__/user.test.ts index 1cd0f4ebe5293..06f76b53d1cb5 100644 --- a/website/src/data/__tests__/user.test.ts +++ b/website/src/data/__tests__/user.test.ts @@ -5,12 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -import {TagList, sortedUsers, type User} from '../users'; -import {Joi} from '@docusaurus/utils-validation'; - import fs from 'fs-extra'; import path from 'path'; import imageSize from 'image-size'; +import {Joi} from '@docusaurus/utils-validation'; +import {TagList, sortedUsers, type User} from '../users'; declare global { namespace jest { diff --git a/website/src/data/showcase/30-days-swa.png b/website/src/data/showcase/30-days-swa.png new file mode 100644 index 0000000000000..06c294bce4f65 Binary files /dev/null and b/website/src/data/showcase/30-days-swa.png differ diff --git a/website/src/data/showcase/codesweetly.png b/website/src/data/showcase/codesweetly.png new file mode 100644 index 0000000000000..6d848fee6aadd Binary files /dev/null and b/website/src/data/showcase/codesweetly.png differ diff --git a/website/src/data/showcase/fast.png b/website/src/data/showcase/fast.png new file mode 100644 index 0000000000000..c69425f7660c7 Binary files /dev/null and b/website/src/data/showcase/fast.png differ diff --git a/website/src/data/showcase/httpin.png b/website/src/data/showcase/httpin.png new file mode 100644 index 0000000000000..97cc4c84e256b Binary files /dev/null and b/website/src/data/showcase/httpin.png differ diff --git a/website/src/data/users.tsx b/website/src/data/users.tsx index 40be9f49be44b..0855937be8649 100644 --- a/website/src/data/users.tsx +++ b/website/src/data/users.tsx @@ -371,6 +371,14 @@ const Users: User[] = [ source: 'https://github.com/lyft/clutch/tree/main/docs/_website', tags: ['opensource'], }, + { + title: 'CodeSweetly', + description: 'The Home of Simplified Web Development Tutorials', + preview: require('./showcase/codesweetly.png'), + website: 'https://codesweetly.com/', + source: null, + tags: ['personal'], + }, { title: 'CodeYourFuture', description: @@ -631,6 +639,14 @@ const Users: User[] = [ source: 'https://github.com/eta-dev/eta-docs', tags: ['opensource'], }, + { + title: 'FAST', + description: 'The adaptive interface system for modern web experiences.', + preview: require('./showcase/fast.png'), + website: 'https://www.fast.design/docs/introduction/', + source: 'https://github.com/microsoft/fast/tree/master/sites/website', + tags: ['opensource', 'product'], + }, { title: 'FBT', description: 'An internationalization framework', @@ -853,6 +869,14 @@ const Users: User[] = [ source: 'https://github.com/home-assistant/developers.home-assistant', tags: ['opensource'], }, + { + title: 'httpin', + description: 'Decode an HTTP request into a custom struct in Go', + preview: require('./showcase/httpin.png'), + website: 'https://ggicci.github.io/httpin/', + source: 'https://github.com/ggicci/httpin/tree/documentation/docs', + tags: ['opensource'], + }, { title: 'I am Massoud', description: 'The portfolio of Massoud Maboudi, Full Stack Developer', @@ -2077,6 +2101,14 @@ const Users: User[] = [ source: null, tags: ['meta'], }, + { + title: '30 Days Of SWA', + description: 'A 30-Day Developer Guide to Azure Static Web Apps', + preview: require('./showcase/30-days-swa.png'), + website: 'https://www.azurestaticwebapps.dev', + source: 'https://github.com/staticwebdev/30DaysOfSWA/tree/main/www', + tags: ['opensource', 'product'], + }, { title: 'TiDB Community Books', description: 'A website for co-created books by TiDB Community users.', diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index d2ccfc69aaca4..62363cbbd647b 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -6,6 +6,9 @@ */ import React from 'react'; +import clsx from 'clsx'; +import LiteYouTubeEmbed from 'react-lite-youtube-embed'; +import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css'; import Link from '@docusaurus/Link'; import Translate, {translate} from '@docusaurus/Translate'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; @@ -18,10 +21,6 @@ import Tweet from '@site/src/components/Tweet'; import Tweets, {type TweetItem} from '@site/src/data/tweets'; import Quotes from '@site/src/data/quotes'; import Features, {type FeatureItem} from '@site/src/data/features'; -import LiteYouTubeEmbed from 'react-lite-youtube-embed'; -import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css'; - -import clsx from 'clsx'; import styles from './styles.module.css'; diff --git a/website/src/pages/showcase/_components/ShowcaseCard/index.tsx b/website/src/pages/showcase/_components/ShowcaseCard/index.tsx index a09b4c5e49091..39c6c07f19dd8 100644 --- a/website/src/pages/showcase/_components/ShowcaseCard/index.tsx +++ b/website/src/pages/showcase/_components/ShowcaseCard/index.tsx @@ -7,13 +7,10 @@ import React from 'react'; import clsx from 'clsx'; -import Image from '@theme/IdealImage'; import Link from '@docusaurus/Link'; import Translate from '@docusaurus/Translate'; - -import styles from './styles.module.css'; +import Image from '@theme/IdealImage'; import FavoriteIcon from '@site/src/components/svgIcons/FavoriteIcon'; -import Tooltip from '../ShowcaseTooltip'; import { Tags, TagList, @@ -22,6 +19,8 @@ import { type Tag, } from '@site/src/data/users'; import {sortBy} from '@site/src/utils/jsUtils'; +import Tooltip from '../ShowcaseTooltip'; +import styles from './styles.module.css'; const TagComp = React.forwardRef<HTMLLIElement, Tag>( ({label, color, description}, ref) => ( diff --git a/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx b/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx index 8df064852eece..acb4516d111f7 100644 --- a/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx +++ b/website/src/pages/showcase/_components/ShowcaseFilterToggle/index.tsx @@ -6,12 +6,12 @@ */ import React, {useState, useEffect, useCallback} from 'react'; +import clsx from 'clsx'; import {useHistory, useLocation} from '@docusaurus/router'; import {prepareUserState} from '../../index'; import styles from './styles.module.css'; -import clsx from 'clsx'; export type Operator = 'OR' | 'AND'; diff --git a/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx b/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx index 29ed978841b9c..7495cf42eb58e 100644 --- a/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx +++ b/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx @@ -15,9 +15,9 @@ import React, { } from 'react'; import {useHistory, useLocation} from '@docusaurus/router'; import {toggleListItem} from '@site/src/utils/jsUtils'; -import {prepareUserState} from '../../index'; import type {TagType} from '@site/src/data/users'; +import {prepareUserState} from '../../index'; import styles from './styles.module.css'; interface Props extends ComponentProps<'input'> { diff --git a/website/src/pages/showcase/index.tsx b/website/src/pages/showcase/index.tsx index e3a576ca3c1c7..0cfd04de3d27d 100644 --- a/website/src/pages/showcase/index.tsx +++ b/website/src/pages/showcase/index.tsx @@ -6,11 +6,21 @@ */ import React, {useState, useMemo, useEffect} from 'react'; - -import Layout from '@theme/Layout'; import clsx from 'clsx'; +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; +import Translate, {translate} from '@docusaurus/Translate'; +import {useHistory, useLocation} from '@docusaurus/router'; +import {usePluralForm} from '@docusaurus/theme-common'; +import Layout from '@theme/Layout'; import FavoriteIcon from '@site/src/components/svgIcons/FavoriteIcon'; +import { + sortedUsers, + Tags, + TagList, + type User, + type TagType, +} from '@site/src/data/users'; import ShowcaseTagSelect, { readSearchTags, } from './_components/ShowcaseTagSelect'; @@ -19,20 +29,8 @@ import ShowcaseFilterToggle, { readOperator, } from './_components/ShowcaseFilterToggle'; import ShowcaseCard from './_components/ShowcaseCard'; -import { - sortedUsers, - Tags, - TagList, - type User, - type TagType, -} from '@site/src/data/users'; import ShowcaseTooltip from './_components/ShowcaseTooltip'; -import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; -import Translate, {translate} from '@docusaurus/Translate'; -import {useHistory, useLocation} from '@docusaurus/router'; -import {usePluralForm} from '@docusaurus/theme-common'; - import styles from './styles.module.css'; const TITLE = 'Docusaurus Site Showcase'; diff --git a/website/src/pages/versions.tsx b/website/src/pages/versions.tsx index c9239d28edb63..9db0ec5d10ee6 100644 --- a/website/src/pages/versions.tsx +++ b/website/src/pages/versions.tsx @@ -8,14 +8,13 @@ import React from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Link from '@docusaurus/Link'; -import Layout from '@theme/Layout'; -import Heading from '@theme/Heading'; import Translate from '@docusaurus/Translate'; import { useVersions, useLatestVersion, } from '@docusaurus/plugin-content-docs/client'; - +import Layout from '@theme/Layout'; +import Heading from '@theme/Heading'; import VersionsArchived from '@site/versionsArchived.json'; const VersionsArchivedList = Object.entries(VersionsArchived); diff --git a/website/src/plugins/changelog/theme/ChangelogAuthors/index.tsx b/website/src/plugins/changelog/theme/ChangelogAuthors/index.tsx index 0ca25fbe7cb94..57be25cbd4a04 100644 --- a/website/src/plugins/changelog/theme/ChangelogAuthors/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogAuthors/index.tsx @@ -7,11 +7,11 @@ import React, {useState} from 'react'; import clsx from 'clsx'; -import type {Props} from '@theme/BlogPostAuthors'; import ChangelogAuthor from '@theme/ChangelogAuthor'; +import IconExpand from '@theme/IconExpand'; +import type {Props} from '@theme/BlogPostAuthors'; import styles from './styles.module.css'; -import IconExpand from '@theme/IconExpand'; // Component responsible for the authors layout export default function BlogPostAuthors({ diff --git a/website/src/plugins/changelog/theme/ChangelogAuthors/styles.module.css b/website/src/plugins/changelog/theme/ChangelogAuthors/styles.module.css index 08d003d4e0e65..19ec3dd69dd2a 100644 --- a/website/src/plugins/changelog/theme/ChangelogAuthors/styles.module.css +++ b/website/src/plugins/changelog/theme/ChangelogAuthors/styles.module.css @@ -28,8 +28,8 @@ margin-left: 0.3rem; margin-right: 0.3rem; border-radius: 50%; - width: var(--ifm-avatar-photo-size-md); - height: var(--ifm-avatar-photo-size-md); + width: var(--ifm-avatar-photo-size); + height: var(--ifm-avatar-photo-size); background-color: var(--ifm-color-emphasis-100); } diff --git a/website/src/plugins/changelog/theme/ChangelogItem/index.tsx b/website/src/plugins/changelog/theme/ChangelogItem/index.tsx index fea34d46bcadd..fee2063062608 100644 --- a/website/src/plugins/changelog/theme/ChangelogItem/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogItem/index.tsx @@ -12,10 +12,10 @@ import Link from '@docusaurus/Link'; import {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; import {blogPostContainerID} from '@docusaurus/utils-common'; import MDXComponents from '@theme/MDXComponents'; +import ChangelogAuthors from '@theme/ChangelogAuthors'; import type {Props} from '@theme/BlogPostItem'; import styles from './styles.module.css'; -import ChangelogAuthors from '@theme/ChangelogAuthors'; export default function ChangelogItem(props: Props): JSX.Element { const {withBaseUrl} = useBaseUrlUtils(); diff --git a/website/src/plugins/changelog/theme/ChangelogList/index.tsx b/website/src/plugins/changelog/theme/ChangelogList/index.tsx index cf0d7b7297a35..17aceebb6f018 100644 --- a/website/src/plugins/changelog/theme/ChangelogList/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogList/index.tsx @@ -6,21 +6,21 @@ */ import React from 'react'; -import BlogLayout from '@theme/BlogLayout'; -import BlogListPaginator from '@theme/BlogListPaginator'; +import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; -import type {Props} from '@theme/BlogListPage'; +import Link from '@docusaurus/Link'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, } from '@docusaurus/theme-common'; -import Link from '@docusaurus/Link'; +import BlogLayout from '@theme/BlogLayout'; +import BlogListPaginator from '@theme/BlogListPaginator'; +import SearchMetadata from '@theme/SearchMetadata'; import ChangelogItem from '@theme/ChangelogItem'; +import type {Props} from '@theme/BlogListPage'; import styles from './styles.module.css'; -import SearchMetadata from '@theme/SearchMetadata'; -import clsx from 'clsx'; function ChangelogListMetadata(props: Props): JSX.Element { const {metadata} = props; diff --git a/website/src/plugins/changelog/theme/ChangelogPage/index.tsx b/website/src/plugins/changelog/theme/ChangelogPage/index.tsx index ef45aa304e6b3..7ce92e1707d2d 100644 --- a/website/src/plugins/changelog/theme/ChangelogPage/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogPage/index.tsx @@ -6,19 +6,19 @@ */ import React from 'react'; +import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; -import BlogLayout from '@theme/BlogLayout'; -import ChangelogItem from '@theme/ChangelogItem'; -import ChangelogPaginator from '@theme/ChangelogPaginator'; -import type {Props} from '@theme/BlogPostPage'; +import Link from '@docusaurus/Link'; import { PageMetadata, HtmlClassNameProvider, ThemeClassNames, } from '@docusaurus/theme-common'; +import BlogLayout from '@theme/BlogLayout'; +import ChangelogItem from '@theme/ChangelogItem'; +import ChangelogPaginator from '@theme/ChangelogPaginator'; import TOC from '@theme/TOC'; -import Link from '@docusaurus/Link'; -import clsx from 'clsx'; +import type {Props} from '@theme/BlogPostPage'; function ChangelogPageMetadata(props: Props): JSX.Element { const {content: BlogPostContents} = props; diff --git a/website/src/plugins/featureRequests/FeatureRequestsPage.tsx b/website/src/plugins/featureRequests/FeatureRequestsPage.tsx index 516f490485d20..f5d836130b532 100644 --- a/website/src/plugins/featureRequests/FeatureRequestsPage.tsx +++ b/website/src/plugins/featureRequests/FeatureRequestsPage.tsx @@ -6,10 +6,10 @@ */ import React, {useEffect} from 'react'; +import clsx from 'clsx'; import Layout from '@theme/Layout'; import cannyScript from './cannyScript'; -import clsx from 'clsx'; import styles from './styles.module.css'; const BOARD_TOKEN = '054e0e53-d951-b14c-7e74-9eb8f9ed2f91'; diff --git a/website/src/theme/CodeBlock/index.tsx b/website/src/theme/CodeBlock/index.tsx index dd5aedfc18dec..82dc1b0f5f14f 100644 --- a/website/src/theme/CodeBlock/index.tsx +++ b/website/src/theme/CodeBlock/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {Props} from '@theme/CodeBlock'; import CodeBlock from '@theme-original/CodeBlock'; +import type {Props} from '@theme/CodeBlock'; // This component does nothing on purpose // Dogfood: wrapping a theme component already enhanced by another theme diff --git a/website/src/theme/ColorModeToggle.tsx b/website/src/theme/ColorModeToggle.tsx index e9e653d163ab5..44f81a00ff66e 100644 --- a/website/src/theme/ColorModeToggle.tsx +++ b/website/src/theme/ColorModeToggle.tsx @@ -7,7 +7,6 @@ import React from 'react'; import OriginalToggle from '@theme-original/ColorModeToggle'; -import type {Props} from '@theme/ColorModeToggle'; import { lightStorage, darkStorage, @@ -19,6 +18,7 @@ import { DARK_BACKGROUND_COLOR, COLOR_SHADES, } from '@site/src/utils/colorUtils'; +import type {Props} from '@theme/ColorModeToggle'; // The ColorGenerator modifies the DOM styles. The styles are persisted in // session storage, and we need to apply the same style when toggling modes even diff --git a/website/src/theme/DocSidebar/Desktop/Content/index.js b/website/src/theme/DocSidebar/Desktop/Content/index.js index 0d47b8eec9780..19d30bc260019 100644 --- a/website/src/theme/DocSidebar/Desktop/Content/index.js +++ b/website/src/theme/DocSidebar/Desktop/Content/index.js @@ -6,8 +6,8 @@ */ import React from 'react'; -import Content from '@theme-original/DocSidebar/Desktop/Content'; import {useLocation} from '@docusaurus/router'; +import Content from '@theme-original/DocSidebar/Desktop/Content'; function SidebarAd() { return ( diff --git a/website/src/theme/Layout/index.tsx b/website/src/theme/Layout/index.tsx index 78f03a793f88a..44034528edcde 100644 --- a/website/src/theme/Layout/index.tsx +++ b/website/src/theme/Layout/index.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import type {Props} from '@theme/Layout'; import Layout from '@theme-original/Layout'; +import type {Props} from '@theme/Layout'; // This component is only used to test for CSS insertion order import './styles.module.css'; diff --git a/yarn.lock b/yarn.lock index 5374e67cd0deb..769b532fb0fac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -147,22 +147,6 @@ jsonpointer "^5.0.0" leven "^3.1.0" -"@babel/cli@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.17.10.tgz#5ea0bf6298bb78f3b59c7c06954f9bd1c79d5943" - integrity sha512-OygVO1M2J4yPMNOW9pb+I6kFGpQK77HmG44Oz3hg8xQIl5L/2zq+ZohwAdSaqYgVwM0SfmPHZHphH4wR8qzVYw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.8" - commander "^4.0.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.1.0" - glob "^7.0.0" - make-dir "^2.1.0" - slash "^2.0.0" - optionalDependencies: - "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" - chokidar "^3.4.0" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.8.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" @@ -170,7 +154,7 @@ dependencies: "@babel/highlight" "^7.16.7" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.10": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== @@ -197,21 +181,21 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.11.1", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.15.5", "@babel/core@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" - integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== +"@babel/core@^7.11.1", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.15.5", "@babel/core@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.12.tgz#b4eb2d7ebc3449b062381644c93050db545b70ee" + integrity sha512-44ODe6O1IVz9s2oJE3rZ4trNNKTX9O7KpQpfAP4t8QII/zwrVRHL7i2pxhqtcY7tqMLrrKfMlBKnm1QlrRFs5w== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" + "@babel/generator" "^7.17.12" "@babel/helper-compilation-targets" "^7.17.10" - "@babel/helper-module-transforms" "^7.17.7" + "@babel/helper-module-transforms" "^7.17.12" "@babel/helpers" "^7.17.9" - "@babel/parser" "^7.17.10" + "@babel/parser" "^7.17.12" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.10" - "@babel/types" "^7.17.10" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -227,13 +211,13 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/generator@^7.12.5", "@babel/generator@^7.17.10", "@babel/generator@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" - integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg== +"@babel/generator@^7.12.5", "@babel/generator@^7.17.12", "@babel/generator@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.12.tgz#5970e6160e9be0428e02f4aba62d8551ec366cc8" + integrity sha512-V49KtZiiiLjH/CnIW6OjJdrenrGoyh6AmKQ3k2AZFKozC1h846Q4NYlZ5nqAigPDUXfGzC88+LOUuG8yKd2kCw== dependencies: - "@babel/types" "^7.17.10" - "@jridgewell/gen-mapping" "^0.1.0" + "@babel/types" "^7.17.12" + "@jridgewell/gen-mapping" "^0.3.0" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.16.7": @@ -261,10 +245,10 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.6": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz#71835d7fb9f38bd9f1378e40a4c0902fdc2ea49d" - integrity sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ== +"@babel/helper-create-class-features-plugin@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.12.tgz#d4f8393fc4838cbff6b7c199af5229aee16d07cf" + integrity sha512-sZoOeUTkFJMyhqCei2+Z+wtH/BehW8NVKQt7IRUQlRiOARuXymJYfN/FCcI8CvVbR0XVyDM6eLFOlR7YtiXnew== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-environment-visitor" "^7.16.7" @@ -274,10 +258,10 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" -"@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1" - integrity sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA== +"@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.12.tgz#bb37ca467f9694bbe55b884ae7a5cc1e0084e4fd" + integrity sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" @@ -339,10 +323,10 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.16.7", "@babel/helper-module-transforms@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" - integrity sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw== +"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.12.tgz#bec00139520cb3feb078ef7a4578562480efb77e" + integrity sha512-t5s2BeSWIghhFRPh9XMn6EIGmvn8Lmw5RVASJzkIx1mSemubQQBNIZiQD7WzaFmaHIrjAec4x8z9Yx8SjJ1/LA== dependencies: "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" @@ -350,8 +334,8 @@ "@babel/helper-split-export-declaration" "^7.16.7" "@babel/helper-validator-identifier" "^7.16.7" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" @@ -365,10 +349,10 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== "@babel/helper-remap-async-to-generator@^7.16.8": version "7.16.8" @@ -441,59 +425,59 @@ "@babel/types" "^7.17.0" "@babel/highlight@^7.16.7": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" - integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" + integrity sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" - integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.12.tgz#36c2ed06944e3691ba82735fc4cf62d12d491a23" + integrity sha512-FLzHmN9V3AJIrWfOpvRlZCeVg/WLdicSnTMsLur6uDj9TT8ymUlG9XxURdW/XvuygK+2CW0poOJABdA4m/YKxA== -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" - integrity sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.17.12.tgz#1dca338caaefca368639c9ffb095afbd4d420b1e" + integrity sha512-xCJQXl4EeQ3J9C4yOmpTrtVGmzpm2iSzyxbkZHw7UCnZBftHpF/hpII80uWVyVrc40ytIClHjgWGTG1g/yB+aw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz#cc001234dfc139ac45f6bcf801866198c8c72ff9" - integrity sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.17.12.tgz#0d498ec8f0374b1e2eb54b9cb2c4c78714c77753" + integrity sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" - "@babel/plugin-proposal-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-optional-chaining" "^7.17.12" -"@babel/plugin-proposal-async-generator-functions@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz#3bdd1ebbe620804ea9416706cd67d60787504bc8" - integrity sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ== +"@babel/plugin-proposal-async-generator-functions@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.17.12.tgz#094a417e31ce7e692d84bab06c8e2a607cbeef03" + integrity sha512-RWVvqD1ooLKP6IqWTA5GyFVX2isGEgC5iFxKzfYOIy/QEFdxYyCybBDtIGjipHpb9bDWHzcqGqFakf+mVmBTdQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-remap-async-to-generator" "^7.16.8" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz#925cad7b3b1a2fcea7e59ecc8eb5954f961f91b0" - integrity sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww== +"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz#84f65c0cc247d46f40a6da99aadd6438315d80a4" + integrity sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-class-static-block@^7.17.6": - version "7.17.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz#164e8fd25f0d80fa48c5a4d1438a6629325ad83c" - integrity sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA== +"@babel/plugin-proposal-class-static-block@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.12.tgz#947f09dd496322c9543ec3b318bf52b4d9833334" + integrity sha512-8ILyDG6eL14F8iub97dVc8q35Md0PJYAnA5Kz9NACFOkt6ffCcr0FISyUPKHsvuAy36fkpIitxZ9bVYPFMGQHA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.17.6" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-proposal-dynamic-import@^7.16.7": @@ -504,36 +488,36 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz#09de09df18445a5786a305681423ae63507a6163" - integrity sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA== +"@babel/plugin-proposal-export-namespace-from@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.17.12.tgz#b22864ccd662db9606edb2287ea5fd1709f05378" + integrity sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz#9732cb1d17d9a2626a08c5be25186c195b6fa6e8" - integrity sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ== +"@babel/plugin-proposal-json-strings@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.17.12.tgz#f4642951792437233216d8c1af370bb0fbff4664" + integrity sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz#be23c0ba74deec1922e639832904be0bea73cdea" - integrity sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg== +"@babel/plugin-proposal-logical-assignment-operators@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.17.12.tgz#c64a1bcb2b0a6d0ed2ff674fd120f90ee4b88a23" + integrity sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99" - integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ== +"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz#1e93079bbc2cbc756f6db6a1925157c4a92b94be" + integrity sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-numeric-separator@^7.16.7": @@ -553,16 +537,16 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.12.1" -"@babel/plugin-proposal-object-rest-spread@^7.17.3": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz#d9eb649a54628a51701aef7e0ea3d17e2b9dd390" - integrity sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw== +"@babel/plugin-proposal-object-rest-spread@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.12.tgz#f94a91715a7f2f8cfb3c06af820c776440bc0148" + integrity sha512-6l9cO3YXXRh4yPCPRA776ZyJ3RobG4ZKJZhp7NDRbKIOeV3dBPG8FXCF7ZtiO2RTCIOkQOph1xDDcc01iWVNjQ== dependencies: - "@babel/compat-data" "^7.17.0" - "@babel/helper-compilation-targets" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/compat-data" "^7.17.10" + "@babel/helper-compilation-targets" "^7.17.10" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.16.7" + "@babel/plugin-transform-parameters" "^7.17.12" "@babel/plugin-proposal-optional-catch-binding@^7.16.7": version "7.16.7" @@ -572,40 +556,40 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" - integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== +"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174" + integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.16.11": - version "7.16.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz#e8df108288555ff259f4527dbe84813aac3a1c50" - integrity sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw== +"@babel/plugin-proposal-private-methods@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.17.12.tgz#c2ca3a80beb7539289938da005ad525a038a819c" + integrity sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A== dependencies: - "@babel/helper-create-class-features-plugin" "^7.16.10" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-private-property-in-object@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz#b0b8cef543c2c3d57e59e2c611994861d46a3fce" - integrity sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ== +"@babel/plugin-proposal-private-property-in-object@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.17.12.tgz#b02efb7f106d544667d91ae97405a9fd8c93952d" + integrity sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-create-class-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.16.7", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz#635d18eb10c6214210ffc5ff4932552de08188a2" - integrity sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg== +"@babel/plugin-proposal-unicode-property-regex@^7.17.12", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.17.12.tgz#3dbd7a67bd7f94c8238b394da112d86aaf32ad4d" + integrity sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-regexp-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -649,12 +633,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz#202b147e5892b8452bbb0bb269c7ed2539ab8832" - integrity sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ== +"@babel/plugin-syntax-flow@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.17.12.tgz#23d852902acd19f42923fca9d0f196984d124e73" + integrity sha512-B8QIgBvkIG6G2jgsOHQUist7Sm0EBLDCx8sen072IwqNuzMegZNXrYnSv77cYzA8mLDZAfQYqsLIhimiP1s2HQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -677,12 +661,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" - integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== +"@babel/plugin-syntax-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" + integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -740,27 +724,27 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.16.7", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.10.tgz#80031e6042cad6a95ed753f672ebd23c30933195" - integrity sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ== +"@babel/plugin-syntax-typescript@^7.17.12", "@babel/plugin-syntax-typescript@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" + integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-arrow-functions@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" - integrity sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ== +"@babel/plugin-transform-arrow-functions@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45" + integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-async-to-generator@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz#b83dff4b970cf41f1b819f8b49cc0cfbaa53a808" - integrity sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg== +"@babel/plugin-transform-async-to-generator@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.17.12.tgz#dbe5511e6b01eee1496c944e35cdfe3f58050832" + integrity sha512-J8dbrWIOO3orDzir57NRsjg4uxucvhby0L/KZuGsWDj0g7twWK3g7JhJhOrXtuXiw8MeiSdJ3E0OW9H8LYEzLQ== dependencies: "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-remap-async-to-generator" "^7.16.8" "@babel/plugin-transform-block-scoped-functions@^7.16.7": @@ -770,40 +754,40 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-block-scoping@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz#f50664ab99ddeaee5bc681b8f3a6ea9d72ab4f87" - integrity sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ== +"@babel/plugin-transform-block-scoping@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.17.12.tgz#68fc3c4b3bb7dfd809d97b7ed19a584052a2725c" + integrity sha512-jw8XW/B1i7Lqwqj2CbrViPcZijSxfguBWZP2aN59NHgxUyO/OcO1mfdCxH13QhN5LbWhPkX+f+brKGhZTiqtZQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-classes@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz#8f4b9562850cd973de3b498f1218796eb181ce00" - integrity sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ== +"@babel/plugin-transform-classes@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.17.12.tgz#da889e89a4d38375eeb24985218edeab93af4f29" + integrity sha512-cvO7lc7pZat6BsvH6l/EGaI8zpl8paICaoGk+7x7guvtfak/TbIf66nYmJOH13EuG0H+Xx3M+9LQDtSvZFKXKw== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz#66dee12e46f61d2aae7a73710f591eb3df616470" - integrity sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw== +"@babel/plugin-transform-computed-properties@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz#bca616a83679698f3258e892ed422546e531387f" + integrity sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-destructuring@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz#49dc2675a7afa9a5e4c6bdee636061136c3408d1" - integrity sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ== +"@babel/plugin-transform-destructuring@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.12.tgz#0861d61e75e2401aca30f2570d46dfc85caacf35" + integrity sha512-P8pt0YiKtX5UMUL5Xzsc9Oyij+pJE6JuC+F1k0/brq/OOGs5jDa1If3OY0LRWGvJsJhI+8tsiecL3nJLc0WTlg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-dotall-regex@^7.16.7", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.7" @@ -813,12 +797,12 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-duplicate-keys@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz#2207e9ca8f82a0d36a5a67b6536e7ef8b08823c9" - integrity sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw== +"@babel/plugin-transform-duplicate-keys@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.17.12.tgz#a09aa709a3310013f8e48e0e23bc7ace0f21477c" + integrity sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-exponentiation-operator@^7.16.7": version "7.16.7" @@ -828,20 +812,20 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-flow-strip-types@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.7.tgz#291fb140c78dabbf87f2427e7c7c332b126964b8" - integrity sha512-mzmCq3cNsDpZZu9FADYYyfZJIOrSONmHcop2XEKPdBNMa4PDC4eEvcOvzZaCNcjKu72v0XQlA5y1g58aLRXdYg== +"@babel/plugin-transform-flow-strip-types@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.17.12.tgz#5e070f99a4152194bd9275de140e83a92966cab3" + integrity sha512-g8cSNt+cHCpG/uunPQELdq/TeV3eg1OLJYwxypwHtAWo9+nErH3lQx9CSO2uI9lF74A0mR0t4KoMjs1snSgnTw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-flow" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-flow" "^7.17.12" -"@babel/plugin-transform-for-of@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz#649d639d4617dff502a9a158c479b3b556728d8c" - integrity sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg== +"@babel/plugin-transform-for-of@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.17.12.tgz#5397c22554ec737a27918e7e7e0e7b679b05f5ec" + integrity sha512-76lTwYaCxw8ldT7tNmye4LLwSoKDbRCBzu6n/DcK/P3FOR29+38CIIaVIZfwol9By8W/QHORYEnYSLuvcQKrsg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-function-name@^7.16.7": version "7.16.7" @@ -852,12 +836,12 @@ "@babel/helper-function-name" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz#254c9618c5ff749e87cb0c0cef1a0a050c0bdab1" - integrity sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ== +"@babel/plugin-transform-literals@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz#97131fbc6bbb261487105b4b3edbf9ebf9c830ae" + integrity sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-member-expression-literals@^7.16.7": version "7.16.7" @@ -866,57 +850,58 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-modules-amd@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz#b28d323016a7daaae8609781d1f8c9da42b13186" - integrity sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g== +"@babel/plugin-transform-modules-amd@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.17.12.tgz#08ec1f10f854c15bb3b44952e60f1fc126d7d481" + integrity sha512-p5rt9tB5Ndcc2Za7CeNxVf7YAjRcUMR6yi8o8tKjb9KhRkEvXwa+C0hj6DA5bVDkKRxB0NYhMUGbVKoFu4+zEA== dependencies: - "@babel/helper-module-transforms" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz#274be1a2087beec0254d4abd4d86e52442e1e5b6" - integrity sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw== +"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.12.tgz#37691c7404320d007288edd5a2d8600bcef61c34" + integrity sha512-tVPs6MImAJz+DiX8Y1xXEMdTk5Lwxu9jiPjlS+nv5M2A59R7+/d1+9A8C/sbuY0b3QjIxqClkj6KAplEtRvzaA== dependencies: - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-simple-access" "^7.17.7" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz#81fd834024fae14ea78fbe34168b042f38703859" - integrity sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw== +"@babel/plugin-transform-modules-systemjs@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.12.tgz#e631b151b99d25401cd9679476cc35e6e5bbc7d4" + integrity sha512-NVhDb0q00hqZcuLduUf/kMzbOQHiocmPbIxIvk23HLiEqaTKC/l4eRxeC7lO63M72BmACoiKOcb9AkOAJRerpw== dependencies: "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-identifier" "^7.16.7" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz#23dad479fa585283dbd22215bff12719171e7618" - integrity sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ== +"@babel/plugin-transform-modules-umd@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.17.12.tgz#b37be3ecf198c1fea10e6268461729ced05644e1" + integrity sha512-BnsPkrUHsjzZGpnrmJeDFkOMMljWFHPjDc9xDcz71/C+ybF3lfC3V4m3dwXPLZrE5b3bgd4V+3/Pj+3620d7IA== dependencies: - "@babel/helper-module-transforms" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-named-capturing-groups-regex@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.10.tgz#715dbcfafdb54ce8bccd3d12e8917296a4ba66a4" - integrity sha512-v54O6yLaJySCs6mGzaVOUw9T967GnH38T6CQSAtnzdNPwu84l2qAjssKzo/WSO8Yi7NF+7ekm5cVbF/5qiIgNA== +"@babel/plugin-transform-named-capturing-groups-regex@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.12.tgz#9c4a5a5966e0434d515f2675c227fd8cc8606931" + integrity sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.17.0" + "@babel/helper-create-regexp-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-new-target@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz#9967d89a5c243818e0800fdad89db22c5f514244" - integrity sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg== +"@babel/plugin-transform-new-target@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.17.12.tgz#10842cd605a620944e81ea6060e9e65c265742e3" + integrity sha512-CaOtzk2fDYisbjAD4Sd1MTKGVIpRtx9bWLyj24Y/k6p4s4gQ3CqDGJauFJxt8M/LEx003d0i3klVqnN73qvK3w== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-object-super@^7.16.7": version "7.16.7" @@ -926,12 +911,12 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/helper-replace-supers" "^7.16.7" -"@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz#a1721f55b99b736511cb7e0152f61f17688f331f" - integrity sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw== +"@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.17.12.tgz#eb467cd9586ff5ff115a9880d6fdbd4a846b7766" + integrity sha512-6qW4rWo1cyCdq1FkYri7AHpauchbGLXpdwnYsfxFb+KtddHENfsY5JZb35xUwkK5opOLcJ3BNd2l7PhRYGlwIA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-property-literals@^7.16.7": version "7.16.7" @@ -941,11 +926,11 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-transform-react-constant-elements@^7.14.5": - version "7.17.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.17.6.tgz#6cc273c2f612a6a50cb657e63ee1303e5e68d10a" - integrity sha512-OBv9VkyyKtsHZiHLoSfCn+h6yU7YKX8nrs32xUmOa1SRSk+t03FosB6fBZ0Yz4BpD1WV7l73Nsad+2Tz7APpqw== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.17.12.tgz#cc580857696b6dd9e5e3d079e673d060a0657f37" + integrity sha512-maEkX2xs2STuv2Px8QuqxqjhV2LsFobT1elCgyU5704fcyTu9DyD/bJXxD/mrRiVyhpHweOQ00OJ5FKhHq9oEw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-transform-react-display-name@^7.16.7": version "7.16.7" @@ -961,16 +946,16 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.16.7" -"@babel/plugin-transform-react-jsx@^7.16.7": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz#eac1565da176ccb1a715dae0b4609858808008c1" - integrity sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ== +"@babel/plugin-transform-react-jsx@^7.16.7", "@babel/plugin-transform-react-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" + integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-jsx" "^7.16.7" - "@babel/types" "^7.17.0" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/types" "^7.17.12" "@babel/plugin-transform-react-pure-annotations@^7.16.7": version "7.16.7" @@ -987,20 +972,20 @@ dependencies: regenerator-transform "^0.15.0" -"@babel/plugin-transform-reserved-words@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz#1d798e078f7c5958eec952059c460b220a63f586" - integrity sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg== +"@babel/plugin-transform-reserved-words@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.17.12.tgz#7dbd349f3cdffba751e817cf40ca1386732f652f" + integrity sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-runtime@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.10.tgz#b89d821c55d61b5e3d3c3d1d636d8d5a81040ae1" - integrity sha512-6jrMilUAJhktTr56kACL8LnWC5hx3Lf27BS0R0DSyW/OoJfb/iTHeE96V3b1dgKG3FSFdd/0culnYWMkjcKCig== +"@babel/plugin-transform-runtime@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.12.tgz#5dc79735c4038c6f4fc0490f68f2798ce608cadd" + integrity sha512-xsl5MeGjWnmV6Ui9PfILM2+YRpa3GqLOrczPpXV3N2KCgQGU+sU8OfzuMbjkIdfvZEZIm+3y0V7w58sk0SGzlw== dependencies: "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" babel-plugin-polyfill-corejs2 "^0.3.0" babel-plugin-polyfill-corejs3 "^0.5.0" babel-plugin-polyfill-regenerator "^0.3.0" @@ -1013,12 +998,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-spread@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz#a303e2122f9f12e0105daeedd0f30fb197d8ff44" - integrity sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg== +"@babel/plugin-transform-spread@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz#c112cad3064299f03ea32afed1d659223935d1f5" + integrity sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-transform-sticky-regex@^7.16.7": @@ -1028,28 +1013,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-template-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz#f3d1c45d28967c8e80f53666fc9c3e50618217ab" - integrity sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA== +"@babel/plugin-transform-template-literals@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.17.12.tgz#4aec0a18f39dd86c442e1d077746df003e362c6e" + integrity sha512-kAKJ7DX1dSRa2s7WN1xUAuaQmkTpN+uig4wCKWivVXIObqGbVTUlSavHyfI2iZvz89GFAMGm9p2DBJ4Y1Tp0hw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-typeof-symbol@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz#9cdbe622582c21368bd482b660ba87d5545d4f7e" - integrity sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ== +"@babel/plugin-transform-typeof-symbol@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.17.12.tgz#0f12f57ac35e98b35b4ed34829948d42bd0e6889" + integrity sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-typescript@^7.16.7": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz#591ce9b6b83504903fa9dd3652c357c2ba7a1ee0" - integrity sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ== +"@babel/plugin-transform-typescript@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.17.12.tgz#9654587131bc776ff713218d929fa9a2e98ca16d" + integrity sha512-ICbXZqg6hgenjmwciVI/UfqZtExBrZOrS8sLB5mTHGO/j08Io3MmooULBiijWk9JBknjM3CbbtTc/0ZsqLrjXQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-typescript" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.17.12" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-typescript" "^7.17.12" "@babel/plugin-transform-unicode-escapes@^7.16.7": version "7.16.7" @@ -1066,32 +1051,32 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.17.10.tgz#a81b093669e3eb6541bb81a23173c5963c5de69c" - integrity sha512-YNgyBHZQpeoBSRBg0xixsZzfT58Ze1iZrajvv0lJc70qDDGuGfonEnMGfWeSY0mQ3JTuCWFbMkzFRVafOyJx4g== +"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.17.12.tgz#b81ae0bb762b683d68b07b6d2d4020ccbef8d67a" + integrity sha512-Kke30Rj3Lmcx97bVs71LO0s8M6FmJ7tUAQI9fNId62rf0cYG1UAWwdNO9/sE0/pLEahAw1MqMorymoD12bj5Fg== dependencies: "@babel/compat-data" "^7.17.10" "@babel/helper-compilation-targets" "^7.17.10" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.16.7" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.16.7" - "@babel/plugin-proposal-async-generator-functions" "^7.16.8" - "@babel/plugin-proposal-class-properties" "^7.16.7" - "@babel/plugin-proposal-class-static-block" "^7.17.6" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.17.12" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.17.12" + "@babel/plugin-proposal-async-generator-functions" "^7.17.12" + "@babel/plugin-proposal-class-properties" "^7.17.12" + "@babel/plugin-proposal-class-static-block" "^7.17.12" "@babel/plugin-proposal-dynamic-import" "^7.16.7" - "@babel/plugin-proposal-export-namespace-from" "^7.16.7" - "@babel/plugin-proposal-json-strings" "^7.16.7" - "@babel/plugin-proposal-logical-assignment-operators" "^7.16.7" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.16.7" + "@babel/plugin-proposal-export-namespace-from" "^7.17.12" + "@babel/plugin-proposal-json-strings" "^7.17.12" + "@babel/plugin-proposal-logical-assignment-operators" "^7.17.12" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.17.12" "@babel/plugin-proposal-numeric-separator" "^7.16.7" - "@babel/plugin-proposal-object-rest-spread" "^7.17.3" + "@babel/plugin-proposal-object-rest-spread" "^7.17.12" "@babel/plugin-proposal-optional-catch-binding" "^7.16.7" - "@babel/plugin-proposal-optional-chaining" "^7.16.7" - "@babel/plugin-proposal-private-methods" "^7.16.11" - "@babel/plugin-proposal-private-property-in-object" "^7.16.7" - "@babel/plugin-proposal-unicode-property-regex" "^7.16.7" + "@babel/plugin-proposal-optional-chaining" "^7.17.12" + "@babel/plugin-proposal-private-methods" "^7.17.12" + "@babel/plugin-proposal-private-property-in-object" "^7.17.12" + "@babel/plugin-proposal-unicode-property-regex" "^7.17.12" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" @@ -1106,40 +1091,40 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.16.7" - "@babel/plugin-transform-async-to-generator" "^7.16.8" + "@babel/plugin-transform-arrow-functions" "^7.17.12" + "@babel/plugin-transform-async-to-generator" "^7.17.12" "@babel/plugin-transform-block-scoped-functions" "^7.16.7" - "@babel/plugin-transform-block-scoping" "^7.16.7" - "@babel/plugin-transform-classes" "^7.16.7" - "@babel/plugin-transform-computed-properties" "^7.16.7" - "@babel/plugin-transform-destructuring" "^7.17.7" + "@babel/plugin-transform-block-scoping" "^7.17.12" + "@babel/plugin-transform-classes" "^7.17.12" + "@babel/plugin-transform-computed-properties" "^7.17.12" + "@babel/plugin-transform-destructuring" "^7.17.12" "@babel/plugin-transform-dotall-regex" "^7.16.7" - "@babel/plugin-transform-duplicate-keys" "^7.16.7" + "@babel/plugin-transform-duplicate-keys" "^7.17.12" "@babel/plugin-transform-exponentiation-operator" "^7.16.7" - "@babel/plugin-transform-for-of" "^7.16.7" + "@babel/plugin-transform-for-of" "^7.17.12" "@babel/plugin-transform-function-name" "^7.16.7" - "@babel/plugin-transform-literals" "^7.16.7" + "@babel/plugin-transform-literals" "^7.17.12" "@babel/plugin-transform-member-expression-literals" "^7.16.7" - "@babel/plugin-transform-modules-amd" "^7.16.7" - "@babel/plugin-transform-modules-commonjs" "^7.17.9" - "@babel/plugin-transform-modules-systemjs" "^7.17.8" - "@babel/plugin-transform-modules-umd" "^7.16.7" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.17.10" - "@babel/plugin-transform-new-target" "^7.16.7" + "@babel/plugin-transform-modules-amd" "^7.17.12" + "@babel/plugin-transform-modules-commonjs" "^7.17.12" + "@babel/plugin-transform-modules-systemjs" "^7.17.12" + "@babel/plugin-transform-modules-umd" "^7.17.12" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.17.12" + "@babel/plugin-transform-new-target" "^7.17.12" "@babel/plugin-transform-object-super" "^7.16.7" - "@babel/plugin-transform-parameters" "^7.16.7" + "@babel/plugin-transform-parameters" "^7.17.12" "@babel/plugin-transform-property-literals" "^7.16.7" "@babel/plugin-transform-regenerator" "^7.17.9" - "@babel/plugin-transform-reserved-words" "^7.16.7" + "@babel/plugin-transform-reserved-words" "^7.17.12" "@babel/plugin-transform-shorthand-properties" "^7.16.7" - "@babel/plugin-transform-spread" "^7.16.7" + "@babel/plugin-transform-spread" "^7.17.12" "@babel/plugin-transform-sticky-regex" "^7.16.7" - "@babel/plugin-transform-template-literals" "^7.16.7" - "@babel/plugin-transform-typeof-symbol" "^7.16.7" + "@babel/plugin-transform-template-literals" "^7.17.12" + "@babel/plugin-transform-typeof-symbol" "^7.17.12" "@babel/plugin-transform-unicode-escapes" "^7.16.7" "@babel/plugin-transform-unicode-regex" "^7.16.7" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.17.10" + "@babel/types" "^7.17.12" babel-plugin-polyfill-corejs2 "^0.3.0" babel-plugin-polyfill-corejs3 "^0.5.0" babel-plugin-polyfill-regenerator "^0.3.0" @@ -1147,13 +1132,13 @@ semver "^6.3.0" "@babel/preset-flow@^7.13.13": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.16.7.tgz#7fd831323ab25eeba6e4b77a589f680e30581cbd" - integrity sha512-6ceP7IyZdUYQ3wUVqyRSQXztd1YmFHWI4Xv11MIqAlE4WqxBSd/FZ61V9k+TS5Gd4mkHOtQtPp9ymRpxH4y1Ug== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.17.12.tgz#664a5df59190260939eee862800a255bef3bd66f" + integrity sha512-7QDz7k4uiaBdu7N89VKjUn807pJRXmdirQu0KyR9LXnQrr5Jt41eIMKTS7ljej+H29erwmMrwq9Io9mJHLI3Lw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-flow-strip-types" "^7.16.7" + "@babel/plugin-transform-flow-strip-types" "^7.17.12" "@babel/preset-modules@^0.1.5": version "0.1.5" @@ -1166,26 +1151,26 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.16.7.tgz#4c18150491edc69c183ff818f9f2aecbe5d93852" - integrity sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA== +"@babel/preset-react@^7.14.5", "@babel/preset-react@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.17.12.tgz#62adbd2d1870c0de3893095757ed5b00b492ab3d" + integrity sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-react-display-name" "^7.16.7" - "@babel/plugin-transform-react-jsx" "^7.16.7" + "@babel/plugin-transform-react-jsx" "^7.17.12" "@babel/plugin-transform-react-jsx-development" "^7.16.7" "@babel/plugin-transform-react-pure-annotations" "^7.16.7" -"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz#ab114d68bb2020afc069cd51b37ff98a046a70b9" - integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== +"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" + integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-typescript" "^7.16.7" + "@babel/plugin-transform-typescript" "^7.17.12" "@babel/register@^7.13.16": version "7.17.7" @@ -1222,26 +1207,26 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.10", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.10.tgz#1ee1a5ac39f4eac844e6cf855b35520e5eb6f8b5" - integrity sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw== +"@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.12", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.12.tgz#011874d2abbca0ccf1adbe38f6f7a4ff1747599c" + integrity sha512-zULPs+TbCvOkIFd4FrG53xrpxvCBwLIgo6tO0tJorY7YV2IWFxUfS/lXDJbGgfyYt9ery/Gxj2niwttNnB0gIw== dependencies: "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" + "@babel/generator" "^7.17.12" "@babel/helper-environment-visitor" "^7.16.7" "@babel/helper-function-name" "^7.17.9" "@babel/helper-hoist-variables" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.10" - "@babel/types" "^7.17.10" + "@babel/parser" "^7.17.12" + "@babel/types" "^7.17.12" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" - integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== +"@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.12.tgz#1210690a516489c0200f355d87619157fbbd69a0" + integrity sha512-rH8i29wcZ6x9xjzI5ILHL/yZkbQnCERdHlogKuIb4PUr7do4iT8DPekrTbBLWTnRQm6U0GYABbTMSzijmEqlAg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" @@ -1393,9 +1378,9 @@ integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== "@cspell/dict-en_us@^2.2.2": - version "2.2.4" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.2.4.tgz#20abce3eabe048aa5d858de7b9475c6c290cdc1e" - integrity sha512-gblsvIPLNAK+pRR/Mn2m2kRQLVFeoORQJeaZKlGHWckA3s0iuTN49hSSTbK66k3aWlzhirtSoux7IdvT2RpgnQ== + version "2.2.5" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.2.5.tgz#7a1c325d54a7c9b8171da6e61f095ad34395ff68" + integrity sha512-gRHem02ZY83AQUTYBxtiVNmtM6gWFCJKumRoAKLj7vWYelmNLcCBsMA3BOOOJ7cZNKCI04lDEdh0u2f2akKZtQ== "@cspell/dict-filetypes@^2.0.1": version "2.0.1" @@ -1443,9 +1428,9 @@ integrity sha512-9f5LDATlAiXRGqxLxgqbOLlQxuMW2zcN7tBgxwtN+4u90vM03ZUOR/gKIuDV/y0ZuAiWBIjA73cjk8DJ13Q1eA== "@cspell/dict-latex@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-latex/-/dict-latex-2.0.0.tgz#0b13b6522d305f5842833ec0179078d900714f65" - integrity sha512-H6RRwbHhQ9ARoO1R57SDqB+q/J5jUDdVnkdfukJkA+HNlJBhCcDuzGOIJqr+GBkJYDkF3obZ3LEOk2lUfT+Eyg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@cspell/dict-latex/-/dict-latex-2.0.2.tgz#f34150db2c4c781ccc7d551dbd8431c0a3938529" + integrity sha512-4tjuaieh5NJsYLco45lWu9SRT5H61aC1vtUNKS0+bpA+JaRJYvlpv/wAsq5HB0I9Iz17XHATDvX1zkp3QJ89gw== "@cspell/dict-lorem-ipsum@^2.0.0": version "2.0.0" @@ -1508,9 +1493,9 @@ integrity sha512-MUwA2YKpqaQOSR4V1/CVGRNk8Ii5kf6I8Ch+4/BhRZRQXuwWbi21rDRYWPqdQWps7VNzAbbMA+PQDWsD5YY38g== "@cspell/dict-software-terms@^2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-2.1.5.tgz#4e2aa08839f37aa933cf1ac5196dbc7005bc8d3e" - integrity sha512-ylXWCsOJlYuucaMoHaHQLVaB8HeDrsCZ42a3jrTC/i6F/SF9I+4tBg4lMivd4w31bXBgILdbIvVHtWzJf+5m0A== + version "2.1.7" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-2.1.7.tgz#30d45d23003980e01854d57788c6c134fa0387f5" + integrity sha512-2FW5MlbazmWPFHzMh2xKYFcYnX+E5MdOPRrfYkbVXvWecA0466l54V+op2zlh1CbngMk4eY7AY3qahfWv6gDHA== "@cspell/dict-swift@^1.0.2": version "1.0.2" @@ -1847,6 +1832,15 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" + integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -1862,10 +1856,10 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c" integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w== -"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.10" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz#db436f0917d655393851bc258918c00226c9b183" - integrity sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q== +"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" + integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -2601,11 +2595,6 @@ dependencies: is-promise "^4.0.0" -"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": - version "2.1.8-no-fsevents.3" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" - integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ== - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -3025,89 +3014,89 @@ "@svgr/plugin-jsx" "^6.2.1" "@svgr/plugin-svgo" "^6.2.0" -"@swc/core-android-arm-eabi@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.181.tgz#8317b96dbcf43f30bc0a9c139f7dbe2ffea4ce2f" - integrity sha512-H3HNf8j6M13uIbSruef8iMsCElJJDZOhp5qxwm/+P1jAG4eQ4vPfajIlTVdFJes8Adrbr4WQaVvl+m4BQw51JQ== - -"@swc/core-android-arm64@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.181.tgz#23ee887e08993d26a2b31a5dce5232a5cf4e17b1" - integrity sha512-b1apYKeosBaXl28xE/By4QVHYrXaR2+nOdcP6rsDXg6nyLBArtoiS5YUFikFN/VQbSAQqNeJQ+rovT5zITrgSQ== - -"@swc/core-darwin-arm64@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.181.tgz#33d44c0aed28baebc797892d2243a845f5b49905" - integrity sha512-M3/PPeO6NTN7GYa1mOWPNMaAPxEQH8xd+X6FHMa7OBCi+Qxkarafu4DZRfzR88TcS3XikqFLgmmzSP7Z/tye2w== - -"@swc/core-darwin-x64@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.181.tgz#6da604c4c4e85c1baad9c355f25a4e0cceff52cb" - integrity sha512-8Uc6gx7YN5+eSnk3h7aHqp1f3RFoBJPDPeH9cURm4mfE4BTgkVgkctUm0IE5sS5AotazVbrOwhEFrl7TONSfPA== - -"@swc/core-freebsd-x64@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.181.tgz#41b26a7fd1214c9947e8a433231bcb3166916a33" - integrity sha512-SbnsbJHGFNY7VSTA5OhBh2PmLgQumIGerAxTCTYO1IgtbADCTL+gCjU0TK0viG/zpH4jnjaL965BI4JTo/bpRg== - -"@swc/core-linux-arm-gnueabihf@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.181.tgz#780f37f6b611ccd5c04d484b7b33e436e2ea8568" - integrity sha512-aWO6Lr9wea96Z7AEagzf4reKgDb3UWXZnClwJK7baScwF8KV+Mh99vVgkSe1nj2gKOZ31pBLp62RDJkc3gdlnA== - -"@swc/core-linux-arm64-gnu@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.181.tgz#34a4639fdcf3cf6c30087f719200c2fb1eac8792" - integrity sha512-+7fzDwsvcbhPafKdminMQrU3Ej1NHltXy7k+zgjj8BDPZbfi8hRzQcONeBV7sfl4xvw3d3roNHu2UMmKzLNs0w== - -"@swc/core-linux-arm64-musl@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.181.tgz#c1388644df35ad30b71c0d09fd9a96d31405299f" - integrity sha512-U9k8pv2oCxYYfu9DdOO1ZZgqbmF97NgJzSaIu3PsTedF4RcGIiPcuGOFqrUECsGUW2i6uKejE8onbXPj9UmaZQ== - -"@swc/core-linux-x64-gnu@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.181.tgz#2384b58d35bb2e31521005869acbc6ea2e0700b4" - integrity sha512-9AQXrvZ9BFQJeqYMpKQZRf9h/DEwhfHIR39krehO+g594i+mkkp+UNTToez6Ifn+NBYl58xyEcQGwsYIqtdYVw== - -"@swc/core-linux-x64-musl@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.181.tgz#4938a87eae011daaf9f360a1452ece8a2e9c5816" - integrity sha512-Pq/aBMj3F4CR4tXq85t7IW3piu76a677nIoo6QtBkAjrQ5QuJqpaez/5aewipG+kIXpiu/DNFIN+cISa1QeC8A== - -"@swc/core-win32-arm64-msvc@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.181.tgz#553b16cfb5aa918f191227abe929619263142ea5" - integrity sha512-m24036tVFDE8ZJ3fBVBfsHw4tHd0BG6g3TvT2MLAiW2MezYeTdrGpmvPBz4Woz686I/06cWeSg7cZF1/ZcZMMA== - -"@swc/core-win32-ia32-msvc@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.181.tgz#e520b9caa136c283fa789805bfe46966faec6d81" - integrity sha512-OPROzGapmr29qqwvB/aP9SA80r2eIukj+q7gghdQVptJrQU4GrTyzW1TpnGtpzj8rLZz4hEG6KtyPUh54bJZ/g== - -"@swc/core-win32-x64-msvc@1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.181.tgz#5cc5843e2aad673abb76231971faca140c711709" - integrity sha512-YrIaS63XsGiQ9AgxUVZ7Irt4pwQc3c2TPN7PyQP7ok9zBZxY5pBTwRTdLctlF4LNsSavlHE5+rvdPzcYAG0ekQ== - -"@swc/core@^1.2.181": - version "1.2.181" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.181.tgz#87a856be4581be4da5515287a2120544f9d733ba" - integrity sha512-evQX+Br/gC+FYLbUIF1dOQa7hUzBpowrcbgPkIRCEvi4HrCn7pGBZ2ZHBXmwEtBdLfOlyQvN/8USClApQKK4Rw== +"@swc/core-android-arm-eabi@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.185.tgz#6fca8a364428c3ff17fd960176a8c5a1047748c4" + integrity sha512-/ZTj5yaPkPC0UwggYN+y4d2DNZJI+b1y1gi4twrQJz997OMU032Hi9/59VxHFzHNxlzhIuCJYcbxOxi1Aqk2bA== + +"@swc/core-android-arm64@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.185.tgz#592fa96fb17036d920f57c8f36c859acf1dacb53" + integrity sha512-TgidzM+7H0YTIABu2ILI8MRDiIzcFULz5vIUWbhLwypPH9vJCFcDnAv5rBpg/4KBMzuSI6BNNBIcf/8Wc9e0HA== + +"@swc/core-darwin-arm64@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.185.tgz#5dfbb3425ddf479c8875a3737e1de5b127e335b2" + integrity sha512-segMc9FVYz+M5KzpPJR+M20Mmeq4ZQw4gi6rt0HXNpSPykm+oe/wb1CZbMk/9SpMaevpXOOZa0HHBM2ue+WhVA== + +"@swc/core-darwin-x64@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.2.185.tgz#e97ed012ff08fb39dcc51fc07233f4425fa89408" + integrity sha512-PL1Xq6R5zpBbYZsWJU0xK2/WQlhag/Kiq1eZd6ftSLaxn0q00wdSGPpzOqK5FTYAqi+5R1CWM/kCOHFoSlYDfg== + +"@swc/core-freebsd-x64@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.185.tgz#ba12147270c754c47eee9a99f08de75172ae4bb1" + integrity sha512-scaFxGfV7RhJrrCGzouwFe1XOzJvY/WjYWysHuD+slSdn3pjSnxXtX2Q9jPIYF0bmIcbTp4D6V8VITLhmfkzEA== + +"@swc/core-linux-arm-gnueabihf@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.185.tgz#4bd8ff733e06c8ea0dc916208f8fdeb907f25256" + integrity sha512-WQ84BVGF0al3ynWBeXuEpO7y6h8Bh4AXr+Ys2YaEgyZtAZ6zWUi3Ca4ktFWwpACSm0XUUB3lhlapUcqXJE8lZg== + +"@swc/core-linux-arm64-gnu@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.185.tgz#8abe168271f4ba6767da87fb4386ccea388fc324" + integrity sha512-INrmHqV5ti0ROS9FeGXPF5ZcIAWZ9Sp+Xbn5isWZ9owqT0c2CU4f9+w+OzNMMDKVFe2ARvlH/D927mLIgwqDmQ== + +"@swc/core-linux-arm64-musl@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.185.tgz#2352673452ac2553d45181d53351cb00d378d848" + integrity sha512-OEwVBlypM7SOZqpa82hIh9jeiu/eSXG+J+R0vekcWz7EkW5zb504uyGPeZJKMqX23I5GZtBpk96UUbhnNCaYUg== + +"@swc/core-linux-x64-gnu@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.185.tgz#058444fa372374f2f7f2f2d09c03085f928c8f12" + integrity sha512-H8LnCdViP7JsFlDE02w5czlKQWnAAM9ZN3oZnvAuTod2gJBjTJ4eZ3h9d+EQdcszw7Csh+IwXbmPz0mPwaR0vQ== + +"@swc/core-linux-x64-musl@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.185.tgz#a8f473965e87acb03057d6b4790f86857e5ce4ea" + integrity sha512-DRHmhjCsA2FloF+6/HMxJ8bkdfddAY/wqnpuW/l3CPUyL3VMDmvSiZICN8f/J8LKpGfDV2FdczztmbGi14jO+g== + +"@swc/core-win32-arm64-msvc@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.185.tgz#d8fc5bf11e67664d54a84ad37d9ac7d69df1a317" + integrity sha512-0BmuvU+Lfz5n1/ihh30UF2Viu9JJn3S3YC9QD9BfF80ueEl8KT4JihhJGuEG3XuZk5+35o2oZiCRkn6NKI/qpA== + +"@swc/core-win32-ia32-msvc@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.185.tgz#cbd3a4ad67bf40754143fafc87baed6021e9a780" + integrity sha512-yRNa/frm5MeXJMpj6V6uQy5a0yfO9q6ZOQ4L+439UH8vBcgIZYOG07bJGvxeUjaKkkrhfzEu5Q8fdXTzPgGeAA== + +"@swc/core-win32-x64-msvc@1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.185.tgz#f2459a88783ed95257229e41034fd913b487c5b4" + integrity sha512-nLF0AKADjeR3Rr05lWoKOeDbGBFpmbFnGkpLJK9EAwAIQUC9lDRYIps5yinPZsgqBwa0RCUsxzS3PjbWEY18bg== + +"@swc/core@^1.2.185": + version "1.2.185" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.2.185.tgz#26cdc7f9417fd2f04fde7f97d0b217aaa1bc8d3b" + integrity sha512-dDNzDrJ4bzMVWeFWqLJojjv5XZJZ84Zia7kQdJjp+kfOMdEhS+onrAwrk5Q88PlAvbrhY6kQbWD2LZ8JdyEaSQ== optionalDependencies: - "@swc/core-android-arm-eabi" "1.2.181" - "@swc/core-android-arm64" "1.2.181" - "@swc/core-darwin-arm64" "1.2.181" - "@swc/core-darwin-x64" "1.2.181" - "@swc/core-freebsd-x64" "1.2.181" - "@swc/core-linux-arm-gnueabihf" "1.2.181" - "@swc/core-linux-arm64-gnu" "1.2.181" - "@swc/core-linux-arm64-musl" "1.2.181" - "@swc/core-linux-x64-gnu" "1.2.181" - "@swc/core-linux-x64-musl" "1.2.181" - "@swc/core-win32-arm64-msvc" "1.2.181" - "@swc/core-win32-ia32-msvc" "1.2.181" - "@swc/core-win32-x64-msvc" "1.2.181" + "@swc/core-android-arm-eabi" "1.2.185" + "@swc/core-android-arm64" "1.2.185" + "@swc/core-darwin-arm64" "1.2.185" + "@swc/core-darwin-x64" "1.2.185" + "@swc/core-freebsd-x64" "1.2.185" + "@swc/core-linux-arm-gnueabihf" "1.2.185" + "@swc/core-linux-arm64-gnu" "1.2.185" + "@swc/core-linux-arm64-musl" "1.2.185" + "@swc/core-linux-x64-gnu" "1.2.185" + "@swc/core-linux-x64-musl" "1.2.185" + "@swc/core-win32-arm64-msvc" "1.2.185" + "@swc/core-win32-ia32-msvc" "1.2.185" + "@swc/core-win32-x64-msvc" "1.2.185" "@swc/jest@^0.2.21": version "0.2.21" @@ -3406,19 +3395,14 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^27.5.0": - version "27.5.0" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.0.tgz#e04ed1824ca6b1dd0438997ba60f99a7405d4c7b" - integrity sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g== +"@types/jest@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.1.tgz#2c8b6dc6ff85c33bcd07d0b62cb3d19ddfdb3ab9" + integrity sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ== dependencies: jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" -"@types/js-cookie@^2.2.6": - version "2.2.7" - resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.7.tgz#226a9e31680835a6188e887f3988e60c04d3f6a3" - integrity sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA== - "@types/js-yaml@^4.0.5": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" @@ -3497,10 +3481,10 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/node@*", "@types/node@^17.0.31", "@types/node@^17.0.5": - version "17.0.31" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d" - integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== +"@types/node@*", "@types/node@^17.0.34", "@types/node@^17.0.5": + version "17.0.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.34.tgz#3b0b6a50ff797280b8d000c6281d229f9c538cef" + integrity sha512-XImEz7XwTvDBtzlTnm8YvMqGW/ErMWBsKZ+hMTvnDIjGCKxwK5Xpc+c/oQjOauwq8M4OS11hEkpjX8rrI/eEgA== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -3533,9 +3517,9 @@ integrity sha512-O397rnSS9iQI4OirieAtsDqvCj4+3eY1J+EPdNTKuHuRWIfUoGyzX294o8C4KJYaLqgSrd2o60c5EqCU8Zv02g== "@types/prettier@^2.1.5": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759" - integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== + version "2.6.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed" + integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw== "@types/prismjs@^1.26.0": version "1.26.0" @@ -3575,10 +3559,10 @@ "@types/webpack" "^4" "@types/webpack-dev-server" "3" -"@types/react-dom@^18.0.3": - version "18.0.3" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.3.tgz#a022ea08c75a476fe5e96b675c3e673363853831" - integrity sha512-1RRW9kst+67gveJRYPxGmVy8eVJ05O43hg77G2j5m76/RFJtMbcfAs2viQ2UNsvvDg8F7OfQZx8qQcl6ymygaQ== +"@types/react-dom@^18.0.4": + version "18.0.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.4.tgz#dcbcadb277bcf6c411ceff70069424c57797d375" + integrity sha512-FgTtbqPOCI3dzZPZoC2T/sx3L34qxy99ITWn4eoSA95qPyXDMH0ALoAqUp49ITniiJFsXUVBtalh/KffMpg21Q== dependencies: "@types/react" "*" @@ -3843,85 +3827,85 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz#bc4cbcf91fbbcc2e47e534774781b82ae25cc3d8" - integrity sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA== +"@typescript-eslint/eslint-plugin@^5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.24.0.tgz#59f9ed21fc4490444b75b250e4ce81e4b7bba18f" + integrity sha512-6bqFGk6wa9+6RrU++eLknKyDqXU1Oc8nyoLu5a1fU17PNRJd9UBr56rMF7c4DRaRtnarlkQ4jwxUbvBo8cNlpw== dependencies: - "@typescript-eslint/scope-manager" "5.23.0" - "@typescript-eslint/type-utils" "5.23.0" - "@typescript-eslint/utils" "5.23.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.24.0" + "@typescript-eslint/type-utils" "5.24.0" + "@typescript-eslint/utils" "5.24.0" + debug "^4.3.4" functional-red-black-tree "^1.0.1" - ignore "^5.1.8" + ignore "^5.2.0" regexpp "^3.2.0" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.23.0.tgz#443778e1afc9a8ff180f91b5e260ac3bec5e2de1" - integrity sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw== +"@typescript-eslint/parser@^5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.24.0.tgz#fe6563483f264aa9fe48b7fd9b329aa5f985841a" + integrity sha512-4q29C6xFYZ5B2CXqSBBdcS0lPyfM9M09DoQLtHS5kf+WbpV8pBBhHDLNhXfgyVwFnhrhYzOu7xmg02DzxeF2Uw== dependencies: - "@typescript-eslint/scope-manager" "5.23.0" - "@typescript-eslint/types" "5.23.0" - "@typescript-eslint/typescript-estree" "5.23.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.24.0" + "@typescript-eslint/types" "5.24.0" + "@typescript-eslint/typescript-estree" "5.24.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz#4305e61c2c8e3cfa3787d30f54e79430cc17ce1b" - integrity sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw== +"@typescript-eslint/scope-manager@5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz#ac8c4d65064204b596909c204fe9b7e30c3f51b2" + integrity sha512-WpMWipcDzGmMzdT7NtTjRXFabx10WleLUGrJpuJLGaxSqpcyq5ACpKSD5VE40h2nz3melQ91aP4Du7lh9FliCA== dependencies: - "@typescript-eslint/types" "5.23.0" - "@typescript-eslint/visitor-keys" "5.23.0" + "@typescript-eslint/types" "5.24.0" + "@typescript-eslint/visitor-keys" "5.24.0" -"@typescript-eslint/type-utils@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz#f852252f2fc27620d5bb279d8fed2a13d2e3685e" - integrity sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw== +"@typescript-eslint/type-utils@5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.24.0.tgz#aad47227e89cceec9175b1a67df69ebcd79f9421" + integrity sha512-uGi+sQiM6E5CeCZYBXiaIvIChBXru4LZ1tMoeKbh1Lze+8BO9syUG07594C4lvN2YPT4KVeIupOJkVI+9/DAmQ== dependencies: - "@typescript-eslint/utils" "5.23.0" - debug "^4.3.2" + "@typescript-eslint/utils" "5.24.0" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.23.0.tgz#8733de0f58ae0ed318dbdd8f09868cdbf9f9ad09" - integrity sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw== +"@typescript-eslint/types@5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.24.0.tgz#565ff94a4b89073265e27514dc65225d18aabe6c" + integrity sha512-Tpg1c3shTDgTmZd3qdUyd+16r/pGmVaVEbLs+ufuWP0EruVbUiEOmpBBQxBb9a8iPRxi8Rb2oiwOxuZJzSq11A== -"@typescript-eslint/typescript-estree@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz#dca5f10a0a85226db0796e8ad86addc9aee52065" - integrity sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg== +"@typescript-eslint/typescript-estree@5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.24.0.tgz#30b9cbc1af475b9e02aca34cfe9ba9e1bb820143" + integrity sha512-zcor6vQkQmZAQfebSPVwUk/FD+CvnsnlfKXYeQDsWXRF+t7SBPmIfNia/wQxCSeu1h1JIjwV2i9f5/DdSp/uDw== dependencies: - "@typescript-eslint/types" "5.23.0" - "@typescript-eslint/visitor-keys" "5.23.0" - debug "^4.3.2" - globby "^11.0.4" + "@typescript-eslint/types" "5.24.0" + "@typescript-eslint/visitor-keys" "5.24.0" + debug "^4.3.4" + globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.23.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.23.0.tgz#4691c3d1b414da2c53d8943310df36ab1c50648a" - integrity sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA== +"@typescript-eslint/utils@5.24.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.24.0.tgz#7a854028040a305ddea129328e45cfb2c6406e75" + integrity sha512-K05sbWoeCBJH8KXu6hetBJ+ukG0k2u2KlgD3bN+v+oBKm8adJqVHpSSLHNzqyuv0Lh4GVSAUgZ5lB4icmPmWLw== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.23.0" - "@typescript-eslint/types" "5.23.0" - "@typescript-eslint/typescript-estree" "5.23.0" + "@typescript-eslint/scope-manager" "5.24.0" + "@typescript-eslint/types" "5.24.0" + "@typescript-eslint/typescript-estree" "5.24.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz#057c60a7ca64667a39f991473059377a8067c87b" - integrity sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg== +"@typescript-eslint/visitor-keys@5.24.0": + version "5.24.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.24.0.tgz#bb3e9a788ccd50c53e03557e4e203599880c3123" + integrity sha512-qzGwSXMyMnogcAo+/2fU+jhlPPVMXlIH2PeAonIKjJSoDKl1+lJVvG5Z5Oud36yU0TWK2cs1p/FaSN5J2OUFYA== dependencies: - "@typescript-eslint/types" "5.23.0" - eslint-visitor-keys "^3.0.0" + "@typescript-eslint/types" "5.24.0" + eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": version "1.11.1" @@ -4044,11 +4028,6 @@ "@webassemblyjs/ast" "1.11.1" "@xtuc/long" "4.2.2" -"@xobotyi/scrollbar-width@^1.9.5": - version "1.9.5" - resolved "https://registry.yarnpkg.com/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.5.tgz#80224a6919272f405b87913ca13b92929bdf3c4d" - integrity sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ== - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -4530,9 +4509,9 @@ aws4@^1.8.0: integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axe-core@^4.3.5: - version "4.4.1" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413" - integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw== + version "4.4.2" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.2.tgz#dcf7fb6dea866166c3eab33d68208afe4d5f670c" + integrity sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA== axios@0.21.3: version "0.21.3" @@ -4960,9 +4939,9 @@ buffers@~0.1.1: integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ== builtin-modules@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" - integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== builtins@^1.0.3: version "1.0.3" @@ -5097,9 +5076,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001335: - version "1.0.30001339" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001339.tgz#f9aece4ea8156071613b27791547ba0b33f176cf" - integrity sha512-Es8PiVqCe+uXdms0Gu5xP5PF2bxLR7OBp3wUzUnuO7OHzhOfCyg3hdiGWVPVxhiuniOzng+hTc1u3fEQ0TlkSQ== + version "1.0.30001341" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz#59590c8ffa8b5939cf4161f00827b8873ad72498" + integrity sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA== caseless@~0.12.0: version "0.12.0" @@ -5219,7 +5198,7 @@ cheerio@^1.0.0-rc.10: parse5-htmlparser2-tree-adapter "^6.0.1" tslib "^2.2.0" -chokidar@^3.4.0, chokidar@^3.4.2, chokidar@^3.5.3: +chokidar@^3.4.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -5255,9 +5234,9 @@ ci-info@^2.0.0: integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== ci-info@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" - integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + version "3.3.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" + integrity sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg== cjs-module-lexer@^1.0.0: version "1.2.2" @@ -5520,11 +5499,6 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - commander@^5.0.0, commander@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" @@ -5629,20 +5603,6 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -concurrently@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.1.0.tgz#477b49b8cfc630bb491f9b02e9ed7fb7bff02942" - integrity sha512-Bz0tMlYKZRUDqJlNiF/OImojMB9ruKUz6GCfmhFnSapXgPe+3xzY4byqoKG9tUZ7L2PGEUjfLPOLfIX3labnmw== - dependencies: - chalk "^4.1.0" - date-fns "^2.16.1" - lodash "^4.17.21" - rxjs "^6.6.3" - spawn-command "^0.0.2-1" - supports-color "^8.1.0" - tree-kill "^1.2.2" - yargs "^16.2.0" - config-chain@^1.1.12: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -5787,7 +5747,7 @@ conventional-recommended-bump@^6.1.0: meow "^8.0.0" q "^1.5.1" -convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -5814,13 +5774,6 @@ copy-text-to-clipboard@^3.0.1: resolved "https://registry.yarnpkg.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz#8cbf8f90e0a47f12e4a24743736265d157bce69c" integrity sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q== -copy-to-clipboard@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" - integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== - dependencies: - toggle-selection "^1.0.6" - copy-webpack-plugin@^10.2.4: version "10.2.4" resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz#6c854be3fdaae22025da34b9112ccf81c63308fe" @@ -5902,6 +5855,17 @@ cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -6001,14 +5965,6 @@ css-functions-list@^3.0.1: resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.0.1.tgz#1460df7fb584d1692c30b105151dbb988c8094f9" integrity sha512-PriDuifDt4u4rkDgnqRCLnjfMatufLmWNfQnGCq34xZwpY3oabwhB9SqRBmuvWUgndbemCFlKqg+nO7C2q0SBw== -css-in-js-utils@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz#3b472b398787291b47cfe3e44fecfdd9e914ba99" - integrity sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA== - dependencies: - hyphenate-style-name "^1.0.2" - isobject "^3.0.1" - css-loader@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.1.tgz#e98106f154f6e1baf3fc3bc455cb9981c1d5fd2e" @@ -6079,28 +6035,28 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-advanced@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.3.tgz#848422118d7a62b5b29a53edc160f58c7f7f7539" - integrity sha512-AB9SmTSC2Gd8T7PpKUsXFJ3eNsg7dc4CTZ0+XAJ29MNxyJsrCEk7N1lw31bpHrsQH2PVJr21bbWgGAfA9j0dIA== +cssnano-preset-advanced@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.4.tgz#91e79c253d3f0176608f7814636242132924195b" + integrity sha512-mZovba9FGPmwGPgeMAE/ChrgmluEFyxQzkGZbBUcDYKfhI263BPV2NSiCyqdy8wSmVYEgyRi8TxiPwI4ZO/yGQ== dependencies: autoprefixer "^10.3.7" - cssnano-preset-default "^5.2.7" + cssnano-preset-default "^5.2.8" postcss-discard-unused "^5.1.0" postcss-merge-idents "^5.1.1" postcss-reduce-idents "^5.2.0" postcss-zindex "^5.1.0" -cssnano-preset-default@^5.2.7: - version "5.2.7" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.7.tgz#791e3603fb8f1b46717ac53b47e3c418e950f5f3" - integrity sha512-JiKP38ymZQK+zVKevphPzNSGHSlTI+AOwlasoSRtSVMUU285O7/6uZyd5NbW92ZHp41m0sSHe6JoZosakj63uA== +cssnano-preset-default@^5.2.8: + version "5.2.8" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.8.tgz#d7886e8cf6d075ae2298d7526b4cccf0eacdcbdc" + integrity sha512-6xQXUhTAPupvib3KC0Gl0d1jIwGFcJyuWQiMcA6grprGdmIzt1cxG5z78VuZu6DRRS6qin6ETkQsH6ixxb/SQw== dependencies: css-declaration-sorter "^6.2.2" cssnano-utils "^3.1.0" postcss-calc "^8.2.3" postcss-colormin "^5.3.0" - postcss-convert-values "^5.1.0" + postcss-convert-values "^5.1.1" postcss-discard-comments "^5.1.1" postcss-discard-duplicates "^5.1.0" postcss-discard-empty "^5.1.1" @@ -6109,7 +6065,7 @@ cssnano-preset-default@^5.2.7: postcss-merge-rules "^5.1.1" postcss-minify-font-values "^5.1.0" postcss-minify-gradients "^5.1.1" - postcss-minify-params "^5.1.2" + postcss-minify-params "^5.1.3" postcss-minify-selectors "^5.2.0" postcss-normalize-charset "^5.1.0" postcss-normalize-display-values "^5.1.0" @@ -6131,12 +6087,12 @@ cssnano-utils@^3.1.0: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== -cssnano@^5.0.6, cssnano@^5.1.7: - version "5.1.7" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.7.tgz#99858bef6c76c9240f0cdc9239570bc7db8368be" - integrity sha512-pVsUV6LcTXif7lvKKW9ZrmX+rGRzxkEdJuVJcp5ftUjWITgwam5LMZOgaTvUrWPkcORBey6he7JKb4XAJvrpKg== +cssnano@^5.0.6, cssnano@^5.1.8: + version "5.1.8" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.8.tgz#6add8a61c8ae493184689af347e61b1bc7cd57dd" + integrity sha512-5lma/yQlK+6eOHSUqNAS11b4/fbiuasoxmCHoVYxSg6lQsyX7bGGIqiLi4o3Pe2CrUTrgcD2udW7JIgzC2806g== dependencies: - cssnano-preset-default "^5.2.7" + cssnano-preset-default "^5.2.8" lilconfig "^2.0.3" yaml "^1.10.2" @@ -6164,10 +6120,10 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@^3.0.2, csstype@^3.0.6: - version "3.0.11" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" - integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== +csstype@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" + integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== damerau-levenshtein@^1.0.7: version "1.0.8" @@ -6195,11 +6151,6 @@ data-urls@^3.0.1: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -date-fns@^2.16.1: - version "2.28.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2" - integrity sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw== - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -6342,10 +6293,10 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -del@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" - integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== +del@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.1.0.tgz#aa79a5b0a2a9ecc985c0a075e8ad9a5b23bf949c" + integrity sha512-OpcRktOt7G7HBfyxP0srBH4Djg4824EQORX8E1qvIhIzthNNArxxhrB/Mm7dRMiLi1nvFyUpDhzD2cTtbBhV8A== dependencies: globby "^11.0.1" graceful-fs "^4.2.4" @@ -6639,9 +6590,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== ejs@^3.1.6: - version "3.1.7" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.7.tgz#c544d9c7f715783dd92f0bddcf73a59e6962d006" - integrity sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw== + version "3.1.8" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" + integrity sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ== dependencies: jake "^10.8.5" @@ -6739,17 +6690,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error-stack-parser@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.7.tgz#b0c6e2ce27d0495cf78ad98715e0cad1219abb57" - integrity sha512-chLOW0ZGRf4s8raLrDxa5sdkvPec5YdvwbFnqJme4rk0rFajP8mPtrDL1+I+CwrQDCjswDA5sREX7jYQDQs9vA== - dependencies: - stackframe "^1.1.1" - es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: - version "1.20.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.0.tgz#b2d526489cceca004588296334726329e0a6bfb6" - integrity sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA== + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -6770,7 +6714,7 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19 object-inspect "^1.12.0" object-keys "^1.1.1" object.assign "^4.1.2" - regexp.prototype.flags "^1.4.1" + regexp.prototype.flags "^1.4.3" string.prototype.trimend "^1.0.5" string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" @@ -6878,10 +6822,10 @@ eslint-module-utils@^2.7.3: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-eslint-plugin@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-4.1.0.tgz#40ae944d79e845dc9d4a85328eea3c5bf4ae0f7d" - integrity sha512-QJVw+WYXJuG2469gx5G929bz7crfxySDlK1i569FkuT6dpeHDeP7MmDrKaswCx17snG25LRFD6wmVX+AO5x7Qg== +eslint-plugin-eslint-plugin@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-4.2.0.tgz#64c5ba82f9b1073c89a79a1c8f451f278be6603a" + integrity sha512-ZDyUUlZJw85hmc9pGciNFiQwojXKxV7KAAVnQtojk1W/I8YYHxYV9JBuzhfAYfVemiQzDPNwj1zwAqQwGN1ROw== dependencies: eslint-utils "^3.0.0" estraverse "^5.2.0" @@ -6910,10 +6854,10 @@ eslint-plugin-import@^2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@^26.1.5: - version "26.1.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.5.tgz#6cfca264818d6d6aa120b019dab4d62b6aa8e775" - integrity sha512-su89aDuljL9bTjEufTXmKUMSFe2kZUL9bi7+woq+C2ukHZordhtfPm4Vg+tdioHBaKf8v3/FXW9uV0ksqhYGFw== +eslint-plugin-jest@^26.2.2: + version "26.2.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.2.2.tgz#74e000544259f1ef0462a609a3fc9e5da3768f6c" + integrity sha512-etSFZ8VIFX470aA6kTqDPhIq7YWe0tjBcboFNV3WeiC18PJ/AVonGhuTwlmuz2fBkH8FJHA7JQ4k7GsQIj1Gew== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -7002,7 +6946,7 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== @@ -7308,11 +7252,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-shallow-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz#d4dcaf6472440dcefa6f88b98e3251e27f25628b" - integrity sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw== - fast-url-parser@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" @@ -7325,11 +7264,6 @@ fastest-levenshtein@^1.0.12: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== -fastest-stable-stringify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz#3757a6774f6ec8de40c4e86ec28ea02417214c76" - integrity sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q== - fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -7413,9 +7347,9 @@ file-loader@^6.2.0: schema-utils "^3.0.0" filelist@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.3.tgz#448607750376484932f67ef1b9ff07386b036c83" - integrity sha512-LwjCsruLWQULGYKy7TX0OPtrL9kLpojOFKc5VCTxdFTV7w5zbsgqVKfnkKG7Qgjtq50gKfO56hJv88OfcGb70Q== + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== dependencies: minimatch "^5.0.1" @@ -7521,9 +7455,9 @@ flatted@^3.1.0: integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== flow-parser@0.*: - version "0.177.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.177.0.tgz#653092470c8e79ed737cb38e3be1d1de0d25feac" - integrity sha512-Ac1OwHjSoUALrcnHTTD6oaEPITaxYmP34iiEEcuCxeeD+tOKR7/Toaw4RpJKcDmYxLX79ZP9E7z+Q8ze9pESbQ== + version "0.178.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.178.0.tgz#85d300e29b146b54cb79e277e092ffd401b05f0c" + integrity sha512-OviMR2Y/sMSyUzR1xLLAmQvmHXTsD1Sq69OTmP5AckVulld7sVNsCfwsw7t3uK00dO9A7k4fD+wodbzzaaEn5g== flux@^4.0.1: version "4.0.3" @@ -7533,10 +7467,10 @@ flux@^4.0.1: fbemitter "^3.0.0" fbjs "^3.0.1" -focus-options-polyfill@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/focus-options-polyfill/-/focus-options-polyfill-1.2.0.tgz#9800ffb230bc9db63eea6d27694a62ac2e355946" - integrity sha512-4sgXxV/zU4WHM2IHWpjUmEWazbF6ie+M93/uo8ipfAbQ1GHopn+/V+Ca+PR0ndxswNQbisCNrjbnvWEq14MkTA== +focus-options-polyfill@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/focus-options-polyfill/-/focus-options-polyfill-1.5.1.tgz#0f422580d9d1fb65651f2968b547032eb17dab3c" + integrity sha512-7yH20IePROHJLLbJvqqtsG420jE6DuukccapiB/WagtUpnc98r9NzHbX5rnjCDgdZqLgcqlzGjn+8l0Zb8Zf9w== follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.7: version "1.15.0" @@ -7655,11 +7589,6 @@ fs-monkey@1.0.3: resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== -fs-readdir-recursive@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -7891,28 +7820,27 @@ glob-to-regexp@^0.4.1: integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" glob@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.1.tgz#00308f5c035aa0b2a447cd37ead267ddff1577d3" - integrity sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow== + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^5.0.1" once "^1.3.0" - path-is-absolute "^1.0.0" global-dirs@^0.1.1: version "0.1.1" @@ -7950,9 +7878,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.6.0, globals@^13.9.0: - version "13.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.14.0.tgz#daf3ff9b4336527cf56e98330b6f64bea9aff9df" - integrity sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg== + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== dependencies: type-fest "^0.20.2" @@ -8537,11 +8465,6 @@ husky@^8.0.1: resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== -hyphenate-style-name@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" - integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== - iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -8578,7 +8501,7 @@ ignore-walk@^3.0.3: dependencies: minimatch "^3.0.4" -ignore@^5.1.8, ignore@^5.1.9, ignore@^5.2.0: +ignore@^5.1.9, ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -8591,9 +8514,9 @@ image-size@^1.0.1: queue "6.0.2" immer@^9.0.7: - version "9.0.12" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" - integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== + version "9.0.14" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.14.tgz#e05b83b63999d26382bb71676c9d827831248a48" + integrity sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw== import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" @@ -8687,13 +8610,6 @@ inline-style-parser@0.1.1: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== -inline-style-prefixer@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-6.0.1.tgz#c5c0e43ba8831707afc5f5bbfd97edf45c1fa7ae" - integrity sha512-AsqazZ8KcRzJ9YPN1wMH2aNM7lkWQ8tSPrW5uDk1ziYwiAPWSZnUsC7lfZq+BDqLqz0B4Pho5wscWcJzVvRzDQ== - dependencies: - css-in-js-utils "^2.0.0" - inquirer@^7.3.3: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -8735,9 +8651,9 @@ invariant@^2.2.4: loose-envify "^1.0.0" ip@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.6.tgz#5a651a37644586e18b6ba3b48ca122bf56495f67" - integrity sha512-/dAvCivFs/VexXAtiAoMIqyhkhStNC9CPD0h1noonimOgB1xrCkexF2c5CjlqQ72GgMPjN6tiV+oreoPv3Ft1g== + version "1.1.8" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" + integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== ipaddr.js@1.9.1: version "1.9.1" @@ -9667,11 +9583,6 @@ joi@^17.6.0: "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^2.0.0" -js-cookie@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" - integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -10483,6 +10394,11 @@ memfs@^3.1.2, memfs@^3.4.1: dependencies: fs-monkey "1.0.3" +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -10641,7 +10557,7 @@ minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2: +minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -10649,9 +10565,9 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== dependencies: brace-expansion "^2.0.1" @@ -10806,9 +10722,9 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== multicast-dns@^7.2.4: - version "7.2.4" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.4.tgz#cf0b115c31e922aeb20b64e6556cbeb34cf0dd19" - integrity sha512-XkCYOU+rr2Ft3LI6w4ye51M3VK31qJXFIxu0XLw169PtKG0Zx47OrXeVW/GCYOfpC9s1yyyf1S+L8/4LY0J9Zw== + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== dependencies: dns-packet "^5.2.2" thunky "^1.0.2" @@ -10838,20 +10754,6 @@ mz@^2.4.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nano-css@^5.3.1: - version "5.3.4" - resolved "https://registry.yarnpkg.com/nano-css/-/nano-css-5.3.4.tgz#40af6a83a76f84204f346e8ccaa9169cdae9167b" - integrity sha512-wfcviJB6NOxDIDfr7RFn/GlaN7I/Bhe4d39ZRCJ3xvZX60LVe2qZ+rDqM49nm4YT81gAjzS+ZklhKP/Gnfnubg== - dependencies: - css-tree "^1.1.2" - csstype "^3.0.6" - fastest-stable-stringify "^2.0.2" - inline-style-prefixer "^6.0.0" - rtl-css-js "^1.14.0" - sourcemap-codec "^1.4.8" - stacktrace-js "^2.0.2" - stylis "^4.0.6" - nanoid@^3.3.3: version "3.3.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" @@ -10899,6 +10801,11 @@ netlify-plugin-cache@^1.0.3: resolved "https://registry.yarnpkg.com/netlify-plugin-cache/-/netlify-plugin-cache-1.0.3.tgz#f60514e259dff2b3286b6d60b570bb1c81206794" integrity sha512-CTOwNWrTOP59T6y6unxQNnp1WX702v2R/faR5peSH94ebrYfyY4zT5IsRcIiHKq57jXeyCrhy0GLuTN8ktzuQg== +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + njre@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/njre/-/njre-0.2.0.tgz#e5abfbafafb3db4438fe6b149da9a733fab0bf3d" @@ -11146,6 +11053,21 @@ npm-registry-fetch@^9.0.0: minizlib "^2.0.0" npm-package-arg "^8.0.0" +npm-run-all@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -11676,6 +11598,11 @@ path-is-inside@1.0.2: resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -11740,6 +11667,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatc resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pidtree@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" + integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== + pidtree@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.5.0.tgz#ad5fbc1de78b8a5f99d6fbdd4f6e4eee21d1aca1" @@ -11814,11 +11746,12 @@ postcss-colormin@^5.3.0: colord "^2.9.1" postcss-value-parser "^4.2.0" -postcss-convert-values@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz#f8d3abe40b4ce4b1470702a0706343eac17e7c10" - integrity sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g== +postcss-convert-values@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.1.1.tgz#31c8ffba650e86dc750631cafcf1db022c5bb6f1" + integrity sha512-UjcYfl3wJJdcabGKk8lgetPvhi1Et7VDc3sYr9EyhNBeB00YD4vHgPBp+oMVoG/dDWCc6ASbmzPNV6jADTwh8Q== dependencies: + browserslist "^4.20.3" postcss-value-parser "^4.2.0" postcss-discard-comments@^5.1.1: @@ -11912,10 +11845,10 @@ postcss-minify-gradients@^5.1.1: cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" -postcss-minify-params@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.1.2.tgz#77e250780c64198289c954884ebe3ee4481c3b1c" - integrity sha512-aEP+p71S/urY48HWaRHasyx4WHQJyOYaKpQ6eXl8k0kxg66Wt/30VR6/woh8THgcpRbonJD5IeD+CzNhPi1L8g== +postcss-minify-params@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz#ac41a6465be2db735099bbd1798d85079a6dc1f9" + integrity sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg== dependencies: browserslist "^4.16.6" cssnano-utils "^3.1.0" @@ -12192,10 +12125,10 @@ pretty-time@^1.1.0: resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.0.1, prism-react-renderer@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.1.tgz#88fc9d0df6bed06ca2b9097421349f8c2f24e30d" - integrity sha512-xUeDMEz074d0zc5y6rxiMp/dlC7C+5IDDlaEUlcBOFE2wddz7hz5PNupb087mPwTt7T9BrFmewObfCBuf/LKwQ== +prism-react-renderer@^1.0.1, prism-react-renderer@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.3.tgz#9b5a4211a6756eee3c96fee9a05733abc0b0805c" + integrity sha512-Viur/7tBTCH2HmYzwCHmt2rEFn+rdIWNIINXyg0StiISbDiIhHKhrFuEK8eMkKgvsIYSjgGqy/hNyucHp6FpoQ== prismjs@^1.28.0: version "1.28.0" @@ -12547,14 +12480,13 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1: dependencies: "@babel/runtime" "^7.10.3" -react-medium-image-zoom@^4.3.7: - version "4.3.7" - resolved "https://registry.yarnpkg.com/react-medium-image-zoom/-/react-medium-image-zoom-4.3.7.tgz#06c0771401c6de312a85843d1feebd15641a969b" - integrity sha512-Vg1M8CIX1EfhfSsmNc2tHP+8KjPDo9e5/zEDaSsfeTBHI82wjEvW3Lgb4k3jdWILPZVOWhM+7QHyDaAzghlvaQ== +react-medium-image-zoom@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/react-medium-image-zoom/-/react-medium-image-zoom-4.4.0.tgz#aa9f63dc08ffc2c2c919f16f3918f13951998a41" + integrity sha512-Y+1enQKyeM/ASAmvlKkLw0USbHePP5dbdjNSclHDBvzGLD8+tUqgxjjtTS54tMvvll7OSxTThVaXxrvO0uYO6A== dependencies: - focus-options-polyfill "1.2.0" - react-use "^17.2.1" - tslib "^2.1.0" + focus-options-polyfill "1.5.1" + tslib "^2.4.0" react-popper@^2.3.0: version "2.3.0" @@ -12572,22 +12504,22 @@ react-router-config@^5.1.1: "@babel/runtime" "^7.1.2" react-router-dom@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.1.tgz#0151baf2365c5fcd8493f6ec9b9b31f34d0f8ae1" - integrity sha512-f0pj/gMAbv9e8gahTmCEY20oFhxhrmHwYeIwH5EO5xu0qme+wXtsdB8YfUOAZzUz4VaXmb58m3ceiLtjMhqYmQ== + version "5.3.2" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.2.tgz#93a82c95732963d137c02b3aee0505956baeb69e" + integrity sha512-j8sAq4YdWsrkM2DfDX26GnjtDKWUSd65LzHyBz8NcgFcK0ct7oTvYlwhOr532xpXsYP1HONq6QqUGA7GhbAY5w== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" loose-envify "^1.3.1" prop-types "^15.6.2" - react-router "5.3.1" + react-router "5.3.2" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.3.1, react-router@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.1.tgz#b13e84a016c79b9e80dde123ca4112c4f117e3cf" - integrity sha512-v+zwjqb7bakqgF+wMVKlAPTca/cEmPOvQ9zt7gpSNyPXau1+0qvuYZ5BWzzNDP1y6s15zDwgb9rPN63+SIniRQ== +react-router@5.3.2, react-router@^5.2.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.2.tgz#87614394781e75cc6aa3b61cdfd147a1361cd890" + integrity sha512-GlsSUckZ4JthgsW5lV9oSCs5CoQ7q0t0Ump/Y5YQ8qhiS+WjaAhaoJhc7otpZW9eVhO6N06vYPt40SpEzuuZeg== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" @@ -12632,31 +12564,6 @@ react-textarea-autosize@^8.3.2: use-composed-ref "^1.0.0" use-latest "^1.0.0" -react-universal-interface@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/react-universal-interface/-/react-universal-interface-0.6.2.tgz#5e8d438a01729a4dbbcbeeceb0b86be146fe2b3b" - integrity sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw== - -react-use@^17.2.1: - version "17.3.2" - resolved "https://registry.yarnpkg.com/react-use/-/react-use-17.3.2.tgz#448abf515f47c41c32455024db28167cb6e53be8" - integrity sha512-bj7OD0/1wL03KyWmzFXAFe425zziuTf7q8olwCYBfOeFHY1qfO1FAMjROQLsLZYwG4Rx63xAfb7XAbBrJsZmEw== - dependencies: - "@types/js-cookie" "^2.2.6" - "@xobotyi/scrollbar-width" "^1.9.5" - copy-to-clipboard "^3.3.1" - fast-deep-equal "^3.1.3" - fast-shallow-equal "^1.0.0" - js-cookie "^2.2.1" - nano-css "^5.3.1" - react-universal-interface "^0.6.2" - resize-observer-polyfill "^1.5.1" - screenfull "^5.1.0" - set-harmonic-interval "^1.0.1" - throttle-debounce "^3.0.1" - ts-easing "^0.2.0" - tslib "^2.1.0" - react-waypoint@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/react-waypoint/-/react-waypoint-10.1.0.tgz#6ab522a61bd52946260e4a78b3182759a97b40ec" @@ -12908,7 +12815,7 @@ regexp-ast-analysis@^0.5.1: refa "^0.9.0" regexpp "^3.2.0" -regexp.prototype.flags@^1.4.1: +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== @@ -13197,11 +13104,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== -resize-observer-polyfill@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" - integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -13330,19 +13232,12 @@ rollup-plugin-terser@^7.0.0: terser "^5.0.0" rollup@^2.43.1: - version "2.72.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.72.1.tgz#861c94790537b10008f0ca0fbc60e631aabdd045" - integrity sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA== + version "2.73.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.73.0.tgz#128fef4b333fd92d02d6929afbb6ee38d7feb32d" + integrity sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ== optionalDependencies: fsevents "~2.3.2" -rtl-css-js@^1.14.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/rtl-css-js/-/rtl-css-js-1.15.0.tgz#680ed816e570a9ebccba9e1cd0f202c6a8bb2dc0" - integrity sha512-99Cu4wNNIhrI10xxUaABHsdDqzalrSRTie4GeCmbGVuehm4oj+fIy8fTzB+16pmKe8Bv9rl+hxIBez6KxExTew== - dependencies: - "@babel/runtime" "^7.1.2" - rtl-detect@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.0.4.tgz#40ae0ea7302a150b96bc75af7d749607392ecac6" @@ -13370,7 +13265,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^6.6.0, rxjs@^6.6.3: +rxjs@^6.6.0: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -13463,11 +13358,6 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" -screenfull@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.2.0.tgz#6533d524d30621fc1283b9692146f3f13a93d1ba" - integrity sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA== - scslre@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/scslre/-/scslre-0.1.6.tgz#71a2832e4bf3a9254973a04fbed90aec94f75757" @@ -13504,7 +13394,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.6.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -13601,11 +13491,6 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -set-harmonic-interval@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz#e1773705539cdfb80ce1c3d99e7f298bb3995249" - integrity sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g== - set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -13657,6 +13542,13 @@ sharp@^0.30.4: tar-fs "^2.1.1" tunnel-agent "^0.6.0" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -13664,12 +13556,17 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.0.0" +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.7.3: +shell-quote@^1.6.1, shell-quote@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== @@ -13742,11 +13639,6 @@ sitemap@^7.1.1: arg "^5.0.0" sax "^1.2.4" -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -13919,11 +13811,6 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== -source-map@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - integrity sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA== - source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -13961,11 +13848,6 @@ space-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz#43193cec4fb858a2ce934b7f98b7f2c18107098b" integrity sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw== -spawn-command@^0.0.2-1: - version "0.0.2-1" - resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" - integrity sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg== - spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -14078,13 +13960,6 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -stack-generator@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.5.tgz#fb00e5b4ee97de603e0773ea78ce944d81596c36" - integrity sha512-/t1ebrbHkrLrDuNMdeAcsvynWgoH/i4o8EGGfX7dEYDoTXOYVAkEpFdtshlvabzc6JlJ8Kf9YdFEoz7JkzGN9Q== - dependencies: - stackframe "^1.1.1" - stack-utils@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" @@ -14092,28 +13967,6 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -stackframe@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.1.tgz#1033a3473ee67f08e2f2fc8eba6aef4f845124e1" - integrity sha512-h88QkzREN/hy8eRdyNhhsO7RSJ5oyTqxxmmn0dzBIMUclZsjpfmrsg81vp8mjjAs2vAZ72nyWxRUwSwmh0e4xg== - -stacktrace-gps@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.0.4.tgz#7688dc2fc09ffb3a13165ebe0dbcaf41bcf0c69a" - integrity sha512-qIr8x41yZVSldqdqe6jciXEaSCKw1U8XTXpjDuy0ki/apyTn/r3w9hDAAQOhZdxvsC93H+WwwEu5cq5VemzYeg== - dependencies: - source-map "0.5.6" - stackframe "^1.1.1" - -stacktrace-js@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-2.0.2.tgz#4ca93ea9f494752d55709a081d400fdaebee897b" - integrity sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg== - dependencies: - error-stack-parser "^2.0.6" - stack-generator "^2.0.5" - stacktrace-gps "^3.0.4" - state-toggle@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" @@ -14201,6 +14054,15 @@ string.prototype.matchall@^4.0.6: regexp.prototype.flags "^1.4.1" side-channel "^1.0.4" +string.prototype.padend@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz#997a6de12c92c7cb34dc8a201a6c53d9bd88a5f1" + integrity sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + string.prototype.trimend@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" @@ -14407,11 +14269,6 @@ stylelint@^14.8.2: v8-compile-cache "^2.3.0" write-file-atomic "^4.0.1" -stylis@^4.0.6: - version "4.1.1" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.1.tgz#e46c6a9bbf7c58db1e65bb730be157311ae1fe12" - integrity sha512-lVrM/bNdhVX2OgBFNa2YJ9Lxj7kPzylieHd3TNjuGE0Re9JB7joL5VUKOVH1kdNNJTgGPpT8hmwIAPLaSyEVFQ== - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -14426,7 +14283,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0, supports-color@^8.1.0: +supports-color@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -14474,10 +14331,10 @@ svgo@^2.5.0, svgo@^2.7.0: picocolors "^1.0.0" stable "^0.1.8" -swc-loader@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/swc-loader/-/swc-loader-0.2.0.tgz#c26621f9fdeb5e28ba4a8ec19e25b1f3d03791c6" - integrity sha512-HefatIgiOaAekVcUPwT5hRNrWF3nULGv5nqGuXeHR7wz1HNN/VGlgmJE830yhIA7X3dHPln4yUTPnZ3ws7B5Fg== +swc-loader@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/swc-loader/-/swc-loader-0.2.1.tgz#43f2d1a746cf985476ca75ecac6234c7314fd9f8" + integrity sha512-opJG9R5Dl+Fa0QihOZO9v6vueB+JzRhJZw+c4ZRCqUHG2RZL10eHZRHMdQoDz6bvLp7XWe7XBIMUkuWtoGfMJw== symbol-tree@^3.2.4: version "3.2.4" @@ -14661,11 +14518,6 @@ throat@^6.0.1: resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== -throttle-debounce@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" - integrity sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg== - through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -14777,11 +14629,6 @@ to-vfile@^6.1.0: is-buffer "^2.0.0" vfile "^4.0.0" -toggle-selection@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" - integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== - toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" @@ -14840,11 +14687,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" integrity sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ== -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - tree-node-cli@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.5.2.tgz#c684fb9e7c2b9b29aa023eebaa9a095b6f93bf93" @@ -14879,11 +14721,6 @@ trough@^2.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876" integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g== -ts-easing@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ts-easing/-/ts-easing-0.2.0.tgz#c8a8a35025105566588d87dbda05dd7fbfa5a4ec" - integrity sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ== - tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" @@ -15013,9 +14850,9 @@ ua-parser-js@^0.7.30: integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ== uglify-js@^3.1.4: - version "3.15.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.4.tgz#fa95c257e88f85614915b906204b9623d4fa340d" - integrity sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA== + version "3.15.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" + integrity sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ== uid-number@0.0.6: version "0.0.6" @@ -15828,7 +15665,7 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -16214,9 +16051,9 @@ yargs@^16.0.0, yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.1.0, yargs@^17.3.1: - version "17.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" - integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: cliui "^7.0.2" escalade "^3.1.1"