From b48c6defaefa894fcc90875f79bb47613d6eb6ef Mon Sep 17 00:00:00 2001 From: Kristoffer K Date: Mon, 13 Dec 2021 02:47:07 +0100 Subject: [PATCH] fix: declare missing dependencies (#6097) * fix(utils-validation): add missing peer dependencies `react` and `react-dom` * fix(theme-classic): add missing peer dependency `@docusaurus/core` * ci: disable PnP fallbacks * ci: link to the docs * Update package.json Co-authored-by: Joshua Chen --- .github/workflows/tests-e2e.yml | 4 ++++ packages/docusaurus-theme-classic/package.json | 2 +- packages/docusaurus-utils-validation/package.json | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 72a50be207e4..616cd0798c5d 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -78,6 +78,10 @@ jobs: yarn config set unsafeHttpWhitelist --json '["localhost"]' yarn config set enableGlobalCache true + # Make PnP as strict as possible + # https://yarnpkg.com/features/pnp#fallback-mode + yarn config set pnpFallbackMode none + # Patch package so that peer deps are provided. This has been fixed in terser by making acorn a direct dependency # TODO watch out for the next terser release. Commit: https://github.com/terser/terser/commit/05b23eeb682d732484ad51b19bf528258fd5dc2a yarn config set packageExtensions --json '{"terser-webpack-plugin@*": {"dependencies": {"acorn": "^8.6.0"}}, "html-minifier-terser@*": {"dependencies": {"acorn": "^8.6.0"}}}' diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index 315daeb37623..23877e758ffb 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -23,6 +23,7 @@ "update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'" }, "dependencies": { + "@docusaurus/core": "2.0.0-beta.13", "@docusaurus/plugin-content-blog": "2.0.0-beta.13", "@docusaurus/plugin-content-docs": "2.0.0-beta.13", "@docusaurus/plugin-content-pages": "2.0.0-beta.13", @@ -45,7 +46,6 @@ "rtlcss": "^3.3.0" }, "devDependencies": { - "@docusaurus/core": "2.0.0-beta.13", "@docusaurus/module-type-aliases": "2.0.0-beta.13", "@docusaurus/types": "2.0.0-beta.13", "@types/mdx-js__react": "^1.5.4", diff --git a/packages/docusaurus-utils-validation/package.json b/packages/docusaurus-utils-validation/package.json index d930c4587d67..380cf4997465 100644 --- a/packages/docusaurus-utils-validation/package.json +++ b/packages/docusaurus-utils-validation/package.json @@ -23,6 +23,10 @@ "joi": "^17.4.2", "tslib": "^2.3.1" }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + }, "engines": { "node": ">=14" }