From 4819ea4cf65817e2f8be48e14da96fc438c4aca9 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 15:56:23 +0200 Subject: [PATCH 01/56] Update packages to pre- react 18 versions --- .yarnrc.yml | 2 +- apps/editing-toolkit/package.json | 72 +- apps/happy-blocks/package.json | 16 +- apps/happychat/package.json | 4 +- apps/o2-blocks/package.json | 28 +- apps/odyssey-stats/package.json | 2 +- apps/wpcom-block-editor/package.json | 38 +- client/package.json | 46 +- package.json | 24 +- packages/block-renderer/package.json | 12 +- packages/calypso-babel-config/package.json | 2 +- packages/calypso-build/package.json | 4 +- packages/calypso-e2e/package.json | 2 +- packages/components/package.json | 8 +- packages/composite-checkout/package.json | 4 +- packages/data-stores/package.json | 10 +- packages/design-carousel/package.json | 6 +- packages/design-picker/package.json | 12 +- packages/design-preview/package.json | 16 +- packages/domain-picker/package.json | 16 +- .../eslint-plugin-package-json/package.json | 2 +- packages/global-styles/package.json | 10 +- packages/help-center/package.json | 14 +- packages/i18n-calypso/package.json | 2 +- packages/i18n-utils/package.json | 4 +- packages/language-picker/package.json | 10 +- packages/launch/package.json | 16 +- packages/mini-cart/package.json | 4 +- packages/onboarding/package.json | 12 +- packages/page-pattern-modal/package.json | 14 +- packages/pattern-picker/package.json | 6 +- packages/plans-grid/package.json | 18 +- packages/search/package.json | 14 +- packages/site-picker/package.json | 8 +- packages/sites/package.json | 2 +- packages/social-previews/package.json | 4 +- packages/state-utils/package.json | 4 +- packages/subscriber/package.json | 18 +- packages/tour-kit/package.json | 18 +- packages/viewport-react/package.json | 2 +- packages/whats-new/package.json | 12 +- packages/wpcom-checkout/package.json | 8 +- packages/wpcom-template-parts/package.json | 4 +- yarn.lock | 2647 +++++++++-------- 44 files changed, 1692 insertions(+), 1485 deletions(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index 40e964db22200..850a550b6bd67 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -144,7 +144,7 @@ packageExtensions: "@types/wordpress__plugins@3.0.0": peerDependencies: react: "*" - "@wordpress/stylelint-config@20.0.3": + "@wordpress/stylelint-config@21.10.0": peerDependencies: postcss: "*" fake-indexeddb@3.1.7: diff --git a/apps/editing-toolkit/package.json b/apps/editing-toolkit/package.json index ffde5010721c3..edfdd653faecb 100644 --- a/apps/editing-toolkit/package.json +++ b/apps/editing-toolkit/package.json @@ -72,39 +72,39 @@ "@emotion/react": "^11.4.1", "@popperjs/core": "^2.10.2", "@sentry/browser": "^7.33.0", - "@wordpress/a11y": "^3.9.0", - "@wordpress/api-fetch": "^6.6.0", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/data": "^6.9.0", - "@wordpress/data-controls": "^2.9.0", - "@wordpress/date": "^4.9.0", - "@wordpress/dependency-extraction-webpack-plugin": "^3.5.0", - "@wordpress/dom-ready": "^3.9.0", - "@wordpress/edit-post": "^6.6.0", - "@wordpress/editor": "^12.8.0", - "@wordpress/element": "^4.7.0", - "@wordpress/env": "^4.7.0", - "@wordpress/escape-html": "^2.9.0", - "@wordpress/hooks": "^3.9.0", - "@wordpress/html-entities": "^3.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/interface": "^4.8.0", - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/keycodes": "^3.9.0", - "@wordpress/notices": "^3.10.0", - "@wordpress/nux": "^5.7.0", - "@wordpress/plugins": "^4.7.0", - "@wordpress/primitives": "^3.7.0", - "@wordpress/react-i18n": "^3.7.0", - "@wordpress/rich-text": "^5.7.0", - "@wordpress/scripts": "^23.1.0", - "@wordpress/server-side-render": "^3.7.0", - "@wordpress/url": "^3.10.0", + "@wordpress/a11y": "^3.22.0", + "@wordpress/api-fetch": "^6.19.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/data": "^7.6.0", + "@wordpress/data-controls": "^2.22.0", + "@wordpress/date": "^4.22.0", + "@wordpress/dependency-extraction-webpack-plugin": "^4.5.0", + "@wordpress/dom-ready": "^3.22.0", + "@wordpress/edit-post": "^6.19.0", + "@wordpress/editor": "^12.21.0", + "@wordpress/element": "^4.20.0", + "@wordpress/env": "^5.7.0", + "@wordpress/escape-html": "^2.22.0", + "@wordpress/hooks": "^3.22.0", + "@wordpress/html-entities": "^3.22.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/interface": "^4.21.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/keycodes": "^3.22.0", + "@wordpress/notices": "^3.22.0", + "@wordpress/nux": "^5.20.0", + "@wordpress/plugins": "^4.20.0", + "@wordpress/primitives": "^3.20.0", + "@wordpress/react-i18n": "^3.20.0", + "@wordpress/rich-text": "^5.20.0", + "@wordpress/scripts": "^24.6.0", + "@wordpress/server-side-render": "^3.20.0", + "@wordpress/url": "^3.23.0", "calypso": "workspace:^", "classnames": "^2.3.1", "eslint": "^8.34.0", @@ -132,9 +132,9 @@ "@testing-library/react": "^12.1.3", "@types/node": "^18.11.18", "@types/wordpress__plugins": "^3.0.0", - "@wordpress/eslint-plugin": "^12.3.0", - "@wordpress/jest-preset-default": "^8.2.0", - "@wordpress/readable-js-assets-webpack-plugin": "^1.0.4", + "@wordpress/eslint-plugin": "^13.6.0", + "@wordpress/jest-preset-default": "^10.3.0", + "@wordpress/readable-js-assets-webpack-plugin": "^2.5.0", "babel-jest": "^27.5.1", "jest-teamcity": "^1.9.0", "wait-for-expect": "^3.0.2", diff --git a/apps/happy-blocks/package.json b/apps/happy-blocks/package.json index 2ddf46d188f03..ca39a445adfae 100644 --- a/apps/happy-blocks/package.json +++ b/apps/happy-blocks/package.json @@ -32,12 +32,12 @@ "@automattic/wp-babel-makepot": "workspace:^", "@automattic/wpcom-template-parts": "workspace:^", "@emotion/styled": "^11.3.0", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.9.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "classnames": "^2.3.2", "glob": "^7.1.6", "i18n-calypso": "workspace:^", @@ -48,7 +48,7 @@ "@automattic/calypso-apps-builder": "workspace:^", "@emotion/react": "^11.4.1", "@testing-library/react": "^12.1.3", - "@wordpress/readable-js-assets-webpack-plugin": "^1.0.4", + "@wordpress/readable-js-assets-webpack-plugin": "^2.5.0", "copy-webpack-plugin": "^10.1.0", "glob": "^7.1.6", "jest": "^27.3.1", @@ -56,6 +56,6 @@ "webpack": "^5.68.0" }, "peerDependencies": { - "@wordpress/data": "^6.1.5" + "@wordpress/data": "^7.6.0" } } diff --git a/apps/happychat/package.json b/apps/happychat/package.json index 138528bcaf0f6..6d83b65b5cc57 100644 --- a/apps/happychat/package.json +++ b/apps/happychat/package.json @@ -28,8 +28,8 @@ "@automattic/calypso-polyfills": "workspace:^", "@automattic/components": "workspace:^", "@automattic/happychat-connection": "workspace:^", - "@wordpress/data": "^6.7.0", - "@wordpress/icons": "^8.3.0", + "@wordpress/data": "^7.6.0", + "@wordpress/icons": "^9.13.0", "calypso": "workspace:^", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/apps/o2-blocks/package.json b/apps/o2-blocks/package.json index cae5ad9829193..2904810a72f70 100644 --- a/apps/o2-blocks/package.json +++ b/apps/o2-blocks/package.json @@ -22,19 +22,19 @@ }, "dependencies": { "@automattic/calypso-build": "workspace:^", - "@wordpress/api-fetch": "^6.6.0", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/data": "^6.9.0", - "@wordpress/editor": "^12.8.0", - "@wordpress/element": "^4.7.0", - "@wordpress/hooks": "^3.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.5.0", - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/primitives": "^3.7.0", + "@wordpress/api-fetch": "^6.19.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/data": "^7.6.0", + "@wordpress/editor": "^12.21.0", + "@wordpress/element": "^4.20.0", + "@wordpress/hooks": "^3.22.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/primitives": "^3.20.0", "classnames": "^2.3.1", "lodash": "^4.17.21", "moment": "^2.26.0", @@ -47,7 +47,7 @@ "devDependencies": { "@automattic/calypso-apps-builder": "workspace:^", "@automattic/calypso-eslint-overrides": "workspace:^", - "@wordpress/readable-js-assets-webpack-plugin": "^1.0.4", + "@wordpress/readable-js-assets-webpack-plugin": "^2.5.0", "jest": "^27.3.1", "postcss": "^8.4.5", "webpack": "^5.68.0" diff --git a/apps/odyssey-stats/package.json b/apps/odyssey-stats/package.json index d2472f10cb3ac..b4e805f816460 100644 --- a/apps/odyssey-stats/package.json +++ b/apps/odyssey-stats/package.json @@ -52,7 +52,7 @@ "@automattic/webpack-extensive-lodash-replacement-plugin": "workspace:^", "@automattic/webpack-inline-constant-exports-plugin": "workspace:^", "@automattic/wp-babel-makepot": "workspace:^", - "@wordpress/dependency-extraction-webpack-plugin": "^4.4.0", + "@wordpress/dependency-extraction-webpack-plugin": "^4.5.0", "autoprefixer": "^10.2.5", "gettext-parser": "^6.0.0", "html-webpack-plugin": "^5.0.0-beta.4", diff --git a/apps/wpcom-block-editor/package.json b/apps/wpcom-block-editor/package.json index 4c4cd99aff502..588c35a836c39 100644 --- a/apps/wpcom-block-editor/package.json +++ b/apps/wpcom-block-editor/package.json @@ -23,24 +23,24 @@ "dependencies": { "@automattic/typography": "workspace:^", "@babel/runtime": "^7.17.2", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/data": "^6.9.0", - "@wordpress/dom-ready": "^3.9.0", - "@wordpress/edit-post": "^6.6.0", - "@wordpress/edit-site": "^4.6.0", - "@wordpress/editor": "^12.8.0", - "@wordpress/element": "^4.7.0", - "@wordpress/hooks": "^3.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/plugins": "^4.7.0", - "@wordpress/rich-text": "^5.7.0", - "@wordpress/url": "^3.10.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/data": "^7.6.0", + "@wordpress/dom-ready": "^3.22.0", + "@wordpress/edit-post": "^6.19.0", + "@wordpress/edit-site": "^4.19.0", + "@wordpress/editor": "^12.21.0", + "@wordpress/element": "^4.20.0", + "@wordpress/hooks": "^3.22.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/plugins": "^4.20.0", + "@wordpress/rich-text": "^5.20.0", + "@wordpress/url": "^3.23.0", "debug": "^4.3.3", "lodash": "^4.17.21", "react": "^17.0.2", @@ -53,7 +53,7 @@ "@automattic/calypso-apps-builder": "workspace:^", "@automattic/calypso-build": "workspace:^", "@automattic/calypso-eslint-overrides": "workspace:^", - "@wordpress/dependency-extraction-webpack-plugin": "^3.5.0", + "@wordpress/dependency-extraction-webpack-plugin": "^4.5.0", "jest": "^27.3.1", "npm-run-all": "^4.1.5", "postcss": "^8.4.5", diff --git a/client/package.json b/client/package.json index 0e0696e4654d6..8643dd761ffa7 100644 --- a/client/package.json +++ b/client/package.json @@ -76,29 +76,29 @@ "@sentry/react": "^7.33.0", "@stripe/react-stripe-js": "^1.4.1", "@stripe/stripe-js": "1.17.1", - "@wordpress/a11y": "^3.9.0", - "@wordpress/api-fetch": "^6.6.0", - "@wordpress/base-styles": "^4.7.0", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/data": "^6.9.0", - "@wordpress/data-controls": "^2.9.0", - "@wordpress/edit-post": "^6.6.0", - "@wordpress/element": "^4.7.0", - "@wordpress/format-library": "^3.7.0", - "@wordpress/hooks": "^3.9.0", - "@wordpress/html-entities": "^3.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/keyboard-shortcuts": "^3.7.0", - "@wordpress/keycodes": "^3.9.0", - "@wordpress/react-i18n": "^3.7.0", - "@wordpress/url": "^3.10.0", - "@wordpress/viewport": "^4.7.0", - "@wordpress/warning": "^2.9.0", + "@wordpress/a11y": "^3.22.0", + "@wordpress/api-fetch": "^6.19.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/data": "^7.6.0", + "@wordpress/data-controls": "^2.22.0", + "@wordpress/edit-post": "^6.19.0", + "@wordpress/element": "^4.20.0", + "@wordpress/format-library": "^3.20.0", + "@wordpress/hooks": "^3.22.0", + "@wordpress/html-entities": "^3.22.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/keyboard-shortcuts": "^3.20.0", + "@wordpress/keycodes": "^3.22.0", + "@wordpress/react-i18n": "^3.20.0", + "@wordpress/url": "^3.23.0", + "@wordpress/viewport": "^4.20.0", + "@wordpress/warning": "^2.22.0", "autosize": "^4.0.4", "body-parser": "^1.19.0", "browser-filesaver": "^1.1.1", diff --git a/package.json b/package.json index 70a2cea6040dc..d9bca24e5fd6b 100644 --- a/package.json +++ b/package.json @@ -174,16 +174,16 @@ "@types/wordpress__data": "^4.6.10", "@types/wordpress__data-controls": "^2.2.0", "@types/wordpress__editor": "^10.0.1", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/data": "^6.9.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/jest-preset-default": "^8.2.0", - "@wordpress/primitives": "^3.8.0", - "@wordpress/url": "^3.10.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/jest-preset-default": "^10.3.0", + "@wordpress/primitives": "^3.20.0", + "@wordpress/url": "^3.23.0", "browserslist": "^4.16.0", "calypso": "workspace:^", "calypso-codemods": "workspace:^", @@ -224,8 +224,8 @@ "@types/superagent": "^4.1.15", "@typescript-eslint/eslint-plugin": "^5.53.0", "@typescript-eslint/parser": "^5.53.0", - "@wordpress/eslint-plugin": "^12.3.0", - "@wordpress/stylelint-config": "^20.0.2", + "@wordpress/eslint-plugin": "^13.6.0", + "@wordpress/stylelint-config": "^21.5.0", "babel-loader": "^8.2.3", "bunyan": "^1.8.15", "capture-website": "^1.0.0", diff --git a/packages/block-renderer/package.json b/packages/block-renderer/package.json index cedc7e114bb06..d4cafb8b76b7c 100644 --- a/packages/block-renderer/package.json +++ b/packages/block-renderer/package.json @@ -29,9 +29,9 @@ "watch": "tsc --build ./tsconfig.json --watch" }, "dependencies": { - "@wordpress/block-editor": "^9.1.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/edit-site": "^4.6.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/edit-site": "^4.19.0", "classnames": "^2.3.1", "react-query": "^3.32.1", "tslib": "^2.3.0", @@ -45,9 +45,9 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "debug": "^4.3.3", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/calypso-babel-config/package.json b/packages/calypso-babel-config/package.json index 622df243017f8..370d650e81fd5 100644 --- a/packages/calypso-babel-config/package.json +++ b/packages/calypso-babel-config/package.json @@ -36,7 +36,7 @@ "@babel/register": "^7.17.0", "@babel/runtime": "^7.17.2", "@emotion/babel-plugin": "^11.3.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^3.1.2", + "@wordpress/babel-plugin-import-jsx-pragma": "^4.5.0", "babel-plugin-dynamic-import-node": "^2.3.3", "babel-plugin-transform-react-remove-prop-types": "^0.4.24" } diff --git a/packages/calypso-build/package.json b/packages/calypso-build/package.json index f348ffc0f826b..e5075389ff921 100644 --- a/packages/calypso-build/package.json +++ b/packages/calypso-build/package.json @@ -38,8 +38,8 @@ "@babel/compat-data": "^7.17.0", "@babel/core": "^7.17.5", "@types/webpack-env": "^1.16.3", - "@wordpress/browserslist-config": "^4.1.2", - "@wordpress/dependency-extraction-webpack-plugin": "^3.5.0", + "@wordpress/browserslist-config": "^5.5.0", + "@wordpress/dependency-extraction-webpack-plugin": "^4.5.0", "autoprefixer": "^10.2.5", "babel-loader": "^8.2.3", "browserslist": "^4.8.2", diff --git a/packages/calypso-e2e/package.json b/packages/calypso-e2e/package.json index 7d74fc74f9ca8..4fe7d2c5e5596 100644 --- a/packages/calypso-e2e/package.json +++ b/packages/calypso-e2e/package.json @@ -34,7 +34,7 @@ "@types/jest": "^27.4.0", "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.1", - "@wordpress/i18n": "^4.9.0", + "@wordpress/i18n": "^4.22.0", "asana-phrase": "^0.0.8", "node-fetch": "^2.6.7", "typescript": "^4.7.4" diff --git a/packages/components/package.json b/packages/components/package.json index 5ef8975b5f6a0..0ac26712f5c36 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -31,9 +31,9 @@ "@automattic/data-stores": "workspace:^", "@automattic/search": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/icons": "^9.11.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/icons": "^9.13.0", "canvas-confetti": "^1.6.0", "classnames": "^2.3.1", "framer-motion": "6.2.8", @@ -46,7 +46,7 @@ "wpcom-proxy-request": "workspace:^" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/composite-checkout/package.json b/packages/composite-checkout/package.json index 4d68272a4693b..bfe1ae1fee879 100644 --- a/packages/composite-checkout/package.json +++ b/packages/composite-checkout/package.json @@ -38,8 +38,8 @@ "dependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/react-i18n": "^3.20.0", "debug": "^4.3.3", "prop-types": "^15.7.2" }, diff --git a/packages/data-stores/package.json b/packages/data-stores/package.json index de281733a6ab6..479592d1cb643 100644 --- a/packages/data-stores/package.json +++ b/packages/data-stores/package.json @@ -35,10 +35,10 @@ "@automattic/format-currency": "workspace:^", "@automattic/happychat-connection": "workspace:^", "@automattic/shopping-cart": "workspace:^", - "@wordpress/api-fetch": "^6.6.0", - "@wordpress/data-controls": "^2.9.0", - "@wordpress/deprecated": "^3.9.0", - "@wordpress/url": "^3.10.0", + "@wordpress/api-fetch": "^6.19.0", + "@wordpress/data-controls": "^2.22.0", + "@wordpress/deprecated": "^3.22.0", + "@wordpress/url": "^3.23.0", "fast-json-stable-stringify": "^2.1.0", "i18n-calypso": "workspace:^", "qs": "^6.9.1", @@ -49,7 +49,7 @@ "validator": "^13.5.2" }, "peerDependencies": { - "@wordpress/data": "^6", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/design-carousel/package.json b/packages/design-carousel/package.json index 8f7a48f22fc15..f1e9e0226aa45 100644 --- a/packages/design-carousel/package.json +++ b/packages/design-carousel/package.json @@ -49,9 +49,9 @@ "webpack": "^5.68.0" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "debug": "^4.3.3", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/design-picker/package.json b/packages/design-picker/package.json index dcf1770dfdd9b..e734a15f13adc 100644 --- a/packages/design-picker/package.json +++ b/packages/design-picker/package.json @@ -33,9 +33,9 @@ "@automattic/js-utils": "workspace:^", "@automattic/onboarding": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/components": "^19.15.0", - "@wordpress/react-i18n": "^3.7.0", - "@wordpress/url": "^3.10.0", + "@wordpress/components": "^22.1.0", + "@wordpress/react-i18n": "^3.20.0", + "@wordpress/url": "^3.23.0", "classnames": "^2.3.1", "react-query": "^3.32.1", "tslib": "^2.3.0", @@ -57,9 +57,9 @@ "webpack": "^5.68.0" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "debug": "^4.3.3", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/design-preview/package.json b/packages/design-preview/package.json index 196d6cfa04e04..ae7be22da3829 100644 --- a/packages/design-preview/package.json +++ b/packages/design-preview/package.json @@ -32,11 +32,11 @@ "@automattic/calypso-config": "workspace:^", "@automattic/design-picker": "workspace:^", "@automattic/i18n-utils": "workspace:^", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/edit-site": "^4.6.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/edit-site": "^4.19.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "tslib": "^2.3.0" }, @@ -49,9 +49,9 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "debug": "^4.3.3", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/domain-picker/package.json b/packages/domain-picker/package.json index 254a46876eec8..ed661c7e0ba44 100644 --- a/packages/domain-picker/package.json +++ b/packages/domain-picker/package.json @@ -35,11 +35,11 @@ "@automattic/i18n-utils": "workspace:^", "@automattic/onboarding": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "lodash": "^4.17.21", "tslib": "^2.3.0", @@ -55,9 +55,9 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "react": "^17.0.2", "reakit-utils": "^0.15.1", "redux": "^4.1.2" diff --git a/packages/eslint-plugin-package-json/package.json b/packages/eslint-plugin-package-json/package.json index f2b4045c8618c..94f9a43475c04 100644 --- a/packages/eslint-plugin-package-json/package.json +++ b/packages/eslint-plugin-package-json/package.json @@ -18,7 +18,7 @@ ], "license": "GPL-2.0-or-later", "dependencies": { - "@wordpress/npm-package-json-lint-config": "^4.1.2", + "@wordpress/npm-package-json-lint-config": "^4.7.0", "eslint-plugin-json-es": "^1.5.7", "esquery": "^1.4.0", "npm-package-json-lint": "^5.4.2" diff --git a/packages/global-styles/package.json b/packages/global-styles/package.json index c80f79ac5cb92..02cedfe625ba8 100644 --- a/packages/global-styles/package.json +++ b/packages/global-styles/package.json @@ -29,11 +29,11 @@ "watch": "tsc --build ./tsconfig.json --watch" }, "dependencies": { - "@wordpress/block-editor": "^9.1.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/edit-site": "^4.6.0", - "@wordpress/keycodes": "^3.9.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/edit-site": "^4.19.0", + "@wordpress/keycodes": "^3.22.0", "classnames": "^2.3.1", "i18n-calypso": "workspace:^", "react": "^17.0.2", diff --git a/packages/help-center/package.json b/packages/help-center/package.json index 443a7aa5f3adf..ae87c4764c8ad 100644 --- a/packages/help-center/package.json +++ b/packages/help-center/package.json @@ -37,11 +37,11 @@ "@automattic/viewport": "workspace:^", "@automattic/viewport-react": "workspace:^", "@popperjs/core": "^2.10.2", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/primitives": "^3.7.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/primitives": "^3.20.0", "classnames": "^2.3.1", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -56,8 +56,8 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", - "@wordpress/element": "^4.5.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/i18n-calypso/package.json b/packages/i18n-calypso/package.json index 1b93d3e176eb8..94e13acf6a451 100644 --- a/packages/i18n-calypso/package.json +++ b/packages/i18n-calypso/package.json @@ -20,7 +20,7 @@ "@automattic/interpolate-components": "workspace:^", "@babel/runtime": "^7.17.2", "@tannin/sprintf": "^1.1.0", - "@wordpress/compose": "^5.7.0", + "@wordpress/compose": "^5.20.0", "debug": "^4.3.3", "events": "^3.0.0", "hash.js": "^1.1.5", diff --git a/packages/i18n-utils/package.json b/packages/i18n-utils/package.json index 20dde3150ca9b..8c082ecabe050 100644 --- a/packages/i18n-utils/package.json +++ b/packages/i18n-utils/package.json @@ -30,8 +30,8 @@ "dependencies": { "@automattic/calypso-url": "workspace:^", "@automattic/languages": "workspace:^", - "@wordpress/compose": "^5.7.0", - "@wordpress/i18n": "^4.9.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/i18n": "^4.22.0", "react": "^17.0.2", "tslib": "^2.3.0" }, diff --git a/packages/language-picker/package.json b/packages/language-picker/package.json index 9b732433060b9..52dd6b11f0801 100644 --- a/packages/language-picker/package.json +++ b/packages/language-picker/package.json @@ -30,13 +30,13 @@ "@automattic/languages": "workspace:^", "@automattic/search": "workspace:^", "@babel/runtime": "^7.17.2", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/react-i18n": "^3.7.0" + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/react-i18n": "^3.20.0" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/launch/package.json b/packages/launch/package.json index 6f0702f3cc86f..a96f3e3cbedc6 100644 --- a/packages/launch/package.json +++ b/packages/launch/package.json @@ -36,10 +36,10 @@ "@automattic/onboarding": "workspace:^", "@automattic/plans-grid": "workspace:^", "@automattic/shopping-cart": "workspace:^", - "@wordpress/components": "^19.15.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/react-i18n": "^3.7.0", - "@wordpress/url": "^3.10.0", + "@wordpress/components": "^22.1.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/react-i18n": "^3.20.0", + "@wordpress/url": "^3.23.0", "classnames": "^2.3.1", "react-router-dom": "^5.1.2", "tslib": "^2.3.0", @@ -50,16 +50,16 @@ "@automattic/calypso-typescript-config": "workspace:^", "@automattic/typography": "workspace:^", "@testing-library/react": "^12.1.3", - "@wordpress/base-styles": "^4.5.0", + "@wordpress/base-styles": "^4.13.0", "copyfiles": "^2.3.0", "react": "^17.0.2", "react-dom": "^17.0.2", "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "reakit-utils": "^0.15.1", "redux": "^4.1.2" }, diff --git a/packages/mini-cart/package.json b/packages/mini-cart/package.json index 4d6ecb98fe016..1aebd8da6297c 100644 --- a/packages/mini-cart/package.json +++ b/packages/mini-cart/package.json @@ -43,8 +43,8 @@ "@automattic/shopping-cart": "workspace:^", "@automattic/wpcom-checkout": "workspace:^", "@emotion/styled": "^11.3.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/react-i18n": "^3.20.0", "debug": "^4.3.3" }, "devDependencies": { diff --git a/packages/onboarding/package.json b/packages/onboarding/package.json index 4b15a958efb86..b3348efbb32c8 100644 --- a/packages/onboarding/package.json +++ b/packages/onboarding/package.json @@ -31,10 +31,10 @@ "dependencies": { "@automattic/components": "workspace:^", "@automattic/data-stores": "workspace:^", - "@wordpress/components": "^19.15.0", - "@wordpress/data": "^6.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/components": "^22.1.0", + "@wordpress/data": "^7.6.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "react-router-dom": "^5.1.2", "tslib": "^2.3.0", @@ -44,7 +44,7 @@ "@automattic/calypso-typescript-config": "workspace:^", "@automattic/typography": "workspace:^", "@testing-library/react": "^12.1.3", - "@wordpress/base-styles": "^4.5.0", + "@wordpress/base-styles": "^4.13.0", "copyfiles": "^2.3.0", "css-loader": "^3.6.0", "history": "^5.1.0", @@ -57,7 +57,7 @@ "webpack": "^5.63.0" }, "peerDependencies": { - "@wordpress/i18n": "^4.7.0", + "@wordpress/i18n": "^4.22.0", "react": "^17.0.2", "reakit-utils": "^0.15.1" }, diff --git a/packages/page-pattern-modal/package.json b/packages/page-pattern-modal/package.json index 99cd3ecff223f..10dbbc45b9b6f 100644 --- a/packages/page-pattern-modal/package.json +++ b/packages/page-pattern-modal/package.json @@ -29,12 +29,12 @@ "dependencies": { "@automattic/onboarding": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/block-editor": "^9.1.0", - "@wordpress/blocks": "^11.8.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.9.0", + "@wordpress/block-editor": "^10.5.0", + "@wordpress/blocks": "^11.21.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "classnames": "^2.3.1", "debug": "^4.3.3", "lodash": "^4.17.21" @@ -49,7 +49,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "reakit-utils": "^0.15.1", "redux": "^4.1.2" diff --git a/packages/pattern-picker/package.json b/packages/pattern-picker/package.json index ec7f69a6f183b..b831323c0b834 100644 --- a/packages/pattern-picker/package.json +++ b/packages/pattern-picker/package.json @@ -49,9 +49,9 @@ "webpack": "^5.68.0" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "debug": "^4.3.3", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/packages/plans-grid/package.json b/packages/plans-grid/package.json index e16b0b672ff06..83510395661fb 100644 --- a/packages/plans-grid/package.json +++ b/packages/plans-grid/package.json @@ -32,11 +32,11 @@ "@automattic/data-stores": "workspace:^", "@automattic/i18n-utils": "workspace:^", "@automattic/onboarding": "workspace:^", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/primitives": "^3.7.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/primitives": "^3.20.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "debug": "^4.3.3", "lodash": "^4.17.21", @@ -46,14 +46,14 @@ "devDependencies": { "@automattic/calypso-typescript-config": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/base-styles": "^4.5.0", + "@wordpress/base-styles": "^4.13.0", "prop-types": "^15.7.2", "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", - "@wordpress/element": "^4.5.0", - "@wordpress/i18n": "^4.7.0", + "@wordpress/data": "^7.6.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/search/package.json b/packages/search/package.json index e444ef7c0163b..c9ac54b115865 100644 --- a/packages/search/package.json +++ b/packages/search/package.json @@ -29,11 +29,11 @@ "dependencies": { "@automattic/typography": "workspace:^", "@babel/runtime": "^7.17.2", - "@wordpress/base-styles": "^4.7.0", - "@wordpress/components": "^19.15.0", - "@wordpress/compose": "^5.7.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "fuse.js": "^6.6.2", "lodash": "^4.17.21", @@ -54,8 +54,8 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.2.5", - "@wordpress/data": "^6.9.0", - "@wordpress/is-shallow-equal": "^4.9.0", + "@wordpress/data": "^7.6.0", + "@wordpress/is-shallow-equal": "^4.22.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/site-picker/package.json b/packages/site-picker/package.json index e10b2df04d30e..a94a6ab0e7a34 100644 --- a/packages/site-picker/package.json +++ b/packages/site-picker/package.json @@ -24,13 +24,13 @@ "bugs": "https://github.com/Automattic/wp-calypso/issues", "dependencies": { "@automattic/tour-kit": "workspace:^", - "@wordpress/dom": "^3.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", + "@wordpress/dom": "^3.22.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", "classnames": "^2.3.1" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/sites/package.json b/packages/sites/package.json index d9285c75022f3..2519e772b7744 100644 --- a/packages/sites/package.json +++ b/packages/sites/package.json @@ -23,7 +23,7 @@ }, "bugs": "https://github.com/Automattic/wp-calypso/issues", "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/social-previews/package.json b/packages/social-previews/package.json index 87a6b6d354f39..415dcb6c664c7 100644 --- a/packages/social-previews/package.json +++ b/packages/social-previews/package.json @@ -38,8 +38,8 @@ }, "dependencies": { "@emotion/react": "^11.4.1", - "@wordpress/components": "^19.15.0", - "@wordpress/i18n": "^4.9.0", + "@wordpress/components": "^22.1.0", + "@wordpress/i18n": "^4.22.0", "classnames": "^2.3.1", "lodash": "^4.17.21", "moment": "^2.26.0", diff --git a/packages/state-utils/package.json b/packages/state-utils/package.json index 5420204afff74..8f1ef55fc1ad9 100644 --- a/packages/state-utils/package.json +++ b/packages/state-utils/package.json @@ -30,8 +30,8 @@ "watch": "tsc --build ./tsconfig.json --watch" }, "dependencies": { - "@wordpress/is-shallow-equal": "^4.9.0", - "@wordpress/warning": "^2.9.0", + "@wordpress/is-shallow-equal": "^4.22.0", + "@wordpress/warning": "^2.22.0", "lodash": "^4.17.21", "redux": "^4.1.2", "redux-thunk": "^2.3.0", diff --git a/packages/subscriber/package.json b/packages/subscriber/package.json index 8d6256c09fb86..453e80150e7c4 100644 --- a/packages/subscriber/package.json +++ b/packages/subscriber/package.json @@ -33,14 +33,14 @@ "@automattic/viewport": "workspace:^", "@automattic/viewport-react": "workspace:^", "@popperjs/core": "^2.10.2", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.11.0", - "@wordpress/dom": "^3.9.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/primitives": "^3.7.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/dom": "^3.22.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/primitives": "^3.20.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "debug": "^4.3.4", "react-popper": "^2.2.5" @@ -51,7 +51,7 @@ "typescript": "^4.5.5" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/tour-kit/package.json b/packages/tour-kit/package.json index 4bfd6d0c99d6f..1bdacaaab0b0a 100644 --- a/packages/tour-kit/package.json +++ b/packages/tour-kit/package.json @@ -34,14 +34,14 @@ "@automattic/viewport": "workspace:^", "@automattic/viewport-react": "workspace:^", "@popperjs/core": "^2.10.2", - "@wordpress/base-styles": "^4.5.0", - "@wordpress/components": "^19.15.0", - "@wordpress/dom": "^3.9.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/icons": "^9.0.0", - "@wordpress/primitives": "^3.7.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/base-styles": "^4.13.0", + "@wordpress/components": "^22.1.0", + "@wordpress/dom": "^3.22.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/icons": "^9.13.0", + "@wordpress/primitives": "^3.20.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "debug": "^4.3.4", "react-popper": "^2.2.5" @@ -54,7 +54,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/viewport-react/package.json b/packages/viewport-react/package.json index 8e2bda3a19bda..8292b1e83e254 100644 --- a/packages/viewport-react/package.json +++ b/packages/viewport-react/package.json @@ -18,7 +18,7 @@ "homepage": "https://github.com/Automattic/wp-calypso/tree/HEAD/packages/viewport-react#readme", "dependencies": { "@automattic/viewport": "workspace:^", - "@wordpress/compose": "^5.7.0" + "@wordpress/compose": "^5.20.0" }, "peerDependencies": { "react": "^17.0.2", diff --git a/packages/whats-new/package.json b/packages/whats-new/package.json index 427cf279a4b0c..1d7a9fbfa652c 100644 --- a/packages/whats-new/package.json +++ b/packages/whats-new/package.json @@ -40,17 +40,17 @@ "@automattic/components": "workspace:^", "@automattic/i18n-utils": "workspace:^", "@automattic/typography": "workspace:^", - "@wordpress/components": "^19.15.0", - "@wordpress/element": "^4.7.0", - "@wordpress/i18n": "^4.10.0", - "@wordpress/keycodes": "^3.10.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/components": "^22.1.0", + "@wordpress/element": "^4.20.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/keycodes": "^3.22.0", + "@wordpress/react-i18n": "^3.20.0", "classnames": "^2.3.1", "wpcom": "workspace:^", "wpcom-proxy-request": "workspace:^" }, "peerDependencies": { - "@wordpress/data": "^6.7.0", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2", "reakit-utils": "^0.15.1", diff --git a/packages/wpcom-checkout/package.json b/packages/wpcom-checkout/package.json index f83bf0e78363b..2792d28d6b835 100644 --- a/packages/wpcom-checkout/package.json +++ b/packages/wpcom-checkout/package.json @@ -42,10 +42,10 @@ "@automattic/shopping-cart": "workspace:^", "@emotion/styled": "^11.3.0", "@stripe/stripe-js": "1.17.1", - "@wordpress/compose": "^5.7.0", - "@wordpress/data": "^6.9.0", - "@wordpress/i18n": "^4.9.0", - "@wordpress/react-i18n": "^3.7.0", + "@wordpress/compose": "^5.20.0", + "@wordpress/data": "^7.6.0", + "@wordpress/i18n": "^4.22.0", + "@wordpress/react-i18n": "^3.20.0", "debug": "^4.3.3", "i18n-calypso": "workspace:^", "prop-types": "^15.7.2" diff --git a/packages/wpcom-template-parts/package.json b/packages/wpcom-template-parts/package.json index c3393d0864f34..f7102e4f3e304 100644 --- a/packages/wpcom-template-parts/package.json +++ b/packages/wpcom-template-parts/package.json @@ -32,7 +32,7 @@ "dependencies": { "@automattic/components": "workspace:^", "@automattic/i18n-utils": "workspace:^", - "@wordpress/url": "^3.28.0", + "@wordpress/url": "^3.23.0", "i18n-calypso": "workspace:^", "social-logos": "^2.5.2" }, @@ -42,7 +42,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@wordpress/data": "^6.1.5", + "@wordpress/data": "^7.6.0", "react": "^17.0.2", "react-dom": "^17.0.2" } diff --git a/yarn.lock b/yarn.lock index 607c103a67da9..6814ce2940e4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -86,9 +86,9 @@ __metadata: resolution: "@automattic/block-renderer@workspace:packages/block-renderer" dependencies: "@automattic/calypso-typescript-config": "workspace:^" - "@wordpress/block-editor": ^9.1.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/edit-site": ^4.6.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/edit-site": ^4.19.0 classnames: ^2.3.1 react: ^17.0.2 react-dom: ^17.0.2 @@ -98,9 +98,9 @@ __metadata: utility-types: ^3.10.0 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -171,7 +171,7 @@ __metadata: "@babel/register": ^7.17.0 "@babel/runtime": ^7.17.2 "@emotion/babel-plugin": ^11.3.0 - "@wordpress/babel-plugin-import-jsx-pragma": ^3.1.2 + "@wordpress/babel-plugin-import-jsx-pragma": ^4.5.0 babel-plugin-dynamic-import-node: ^2.3.3 babel-plugin-transform-react-remove-prop-types: ^0.4.24 languageName: unknown @@ -188,8 +188,8 @@ __metadata: "@babel/compat-data": ^7.17.0 "@babel/core": ^7.17.5 "@types/webpack-env": ^1.16.3 - "@wordpress/browserslist-config": ^4.1.2 - "@wordpress/dependency-extraction-webpack-plugin": ^3.5.0 + "@wordpress/browserslist-config": ^5.5.0 + "@wordpress/dependency-extraction-webpack-plugin": ^4.5.0 autoprefixer: ^10.2.5 babel-loader: ^8.2.3 browserslist: ^4.8.2 @@ -269,7 +269,7 @@ __metadata: "@types/node": ^18.11.18 "@types/node-fetch": ^2.6.1 "@types/totp-generator": ^0.0.3 - "@wordpress/i18n": ^4.9.0 + "@wordpress/i18n": ^4.22.0 asana-phrase: ^0.0.8 form-data: ^4.0.0 jest-docblock: ^27 @@ -430,9 +430,9 @@ __metadata: "@testing-library/react-hooks": 7.0.2 "@types/canvas-confetti": ^1.6.0 "@types/qrcode.react": ^1.0.2 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/icons": ^9.11.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/icons": ^9.13.0 canvas-confetti: ^1.6.0 classnames: ^2.3.1 framer-motion: 6.2.8 @@ -446,7 +446,7 @@ __metadata: utility-types: ^3.10.0 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -465,8 +465,8 @@ __metadata: "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.2.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/react-i18n": ^3.20.0 debug: ^4.3.3 prop-types: ^15.7.2 react: ^17.0.2 @@ -499,10 +499,10 @@ __metadata: "@automattic/happychat-connection": "workspace:^" "@automattic/shopping-cart": "workspace:^" "@types/validator": ^13.7.1 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/data-controls": ^2.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/url": ^3.10.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/data-controls": ^2.22.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/url": ^3.23.0 fast-json-stable-stringify: ^2.1.0 i18n-calypso: "workspace:^" jest-fetch-mock: ^3.0.3 @@ -518,7 +518,7 @@ __metadata: wait-for-expect: ^3.0.2 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -545,9 +545,9 @@ __metadata: webpack: ^5.68.0 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -569,9 +569,9 @@ __metadata: "@automattic/typography": "workspace:^" "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/components": ^19.15.0 - "@wordpress/react-i18n": ^3.7.0 - "@wordpress/url": ^3.10.0 + "@wordpress/components": ^22.1.0 + "@wordpress/react-i18n": ^3.20.0 + "@wordpress/url": ^3.23.0 classnames: ^2.3.1 jest: ^27.3.1 postcss: ^8.4.5 @@ -585,9 +585,9 @@ __metadata: utility-types: ^3.10.0 webpack: ^5.68.0 peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -606,20 +606,20 @@ __metadata: "@automattic/i18n-utils": "workspace:^" "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/edit-site": ^4.6.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/edit-site": ^4.19.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 react: ^17.0.2 react-dom: ^17.0.2 tslib: ^2.3.0 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -641,11 +641,11 @@ __metadata: "@automattic/typography": "workspace:^" "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 lodash: ^4.17.21 react: ^17.0.2 @@ -655,9 +655,9 @@ __metadata: use-debounce: ^3.1.0 uuid: ^8.3.2 peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 react: ^17.0.2 reakit-utils: ^0.15.1 redux: ^4.1.2 @@ -692,7 +692,7 @@ __metadata: dependencies: "@automattic/calypso-eslint-overrides": "workspace:^" "@automattic/calypso-typescript-config": "workspace:^" - "@wordpress/npm-package-json-lint-config": ^4.1.2 + "@wordpress/npm-package-json-lint-config": ^4.7.0 eslint-plugin-json-es: ^1.5.7 esquery: ^1.4.0 npm-package-json-lint: ^5.4.2 @@ -752,11 +752,11 @@ __metadata: resolution: "@automattic/global-styles@workspace:packages/global-styles" dependencies: "@automattic/calypso-typescript-config": "workspace:^" - "@wordpress/block-editor": ^9.1.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/edit-site": ^4.6.0 - "@wordpress/keycodes": ^3.9.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/edit-site": ^4.19.0 + "@wordpress/keycodes": ^3.22.0 classnames: ^2.3.1 i18n-calypso: "workspace:^" react: ^17.0.2 @@ -780,8 +780,8 @@ __metadata: "@automattic/happychat-connection": "workspace:^" "@automattic/webpack-extensive-lodash-replacement-plugin": "workspace:^" "@automattic/webpack-inline-constant-exports-plugin": "workspace:^" - "@wordpress/data": ^6.7.0 - "@wordpress/icons": ^8.3.0 + "@wordpress/data": ^7.6.0 + "@wordpress/icons": ^9.13.0 autoprefixer: ^10.2.5 calypso: "workspace:^" copy-webpack-plugin: ^10.1.0 @@ -837,19 +837,19 @@ __metadata: "@popperjs/core": ^2.10.2 "@storybook/addon-backgrounds": ^6.4.19 "@storybook/react": ^6.4.19 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/primitives": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/primitives": ^3.20.0 classnames: ^2.3.1 react: ^17.0.2 react-dom: ^17.0.2 react-draggable: ^4.4.4 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.1.5 - "@wordpress/element": ^4.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -868,8 +868,8 @@ __metadata: "@testing-library/react": ^12.1.3 "@testing-library/react-hooks": 7.0.2 "@types/react": ^17.0.39 - "@wordpress/compose": ^5.7.0 - "@wordpress/i18n": ^4.9.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/i18n": ^4.22.0 react: ^17.0.2 react-dom: ^17.0.2 react-test-renderer: ^17.0.2 @@ -954,13 +954,13 @@ __metadata: "@automattic/languages": "workspace:^" "@automattic/search": "workspace:^" "@babel/runtime": ^7.17.2 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/react-i18n": ^3.20.0 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.7.0 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1010,11 +1010,11 @@ __metadata: "@automattic/shopping-cart": "workspace:^" "@automattic/typography": "workspace:^" "@testing-library/react": ^12.1.3 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/react-i18n": ^3.7.0 - "@wordpress/url": ^3.10.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/react-i18n": ^3.20.0 + "@wordpress/url": ^3.23.0 classnames: ^2.3.1 copyfiles: ^2.3.0 react: ^17.0.2 @@ -1024,9 +1024,9 @@ __metadata: typescript: ^4.7.4 use-debounce: ^3.1.0 peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 reakit-utils: ^0.15.1 redux: ^4.1.2 languageName: unknown @@ -1063,8 +1063,8 @@ __metadata: "@emotion/styled": ^11.3.0 "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/i18n": ^4.9.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/react-i18n": ^3.20.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -1135,20 +1135,20 @@ __metadata: "@automattic/calypso-apps-builder": "workspace:^" "@automattic/calypso-build": "workspace:^" "@automattic/calypso-eslint-overrides": "workspace:^" - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/data": ^6.9.0 - "@wordpress/editor": ^12.8.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.5.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/readable-js-assets-webpack-plugin": ^1.0.4 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/data": ^7.6.0 + "@wordpress/editor": ^12.21.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/readable-js-assets-webpack-plugin": ^2.5.0 classnames: ^2.3.1 jest: ^27.3.1 lodash: ^4.17.21 @@ -1179,7 +1179,7 @@ __metadata: "@automattic/webpack-extensive-lodash-replacement-plugin": "workspace:^" "@automattic/webpack-inline-constant-exports-plugin": "workspace:^" "@automattic/wp-babel-makepot": "workspace:^" - "@wordpress/dependency-extraction-webpack-plugin": ^4.4.0 + "@wordpress/dependency-extraction-webpack-plugin": ^4.5.0 autoprefixer: ^10.2.5 calypso: "workspace:^" classnames: ^2.3.1 @@ -1216,11 +1216,11 @@ __metadata: "@automattic/data-stores": "workspace:^" "@automattic/typography": "workspace:^" "@testing-library/react": ^12.1.3 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/data": ^6.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/data": ^7.6.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 copyfiles: ^2.3.0 css-loader: ^3.6.0 @@ -1236,7 +1236,7 @@ __metadata: webpack: ^5.63.0 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/i18n": ^4.7.0 + "@wordpress/i18n": ^4.22.0 react: ^17.0.2 reakit-utils: ^0.15.1 languageName: unknown @@ -1250,12 +1250,12 @@ __metadata: "@automattic/onboarding": "workspace:^" "@automattic/typography": "workspace:^" "@testing-library/react": ^12.1.3 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 classnames: ^2.3.1 debug: ^4.3.3 jest: ^27.3.1 @@ -1265,7 +1265,7 @@ __metadata: resize-observer-polyfill: 1.5.1 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.7.0 + "@wordpress/data": ^7.6.0 react: ^17.0.2 reakit-utils: ^0.15.1 redux: ^4.1.2 @@ -1293,9 +1293,9 @@ __metadata: webpack: ^5.68.0 wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 debug: ^4.3.3 react: ^17.0.2 react-dom: ^17.0.2 @@ -1313,12 +1313,12 @@ __metadata: "@automattic/i18n-utils": "workspace:^" "@automattic/onboarding": "workspace:^" "@automattic/typography": "workspace:^" - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 debug: ^4.3.3 lodash: ^4.17.21 @@ -1327,9 +1327,9 @@ __metadata: typescript: ^4.7.4 uuid: ^8.3.2 peerDependencies: - "@wordpress/data": ^6.7.0 - "@wordpress/element": ^4.5.0 - "@wordpress/i18n": ^4.7.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1409,13 +1409,13 @@ __metadata: "@testing-library/jest-dom": ^5.16.4 "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.2.5 - "@wordpress/base-styles": ^4.7.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 fuse.js: ^6.6.2 lodash: ^4.17.21 @@ -1455,13 +1455,13 @@ __metadata: "@automattic/tour-kit": "workspace:^" "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/dom": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 classnames: ^2.3.1 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1478,7 +1478,7 @@ __metadata: "@testing-library/react": ^12.1.3 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1494,8 +1494,8 @@ __metadata: "@emotion/react": ^11.4.1 "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/components": ^19.15.0 - "@wordpress/i18n": ^4.9.0 + "@wordpress/components": ^22.1.0 + "@wordpress/i18n": ^4.22.0 classnames: ^2.3.1 lodash: ^4.17.21 moment: ^2.26.0 @@ -1517,8 +1517,8 @@ __metadata: resolution: "@automattic/state-utils@workspace:packages/state-utils" dependencies: "@automattic/calypso-typescript-config": "workspace:^" - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/warning": ^2.9.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/warning": ^2.22.0 lodash: ^4.17.21 redux: ^4.1.2 redux-thunk: ^2.3.0 @@ -1537,20 +1537,20 @@ __metadata: "@automattic/viewport": "workspace:^" "@automattic/viewport-react": "workspace:^" "@popperjs/core": ^2.10.2 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.11.0 - "@wordpress/dom": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 debug: ^4.3.4 react-popper: ^2.2.5 typescript: ^4.5.5 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1586,20 +1586,20 @@ __metadata: "@automattic/viewport-react": "workspace:^" "@popperjs/core": ^2.10.2 "@storybook/react": ^6.4.18 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/dom": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 debug: ^4.3.4 react-popper: ^2.2.5 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1631,7 +1631,7 @@ __metadata: dependencies: "@automattic/calypso-typescript-config": "workspace:^" "@automattic/viewport": "workspace:^" - "@wordpress/compose": ^5.7.0 + "@wordpress/compose": ^5.20.0 peerDependencies: react: ^17.0.2 react-dom: ^17.0.2 @@ -1706,16 +1706,16 @@ __metadata: "@automattic/components": "workspace:^" "@automattic/i18n-utils": "workspace:^" "@automattic/typography": "workspace:^" - "@wordpress/components": ^19.15.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.10.0 - "@wordpress/keycodes": ^3.10.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/components": ^22.1.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/react-i18n": ^3.20.0 classnames: ^2.3.1 wpcom: "workspace:^" wpcom-proxy-request: "workspace:^" peerDependencies: - "@wordpress/data": ^6.7.0 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 reakit-utils: ^0.15.1 @@ -1758,25 +1758,25 @@ __metadata: "@automattic/calypso-eslint-overrides": "workspace:^" "@automattic/typography": "workspace:^" "@babel/runtime": ^7.17.2 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/dependency-extraction-webpack-plugin": ^3.5.0 - "@wordpress/dom-ready": ^3.9.0 - "@wordpress/edit-post": ^6.6.0 - "@wordpress/edit-site": ^4.6.0 - "@wordpress/editor": ^12.8.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/url": ^3.10.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/dependency-extraction-webpack-plugin": ^4.5.0 + "@wordpress/dom-ready": ^3.22.0 + "@wordpress/edit-post": ^6.19.0 + "@wordpress/edit-site": ^4.19.0 + "@wordpress/editor": ^12.21.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/plugins": ^4.20.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/url": ^3.23.0 debug: ^4.3.3 jest: ^27.3.1 lodash: ^4.17.21 @@ -1805,10 +1805,10 @@ __metadata: "@stripe/stripe-js": 1.17.1 "@testing-library/jest-dom": ^5.16.2 "@testing-library/react": ^12.1.3 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/react-i18n": ^3.7.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/react-i18n": ^3.20.0 debug: ^4.3.3 i18n-calypso: "workspace:^" prop-types: ^15.7.2 @@ -1857,42 +1857,42 @@ __metadata: "@testing-library/react": ^12.1.3 "@types/node": ^18.11.18 "@types/wordpress__plugins": ^3.0.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/data-controls": ^2.9.0 - "@wordpress/date": ^4.9.0 - "@wordpress/dependency-extraction-webpack-plugin": ^3.5.0 - "@wordpress/dom-ready": ^3.9.0 - "@wordpress/edit-post": ^6.6.0 - "@wordpress/editor": ^12.8.0 - "@wordpress/element": ^4.7.0 - "@wordpress/env": ^4.7.0 - "@wordpress/escape-html": ^2.9.0 - "@wordpress/eslint-plugin": ^12.3.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/interface": ^4.8.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/jest-preset-default": ^8.2.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/notices": ^3.10.0 - "@wordpress/nux": ^5.7.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/react-i18n": ^3.7.0 - "@wordpress/readable-js-assets-webpack-plugin": ^1.0.4 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/scripts": ^23.1.0 - "@wordpress/server-side-render": ^3.7.0 - "@wordpress/url": ^3.10.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/data-controls": ^2.22.0 + "@wordpress/date": ^4.22.0 + "@wordpress/dependency-extraction-webpack-plugin": ^4.5.0 + "@wordpress/dom-ready": ^3.22.0 + "@wordpress/edit-post": ^6.19.0 + "@wordpress/editor": ^12.21.0 + "@wordpress/element": ^4.20.0 + "@wordpress/env": ^5.7.0 + "@wordpress/escape-html": ^2.22.0 + "@wordpress/eslint-plugin": ^13.6.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/interface": ^4.21.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/jest-preset-default": ^10.3.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/nux": ^5.20.0 + "@wordpress/plugins": ^4.20.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/react-i18n": ^3.20.0 + "@wordpress/readable-js-assets-webpack-plugin": ^2.5.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/scripts": ^24.6.0 + "@wordpress/server-side-render": ^3.20.0 + "@wordpress/url": ^3.23.0 babel-jest: ^27.5.1 calypso: "workspace:^" classnames: ^2.3.1 @@ -1926,12 +1926,12 @@ __metadata: "@automattic/components": "workspace:^" "@automattic/i18n-utils": "workspace:^" "@types/social-logos": ^2.3.1 - "@wordpress/url": ^3.28.0 + "@wordpress/url": ^3.23.0 i18n-calypso: "workspace:^" social-logos: ^2.5.2 typescript: ^4.7.4 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -3972,7 +3972,7 @@ __metadata: languageName: node linkType: hard -"@emotion/utils@npm:^1.1.0, @emotion/utils@npm:^1.2.0": +"@emotion/utils@npm:^1.0.0, @emotion/utils@npm:^1.1.0, @emotion/utils@npm:^1.2.0": version: 1.2.0 resolution: "@emotion/utils@npm:1.2.0" checksum: 7051cec83bb49688549667484058d3a19a30001fa3692c23f7a2e727c05121f952854e1196feb9ece4fa36914705ebf474edba833a2178bdc133c654b5e3ca7d @@ -3993,17 +3993,6 @@ __metadata: languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.20.1": - version: 0.20.1 - resolution: "@es-joy/jsdoccomment@npm:0.20.1" - dependencies: - comment-parser: 1.3.0 - esquery: ^1.4.0 - jsdoc-type-pratt-parser: ~2.2.3 - checksum: 1a4c53129e4a509714b8d92f094abafa022915678384897559827884e4b1df2b5043d681cb4819959e8ba9ec91143fd0e80011b86962e8424e4bf02c989f0eaa - languageName: node - linkType: hard - "@es-joy/jsdoccomment@npm:~0.36.1": version: 0.36.1 resolution: "@es-joy/jsdoccomment@npm:0.36.1" @@ -4039,6 +4028,13 @@ __metadata: languageName: node linkType: hard +"@floating-ui/core@npm:^1.2.1": + version: 1.2.1 + resolution: "@floating-ui/core@npm:1.2.1" + checksum: 53450f78a0b9fc7f02a6289b9273bdc4a5d06102585894a7db8da33b734f2d5a212f812fde264c73b08b22dc6bc777077f05c9cd8aa015884fb4262e77ea3a43 + languageName: node + linkType: hard + "@floating-ui/dom@npm:^0.4.5": version: 0.4.5 resolution: "@floating-ui/dom@npm:0.4.5" @@ -4048,6 +4044,15 @@ __metadata: languageName: node linkType: hard +"@floating-ui/dom@npm:^1.2.1": + version: 1.2.1 + resolution: "@floating-ui/dom@npm:1.2.1" + dependencies: + "@floating-ui/core": ^1.2.1 + checksum: a8767f2823f72a14897a6c0144fce11be607b764b96f174096bce55c2a1a1769f71ec8b39b2daac4e89341c40ea0afcbe955be26207ac8b282a81d7ad660cc45 + languageName: node + linkType: hard + "@floating-ui/react-dom@npm:0.6.3": version: 0.6.3 resolution: "@floating-ui/react-dom@npm:0.6.3" @@ -4061,6 +4066,18 @@ __metadata: languageName: node linkType: hard +"@floating-ui/react-dom@npm:^1.0.0": + version: 1.3.0 + resolution: "@floating-ui/react-dom@npm:1.3.0" + dependencies: + "@floating-ui/dom": ^1.2.1 + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + checksum: bd9883660d216fdecca76a0b0ecef580d1914fb3d73775920569b641c9c3be552cff1ffa88ba6e7fbd8022d81ddfdf480b1ba81fa8e01366c4117576c5e315fb + languageName: node + linkType: hard + "@gar/promisify@npm:^1.0.1": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -4626,69 +4643,70 @@ __metadata: languageName: node linkType: hard -"@react-spring/animated@npm:~9.3.0": - version: 9.3.0 - resolution: "@react-spring/animated@npm:9.3.0" +"@react-spring/animated@npm:~9.7.1": + version: 9.7.1 + resolution: "@react-spring/animated@npm:9.7.1" dependencies: - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/shared": ~9.7.1 + "@react-spring/types": ~9.7.1 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: 1207bf3faefc94aa62983c87ca9b137314c80961604864b9562aceded326c53cb215ad7e9a9e209c61a4bdda89d9e53c5e2acb1ba54c0adb35b41aa2b98c091b + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: eca2c1c7049fe9ece233c8c723134e53ce5f0468046b34384d07bf3c0890c7d8fc374e8038e71851faa2c559674fe3702e2cdb469d9a78b1e70dad382913b31b languageName: node linkType: hard -"@react-spring/core@npm:~9.3.0": - version: 9.3.0 - resolution: "@react-spring/core@npm:9.3.0" +"@react-spring/core@npm:~9.7.1": + version: 9.7.1 + resolution: "@react-spring/core@npm:9.7.1" dependencies: - "@react-spring/animated": ~9.3.0 - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/animated": ~9.7.1 + "@react-spring/rafz": ~9.7.1 + "@react-spring/shared": ~9.7.1 + "@react-spring/types": ~9.7.1 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: 3e58ec235790db43a3058ca68d1818869f9c24e2445bedc92a61b4b49387598a49564a531c5a776663076dbf36f8e0844a991d7c2e5b548035578e8cd76840fb + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 6de4e1cf2628d3135cc2931a5b2c482daea83e030997c7211b1f24f33c42e0b79248bd1cf11deac0243e220d5f15cb27d1bcd30655c3174bd0d6158bab007738 languageName: node linkType: hard -"@react-spring/rafz@npm:~9.3.0": - version: 9.3.0 - resolution: "@react-spring/rafz@npm:9.3.0" - checksum: e382d177a6906ac4dda829a40d563f1c3b0e01dd308407bf73a74701ad9856294f1b0f473bf8b096880b45f9767e6701e8ac15b141644738c09fc2c525262c92 +"@react-spring/rafz@npm:~9.7.1": + version: 9.7.1 + resolution: "@react-spring/rafz@npm:9.7.1" + checksum: 2ece611af1e0b7427c0f865204c76b2b44622dc0f31e8ee7a18d336ad4e14b7cb64c0b4034abf7e80342faa39079b2bf0b59c7f84244cacd24cf2ab67bf7b8c6 languageName: node linkType: hard -"@react-spring/shared@npm:~9.3.0": - version: 9.3.0 - resolution: "@react-spring/shared@npm:9.3.0" +"@react-spring/shared@npm:~9.7.1": + version: 9.7.1 + resolution: "@react-spring/shared@npm:9.7.1" dependencies: - "@react-spring/rafz": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/rafz": ~9.7.1 + "@react-spring/types": ~9.7.1 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: 61d403ebee6a9f95437ee03f98fdc184c04d86202c007a98f26766c76b0c9c094c9c85e3070fb721f4efc210e1cae8625eafcbfb9c7736bf56a535f6f2adfda5 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 76158c671b9c01dae96d74523fdd3ea95405859d95878c49d09b42a2d96a3ff87f34f9ee9d3123ddd5124f391003893c0f9bce0274c30bc1382890bc998fe796 languageName: node linkType: hard -"@react-spring/types@npm:~9.3.0": - version: 9.3.0 - resolution: "@react-spring/types@npm:9.3.0" - checksum: 4a09f022f27880edc92a2a14d295b2d4d3b8d42e3ffcd1ae5291ffb7540d37e42ba1f695e65ce4fd476ced7259f06b76845f70983cb95c04fa5e2c7f4d3c444d +"@react-spring/types@npm:~9.7.1": + version: 9.7.1 + resolution: "@react-spring/types@npm:9.7.1" + checksum: 5e7134c244a86c687691bb3347d253a79e649f00752693bf32bb0ba8b3cf6fce19b1feea5c839d147612d94c0ba81161c5cf1e974f2e3d1f724c1a1f2a4b7b4e languageName: node linkType: hard -"@react-spring/web@npm:^9.2.4": - version: 9.3.0 - resolution: "@react-spring/web@npm:9.3.0" +"@react-spring/web@npm:^9.4.5": + version: 9.7.1 + resolution: "@react-spring/web@npm:9.7.1" dependencies: - "@react-spring/animated": ~9.3.0 - "@react-spring/core": ~9.3.0 - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/animated": ~9.7.1 + "@react-spring/core": ~9.7.1 + "@react-spring/shared": ~9.7.1 + "@react-spring/types": ~9.7.1 peerDependencies: - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - checksum: 7e5d70b26566b17e62b4c58bd31de60172ca274853bb5155730360c890f3714ffe295018c6f4f232a567e02f006b7ea08a604085601cd45fff3df90915de79f7 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: a733d84d69a0c27199e943156c9838424863a6b377bbbec37d9fda5eb10d8a87f324e4615c2f892c94a4016919d8d0b39d330164aa0013178d53ba29936ca15d languageName: node linkType: hard @@ -4923,13 +4941,6 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^2.0.0": - version: 2.1.1 - resolution: "@sindresorhus/is@npm:2.1.1" - checksum: 0e19eb3024a44e2de575e169e49a3a7fcea5558b52f2173ce249d57ad3d45fe6d0401b0d0c0a190feb92974c9be523bd0dfd6d660f651c74d8c2b4532b748105 - languageName: node - linkType: hard - "@sindresorhus/is@npm:^4.0.0": version: 4.2.0 resolution: "@sindresorhus/is@npm:4.2.0" @@ -6243,7 +6254,7 @@ __metadata: languageName: node linkType: hard -"@szmarczak/http-timer@npm:^4.0.0, @szmarczak/http-timer@npm:^4.0.5": +"@szmarczak/http-timer@npm:^4.0.5": version: 4.0.5 resolution: "@szmarczak/http-timer@npm:4.0.5" dependencies: @@ -7045,6 +7056,15 @@ __metadata: languageName: node linkType: hard +"@types/react-dom@npm:^18.0.6": + version: 18.0.11 + resolution: "@types/react-dom@npm:18.0.11" + dependencies: + "@types/react": "*" + checksum: 8bf1e3f710221a937613df4d192f3b9e5a30e5c3103cac52c5210fb56b79f7a8cc66137d3bc5c9d92d375165a97fae53284724191bc01cb9898564fa02595569 + languageName: node + linkType: hard + "@types/react-modal@npm:^3.13.1": version: 3.13.1 resolution: "@types/react-modal@npm:3.13.1" @@ -7625,6 +7645,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/scope-manager@npm:5.54.0" + dependencies: + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/visitor-keys": 5.54.0 + checksum: b3e48219c68a02d91c672c66c66d82f6fde7c65dae6b795f4dc4e43ee8a1de545f8cd515885fd671b173c6e4d4aa1446b899dd3f536f5778c76bf37f1e2fd5bb + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:5.7.0": version: 5.7.0 resolution: "@typescript-eslint/scope-manager@npm:5.7.0" @@ -7659,6 +7689,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/types@npm:5.54.0" + checksum: dec34efd330b7731a36e767ec18bdf6d9e89399963f9e77f0cc14043b320b81fbd1a8e10eae3c2866a765a540626e843522878349d6ec73f09e270ee384c9df5 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:5.7.0": version: 5.7.0 resolution: "@typescript-eslint/types@npm:5.7.0" @@ -7684,6 +7721,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.54.0" + dependencies: + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/visitor-keys": 5.54.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: e3f7d0c387d62c0e9c111f6de34d6a30e2207a23469335460776380b94dcb7eb10e64d5619473459bc7d4009847b95f7471bc7f292250b2c47b92465e22fd181 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.7.0": version: 5.7.0 resolution: "@typescript-eslint/typescript-estree@npm:5.7.0" @@ -7720,6 +7775,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^5.10.0": + version: 5.54.0 + resolution: "@typescript-eslint/utils@npm:5.54.0" + dependencies: + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.54.0 + "@typescript-eslint/types": 5.54.0 + "@typescript-eslint/typescript-estree": 5.54.0 + eslint-scope: ^5.1.1 + eslint-utils: ^3.0.0 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 25932be66c1cafd7a393bf8c236807d4c548b08f4887d98d9e1d136db19a2a6e486b3d48bbcc37e4bdb5ed332d2f4811700470b63cf6d1ee75a2dfb2408f415b + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.53.0": version: 5.53.0 resolution: "@typescript-eslint/visitor-keys@npm:5.53.0" @@ -7730,6 +7803,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:5.54.0": + version: 5.54.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.54.0" + dependencies: + "@typescript-eslint/types": 5.54.0 + eslint-visitor-keys: ^3.3.0 + checksum: cfcff6b2b42a5b3b4865d84ce45263d4c6ee3551dff6250c67ba27d14ab5f040466d9f4aec77b1682cf9e2c554ee43ac70a94cc2a209b65b46a16e908780147f + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.7.0": version: 5.7.0 resolution: "@typescript-eslint/visitor-keys@npm:5.7.0" @@ -8123,39 +8206,7 @@ __metadata: languageName: node linkType: hard -"@wojtekmaj/enzyme-adapter-react-17@npm:^0.6.1": - version: 0.6.6 - resolution: "@wojtekmaj/enzyme-adapter-react-17@npm:0.6.6" - dependencies: - "@wojtekmaj/enzyme-adapter-utils": ^0.1.2 - enzyme-shallow-equal: ^1.0.0 - has: ^1.0.0 - prop-types: ^15.7.0 - react-is: ^17.0.0 - react-test-renderer: ^17.0.0 - peerDependencies: - enzyme: ^3.0.0 - react: ^17.0.0-0 - react-dom: ^17.0.0-0 - checksum: a251aa94696e7b6634b3a6764130a7a97885b3792f439dcb4b8c00f03926777792228679e475f247f2b2be23ac6772224d14c98418b2d3e3c2ccae7af977a6ab - languageName: node - linkType: hard - -"@wojtekmaj/enzyme-adapter-utils@npm:^0.1.2": - version: 0.1.2 - resolution: "@wojtekmaj/enzyme-adapter-utils@npm:0.1.2" - dependencies: - function.prototype.name: ^1.1.0 - has: ^1.0.0 - object.fromentries: ^2.0.0 - prop-types: ^15.7.0 - peerDependencies: - react: ^17.0.0-0 - checksum: caa271475622a2b3a00cb521191382bd91986181ae4d48ff076faa94a3978c56b668a20eee1f809f1e96b809c0852fd25eb0666cb48ad78283d8d9ddb47a1b14 - languageName: node - linkType: hard - -"@wordpress/a11y@npm:^3.10.0, @wordpress/a11y@npm:^3.13.0, @wordpress/a11y@npm:^3.9.0": +"@wordpress/a11y@npm:^3.13.0": version: 3.13.0 resolution: "@wordpress/a11y@npm:3.13.0" dependencies: @@ -8166,6 +8217,17 @@ __metadata: languageName: node linkType: hard +"@wordpress/a11y@npm:^3.22.0, @wordpress/a11y@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/a11y@npm:3.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/dom-ready": ^3.27.0 + "@wordpress/i18n": ^4.27.0 + checksum: dc4c97f087d3d6dfa5e930ad6d1f8882c15d1461a600c38aeb052f2fcb351aff6d2679b13465ee898d35e4e0642ffb41f2e3cff0d1203ed089eb93404f539a8f + languageName: node + linkType: hard + "@wordpress/api-fetch@npm:^5.2.5": version: 5.2.6 resolution: "@wordpress/api-fetch@npm:5.2.6" @@ -8177,38 +8239,38 @@ __metadata: languageName: node linkType: hard -"@wordpress/api-fetch@npm:^6.6.0": - version: 6.6.0 - resolution: "@wordpress/api-fetch@npm:6.6.0" +"@wordpress/api-fetch@npm:^6.19.0, @wordpress/api-fetch@npm:^6.24.0": + version: 6.24.0 + resolution: "@wordpress/api-fetch@npm:6.24.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/url": ^3.10.0 - checksum: e36375ae57b021bc517518861f9831b99a9fa9b3684ce06eb27eef67cd2dbd3624dca850c9b9929988607892bd4c86f9d4c4b30f89ec9ccb93f3c604332e43b0 + "@wordpress/i18n": ^4.27.0 + "@wordpress/url": ^3.28.0 + checksum: fba338699e0f81cf53dc0e1341f9b5c68ca726b952fa834bf2ba88c8d5b46257014b34354a9791ca451df2c3a6a02d6badcca31c61810e72bd8e76ff400a0ff4 languageName: node linkType: hard -"@wordpress/autop@npm:^3.9.0": - version: 3.9.0 - resolution: "@wordpress/autop@npm:3.9.0" +"@wordpress/autop@npm:^3.22.0": + version: 3.27.0 + resolution: "@wordpress/autop@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - checksum: 51b6946b641df7d4591e84eefe99ea61487d1a86bfa96fd4ba45072eea3e0121d29341e17b3b569e5a6b29248e1d7cfc137a0a9295ec8bd50600e810f51d92a9 + checksum: cfc22c85e9173351c9c2d49c5edcfc292722a1ef51810c87d867d12faa0c4facc9a3592d3256ad981a2163afd4ab78117826d5c3f79f16fe4efb83c57f3fbdae languageName: node linkType: hard -"@wordpress/babel-plugin-import-jsx-pragma@npm:^3.1.2": - version: 3.1.3 - resolution: "@wordpress/babel-plugin-import-jsx-pragma@npm:3.1.3" +"@wordpress/babel-plugin-import-jsx-pragma@npm:^4.10.0, @wordpress/babel-plugin-import-jsx-pragma@npm:^4.5.0": + version: 4.10.0 + resolution: "@wordpress/babel-plugin-import-jsx-pragma@npm:4.10.0" peerDependencies: "@babel/core": ^7.12.9 - checksum: 02c2caaf3956c160c69aa78abd34fffaa31583c52dcd16c91416bb1ba6613e113666c4cf61450268239211c2a627534e580585ff5b5cf58936c79959d915f94f + checksum: 15da43602daf754f1db0af94a751c9207d044e0beff3d9edbb806b6fb4b66cef9e01b40533fb3b80e9a1180779a26e9a647e5b33c57f648ea156bf6c0cd90cf0 languageName: node linkType: hard -"@wordpress/babel-preset-default@npm:^6.11.0": - version: 6.11.0 - resolution: "@wordpress/babel-preset-default@npm:6.11.0" +"@wordpress/babel-preset-default@npm:^7.10.2, @wordpress/babel-preset-default@npm:^7.6.0": + version: 7.11.0 + resolution: "@wordpress/babel-preset-default@npm:7.11.0" dependencies: "@babel/core": ^7.16.0 "@babel/plugin-transform-react-jsx": ^7.16.0 @@ -8216,13 +8278,13 @@ __metadata: "@babel/preset-env": ^7.16.0 "@babel/preset-typescript": ^7.16.0 "@babel/runtime": ^7.16.0 - "@wordpress/babel-plugin-import-jsx-pragma": ^3.1.2 - "@wordpress/browserslist-config": ^4.1.2 - "@wordpress/element": ^4.7.0 - "@wordpress/warning": ^2.9.0 + "@wordpress/babel-plugin-import-jsx-pragma": ^4.10.0 + "@wordpress/browserslist-config": ^5.10.0 + "@wordpress/element": ^5.4.0 + "@wordpress/warning": ^2.27.0 browserslist: ^4.17.6 core-js: ^3.19.1 - checksum: 82b57949db9fa8fa220827edf2dd091ee0fd6ceb017dc900181fda575c2893b8afa428f2a6430475e8189dc757e8ff27c76a6cb6b5f45c8689508c9004dc4c44 + checksum: 3f15aa10edcb2a799891bf37a3f8289b57dde78c012225af69329fea415c08a7263346d006b1f05ccb27fea0cad8cac2b87294695955a8494b1cf4538dfec123 languageName: node linkType: hard @@ -8233,54 +8295,55 @@ __metadata: languageName: node linkType: hard -"@wordpress/base-styles@npm:^4.5.0, @wordpress/base-styles@npm:^4.7.0": - version: 4.7.0 - resolution: "@wordpress/base-styles@npm:4.7.0" - checksum: c6e35d60a373875f4e9059547fcbe6292a951e6a270de9afe8d355714efa08cc2a941a092d45da53eadc1028d240df071875b10b53f47210f3f0896584df88a5 +"@wordpress/base-styles@npm:^4.13.0, @wordpress/base-styles@npm:^4.18.0": + version: 4.18.0 + resolution: "@wordpress/base-styles@npm:4.18.0" + checksum: 33639a0ddb45f6baaad724dff022629432d5b6a36554e444709e98b1107ef1fb7b64c1204f864eb3df47ee09e9ea02f06718d6d42f140e1db42a45e103297daf languageName: node linkType: hard -"@wordpress/blob@npm:^3.9.0": - version: 3.9.0 - resolution: "@wordpress/blob@npm:3.9.0" +"@wordpress/blob@npm:^3.22.0, @wordpress/blob@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/blob@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - checksum: 14e721171664ed50e6c7df5a8dc1d437db3edcaaf20bf04c0bd0c4a36b1076988106e9105fc84f6f0f7e6f7bd533e6818aaeef75dce1b5cd3dfb9888ab304206 + checksum: 42218bb23bc714eddb23b138eaabc66eb0a2aac521c8145a749207ec6c000d4392f8d8c4e8cd77dd97dbd1aae5c5681650cb997a09d228eb9945574ad9d69d3b languageName: node linkType: hard -"@wordpress/block-editor@npm:^9.1.0": - version: 9.1.0 - resolution: "@wordpress/block-editor@npm:9.1.0" +"@wordpress/block-editor@npm:^10.5.0": + version: 10.5.0 + resolution: "@wordpress/block-editor@npm:10.5.0" dependencies: "@babel/runtime": ^7.16.0 - "@react-spring/web": ^9.2.4 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/blob": ^3.9.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/date": ^4.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/dom": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/keyboard-shortcuts": ^3.7.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/shortcode": ^3.9.0 - "@wordpress/style-engine": ^0.8.0 - "@wordpress/token-list": ^2.9.0 - "@wordpress/url": ^3.10.0 - "@wordpress/warning": ^2.9.0 - "@wordpress/wordcount": ^3.9.0 + "@react-spring/web": ^9.4.5 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/blob": ^3.22.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/date": ^4.22.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/keyboard-shortcuts": ^3.20.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/shortcode": ^3.22.0 + "@wordpress/style-engine": ^1.5.0 + "@wordpress/token-list": ^2.22.0 + "@wordpress/url": ^3.23.0 + "@wordpress/warning": ^2.22.0 + "@wordpress/wordcount": ^3.22.0 + change-case: ^4.1.2 classnames: ^2.3.1 colord: ^2.7.0 diff: ^4.0.2 @@ -8288,110 +8351,116 @@ __metadata: inherits: ^2.0.3 lodash: ^4.17.21 react-autosize-textarea: ^7.1.0 - react-easy-crop: ^3.0.0 - rememo: ^3.0.0 + react-easy-crop: ^4.5.1 + rememo: ^4.0.0 + remove-accents: ^0.4.2 traverse: ^0.6.6 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 957996813393175b67cc86207d9555e88029895315ac392d04d46c2515ed6a2b37ed33364aa51604896f16e6d134177bfa4146f1cfe5d5bf2a7aafe2b76d2457 + checksum: 416c7a45b9a63fbc710fb4aaf29970fa8a4d31b11f8b20936476885e352336b7407326d7fd4562018d79162196949393f7a580ff32745de8c49124ebd0b34704 languageName: node linkType: hard -"@wordpress/block-library@npm:^7.6.0": - version: 7.6.0 - resolution: "@wordpress/block-library@npm:7.6.0" +"@wordpress/block-library@npm:^7.19.0": + version: 7.19.0 + resolution: "@wordpress/block-library@npm:7.19.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/autop": ^3.9.0 - "@wordpress/blob": ^3.9.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/core-data": ^4.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/date": ^4.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/dom": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/primitives": ^3.7.0 - "@wordpress/reusable-blocks": ^3.7.0 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/server-side-render": ^3.7.0 - "@wordpress/url": ^3.10.0 - "@wordpress/viewport": ^4.7.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/autop": ^3.22.0 + "@wordpress/blob": ^3.22.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/core-data": ^5.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/date": ^4.22.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/reusable-blocks": ^3.20.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/server-side-render": ^3.20.0 + "@wordpress/url": ^3.23.0 + "@wordpress/viewport": ^4.20.0 + change-case: ^4.1.2 classnames: ^2.3.1 colord: ^2.7.0 - fast-average-color: 4.3.0 + escape-html: ^1.0.3 + fast-average-color: ^9.1.1 lodash: ^4.17.21 memize: ^1.1.0 micromodal: ^0.4.10 - moment: ^2.22.1 + remove-accents: ^0.4.2 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 1109f092612de1d244b10f15cf092cbf956b149abf4691c288bbc67f26050adb1a96f3d1a84cb6cab3bb4a4c8fca1fa9c817ebddf8d556e1b65e75469220afee + checksum: 3b10d67b44245a27c2d295ab3cb30a9dcec476aa65156257fc627f8e20c3d2f66137e1a34dc8ab5c84b6716db4f848c132668530693137d0d4f2f445d0a18e13 languageName: node linkType: hard -"@wordpress/block-serialization-default-parser@npm:^4.9.0": - version: 4.9.0 - resolution: "@wordpress/block-serialization-default-parser@npm:4.9.0" +"@wordpress/block-serialization-default-parser@npm:^4.22.0": + version: 4.27.0 + resolution: "@wordpress/block-serialization-default-parser@npm:4.27.0" dependencies: "@babel/runtime": ^7.16.0 - checksum: 3e6cfc6216a27661c2601964e86c8b973ae2b5a0539fccd7c2863271127648b3b47a8c715adb85cbd0bb50d74ba3c254b765da5dfa0dd26f482f10dc58e2d37e + checksum: 6907069d7f02f85c7fe25d680a96d2eb86d975cafd9b219aa0f79d342eb30105ae3dbc97aeac7ce8e75a55913e78427c50cf9ffe883546b74bbf38c25a9c31d4 languageName: node linkType: hard -"@wordpress/blocks@npm:^11.8.0": - version: 11.8.0 - resolution: "@wordpress/blocks@npm:11.8.0" +"@wordpress/blocks@npm:^11.21.0": + version: 11.21.0 + resolution: "@wordpress/blocks@npm:11.21.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/autop": ^3.9.0 - "@wordpress/blob": ^3.9.0 - "@wordpress/block-serialization-default-parser": ^4.9.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/dom": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/shortcode": ^3.9.0 + "@wordpress/autop": ^3.22.0 + "@wordpress/blob": ^3.22.0 + "@wordpress/block-serialization-default-parser": ^4.22.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/shortcode": ^3.22.0 + change-case: ^4.1.2 colord: ^2.7.0 hpq: ^1.3.0 + is-plain-object: ^5.0.0 lodash: ^4.17.21 memize: ^1.1.0 - rememo: ^3.0.0 + rememo: ^4.0.0 + remove-accents: ^0.4.2 showdown: ^1.9.1 simple-html-tokenizer: ^0.5.7 uuid: ^8.3.0 peerDependencies: react: ^17.0.0 - checksum: d01627043d5142ce7e78f2c0156fafbd8ee065a69ebdfc37c8588728247301f0573333e77fb5a331c448d0d3540c1dac1a01926f1d242738e42e0366c772ca45 + checksum: 9f1d18ce55f3a3d61fb626a498f169dbc41cb1761a52d5b08d450b6c47a9355422a719bfbdd5c7e44649aa8ad6296678da656a7a3877b0e2ed19428a5acde6e6 languageName: node linkType: hard -"@wordpress/browserslist-config@npm:^4.1.2": - version: 4.1.3 - resolution: "@wordpress/browserslist-config@npm:4.1.3" - checksum: 192b94e8885326a689a365df0903b5ffe8ea9d20901e6e7313fbb0c74aafab6f6634900ab19347ab2ce68e2ea1fa2efc653345e927b5c8c351492fe9e6993441 +"@wordpress/browserslist-config@npm:^5.10.0, @wordpress/browserslist-config@npm:^5.5.0": + version: 5.10.0 + resolution: "@wordpress/browserslist-config@npm:5.10.0" + checksum: 2ced4986669ce68b8722c3cf50aac63becae678739d6560d521b60d3d9f58b119b6af8c3c5ec89924e53ed8c6267478ee2d3c259a9f32559f9fd85195b2efb9a languageName: node linkType: hard -"@wordpress/components@npm:19.15.0, @wordpress/components@npm:^19.11.0, @wordpress/components@npm:^19.15.0": +"@wordpress/components@npm:19.15.0": version: 19.15.0 resolution: "@wordpress/components@npm:19.15.0" dependencies: @@ -8442,7 +8511,60 @@ __metadata: languageName: node linkType: hard -"@wordpress/compose@npm:^5.11.0, @wordpress/compose@npm:^5.7.0": +"@wordpress/components@npm:^22.1.0": + version: 22.1.0 + resolution: "@wordpress/components@npm:22.1.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@emotion/cache": ^11.7.1 + "@emotion/css": ^11.7.1 + "@emotion/react": ^11.7.1 + "@emotion/serialize": ^1.0.2 + "@emotion/styled": ^11.6.0 + "@emotion/utils": ^1.0.0 + "@floating-ui/react-dom": ^1.0.0 + "@use-gesture/react": ^10.2.6 + "@wordpress/a11y": ^3.22.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/date": ^4.22.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/escape-html": ^2.22.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/warning": ^2.22.0 + change-case: ^4.1.2 + classnames: ^2.3.1 + colord: ^2.7.0 + date-fns: ^2.28.0 + dom-scroll-into-view: ^1.2.1 + downshift: ^6.0.15 + framer-motion: ^6.2.8 + gradient-parser: ^0.1.5 + highlight-words-core: ^1.2.2 + lodash: ^4.17.21 + memize: ^1.1.0 + re-resizable: ^6.4.0 + react-colorful: ^5.3.1 + reakit: ^1.3.8 + remove-accents: ^0.4.2 + use-lilius: ^2.0.1 + uuid: ^8.3.0 + valtio: ^1.7.0 + peerDependencies: + react: ^17.0.0 + react-dom: ^17.0.0 + checksum: 2bfefa1cf44ca62497dd91722f5994a5de5fbd56de022e55b2c054ceb15e7c1cb0fa58c561cd6927b58808d9c8c26c93f252190e94b337d0161bcfedd9fc5e05 + languageName: node + linkType: hard + +"@wordpress/compose@npm:^5.11.0": version: 5.11.0 resolution: "@wordpress/compose@npm:5.11.0" dependencies: @@ -8465,57 +8587,126 @@ __metadata: languageName: node linkType: hard -"@wordpress/core-data@npm:^4.7.0": - version: 4.7.0 - resolution: "@wordpress/core-data@npm:4.7.0" +"@wordpress/compose@npm:^5.13.0, @wordpress/compose@npm:^5.20.0": + version: 5.20.0 + resolution: "@wordpress/compose@npm:5.20.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@types/mousetrap": ^1.6.8 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/priority-queue": ^2.22.0 + change-case: ^4.1.2 + clipboard: ^2.0.8 + mousetrap: ^1.6.5 + use-memo-one: ^1.1.1 + peerDependencies: + react: ^17.0.0 + checksum: 0b5a745c9c2a4f6942bf04861e896f2607d7f78df6ef06a76c4f508d7334e482ec2003afd31c19e0dc657e1db31886c6ccd0f4410d4346940e9edbc0a7f00cc9 + languageName: node + linkType: hard + +"@wordpress/compose@npm:^6.4.0": + version: 6.4.0 + resolution: "@wordpress/compose@npm:6.4.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/url": ^3.10.0 + "@types/mousetrap": ^1.6.8 + "@wordpress/deprecated": ^3.27.0 + "@wordpress/dom": ^3.27.0 + "@wordpress/element": ^5.4.0 + "@wordpress/is-shallow-equal": ^4.27.0 + "@wordpress/keycodes": ^3.27.0 + "@wordpress/priority-queue": ^2.27.0 + change-case: ^4.1.2 + clipboard: ^2.0.8 + mousetrap: ^1.6.5 + use-memo-one: ^1.1.1 + peerDependencies: + react: ^18.0.0 + checksum: af25afae36d63addadeb949fb7d591cb8a401b63f9e7b2ea321ed5d3e1bc33eba16e494a675757e233a1a53fd7f79aead3df1d871c2d1f03d852c1c9af39ca55 + languageName: node + linkType: hard + +"@wordpress/core-data@npm:^5.5.0": + version: 5.5.0 + resolution: "@wordpress/core-data@npm:5.5.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/url": ^3.23.0 + change-case: ^4.1.2 equivalent-key-map: ^0.2.2 lodash: ^4.17.21 memize: ^1.1.0 - rememo: ^3.0.0 + rememo: ^4.0.0 uuid: ^8.3.0 peerDependencies: react: ^17.0.0 - checksum: a5d317289db7a79b74d02fdfae359aef51544357836f7f3da27cdde7649b45762c61cb1ef0f8feff700ec272e921c19561e6d85cf10aca9bc41f2559f0b80314 + checksum: 824179e63334f03b67cbac3dd2f3c5c795c1b467236cc9db4ee7be3485ed0ed14c4d5eb4d8d516272945e220e064f68c12ca169c7b87e53af25633eec0e68a9b languageName: node linkType: hard -"@wordpress/data-controls@npm:^2.9.0": - version: 2.9.0 - resolution: "@wordpress/data-controls@npm:2.9.0" +"@wordpress/data-controls@npm:^2.22.0": + version: 2.27.0 + resolution: "@wordpress/data-controls@npm:2.27.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 + "@wordpress/api-fetch": ^6.24.0 + "@wordpress/data": ^8.4.0 + "@wordpress/deprecated": ^3.27.0 + checksum: b92f2087d611ae9a2ae9ad92ee065c00cabe6e97f05d533c34a02b017ca50df80ca716251fc9cfbe372cc7ca809c41c79688525c2c3a82c4c7501b2834046780 + languageName: node + linkType: hard + +"@wordpress/data@npm:^6.13.0": + version: 6.15.0 + resolution: "@wordpress/data@npm:6.15.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/compose": ^5.13.0 + "@wordpress/deprecated": ^3.15.0 + "@wordpress/element": ^4.13.0 + "@wordpress/is-shallow-equal": ^4.15.0 + "@wordpress/priority-queue": ^2.15.0 + "@wordpress/redux-routine": ^4.15.0 + equivalent-key-map: ^0.2.2 + is-plain-obj: ^4.1.0 + is-promise: ^4.0.0 + lodash: ^4.17.21 + redux: ^4.1.2 + turbo-combine-reducers: ^1.0.2 + use-memo-one: ^1.1.1 peerDependencies: react: ^17.0.0 - checksum: c7871a50ab8137780b6a51cf703e5f6cf675f8587e26efd5bab5733199b875ec2442b3f01107fe621b02c9b5c8ce86f8400507d2b77ec641608cabfc01d7268c + checksum: 5e8f9e62d52b62b17aadd9e83b8812973cd425d7c5937378b32036e862b372967233fc042d1ad83907bae22ad4b3194925bf9be2d7aaf4abcf6efec30fefb3e7 languageName: node linkType: hard -"@wordpress/data@npm:^6.10.0, @wordpress/data@npm:^6.13.0, @wordpress/data@npm:^6.7.0, @wordpress/data@npm:^6.9.0": - version: 6.13.0 - resolution: "@wordpress/data@npm:6.13.0" +"@wordpress/data@npm:^7.6.0": + version: 7.6.0 + resolution: "@wordpress/data@npm:7.6.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/compose": ^5.11.0 - "@wordpress/deprecated": ^3.13.0 - "@wordpress/element": ^4.11.0 - "@wordpress/is-shallow-equal": ^4.13.0 - "@wordpress/priority-queue": ^2.13.0 - "@wordpress/redux-routine": ^4.13.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/priority-queue": ^2.22.0 + "@wordpress/redux-routine": ^4.22.0 equivalent-key-map: ^0.2.2 + is-plain-object: ^5.0.0 is-promise: ^4.0.0 lodash: ^4.17.21 redux: ^4.1.2 @@ -8523,11 +8714,36 @@ __metadata: use-memo-one: ^1.1.1 peerDependencies: react: ^17.0.0 - checksum: 506b4cd10e5f9361494b2fb30463481f96e7b40355323343f71a54691ff602018a318018a8c9b480155ab38300046f421210f339d085020f2d95de9777cd1d6f + checksum: 9bfe31aaca62e3eb2516575300b764a42d6d7f020ceee89d33e28e183eec7c1f58dee30d171e9d1e186aa0bca3df5dd714dd9902614193d95983410077fa55b7 languageName: node linkType: hard -"@wordpress/date@npm:^4.13.0, @wordpress/date@npm:^4.9.0": +"@wordpress/data@npm:^8.4.0": + version: 8.4.0 + resolution: "@wordpress/data@npm:8.4.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/compose": ^6.4.0 + "@wordpress/deprecated": ^3.27.0 + "@wordpress/element": ^5.4.0 + "@wordpress/is-shallow-equal": ^4.27.0 + "@wordpress/priority-queue": ^2.27.0 + "@wordpress/private-apis": ^0.9.0 + "@wordpress/redux-routine": ^4.27.0 + deepmerge: ^4.3.0 + equivalent-key-map: ^0.2.2 + is-plain-object: ^5.0.0 + is-promise: ^4.0.0 + redux: ^4.1.2 + turbo-combine-reducers: ^1.0.2 + use-memo-one: ^1.1.1 + peerDependencies: + react: ^18.0.0 + checksum: e1b3c1e124ec6e540f192986348cc9fa553ad2aad8385a69f165125cc41ca4601f43e817e8a70c9c3254c4505c7f2dc522c14e4695499d7b2e11c0cbef65f84b + languageName: node + linkType: hard + +"@wordpress/date@npm:^4.13.0": version: 4.13.0 resolution: "@wordpress/date@npm:4.13.0" dependencies: @@ -8538,31 +8754,31 @@ __metadata: languageName: node linkType: hard -"@wordpress/dependency-extraction-webpack-plugin@npm:^3.5.0": - version: 3.5.0 - resolution: "@wordpress/dependency-extraction-webpack-plugin@npm:3.5.0" +"@wordpress/date@npm:^4.22.0": + version: 4.27.0 + resolution: "@wordpress/date@npm:4.27.0" dependencies: - json2php: ^0.0.4 - webpack-sources: ^3.2.2 - peerDependencies: - webpack: ^4.8.3 || ^5.0.0 - checksum: 5a712c1ee8b837542b5c37f6f3dca1653181b8e3fea2c706fda506bc570523a105e808be43501065d61039f6dd5080f1a748fffef6946964d0804ee2fd96cd92 + "@babel/runtime": ^7.16.0 + "@wordpress/deprecated": ^3.27.0 + moment: ^2.29.4 + moment-timezone: ^0.5.40 + checksum: adcfcd6936f6c504e6ea537b58a34cf1077ec0a35b4cff6ed1e7b7b2ebe378c60bc1cd8f700cbe6ba4b0ec548d505e144941cb317d769e924c932b1fa681ea65 languageName: node linkType: hard -"@wordpress/dependency-extraction-webpack-plugin@npm:^4.4.0": - version: 4.4.0 - resolution: "@wordpress/dependency-extraction-webpack-plugin@npm:4.4.0" +"@wordpress/dependency-extraction-webpack-plugin@npm:^4.5.0": + version: 4.10.0 + resolution: "@wordpress/dependency-extraction-webpack-plugin@npm:4.10.0" dependencies: - json2php: ^0.0.5 + json2php: ^0.0.7 webpack-sources: ^3.2.2 peerDependencies: webpack: ^4.8.3 || ^5.0.0 - checksum: 9a402783ae313a9155e5bdadea1f6b396214920a5df2ed964d79cf7a110d44e466c019f98ad28e7b32fa2429a489f0f20119c3fd93a3da278c225c8e1b610449 + checksum: 774d92234b9f0baea327fadeb8e89bdb930fd2401d50f75adff9f2c589d418189077ee8d1bca490cbaa33f2dcca9091dfbf6f89905aa776663a6b70110207934 languageName: node linkType: hard -"@wordpress/deprecated@npm:^3.13.0, @wordpress/deprecated@npm:^3.8.0, @wordpress/deprecated@npm:^3.9.0": +"@wordpress/deprecated@npm:^3.13.0, @wordpress/deprecated@npm:^3.8.0": version: 3.13.0 resolution: "@wordpress/deprecated@npm:3.13.0" dependencies: @@ -8572,7 +8788,17 @@ __metadata: languageName: node linkType: hard -"@wordpress/dom-ready@npm:^3.13.0, @wordpress/dom-ready@npm:^3.9.0": +"@wordpress/deprecated@npm:^3.15.0, @wordpress/deprecated@npm:^3.22.0, @wordpress/deprecated@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/deprecated@npm:3.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/hooks": ^3.27.0 + checksum: 1d95e20de156f354b013d8803b912b007e4625974c35784be47138e60447ac8fa43d508403e26d924e66397eaec8302f6e70205f29aec407b464bd97de4d9dc3 + languageName: node + linkType: hard + +"@wordpress/dom-ready@npm:^3.13.0": version: 3.13.0 resolution: "@wordpress/dom-ready@npm:3.13.0" dependencies: @@ -8581,7 +8807,16 @@ __metadata: languageName: node linkType: hard -"@wordpress/dom@npm:^3.13.0, @wordpress/dom@npm:^3.9.0": +"@wordpress/dom-ready@npm:^3.22.0, @wordpress/dom-ready@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/dom-ready@npm:3.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + checksum: 0ef2f2f0267f889712dbd92017432dd7c39ac26301f82ceda2c85720a174f948065f74b0c5c21191aa85de0ed935737dcbce81961605bf3bc464c520828d9d2a + languageName: node + linkType: hard + +"@wordpress/dom@npm:^3.13.0": version: 3.13.0 resolution: "@wordpress/dom@npm:3.13.0" dependencies: @@ -8592,132 +8827,147 @@ __metadata: languageName: node linkType: hard -"@wordpress/edit-post@npm:^6.6.0": - version: 6.6.0 - resolution: "@wordpress/edit-post@npm:6.6.0" +"@wordpress/dom@npm:^3.22.0, @wordpress/dom@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/dom@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/block-library": ^7.6.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/core-data": ^4.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/editor": ^12.8.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/interface": ^4.8.0 - "@wordpress/keyboard-shortcuts": ^3.7.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/media-utils": ^4.0.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/preferences": ^2.1.0 - "@wordpress/url": ^3.10.0 - "@wordpress/viewport": ^4.7.0 - "@wordpress/warning": ^2.9.0 + "@wordpress/deprecated": ^3.27.0 + checksum: 4e48d1347cfefc1b6f0959867f113015805447a11998ca0b9675e7f1578942dec4d23ebfcb4002582ed7bde3c14cca253b28a56d3bdc5e1be4e63c8b1411fb0f + languageName: node + linkType: hard + +"@wordpress/edit-post@npm:^6.19.0": + version: 6.19.0 + resolution: "@wordpress/edit-post@npm:6.19.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/block-library": ^7.19.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/core-data": ^5.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/editor": ^12.21.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/interface": ^4.21.0 + "@wordpress/keyboard-shortcuts": ^3.20.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/media-utils": ^4.13.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/plugins": ^4.20.0 + "@wordpress/preferences": ^2.14.0 + "@wordpress/url": ^3.23.0 + "@wordpress/viewport": ^4.20.0 + "@wordpress/warning": ^2.22.0 classnames: ^2.3.1 lodash: ^4.17.21 memize: ^1.1.0 - rememo: ^3.0.0 + rememo: ^4.0.0 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 380516dd2c10cc6a65b2b9206c2068c18d6635155849151f2cd13ef6276131829b5a2bd23c752d31c40131490c3ad97a266e841c96b58b3715df67db6d867ebd + checksum: d0003fea94a9b794bbf819de0d022b8110cf13cb0b6d3de938eb4f74f6bef4ccc80ad6d397684453aa12bfa84f06de34603512a20c3df7da7775d93155728738 languageName: node linkType: hard -"@wordpress/edit-site@npm:^4.6.0": - version: 4.6.0 - resolution: "@wordpress/edit-site@npm:4.6.0" +"@wordpress/edit-site@npm:^4.19.0": + version: 4.19.0 + resolution: "@wordpress/edit-site@npm:4.19.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/block-library": ^7.6.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/core-data": ^4.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/editor": ^12.8.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/interface": ^4.8.0 - "@wordpress/keyboard-shortcuts": ^3.7.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/media-utils": ^4.0.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/preferences": ^2.1.0 - "@wordpress/reusable-blocks": ^3.7.0 - "@wordpress/style-engine": ^0.8.0 - "@wordpress/url": ^3.10.0 - "@wordpress/viewport": ^4.7.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/block-library": ^7.19.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/core-data": ^5.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/editor": ^12.21.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/interface": ^4.21.0 + "@wordpress/keyboard-shortcuts": ^3.20.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/media-utils": ^4.13.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/plugins": ^4.20.0 + "@wordpress/preferences": ^2.14.0 + "@wordpress/reusable-blocks": ^3.20.0 + "@wordpress/style-engine": ^1.5.0 + "@wordpress/url": ^3.23.0 + "@wordpress/viewport": ^4.20.0 classnames: ^2.3.1 + colord: ^2.9.2 downloadjs: ^1.4.7 history: ^5.1.0 lodash: ^4.17.21 react-autosize-textarea: ^7.1.0 - rememo: ^3.0.0 + rememo: ^4.0.0 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: fe1ea39e2a8a5fee9c42d5bd2ae58fc4eb8248d877f31f1af444fd1650c2a066eca3b1a934319779732fac10261f5998801b2201b2ce474a7056eb6852acd995 + checksum: f8fce565e9bdcb9256e347a5cec0dd09711d6b9e96e719f14356014b20afafa3f736dabceeeaa4ae8038acb72e6ecb47625d8b663dcad7a92470d99c0bec8b30 languageName: node linkType: hard -"@wordpress/editor@npm:^12.8.0": - version: 12.8.0 - resolution: "@wordpress/editor@npm:12.8.0" +"@wordpress/editor@npm:^12.21.0": + version: 12.21.0 + resolution: "@wordpress/editor@npm:12.21.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/blob": ^3.9.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/core-data": ^4.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/date": ^4.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/keyboard-shortcuts": ^3.7.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/media-utils": ^4.0.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/preferences": ^2.1.0 - "@wordpress/reusable-blocks": ^3.7.0 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/server-side-render": ^3.7.0 - "@wordpress/url": ^3.10.0 - "@wordpress/wordcount": ^3.9.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/blob": ^3.22.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/core-data": ^5.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/date": ^4.22.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/dom": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/keyboard-shortcuts": ^3.20.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/media-utils": ^4.13.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/preferences": ^2.14.0 + "@wordpress/reusable-blocks": ^3.20.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/server-side-render": ^3.20.0 + "@wordpress/url": ^3.23.0 + "@wordpress/wordcount": ^3.22.0 classnames: ^2.3.1 + date-fns: ^2.28.0 + escape-html: ^1.0.3 lodash: ^4.17.21 memize: ^1.1.0 react-autosize-textarea: ^7.1.0 - rememo: ^3.0.0 + rememo: ^4.0.0 + remove-accents: ^0.4.2 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 7fb760f5b9f0f4fadd6fa31dd0ef3926a539d5de5cd856e24f685f0a5d99a691e6f9afb0613a8054a3d372861bbc5f894d3388527bb1396b37d0fa14dbac817f + checksum: 6e621b3d73ba56380befa03a6526414c1a4b90e910a10df3589e6a977eb1ee757b20f2a2538792ee941ccd77b3bce4754455097b3ab5a53cf77f813d4ea40c33 languageName: node linkType: hard @@ -8766,7 +9016,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/element@npm:^4.1.1, @wordpress/element@npm:^4.11.0, @wordpress/element@npm:^4.18.0, @wordpress/element@npm:^4.19.0, @wordpress/element@npm:^4.5.0, @wordpress/element@npm:^4.7.0": +"@wordpress/element@npm:^4.1.1, @wordpress/element@npm:^4.11.0, @wordpress/element@npm:^4.18.0": version: 4.19.0 resolution: "@wordpress/element@npm:4.19.0" dependencies: @@ -8782,15 +9032,47 @@ __metadata: languageName: node linkType: hard -"@wordpress/env@npm:^4.7.0": - version: 4.7.0 - resolution: "@wordpress/env@npm:4.7.0" +"@wordpress/element@npm:^4.13.0, @wordpress/element@npm:^4.20.0": + version: 4.20.0 + resolution: "@wordpress/element@npm:4.20.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@types/react": ^17.0.37 + "@types/react-dom": ^17.0.11 + "@wordpress/escape-html": ^2.22.0 + change-case: ^4.1.2 + is-plain-object: ^5.0.0 + react: ^17.0.2 + react-dom: ^17.0.2 + checksum: 729a1acd675bcecccb43804afe40a38c8be561a205e556a22faade0638331955389da6a9fc2f8ea103f8eefc8035067464c44f2b91fa4e200f2f9cb3dc2b2d94 + languageName: node + linkType: hard + +"@wordpress/element@npm:^5.4.0": + version: 5.4.0 + resolution: "@wordpress/element@npm:5.4.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@types/react": ^18.0.21 + "@types/react-dom": ^18.0.6 + "@wordpress/escape-html": ^2.27.0 + change-case: ^4.1.2 + is-plain-object: ^5.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 + checksum: a63a4dc2dea7b83be946f3a86d367eb8e2917c198167ff8a44994b6ef635721b48dc5c44d9429396c86ad1ccf26913e5b8981ddb83c7e0e0b79679c336a9e302 + languageName: node + linkType: hard + +"@wordpress/env@npm:^5.7.0": + version: 5.12.0 + resolution: "@wordpress/env@npm:5.12.0" dependencies: chalk: ^4.0.0 copy-dir: ^1.3.0 docker-compose: ^0.22.2 extract-zip: ^1.6.7 - got: ^10.7.0 + got: ^11.8.5 inquirer: ^7.1.0 js-yaml: ^3.13.1 ora: ^4.0.2 @@ -8800,7 +9082,7 @@ __metadata: yargs: ^17.3.0 bin: wp-env: bin/wp-env - checksum: 58ff63f33d98028f295bc917390fb04dbb9d186ac32e31b65631361a80c729e9cc6cebf62e5a57757501d84a4939b37bc74f8d18d03d9e4ea5989f6ad4e6bd26 + checksum: 901055c5a0306f60114ea705ded5759d24e204949c7d37f077032ee3f26dbe524a1390ac21858348cc9a4062ff380771cef8d432cf053b9a8e5886e204b2fde5 languageName: node linkType: hard @@ -8822,20 +9104,29 @@ __metadata: languageName: node linkType: hard -"@wordpress/eslint-plugin@npm:^12.3.0": - version: 12.3.0 - resolution: "@wordpress/eslint-plugin@npm:12.3.0" +"@wordpress/escape-html@npm:^2.22.0, @wordpress/escape-html@npm:^2.27.0": + version: 2.27.0 + resolution: "@wordpress/escape-html@npm:2.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + checksum: e4fe71eb0b3233a2b3a61dd15ca0f34c53cd57a83a49a0f753519fefb6354ca22105bc38f3282e2fbfc44ed98a973ac62e65b95fe85f601022c551ea1ba0125d + languageName: node + linkType: hard + +"@wordpress/eslint-plugin@npm:^13.6.0": + version: 13.10.3 + resolution: "@wordpress/eslint-plugin@npm:13.10.3" dependencies: "@babel/eslint-parser": ^7.16.0 "@typescript-eslint/eslint-plugin": ^5.3.0 "@typescript-eslint/parser": ^5.3.0 - "@wordpress/babel-preset-default": ^6.11.0 - "@wordpress/prettier-config": ^1.3.0 + "@wordpress/babel-preset-default": ^7.10.2 + "@wordpress/prettier-config": ^2.9.1 cosmiconfig: ^7.0.0 eslint-config-prettier: ^8.3.0 eslint-plugin-import: ^2.25.2 - eslint-plugin-jest: ^25.2.3 - eslint-plugin-jsdoc: ^37.0.3 + eslint-plugin-jest: ^27.2.1 + eslint-plugin-jsdoc: ^39.6.9 eslint-plugin-jsx-a11y: ^6.5.1 eslint-plugin-prettier: ^3.3.0 eslint-plugin-react: ^7.27.0 @@ -8852,31 +9143,30 @@ __metadata: optional: true typescript: optional: true - checksum: 73e834cb50b85d609e655ddda66bb4cc33e6b50034df1cb95d832411f7a8500b6977040eadfc6357804f14e74e73b5d4bfa1889fd8701739c0ab04def9c73d87 + checksum: e42ebe29d691581fa2b6e2f7f1483f97b6eeacad0af5480efc94e6413873c837c617f1bcf9cb1e1dd8525aea2f2cb25785f55d97958b00ae3a83c6504746c69a languageName: node linkType: hard -"@wordpress/format-library@npm:^3.7.0": - version: 3.7.0 - resolution: "@wordpress/format-library@npm:3.7.0" +"@wordpress/format-library@npm:^3.20.0": + version: 3.20.0 + resolution: "@wordpress/format-library@npm:3.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/rich-text": ^5.7.0 - "@wordpress/url": ^3.10.0 - lodash: ^4.17.21 + "@wordpress/a11y": ^3.22.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/rich-text": ^5.20.0 + "@wordpress/url": ^3.23.0 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 11a0b4d3ea8c707bd877d51029d874c767e6d50b82a12863cb47fa2f08c8cdf6cc2af31e99791c2969f6d6694b9b452b18c8e845ee0aae9f3546768399c38856 + checksum: 036bbfb1da1bea0f251f13d257ba273a429537f993d0a789889531be524a8253347ad5582ef65aa64b5a9cbe47c97389def9cf98522bffc8b76d0de77273df62 languageName: node linkType: hard @@ -8889,12 +9179,21 @@ __metadata: languageName: node linkType: hard -"@wordpress/html-entities@npm:^3.9.0": - version: 3.9.0 - resolution: "@wordpress/html-entities@npm:3.9.0" +"@wordpress/hooks@npm:^3.22.0, @wordpress/hooks@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/hooks@npm:3.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + checksum: f82c96f79a4ec2b9e5cc72e199a539823ed90b38b855577664fb66467dc9803d1387885d3bc2aa962656d6b2a91331e8b0db8b64ab5612a5ce075d0332b4bf2b + languageName: node + linkType: hard + +"@wordpress/html-entities@npm:^3.22.0": + version: 3.27.0 + resolution: "@wordpress/html-entities@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - checksum: bea6dc5a49eacbdf7bdd5aa4f6dc163a86ee67c4f09e287081fd43ce71236f77d661657e45a5a872f825f45bb4c1df92c1a7d754804b9bf05f1efa1791b4bce9 + checksum: 64406a45c0026ea6991e30d10c56f369774b51ef3724eacb4a1a9923bc03fb3ae26c4ec796fd9661a2f31c488aae57cf0d0731753446a4c1b67d731af205b6fb languageName: node linkType: hard @@ -8915,7 +9214,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/i18n@npm:^4.10.0, @wordpress/i18n@npm:^4.13.0, @wordpress/i18n@npm:^4.2.4, @wordpress/i18n@npm:^4.21.0, @wordpress/i18n@npm:^4.9.0": +"@wordpress/i18n@npm:^4.13.0, @wordpress/i18n@npm:^4.2.4": version: 4.21.0 resolution: "@wordpress/i18n@npm:4.21.0" dependencies: @@ -8931,6 +9230,22 @@ __metadata: languageName: node linkType: hard +"@wordpress/i18n@npm:^4.22.0, @wordpress/i18n@npm:^4.27.0": + version: 4.27.0 + resolution: "@wordpress/i18n@npm:4.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/hooks": ^3.27.0 + gettext-parser: ^1.3.1 + memize: ^1.1.0 + sprintf-js: ^1.1.1 + tannin: ^1.2.0 + bin: + pot-to-php: tools/pot-to-php.js + checksum: e881fd4ec54c6a9789312a8c3919bc909a6ac619d8f9ed6ba77b14e1f1265c4b3b4a17c32f87fd62001f240e902ef12718d5cdae59121d3e3be98b889fa086bf + languageName: node + linkType: hard + "@wordpress/icons@npm:^6.1.0": version: 6.3.0 resolution: "@wordpress/icons@npm:6.3.0" @@ -8942,18 +9257,18 @@ __metadata: languageName: node linkType: hard -"@wordpress/icons@npm:^8.3.0": - version: 8.3.0 - resolution: "@wordpress/icons@npm:8.3.0" +"@wordpress/icons@npm:^9.13.0": + version: 9.18.0 + resolution: "@wordpress/icons@npm:9.18.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/element": ^4.5.0 - "@wordpress/primitives": ^3.5.0 - checksum: e664f8b626cc11152059552beffa8abdf19c60f48fad7959e01f5d8d2af0a9431c211da637896ae747eecb03c67f0e13b9b5739034ad459e1a1955baa9524721 + "@wordpress/element": ^5.4.0 + "@wordpress/primitives": ^3.25.0 + checksum: 4faa7d2698dc4a0740047c54913688b0b37e21f8ece9eafd09b6f34ec4d57eb8fd55e09cdf191ebe13abaa06d27ee27722e193e1f109bff16ec3da16b08f9caf languageName: node linkType: hard -"@wordpress/icons@npm:^9.0.0, @wordpress/icons@npm:^9.11.0, @wordpress/icons@npm:^9.4.0, @wordpress/icons@npm:^9.5.0": +"@wordpress/icons@npm:^9.4.0": version: 9.11.0 resolution: "@wordpress/icons@npm:9.11.0" dependencies: @@ -8964,113 +9279,89 @@ __metadata: languageName: node linkType: hard -"@wordpress/interface@npm:4.8.0": - version: 4.8.0 - resolution: "@wordpress/interface@npm:4.8.0" +"@wordpress/interface@npm:^4.21.0": + version: 4.21.0 + resolution: "@wordpress/interface@npm:4.21.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/preferences": ^2.1.0 - "@wordpress/viewport": ^4.7.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/plugins": ^4.20.0 + "@wordpress/preferences": ^2.14.0 + "@wordpress/viewport": ^4.20.0 classnames: ^2.3.1 - lodash: ^4.17.21 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 2b77361bcfdb6ff1e61d26ad4804bf6701efb4c59418a6e0427857dcd74511c28888c83e195f0e2b25a04c5d49a3f52a8e19fd09826063a085a7c468303583be + checksum: 836f68e3bb85e3289fe0f4ab7a1855e65d1461832dd732b4133be0e8013e7c80a91ef6acf977822030fbb470a240ff7b9c13cbb2f6b0c27eaa3a99e240a6e003 languageName: node linkType: hard -"@wordpress/interface@patch:@wordpress/interface@npm%3A4.8.0#./.yarn/patches/@wordpress-interface-npm-4.8.0-8a39ad37cf.patch::locator=wp-calypso%40workspace%3A.": - version: 4.8.0 - resolution: "@wordpress/interface@patch:@wordpress/interface@npm%3A4.8.0#./.yarn/patches/@wordpress-interface-npm-4.8.0-8a39ad37cf.patch::version=4.8.0&hash=2df8dc&locator=wp-calypso%40workspace%3A." +"@wordpress/is-shallow-equal@npm:^4.13.0": + version: 4.13.0 + resolution: "@wordpress/is-shallow-equal@npm:4.13.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/plugins": ^4.7.0 - "@wordpress/preferences": ^2.1.0 - "@wordpress/viewport": ^4.7.0 - classnames: ^2.3.1 - lodash: ^4.17.21 - peerDependencies: - react: ^17.0.0 - react-dom: ^17.0.0 - checksum: 135ac4a7970a958c49fc04cd040f20d24a03d3a866507a42d4d6b6e25a6516b090bdec0a464618f6cbcfe31283e2cf553a33e5aaa8936713d4e2c7ba9c7802b0 + checksum: 021285643f7d9c148ef21a819a849f21081622d90835271b8ea74ece6a52bcb852efc11b30304955cd9caefd1dbb5c2e78a4c2807e978a76ccfdea3a4780a371 languageName: node linkType: hard -"@wordpress/is-shallow-equal@npm:^4.13.0, @wordpress/is-shallow-equal@npm:^4.9.0": - version: 4.13.0 - resolution: "@wordpress/is-shallow-equal@npm:4.13.0" +"@wordpress/is-shallow-equal@npm:^4.15.0, @wordpress/is-shallow-equal@npm:^4.22.0, @wordpress/is-shallow-equal@npm:^4.27.0": + version: 4.27.0 + resolution: "@wordpress/is-shallow-equal@npm:4.27.0" dependencies: "@babel/runtime": ^7.16.0 - checksum: 021285643f7d9c148ef21a819a849f21081622d90835271b8ea74ece6a52bcb852efc11b30304955cd9caefd1dbb5c2e78a4c2807e978a76ccfdea3a4780a371 + checksum: 3833302891f98f3bc87f7d750393505e7d2a2fab52ae0cc7a81a3d16408fcbd73ddf6b6611ab7c191a66d8367d49a072a39ece780f830de3ae31412cf8699de6 languageName: node linkType: hard -"@wordpress/jest-console@npm:^5.1.0": - version: 5.1.0 - resolution: "@wordpress/jest-console@npm:5.1.0" +"@wordpress/jest-console@npm:^6.10.0": + version: 6.10.0 + resolution: "@wordpress/jest-console@npm:6.10.0" dependencies: "@babel/runtime": ^7.16.0 jest-matcher-utils: ^27.4.2 - lodash: ^4.17.21 peerDependencies: jest: ">=27" - checksum: 666bb4c7617d9253c401ac65563d2474109be597174554278deb476f752c571cac37a1559ea994b31291c86f853fc376d692b13e0229eb218184693770270081 + checksum: c6538be3a5e3ac867172505089e6a1d2d81b4e7078841c6118123ab191091cb2a6cfbfc846471064fc44f7cffb025489b5347d2d4acfdb48d52c6ade9e373c89 languageName: node linkType: hard -"@wordpress/jest-preset-default@npm:^8.2.0": - version: 8.2.0 - resolution: "@wordpress/jest-preset-default@npm:8.2.0" +"@wordpress/jest-preset-default@npm:^10.3.0": + version: 10.8.0 + resolution: "@wordpress/jest-preset-default@npm:10.8.0" dependencies: - "@wojtekmaj/enzyme-adapter-react-17": ^0.6.1 - "@wordpress/jest-console": ^5.1.0 + "@wordpress/jest-console": ^6.10.0 babel-jest: ^27.4.5 - enzyme: ^3.11.0 - enzyme-to-json: ^3.4.4 peerDependencies: "@babel/core": ">=7" jest: ">=27" - react: ^17.0.0 - react-dom: ^17.0.0 - checksum: 2dd02428288e6a2b4eab1d938671a693218652edaddaa900947d2142c1eb03fb33ebba6d653494f9f1831ab68077bc4ac41dd923cd2dd92515540f34bf5ee9f4 + checksum: c88fcdd3ff6cecceed95c41b6abe3e2011f874d739605db4bc97f498266313886ea7ba10dc5cb7a3ccf81d29b553589b6640d44a4417951e34a32ca7f0c0facd languageName: node linkType: hard -"@wordpress/keyboard-shortcuts@npm:^3.7.0": - version: 3.7.0 - resolution: "@wordpress/keyboard-shortcuts@npm:3.7.0" +"@wordpress/keyboard-shortcuts@npm:^3.20.0": + version: 3.20.0 + resolution: "@wordpress/keyboard-shortcuts@npm:3.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/data": ^6.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/keycodes": ^3.9.0 - lodash: ^4.17.21 - rememo: ^3.0.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/keycodes": ^3.22.0 + rememo: ^4.0.0 peerDependencies: react: ^17.0.0 - checksum: c519dfd25a14343111239d9f4f9d342c47154c671ba2f117230d333eb4ae889de3790a8da745d4df716e1c093fb9a57ab42488a3ab11624eb86d6caa8eca7b43 + checksum: cc8f390fa61405857943a884ae91468a2ac16d64427e671953bae8bf7003d6a63257851bb8354349018ac2e207c8c8d74b010332e696f41f062a5381b164548d languageName: node linkType: hard -"@wordpress/keycodes@npm:^3.10.0, @wordpress/keycodes@npm:^3.13.0, @wordpress/keycodes@npm:^3.9.0": +"@wordpress/keycodes@npm:^3.13.0": version: 3.13.0 resolution: "@wordpress/keycodes@npm:3.13.0" dependencies: @@ -9081,121 +9372,126 @@ __metadata: languageName: node linkType: hard -"@wordpress/media-utils@npm:^4.0.0": - version: 4.0.0 - resolution: "@wordpress/media-utils@npm:4.0.0" +"@wordpress/keycodes@npm:^3.22.0, @wordpress/keycodes@npm:^3.27.0": + version: 3.27.0 + resolution: "@wordpress/keycodes@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/blob": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - lodash: ^4.17.21 - checksum: 5b7fca05ca298dddf7c2c5cc25d5cb02dd28b08bbcaf82fbac30faa560b0e663104eb7ebafe6177bb3a1a83ee8be1dbaf76501ec21b0e70575905bf87eb7d44b + "@wordpress/i18n": ^4.27.0 + change-case: ^4.1.2 + checksum: a285a3f42d89c5d0260914e8f7aac865b4404c761e9e3e874017c20554a073e77444672fa21c941b97ce2a8f1b5915bdf5fea9cd4f0bb943c7a58f00d418acb4 languageName: node linkType: hard -"@wordpress/notices@npm:^3.10.0, @wordpress/notices@npm:^3.9.0": - version: 3.10.0 - resolution: "@wordpress/notices@npm:3.10.0" +"@wordpress/media-utils@npm:^4.13.0": + version: 4.18.0 + resolution: "@wordpress/media-utils@npm:4.18.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.10.0 - "@wordpress/data": ^6.10.0 - lodash: ^4.17.21 - peerDependencies: - react: ^17.0.0 - checksum: 9a967a8eb603f3659f8e28fbcdf3a4fa2f8aa311e4337a7d2cb25231c16890b9ab2be07a685a0eb2b495d26f5850f9e257bddab0d5bfb831b7d7e94076b9515a + "@wordpress/api-fetch": ^6.24.0 + "@wordpress/blob": ^3.27.0 + "@wordpress/element": ^5.4.0 + "@wordpress/i18n": ^4.27.0 + checksum: 2e3753eb67777df3326caf27487859271d062b44d8c61730f75d8b3956f5201bdf3d0a1bb75dcc164d8d4e8e302889d14e036c626280f3b2e2ac6259f0d44c7b languageName: node linkType: hard -"@wordpress/npm-package-json-lint-config@npm:^4.1.2": - version: 4.1.3 - resolution: "@wordpress/npm-package-json-lint-config@npm:4.1.3" +"@wordpress/notices@npm:^3.22.0": + version: 3.27.0 + resolution: "@wordpress/notices@npm:3.27.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/a11y": ^3.27.0 + "@wordpress/data": ^8.4.0 + checksum: 2da6ca0159903ba33d044213dbdea4e66be9b9408627ba503fa06275bd9b879e6c40cf56dc4a26e5ba5e89bc7a6d94b4122cc3d46042b8d3bb82bb4c7f04e9ba + languageName: node + linkType: hard + +"@wordpress/npm-package-json-lint-config@npm:^4.7.0": + version: 4.12.0 + resolution: "@wordpress/npm-package-json-lint-config@npm:4.12.0" peerDependencies: npm-package-json-lint: ">=3.6.0" - checksum: c4e6c655a88ebd030289efb545635d56f4532e62396aca107ec9c85dc555c6f5a4fd3dabeec1dba49c6f06c25371604cec42fa5bce65ae6797c42425ba4d2494 + checksum: 7156e525a136be41669e3b44ccf81d97ca8d5ac2e62932a2070bf2c74e2d11b4644de02701e26b048c36589a3b230547a784c7e9cdc252fc64c22a04726eb830 languageName: node linkType: hard -"@wordpress/nux@npm:^5.7.0": - version: 5.7.0 - resolution: "@wordpress/nux@npm:5.7.0" +"@wordpress/nux@npm:^5.20.0": + version: 5.20.0 + resolution: "@wordpress/nux@npm:5.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - lodash: ^4.17.21 - rememo: ^3.0.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + rememo: ^4.0.0 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 6c0b72fc51956a6e4f2aa96a87f06ce16063fb49f205c256488a0674da4bf89746465bf7629744f161d18540e634746835085d5f821b918708bbad85bbd9fe98 + checksum: a565fe0e8827ec2e4c701f93d7d37120539e2e25f6ad0608b602587bc4c625190376b30f8b8e68e0302d90f0726241f7f3b621de095db2ee6940831d4afc050c languageName: node linkType: hard -"@wordpress/plugins@npm:^4.7.0": - version: 4.7.0 - resolution: "@wordpress/plugins@npm:4.7.0" +"@wordpress/plugins@npm:^4.20.0": + version: 4.20.0 + resolution: "@wordpress/plugins@npm:4.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/element": ^4.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/icons": ^9.0.0 - lodash: ^4.17.21 + "@wordpress/compose": ^5.20.0 + "@wordpress/element": ^4.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/icons": ^9.13.0 memize: ^1.1.0 peerDependencies: react: ^17.0.0 - checksum: 0bdf3658c9b3be120a3095e1e2905261f8468da13e9f3d09d4eb9f482ec01acb03378724048b9104ca3560a5ad2e3a56f95248bd3745f980492c34bedbbda780 + checksum: 53ae7c64c817273a60ac8944c7c432aeef8b94fb5c22a0fa325e8c4cb898177746146c1ce744449f5327e526e19104101b673359cee667b39df905a76e32c96e languageName: node linkType: hard -"@wordpress/postcss-plugins-preset@npm:^3.8.0": - version: 3.8.0 - resolution: "@wordpress/postcss-plugins-preset@npm:3.8.0" +"@wordpress/postcss-plugins-preset@npm:^4.6.0": + version: 4.11.0 + resolution: "@wordpress/postcss-plugins-preset@npm:4.11.0" dependencies: - "@wordpress/base-styles": ^4.5.0 + "@wordpress/base-styles": ^4.18.0 autoprefixer: ^10.2.5 peerDependencies: postcss: ^8.0.0 - checksum: 6980372a7dad72b96e85bd8c67bef62f4da7c454cfbc24512e7cdb378adb38ccfba5a32356aebc021402d6ad7772d5cccca1f4369a226cf09847bb29a2e17835 + checksum: 4364896bbb3408748da064d31ea1c3ea97ec517fdd64c8ddee15a721b35afbde0773e1c696e86cdf09058093ff062fc4de336c2b0ee866255b2fde9b32f94133 languageName: node linkType: hard -"@wordpress/preferences@npm:^2.1.0": - version: 2.1.0 - resolution: "@wordpress/preferences@npm:2.1.0" +"@wordpress/preferences@npm:^2.14.0": + version: 2.14.0 + resolution: "@wordpress/preferences@npm:2.14.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/components": ^19.11.0 - "@wordpress/data": ^6.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/components": ^22.1.0 + "@wordpress/data": ^7.6.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 classnames: ^2.3.1 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: e716c0a29ed40429bac87c7de0adcf2f09ed00e95fbffa6069b4d726e8fd699929b250fc22bc8a454728ce341c08461c7936e3cf678d11c3e87741af54d2a5bf + checksum: db13e8ffc083023c574f3002e882a7b01ddca846fb5c30533535fc552f62f5612ebc98ae845245b2112df861ad7064233973be9063fbf9020e06fb159803dcfb languageName: node linkType: hard -"@wordpress/prettier-config@npm:^1.3.0": - version: 1.3.0 - resolution: "@wordpress/prettier-config@npm:1.3.0" +"@wordpress/prettier-config@npm:^2.5.0, @wordpress/prettier-config@npm:^2.9.1": + version: 2.10.0 + resolution: "@wordpress/prettier-config@npm:2.10.0" peerDependencies: prettier: ">=2" - checksum: b3f930e979d85460b64b489327cabb89c3d298a58006d0d7c55f9d1e12099377ab2d6c9e914853160795124d51215fa20db332b1ef1d5f8dc37a504bd1089187 + checksum: 4d63538132bb2d6a94eb36c7ca7647b32a2af488b2eeed18074cb957158b47d5fb2d60fee7018f59d10bf4fc238820aa531b77db716d1b85f798c4b39e6686b1 languageName: node linkType: hard -"@wordpress/primitives@npm:^3.1.1, @wordpress/primitives@npm:^3.11.0, @wordpress/primitives@npm:^3.18.0, @wordpress/primitives@npm:^3.5.0, @wordpress/primitives@npm:^3.7.0, @wordpress/primitives@npm:^3.8.0": +"@wordpress/primitives@npm:^3.1.1, @wordpress/primitives@npm:^3.11.0, @wordpress/primitives@npm:^3.18.0": version: 3.18.0 resolution: "@wordpress/primitives@npm:3.18.0" dependencies: @@ -9206,6 +9502,17 @@ __metadata: languageName: node linkType: hard +"@wordpress/primitives@npm:^3.20.0, @wordpress/primitives@npm:^3.25.0": + version: 3.25.0 + resolution: "@wordpress/primitives@npm:3.25.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/element": ^5.4.0 + classnames: ^2.3.1 + checksum: 72f570d9cc269c6827b56e8e6e000277c80495b329cb30706bdedf54462ce49b91d28f4418d71f4a3cda676b7c451359575c20c9640003aca2242cdd1420aadd + languageName: node + linkType: hard + "@wordpress/priority-queue@npm:^2.13.0": version: 2.13.0 resolution: "@wordpress/priority-queue@npm:2.13.0" @@ -9215,64 +9522,82 @@ __metadata: languageName: node linkType: hard -"@wordpress/react-i18n@npm:^3.7.0": - version: 3.19.0 - resolution: "@wordpress/react-i18n@npm:3.19.0" +"@wordpress/priority-queue@npm:^2.15.0, @wordpress/priority-queue@npm:^2.22.0, @wordpress/priority-queue@npm:^2.27.0": + version: 2.27.0 + resolution: "@wordpress/priority-queue@npm:2.27.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/element": ^4.19.0 - "@wordpress/i18n": ^4.21.0 + requestidlecallback: ^0.3.0 + checksum: 355d55aa76d1391227af9aa2cf26e6eefd202802fb33a764c380752805a8f56e6c44f370e8889109315e8d23ad0ab18bc94b547ffb79128adb4d18347d8818a3 + languageName: node + linkType: hard + +"@wordpress/private-apis@npm:^0.9.0": + version: 0.9.0 + resolution: "@wordpress/private-apis@npm:0.9.0" + dependencies: + "@babel/runtime": ^7.16.0 + checksum: e18f2fe7e226283664d3218c45583becd6f5e87e7f6431b0f5633de6d3624fa8f0941f2d2606023170ce318fcd9dff536a8e056029f436b206590f836fceae80 + languageName: node + linkType: hard + +"@wordpress/react-i18n@npm:^3.20.0": + version: 3.25.0 + resolution: "@wordpress/react-i18n@npm:3.25.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/element": ^5.4.0 + "@wordpress/i18n": ^4.27.0 utility-types: ^3.10.0 - checksum: 91ba020f48d370679515f880f30c7bdabaf5a4dede01529b682bebdf92bae7e9509f7b7127da014146f18b146549799d328e8e72125213b96c0aef19c84d9779 + checksum: 404e41065f430b3d64255000c05313ab8044b7b1c224ecc96a0f2e39c4c65cb1e7af4088ee8ab2191e7f498c5fe7c519db64689e1e7abdbc250935553bacfb4e languageName: node linkType: hard -"@wordpress/readable-js-assets-webpack-plugin@npm:^1.0.4": - version: 1.0.5 - resolution: "@wordpress/readable-js-assets-webpack-plugin@npm:1.0.5" +"@wordpress/readable-js-assets-webpack-plugin@npm:^2.5.0": + version: 2.10.0 + resolution: "@wordpress/readable-js-assets-webpack-plugin@npm:2.10.0" peerDependencies: webpack: ^4.8.3 || ^5.0.0 - checksum: 8550eb60b6fe02d9b36c98bf22c75c42a15fabb5f6bca83cbeb53d0950e1fafdac0a1ac50c6940f7d5ef0e0af28b9a8272e50e93c0575b1d8a990a0103d5b52c + checksum: c2bfffdd3c883632ad81d12808b49f2694efa1f8680ee1ffc7be0aea2031428bdd4d181dd51f0decab98ca66c958c1ca8d3f34b4b7e248c95c2c4271ae6c9d58 languageName: node linkType: hard -"@wordpress/redux-routine@npm:^4.13.0": - version: 4.13.0 - resolution: "@wordpress/redux-routine@npm:4.13.0" +"@wordpress/redux-routine@npm:^4.15.0, @wordpress/redux-routine@npm:^4.22.0, @wordpress/redux-routine@npm:^4.27.0": + version: 4.27.0 + resolution: "@wordpress/redux-routine@npm:4.27.0" dependencies: "@babel/runtime": ^7.16.0 + is-plain-object: ^5.0.0 is-promise: ^4.0.0 - lodash: ^4.17.21 rungen: ^0.3.2 peerDependencies: redux: ">=4" - checksum: 5490599778378df687fdb94dea8fe6731c172f2811e17a4b6a811f3721f5598824e040e10da10e8d2345abe6cecbd3f590cabd88567386d0f9f78dbb2d50f6fb + checksum: cce3c0a5caf18f9cd9b4c5fb30e6b4dc597353ae1085fef1b4ed111cf9855f0602356043165a8ec858a4f8d44434f16f003caa3f8c28116ac3fee0ecd8ef9a3e languageName: node linkType: hard -"@wordpress/reusable-blocks@npm:^3.7.0": - version: 3.7.0 - resolution: "@wordpress/reusable-blocks@npm:3.7.0" - dependencies: - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/core-data": ^4.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/notices": ^3.9.0 - "@wordpress/url": ^3.10.0 - lodash: ^4.17.21 +"@wordpress/reusable-blocks@npm:^3.20.0": + version: 3.20.0 + resolution: "@wordpress/reusable-blocks@npm:3.20.0" + dependencies: + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/core-data": ^5.5.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/notices": ^3.22.0 + "@wordpress/url": ^3.23.0 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: e0a469bfa7547db1b3d4772a203497c567d197c48359900daa297dc493278018a9fb2e81ef8ae1936fbda725265d44a65e8b28bdf9bc9113c19bf02588e6e2bd + checksum: 9b0ebbd9e4ccb800405c05914ce6e24d16b681050a98ac9ab8910c8bc77a755e32c25cdc2c841f8ab52e92991dbf67c8c43bf9615dc790c53eca954a0a5e4220 languageName: node linkType: hard -"@wordpress/rich-text@npm:^5.11.0, @wordpress/rich-text@npm:^5.7.0": +"@wordpress/rich-text@npm:^5.11.0": version: 5.11.0 resolution: "@wordpress/rich-text@npm:5.11.0" dependencies: @@ -9293,22 +9618,43 @@ __metadata: languageName: node linkType: hard -"@wordpress/scripts@npm:^23.1.0": - version: 23.1.0 - resolution: "@wordpress/scripts@npm:23.1.0" +"@wordpress/rich-text@npm:^5.20.0": + version: 5.20.0 + resolution: "@wordpress/rich-text@npm:5.20.0" + dependencies: + "@babel/runtime": ^7.16.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/escape-html": ^2.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/keycodes": ^3.22.0 + memize: ^1.1.0 + rememo: ^4.0.0 + peerDependencies: + react: ^17.0.0 + checksum: 3022c9251c582867d3ea51021f48dd89d183a1db3068177bb0d19ad97f69f7ff47e2c8f86affe481b6d22e29f1350ba2aa1320fd0241e668fa9f60411073ebda + languageName: node + linkType: hard + +"@wordpress/scripts@npm:^24.6.0": + version: 24.6.0 + resolution: "@wordpress/scripts@npm:24.6.0" dependencies: "@babel/core": ^7.16.0 "@pmmmwh/react-refresh-webpack-plugin": ^0.5.2 "@svgr/webpack": ^6.2.1 - "@wordpress/babel-preset-default": ^6.11.0 - "@wordpress/browserslist-config": ^4.1.2 - "@wordpress/dependency-extraction-webpack-plugin": ^3.5.0 - "@wordpress/eslint-plugin": ^12.3.0 - "@wordpress/jest-preset-default": ^8.2.0 - "@wordpress/npm-package-json-lint-config": ^4.1.2 - "@wordpress/postcss-plugins-preset": ^3.8.0 - "@wordpress/prettier-config": ^1.3.0 - "@wordpress/stylelint-config": ^20.0.2 + "@wordpress/babel-preset-default": ^7.6.0 + "@wordpress/browserslist-config": ^5.5.0 + "@wordpress/dependency-extraction-webpack-plugin": ^4.5.0 + "@wordpress/eslint-plugin": ^13.6.0 + "@wordpress/jest-preset-default": ^10.3.0 + "@wordpress/npm-package-json-lint-config": ^4.7.0 + "@wordpress/postcss-plugins-preset": ^4.6.0 + "@wordpress/prettier-config": ^2.5.0 + "@wordpress/stylelint-config": ^21.5.0 adm-zip: ^0.5.9 babel-jest: ^27.4.5 babel-loader: ^8.2.3 @@ -9337,7 +9683,7 @@ __metadata: npm-packlist: ^3.0.0 postcss: ^8.4.5 postcss-loader: ^6.2.1 - prettier: "npm:wp-prettier@2.2.1-beta-1" + prettier: "npm:wp-prettier@2.6.2" puppeteer-core: ^13.2.0 react-refresh: ^0.10.0 read-pkg-up: ^7.0.1 @@ -9357,76 +9703,74 @@ __metadata: react-dom: ^17.0.0 bin: wp-scripts: bin/wp-scripts.js - checksum: dbb0cbe0fdaff682e04c31f69156fe71b3895e3f79a62fa725be4bb9268672818856ee8905e88e94a7d3a5f3efa5e540ef42b268f1b260d856c751bc1a90848c + checksum: becee765bae7059c1044b337eda843a84f4ed3cf45823c7dc7cc08587347f324740db9a92f12ce4be1447417fd717f3f3153441b823449e19f7aeac1d9a985e5 languageName: node linkType: hard -"@wordpress/server-side-render@npm:^3.7.0": - version: 3.7.0 - resolution: "@wordpress/server-side-render@npm:3.7.0" +"@wordpress/server-side-render@npm:^3.20.0": + version: 3.20.0 + resolution: "@wordpress/server-side-render@npm:3.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.11.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/deprecated": ^3.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/url": ^3.10.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/deprecated": ^3.22.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/url": ^3.23.0 lodash: ^4.17.21 peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - checksum: 5964cb2c65d69ddbe135fb7816843ac4b57783ef33171aecfb15ce80632b9018d17d9a63bd224b7adac4eaebaca20358200a6508267807e1dbc292208d7b70e6 + checksum: 5cdb74bd039a68af12478409823738222cb66da54d56914bb46fc129df49588a9ae5e2dfa4e8d045a642d2f34f5e3fe66b6cd814584fdd54b1e33b3e53d868ec languageName: node linkType: hard -"@wordpress/shortcode@npm:^3.9.0": - version: 3.9.0 - resolution: "@wordpress/shortcode@npm:3.9.0" +"@wordpress/shortcode@npm:^3.22.0": + version: 3.27.0 + resolution: "@wordpress/shortcode@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - lodash: ^4.17.21 memize: ^1.1.0 - checksum: c4b87038445005c8bcb2328237b5947bbf0328924e56d13607dfbb622bd56bcec6441a8fe138367c5b7db2b23b37badef188d75c8b499dcbe0beacfef296304f + checksum: 3d931c6fddaa43985fe3dc852afe9730f786917ca7f43c46eefc278988a5c0a10fd143d500965b9608fc33323f7c516b1c640c22a2baf883ccad35c2830d5c92 languageName: node linkType: hard -"@wordpress/style-engine@npm:^0.8.0": - version: 0.8.0 - resolution: "@wordpress/style-engine@npm:0.8.0" +"@wordpress/style-engine@npm:^1.5.0": + version: 1.10.0 + resolution: "@wordpress/style-engine@npm:1.10.0" dependencies: "@babel/runtime": ^7.16.0 lodash: ^4.17.21 - checksum: a9c177a1f8b40ed484c523cae159a6f1741da85e43c644a1475af7a932461c97bece16c2ffffc2dc74a0ccb5263a56dfe055d9c4325680c5f292c0cfcf55a29a + checksum: 48ab50b0a8f78dc3a0d5830c3a0f0e6ebdf847785d52a10a996d7b3cae92156e92f6f1cdd295dfbb2a628320b6f987bfce322a430a2291708e4f3f94c30c9ee5 languageName: node linkType: hard -"@wordpress/stylelint-config@npm:^20.0.2": - version: 20.0.3 - resolution: "@wordpress/stylelint-config@npm:20.0.3" +"@wordpress/stylelint-config@npm:^21.5.0": + version: 21.10.0 + resolution: "@wordpress/stylelint-config@npm:21.10.0" dependencies: stylelint-config-recommended: ^6.0.0 stylelint-config-recommended-scss: ^5.0.2 peerDependencies: stylelint: ^14.2 - checksum: 308fae2ac6b52e956d6eee908e07b919393a1eb3055ee45b7ca8743c5d7d4270514f0141f2f020757d389697846abc76ab2bf3ab0652bec4a0fab945c7fd6e25 + checksum: 77d1928931655b59fb97d6cbc80e46064e5e1753845c5cac4818cde537532ca18bad2810e965e208b74d73ebfcaf6e231c92e932a49943c2ab805576bd1dba52 languageName: node linkType: hard -"@wordpress/token-list@npm:^2.9.0": - version: 2.9.0 - resolution: "@wordpress/token-list@npm:2.9.0" +"@wordpress/token-list@npm:^2.22.0": + version: 2.27.0 + resolution: "@wordpress/token-list@npm:2.27.0" dependencies: "@babel/runtime": ^7.16.0 - lodash: ^4.17.21 - checksum: 22ba6445f7911ec31211b026265315c225c551aad87ca87c7d9ee69d92c2ebc00d769c65a733f244b2e3c6aa2a569dec28815fc2c154fb4f13dc5fdf4c531c50 + checksum: dade0bc27c7faa56cea7864900644a244319d5e45bdfa0a4574a7afdac8d6706a0743cf7e6d28d0f9a5c545ab6bc0c843ca328b1d1743547ab1b080fc5940643 languageName: node linkType: hard -"@wordpress/url@npm:^3.10.0, @wordpress/url@npm:^3.28.0, @wordpress/url@npm:^3.3.1": +"@wordpress/url@npm:^3.23.0, @wordpress/url@npm:^3.28.0, @wordpress/url@npm:^3.3.1": version: 3.28.0 resolution: "@wordpress/url@npm:3.28.0" dependencies: @@ -9436,34 +9780,39 @@ __metadata: languageName: node linkType: hard -"@wordpress/viewport@npm:^4.7.0": - version: 4.7.0 - resolution: "@wordpress/viewport@npm:4.7.0" +"@wordpress/viewport@npm:^4.20.0": + version: 4.20.0 + resolution: "@wordpress/viewport@npm:4.20.0" dependencies: "@babel/runtime": ^7.16.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - lodash: ^4.17.21 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 peerDependencies: react: ^17.0.0 - checksum: 467107bc3f673f3bc9c61dde9c194e869bdd1b3152f9bd6327a1c88ac700f4b9e1784901cf53d8c0eea4a44f65fe4c786a6dd252073f691fcb3e5a37e7aa86cd + checksum: 7b142fad82f7138c58d474fd934640715c714299ebac24602c9997cf5a033d9709f6edb47e8e88517670a1982476050e7f31202b24cda725ddeaead1203ac29e languageName: node linkType: hard -"@wordpress/warning@npm:^2.13.0, @wordpress/warning@npm:^2.9.0": +"@wordpress/warning@npm:^2.13.0": version: 2.13.0 resolution: "@wordpress/warning@npm:2.13.0" checksum: f7f1fd837d157309889b1c8b3c91ff64d3f802e7492546af9aa39db2399ab69d25b3bc59f53e56fbaafc37d215b383440cd8ce419cbc96579dffdc68d778e16a languageName: node linkType: hard -"@wordpress/wordcount@npm:^3.9.0": - version: 3.9.0 - resolution: "@wordpress/wordcount@npm:3.9.0" +"@wordpress/warning@npm:^2.22.0, @wordpress/warning@npm:^2.27.0": + version: 2.27.0 + resolution: "@wordpress/warning@npm:2.27.0" + checksum: 64df4b157c3ea592dd33ae293ca5e0020f0dace8047cd8d925aa396276b9656c48b3cca48e1564a9308321c69ce248fb382ac63b9571a5f684ddb6934dae0b09 + languageName: node + linkType: hard + +"@wordpress/wordcount@npm:^3.22.0": + version: 3.27.0 + resolution: "@wordpress/wordcount@npm:3.27.0" dependencies: "@babel/runtime": ^7.16.0 - lodash: ^4.17.21 - checksum: 737b1f97eaa10b0ac5bae8431b62fea892b08baf0a494cb97331261595904567b48d01bdd3103ab2de250f55f16339992e84f8e8df46971a120fd7ab76a1aaa7 + checksum: c9e341506f29987a00f8f46812e886685a02313507c6d6667f6f76d556c66135cd56fb4e392021b68db1ee2f906c43d675e35cd762795d626fff426124b49188 languageName: node linkType: hard @@ -10180,13 +10529,6 @@ __metadata: languageName: node linkType: hard -"array-filter@npm:^1.0.0": - version: 1.0.0 - resolution: "array-filter@npm:1.0.0" - checksum: dbaba6d6d82b2ae4addd5688deaadacaa4d6b2432e801034e3c68d5e52c0dff69b6f051d52b13a49e8e7df9757342617c407454e0e873e57f8bd2e4b4e939591 - languageName: node - linkType: hard - "array-find-index@npm:^1.0.1": version: 1.0.2 resolution: "array-find-index@npm:1.0.2" @@ -10282,7 +10624,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.1, array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.3.1": +"array.prototype.flat@npm:^1.2.1, array.prototype.flat@npm:^1.3.1": version: 1.3.1 resolution: "array.prototype.flat@npm:1.3.1" dependencies: @@ -11636,16 +11978,6 @@ __metadata: languageName: node linkType: hard -"cacheable-lookup@npm:^2.0.0": - version: 2.0.1 - resolution: "cacheable-lookup@npm:2.0.1" - dependencies: - "@types/keyv": ^3.1.1 - keyv: ^4.0.0 - checksum: d9ac1e91736939ea619ad9bec50f09347f57308c7d9fb15e0d1de1e8d0d5152df364f6d8c7e611f62a53c35d059fc867858c0431d66366438247557e68f7e4b0 - languageName: node - linkType: hard - "cacheable-lookup@npm:^5.0.3": version: 5.0.4 resolution: "cacheable-lookup@npm:5.0.4" @@ -11683,6 +12015,21 @@ __metadata: languageName: node linkType: hard +"cacheable-request@npm:^7.0.2": + version: 7.0.2 + resolution: "cacheable-request@npm:7.0.2" + dependencies: + clone-response: ^1.0.2 + get-stream: ^5.1.0 + http-cache-semantics: ^4.0.0 + keyv: ^4.0.0 + lowercase-keys: ^2.0.0 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 681bad13691d0d5d10652d409374747a2ce8676f854b0d454ee8fc65e0a10a52ea83cd1f6c367ada08572fd4982f2aa2582dc38983d4e958e053e181c433765e + languageName: node + linkType: hard + "calendar@npm:^0.1.0": version: 0.1.1 resolution: "calendar@npm:0.1.1" @@ -11814,29 +12161,29 @@ __metadata: "@testing-library/react-hooks": 7.0.2 "@testing-library/user-event": ^14.2.0 "@types/jest": ^27.4.0 - "@wordpress/a11y": ^3.9.0 - "@wordpress/api-fetch": ^6.6.0 - "@wordpress/base-styles": ^4.7.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/compose": ^5.7.0 - "@wordpress/data": ^6.9.0 - "@wordpress/data-controls": ^2.9.0 - "@wordpress/edit-post": ^6.6.0 - "@wordpress/element": ^4.7.0 - "@wordpress/format-library": ^3.7.0 - "@wordpress/hooks": ^3.9.0 - "@wordpress/html-entities": ^3.9.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/keyboard-shortcuts": ^3.7.0 - "@wordpress/keycodes": ^3.9.0 - "@wordpress/react-i18n": ^3.7.0 - "@wordpress/url": ^3.10.0 - "@wordpress/viewport": ^4.7.0 - "@wordpress/warning": ^2.9.0 + "@wordpress/a11y": ^3.22.0 + "@wordpress/api-fetch": ^6.19.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/compose": ^5.20.0 + "@wordpress/data": ^7.6.0 + "@wordpress/data-controls": ^2.22.0 + "@wordpress/edit-post": ^6.19.0 + "@wordpress/element": ^4.20.0 + "@wordpress/format-library": ^3.20.0 + "@wordpress/hooks": ^3.22.0 + "@wordpress/html-entities": ^3.22.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/keyboard-shortcuts": ^3.20.0 + "@wordpress/keycodes": ^3.22.0 + "@wordpress/react-i18n": ^3.20.0 + "@wordpress/url": ^3.23.0 + "@wordpress/viewport": ^4.20.0 + "@wordpress/warning": ^2.22.0 autoprefixer: ^10.2.5 autosize: ^4.0.4 body-parser: ^1.19.0 @@ -12280,20 +12627,6 @@ __metadata: languageName: node linkType: hard -"cheerio@npm:^1.0.0-rc.3": - version: 1.0.0-rc.3 - resolution: "cheerio@npm:1.0.0-rc.3" - dependencies: - css-select: ~1.2.0 - dom-serializer: ~0.1.1 - entities: ~1.1.1 - htmlparser2: ^3.9.1 - lodash: ^4.15.0 - parse5: ^3.0.1 - checksum: 4ab836665ff165a020923f86123e8abb8df9a3d6032d3a6bab9ef22d61f6fff9e466a7f031aa9444b8a9e1710c57b6a072eecf8a6f0f39860750f052fb35aab8 - languageName: node - linkType: hard - "chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.3.0, chokidar@npm:^3.3.1, chokidar@npm:^3.4.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -12751,7 +13084,7 @@ __metadata: languageName: node linkType: hard -"colord@npm:^2.7.0, colord@npm:^2.9.1, colord@npm:^2.9.3": +"colord@npm:^2.7.0, colord@npm:^2.9.1, colord@npm:^2.9.2, colord@npm:^2.9.3": version: 2.9.3 resolution: "colord@npm:2.9.3" checksum: 9699e956894d8996b28c686afe8988720785f476f59335c80ce852ded76ab3ebe252703aec53d9bef54f6219aea6b960fb3d9a8300058a1d0c0d4026460cd110 @@ -12887,13 +13220,6 @@ __metadata: languageName: node linkType: hard -"comment-parser@npm:1.3.0": - version: 1.3.0 - resolution: "comment-parser@npm:1.3.0" - checksum: d7747a9527f600e9334e0d260ec9aae026bb2e3a2cfba931c55956b3b570704bccf3cc224ced7af57170c3e2bb083df07bd29bf743eb76596d48617f9b540f9c - languageName: node - linkType: hard - "comment-parser@npm:1.3.1": version: 1.3.1 resolution: "comment-parser@npm:1.3.1" @@ -14185,6 +14511,13 @@ __metadata: languageName: node linkType: hard +"date-fns@npm:^2.28.0, date-fns@npm:^2.29.2": + version: 2.29.3 + resolution: "date-fns@npm:2.29.3" + checksum: aa9128c876ef69a05988029d6aa3d7e5c47a1e978f18b77b48126683d1a2e6605a16c3f5293ca9f4ca790d0755b5061fcea5b469f097871cd53f6590a5c1adc4 + languageName: node + linkType: hard + "dayjs@npm:^1.10.0": version: 1.10.7 resolution: "dayjs@npm:1.10.7" @@ -14301,15 +14634,6 @@ __metadata: languageName: node linkType: hard -"decompress-response@npm:^5.0.0": - version: 5.0.0 - resolution: "decompress-response@npm:5.0.0" - dependencies: - mimic-response: ^2.0.0 - checksum: d76c4fc4fa21f4b39a7bf711a655b2b56d37b44c99754c3fb44d64b83a8132cfd916c81951477c94478d2cba47058cf8c73da26bb999b07f1b9c8d466a2b4346 - languageName: node - linkType: hard - "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -14393,6 +14717,13 @@ __metadata: languageName: node linkType: hard +"deepmerge@npm:^4.3.0": + version: 4.3.0 + resolution: "deepmerge@npm:4.3.0" + checksum: 7ff5c6294b3316c1bc6bca9d3ef2193c1d7beec4e62252db8bcb8a6366d85b924850492eb1a746a5f33d609862e03dfb907ce9fa8769583300f65f20a337cec5 + languageName: node + linkType: hard + "default-gateway@npm:^6.0.3": version: 6.0.3 resolution: "default-gateway@npm:6.0.3" @@ -14685,13 +15016,6 @@ __metadata: languageName: node linkType: hard -"discontinuous-range@npm:1.0.0": - version: 1.0.0 - resolution: "discontinuous-range@npm:1.0.0" - checksum: 487b105f83c1cc528e25e65d3c4b73958ec79769b7bd0e264414702a23a7e2b282c72982b4bef4af29fcab53f47816c3f0a5c40d85a99a490f4bc35b83dc00f8 - languageName: node - linkType: hard - "dmg-builder@npm:22.14.5": version: 22.14.5 resolution: "dmg-builder@npm:22.14.5" @@ -14843,7 +15167,7 @@ __metadata: languageName: node linkType: hard -"dom-serializer@npm:~0.1.0, dom-serializer@npm:~0.1.1": +"dom-serializer@npm:~0.1.0": version: 0.1.1 resolution: "dom-serializer@npm:0.1.1" dependencies: @@ -15511,58 +15835,6 @@ __metadata: languageName: node linkType: hard -"enzyme-shallow-equal@npm:^1.0.0, enzyme-shallow-equal@npm:^1.0.1": - version: 1.0.4 - resolution: "enzyme-shallow-equal@npm:1.0.4" - dependencies: - has: ^1.0.3 - object-is: ^1.1.2 - checksum: c94ad4eb012610719e0cd2e0780225c20880052cf61b7120af43a84ea1414b170a19ed9853fdfc4f5910e7f4159445d168179d2fe7e93fe10da0bdeeb93a2348 - languageName: node - linkType: hard - -"enzyme-to-json@npm:^3.4.4": - version: 3.4.4 - resolution: "enzyme-to-json@npm:3.4.4" - dependencies: - lodash: ^4.17.15 - react-is: ^16.12.0 - peerDependencies: - enzyme: ^3.4.0 - checksum: eb750c947b5330dc15489b5f0deb774dc67101fb8612f752f1922e468500a9fba7828403a600f78d0f0eebb9da97b13b14775f5306d92b5e5812cfe5bcbd4511 - languageName: node - linkType: hard - -"enzyme@npm:^3.11.0": - version: 3.11.0 - resolution: "enzyme@npm:3.11.0" - dependencies: - array.prototype.flat: ^1.2.3 - cheerio: ^1.0.0-rc.3 - enzyme-shallow-equal: ^1.0.1 - function.prototype.name: ^1.1.2 - has: ^1.0.3 - html-element-map: ^1.2.0 - is-boolean-object: ^1.0.1 - is-callable: ^1.1.5 - is-number-object: ^1.0.4 - is-regex: ^1.0.5 - is-string: ^1.0.5 - is-subset: ^0.1.1 - lodash.escape: ^4.0.1 - lodash.isequal: ^4.5.0 - object-inspect: ^1.7.0 - object-is: ^1.0.2 - object.assign: ^4.1.0 - object.entries: ^1.1.1 - object.values: ^1.1.1 - raf: ^3.4.1 - rst-selector-parser: ^2.2.3 - string.prototype.trim: ^1.2.1 - checksum: 14081671ed77924026036ed4edb1168cdac826aadd1ab2c77a5b7fdda625589dc5a4062cd0c65ec88add3ea3f7c0ebcbf3178bcf84b43335a175d8c71a016809 - languageName: node - linkType: hard - "equivalent-key-map@npm:^0.2.2": version: 0.2.2 resolution: "equivalent-key-map@npm:0.2.2" @@ -15786,7 +16058,7 @@ __metadata: languageName: node linkType: hard -"escape-html@npm:~1.0.3": +"escape-html@npm:^1.0.3, escape-html@npm:~1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" checksum: 524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3 @@ -15953,7 +16225,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jest@npm:^25.2.3, eslint-plugin-jest@npm:^25.3.0, eslint-plugin-jest@npm:^25.3.4": +"eslint-plugin-jest@npm:^25.3.0, eslint-plugin-jest@npm:^25.3.4": version: 25.7.0 resolution: "eslint-plugin-jest@npm:25.7.0" dependencies: @@ -15970,25 +16242,24 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsdoc@npm:^37.0.3": - version: 37.9.7 - resolution: "eslint-plugin-jsdoc@npm:37.9.7" +"eslint-plugin-jest@npm:^27.2.1": + version: 27.2.1 + resolution: "eslint-plugin-jest@npm:27.2.1" dependencies: - "@es-joy/jsdoccomment": ~0.20.1 - comment-parser: 1.3.0 - debug: ^4.3.3 - escape-string-regexp: ^4.0.0 - esquery: ^1.4.0 - regextras: ^0.8.0 - semver: ^7.3.5 - spdx-expression-parse: ^3.0.1 + "@typescript-eslint/utils": ^5.10.0 peerDependencies: + "@typescript-eslint/eslint-plugin": ^5.0.0 eslint: ^7.0.0 || ^8.0.0 - checksum: 8ea51ffc3717cd27522f6984419e17ab7eaf6c8f7ff1a5c9dafc032a7ecbb62833ca7b6af28b4dd66b8d0fcd0a725ff4716259b91583fdfa291dda0526a14f2c + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: eaa298ddcae3f28b0989207d50e8cece0399283e3c1664f8686f6ff6a9dabee637e8e5f77278e319389d808cdc94f7de49a5705ce3d2fbc0a782ae3cd06ec17c languageName: node linkType: hard -"eslint-plugin-jsdoc@npm:^39.6.8": +"eslint-plugin-jsdoc@npm:^39.6.8, eslint-plugin-jsdoc@npm:^39.6.9": version: 39.9.1 resolution: "eslint-plugin-jsdoc@npm:39.9.1" dependencies: @@ -16801,10 +17072,10 @@ __metadata: languageName: node linkType: hard -"fast-average-color@npm:4.3.0": - version: 4.3.0 - resolution: "fast-average-color@npm:4.3.0" - checksum: ee5a1a938614459963fd71247fbc3acab4c3d098522998677b120ac1c45e44d85ee033af5334aa5d29584a7f4a1885a2063cdc01d04357f6a6254b3748b67605 +"fast-average-color@npm:^9.1.1": + version: 9.3.0 + resolution: "fast-average-color@npm:9.3.0" + checksum: d43949bb1aea924324cdb27f1eef35326c5e4573dd506ea86b3fd13ab95c3d85ae77bddac568cf9c578ab3094499543de70011e42e40f9378f6352745345aa72 languageName: node linkType: hard @@ -18368,45 +18639,41 @@ fsevents@^1.2.7: languageName: node linkType: hard -"got@npm:^10.7.0": - version: 10.7.0 - resolution: "got@npm:10.7.0" +"got@npm:^11.7.0": + version: 11.8.2 + resolution: "got@npm:11.8.2" dependencies: - "@sindresorhus/is": ^2.0.0 - "@szmarczak/http-timer": ^4.0.0 + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 "@types/cacheable-request": ^6.0.1 - cacheable-lookup: ^2.0.0 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 cacheable-request: ^7.0.1 - decompress-response: ^5.0.0 - duplexer3: ^0.1.4 - get-stream: ^5.0.0 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 lowercase-keys: ^2.0.0 - mimic-response: ^2.1.0 p-cancelable: ^2.0.0 - p-event: ^4.0.0 responselike: ^2.0.0 - to-readable-stream: ^2.0.0 - type-fest: ^0.10.0 - checksum: 3972cbbd2f99b8331f3447596e92849adb0e486c6c4feebbbedbf243e95f0ed79e62c34d8ff354d2e861ba69dd18c8870842aefae15cf3db3d5bb1019e8b837b + checksum: 12fc2f5ffeed74746b75764c304f9dcd679edb593a9d079e8235ca3a2a112ab500702a81f693573a389c198c678f9b0e827921a20cdb29c90dc8897a37432419 languageName: node linkType: hard -"got@npm:^11.7.0": - version: 11.8.2 - resolution: "got@npm:11.8.2" +"got@npm:^11.8.5": + version: 11.8.6 + resolution: "got@npm:11.8.6" dependencies: "@sindresorhus/is": ^4.0.0 "@szmarczak/http-timer": ^4.0.5 "@types/cacheable-request": ^6.0.1 "@types/responselike": ^1.0.0 cacheable-lookup: ^5.0.3 - cacheable-request: ^7.0.1 + cacheable-request: ^7.0.2 decompress-response: ^6.0.0 http2-wrapper: ^1.0.0-beta.5.2 lowercase-keys: ^2.0.0 p-cancelable: ^2.0.0 responselike: ^2.0.0 - checksum: 12fc2f5ffeed74746b75764c304f9dcd679edb593a9d079e8235ca3a2a112ab500702a81f693573a389c198c678f9b0e827921a20cdb29c90dc8897a37432419 + checksum: 754dd44877e5cf6183f1e989ff01c648d9a4719e357457bd4c78943911168881f1cfb7b2cb15d885e2105b3ad313adb8f017a67265dd7ade771afdb261ee8cb1 languageName: node linkType: hard @@ -18520,13 +18787,13 @@ fsevents@^1.2.7: "@emotion/react": ^11.4.1 "@emotion/styled": ^11.3.0 "@testing-library/react": ^12.1.3 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/block-editor": ^9.1.0 - "@wordpress/blocks": ^11.8.0 - "@wordpress/components": ^19.15.0 - "@wordpress/element": ^4.7.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/readable-js-assets-webpack-plugin": ^1.0.4 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/block-editor": ^10.5.0 + "@wordpress/blocks": ^11.21.0 + "@wordpress/components": ^22.1.0 + "@wordpress/element": ^4.20.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/readable-js-assets-webpack-plugin": ^2.5.0 classnames: ^2.3.2 copy-webpack-plugin: ^10.1.0 glob: ^7.1.6 @@ -18537,7 +18804,7 @@ fsevents@^1.2.7: react-dom: ^17.0.2 webpack: ^5.68.0 peerDependencies: - "@wordpress/data": ^6.1.5 + "@wordpress/data": ^7.6.0 languageName: unknown linkType: soft @@ -18705,7 +18972,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"has@npm:^1.0.0, has@npm:^1.0.3": +"has@npm:^1.0.3": version: 1.0.3 resolution: "has@npm:1.0.3" dependencies: @@ -18966,15 +19233,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"html-element-map@npm:^1.2.0": - version: 1.2.0 - resolution: "html-element-map@npm:1.2.0" - dependencies: - array-filter: ^1.0.0 - checksum: 1c4249695e773da6732ad4c511546afba9b59120d70e19f089e42b41b051103bc48553df113701b6df75ced4c8dd67f402c775fb0d6546721ff1b8923a986580 - languageName: node - linkType: hard - "html-encoding-sniffer@npm:^2.0.1": version: 2.0.1 resolution: "html-encoding-sniffer@npm:2.0.1" @@ -19371,7 +19629,7 @@ fsevents@^1.2.7: "@automattic/interpolate-components": "workspace:^" "@babel/runtime": ^7.17.2 "@tannin/sprintf": ^1.1.0 - "@wordpress/compose": ^5.7.0 + "@wordpress/compose": ^5.20.0 debug: ^4.3.3 events: ^3.0.0 hash.js: ^1.1.5 @@ -19880,7 +20138,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-boolean-object@npm:^1.0.1, is-boolean-object@npm:^1.1.0": +"is-boolean-object@npm:^1.1.0": version: 1.1.0 resolution: "is-boolean-object@npm:1.1.0" dependencies: @@ -19903,7 +20161,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.1.5, is-callable@npm:^1.2.7": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f @@ -20311,6 +20569,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"is-plain-obj@npm:^4.1.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e + languageName: node + linkType: hard + "is-plain-object@npm:3.0.1": version: 3.0.1 resolution: "is-plain-object@npm:3.0.1" @@ -20355,7 +20620,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-regex@npm:^1.0.5, is-regex@npm:^1.1.0, is-regex@npm:^1.1.2, is-regex@npm:^1.1.4": +"is-regex@npm:^1.1.0, is-regex@npm:^1.1.2, is-regex@npm:^1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" dependencies: @@ -20420,13 +20685,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-subset@npm:^0.1.1": - version: 0.1.1 - resolution: "is-subset@npm:0.1.1" - checksum: d8125598ab9077a76684e18726fb915f5cea7a7358ed0c6ff723f4484d71a0a9981ee5aae06c44de99cfdef0fefce37438c6257ab129e53c82045ea0c2acdebf - languageName: node - linkType: hard - "is-symbol@npm:^1.0.1, is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": version: 1.0.3 resolution: "is-symbol@npm:1.0.3" @@ -21477,13 +21735,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"jsdoc-type-pratt-parser@npm:~2.2.3": - version: 2.2.5 - resolution: "jsdoc-type-pratt-parser@npm:2.2.5" - checksum: 0ecd96f4b051fd600d3019ae7e5122731b8a856baee701966c0f37b060fb86a23296d22a39b49c593c50065978be5e4ffe0eeba931f3617ca8dd668cb40af6e6 - languageName: node - linkType: hard - "jsdoc-type-pratt-parser@npm:~3.1.0": version: 3.1.0 resolution: "jsdoc-type-pratt-parser@npm:3.1.0" @@ -21651,17 +21902,10 @@ fsevents@^1.2.7: languageName: node linkType: hard -"json2php@npm:^0.0.4": - version: 0.0.4 - resolution: "json2php@npm:0.0.4" - checksum: 772f3bb4ce9ffcbdbed79c4a547933ea8134623c6f337377818921baf096b52e6c23babcfa3598791be4ff8310028684e4f0c396dce37b9baa65458cc46e355e - languageName: node - linkType: hard - -"json2php@npm:^0.0.5": - version: 0.0.5 - resolution: "json2php@npm:0.0.5" - checksum: 29033b529c7d7b9ed27d875fbf5c06ec794a228250307931bd72067f7bdee67e3fa87a083e6b9bb15e5b192447901cd6cc5143733a08525e386f6089246ce3e0 +"json2php@npm:^0.0.7": + version: 0.0.7 + resolution: "json2php@npm:0.0.7" + checksum: b7ef04b9abe6f38b2b60b378b1272fd9b57cad2ecd6ca5485aee8f39b9ab63e50c5d73278f068de454ea1fff0243ae3c2b4029b7187275887e073ad903a038ab languageName: node linkType: hard @@ -22252,13 +22496,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"lodash.escape@npm:^4.0.1": - version: 4.0.1 - resolution: "lodash.escape@npm:4.0.1" - checksum: 90ade409cec05b6869090476952fdfb84d4d87b1ff4a0e03ebd590f980d9a1248d93ba14579f10d80c6429e4d6af13ba137c28db64cae6dadb71442e54a3ad2b - languageName: node - linkType: hard - "lodash.filter@npm:^4.4.0": version: 4.6.0 resolution: "lodash.filter@npm:4.6.0" @@ -22273,13 +22510,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"lodash.flattendeep@npm:^4.4.0": - version: 4.4.0 - resolution: "lodash.flattendeep@npm:4.4.0" - checksum: 83cb80754b921fb4ed2c222b91a82b2524f3bdc60c3ae91e00688bd4bf1bcc28b8a2cc250e11fdc1b6da3a2de09e57008e13f15a209cafdd4f9163d047f97544 - languageName: node - linkType: hard - "lodash.foreach@npm:^4.3.0": version: 4.5.0 resolution: "lodash.foreach@npm:4.5.0" @@ -22423,7 +22653,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"lodash@npm:^4.1.1, lodash@npm:^4.15.0, lodash@npm:^4.17.10, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": +"lodash@npm:^4.1.1, lodash@npm:^4.17.10, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -23289,7 +23519,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"mimic-response@npm:^2.0.0, mimic-response@npm:^2.1.0": +"mimic-response@npm:^2.0.0": version: 2.1.0 resolution: "mimic-response@npm:2.1.0" checksum: 717475c840f20deca87a16cb2f7561f9115f5de225ea2377739e09890c81aec72f43c81fd4984650c4044e66be5a846fa7a517ac7908f01009e1e624e19864d5 @@ -23613,6 +23843,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"moment@npm:^2.29.4": + version: 2.29.4 + resolution: "moment@npm:2.29.4" + checksum: 844c6f3ce42862ac9467c8ca4f5e48a00750078682cc5bda1bc0e50cc7ca88e2115a0f932d65a06e4a90e26cb78892be9b3ca3dd6546ca2c4d994cebb787fc2b + languageName: node + linkType: hard + "moo-color@npm:^1.0.2": version: 1.0.3 resolution: "moo-color@npm:1.0.3" @@ -23622,13 +23859,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"moo@npm:^0.5.0": - version: 0.5.1 - resolution: "moo@npm:0.5.1" - checksum: 2a4f2557463c3a71cf5bf06362d13ed3de065fa366e72dbc8ae1af500b7077a3d66e5c893ce24d643a81dcbf46f966f45e749ab303ccc0c56fbce3c15e941b34 - languageName: node - linkType: hard - "mousetrap@npm:^1.6.5": version: 1.6.5 resolution: "mousetrap@npm:1.6.5" @@ -23814,24 +24044,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"nearley@npm:^2.7.10": - version: 2.19.1 - resolution: "nearley@npm:2.19.1" - dependencies: - commander: ^2.19.0 - moo: ^0.5.0 - railroad-diagrams: ^1.0.0 - randexp: 0.4.6 - semver: ^5.4.1 - bin: - nearley-railroad: bin/nearley-railroad.js - nearley-test: bin/nearley-test.js - nearley-unparse: bin/nearley-unparse.js - nearleyc: bin/nearleyc.js - checksum: 2d7b7a95b0a599c1e5612acfe3fbdb2b960534135d1245bd7690522d420aedd6fa48d8b8c1a4a77a0814fcf0214139e466e8fd052f95c0102f9613037bebf3dd - languageName: node - linkType: hard - "negotiator@npm:0.6.3, negotiator@npm:^0.6.2": version: 0.6.3 resolution: "negotiator@npm:0.6.3" @@ -24219,6 +24431,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"normalize-wheel@npm:^1.0.1": + version: 1.0.1 + resolution: "normalize-wheel@npm:1.0.1" + checksum: 5daf4c97e39f36658a5263a6499bbc148676ae2bd85f12c8d03c46ffe7bc3c68d44564c00413d88d0457ac0d94450559bb1c24c2ce7ae0c107031f82d093ac06 + languageName: node + linkType: hard + "npm-bundled@npm:^1.1.1": version: 1.1.2 resolution: "npm-bundled@npm:1.1.2" @@ -24446,14 +24665,14 @@ fsevents@^1.2.7: languageName: node linkType: hard -"object-inspect@npm:^1.12.2, object-inspect@npm:^1.7.0, object-inspect@npm:^1.9.0": +"object-inspect@npm:^1.12.2, object-inspect@npm:^1.9.0": version: 1.12.3 resolution: "object-inspect@npm:1.12.3" checksum: 752bb5f4dc595e214157ea8f442adb77bdb850ace762b078d151d8b6486331ab12364997a89ee6509be1023b15adf2b3774437a7105f8a5043dfda11ed622411 languageName: node linkType: hard -"object-is@npm:^1.0.2, object-is@npm:^1.1.2, object-is@npm:^1.1.5": +"object-is@npm:^1.1.2, object-is@npm:^1.1.5": version: 1.1.5 resolution: "object-is@npm:1.1.5" dependencies: @@ -24510,7 +24729,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"object.entries@npm:^1.1.0, object.entries@npm:^1.1.1, object.entries@npm:^1.1.2, object.entries@npm:^1.1.6": +"object.entries@npm:^1.1.0, object.entries@npm:^1.1.2, object.entries@npm:^1.1.6": version: 1.1.6 resolution: "object.entries@npm:1.1.6" dependencies: @@ -24521,7 +24740,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"object.fromentries@npm:^2.0.0, object.fromentries@npm:^2.0.0 || ^1.0.0, object.fromentries@npm:^2.0.6": +"object.fromentries@npm:^2.0.0 || ^1.0.0, object.fromentries@npm:^2.0.6": version: 2.0.6 resolution: "object.fromentries@npm:2.0.6" dependencies: @@ -24571,7 +24790,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"object.values@npm:^1.0.4, object.values@npm:^1.1.0, object.values@npm:^1.1.1, object.values@npm:^1.1.5, object.values@npm:^1.1.6": +"object.values@npm:^1.0.4, object.values@npm:^1.1.0, object.values@npm:^1.1.5, object.values@npm:^1.1.6": version: 1.1.6 resolution: "object.values@npm:1.1.6" dependencies: @@ -24832,7 +25051,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"p-event@npm:^4.0.0, p-event@npm:^4.1.0": +"p-event@npm:^4.1.0": version: 4.2.0 resolution: "p-event@npm:4.2.0" dependencies: @@ -25173,15 +25392,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"parse5@npm:^3.0.1": - version: 3.0.3 - resolution: "parse5@npm:3.0.3" - dependencies: - "@types/node": "*" - checksum: b9ea8adfb03fb55bbc0e090233f8ccf6b47210daf71b4c8785612b27484f6e98a83b9b3998c54c1d26ba1f1d9ebc9402f7e4b3c285a7650df1a0d2532fe79cb1 - languageName: node - linkType: hard - "parse5@npm:^7.1.1": version: 7.1.1 resolution: "parse5@npm:7.1.1" @@ -26313,15 +26523,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"prettier@npm:wp-prettier@2.2.1-beta-1": - version: 2.2.1-beta-1 - resolution: "wp-prettier@npm:2.2.1-beta-1" - bin: - prettier: bin-prettier.js - checksum: 24287cada8e2320683c12e0b0ca2079db1f8bf1314b564cb59aa5cbfff6c326722d04960e04db2dae3270de7f651114f6fe9d930e493c6e9ba8758e16f6de6ec - languageName: node - linkType: hard - "prettier@npm:wp-prettier@2.6.2": version: 2.6.2 resolution: "wp-prettier@npm:2.6.2" @@ -26519,7 +26720,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"prop-types@npm:^15.0.0, prop-types@npm:^15.5.6, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.0, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:^15.0.0, prop-types@npm:^15.5.6, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -26580,6 +26781,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"proxy-compare@npm:2.5.0": + version: 2.5.0 + resolution: "proxy-compare@npm:2.5.0" + checksum: 2aba31f18d98a14bfd26e305254222d0285d2e9c21e0e77853f4edbd301caf87f5a257b5dd2ecd389b985b8cb0c0ca3267ed47b877df1e7caa0f816c881acd7c + languageName: node + linkType: hard + "proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0, proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" @@ -26815,22 +27023,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"raf@npm:^3.4.1": - version: 3.4.1 - resolution: "raf@npm:3.4.1" - dependencies: - performance-now: ^2.1.0 - checksum: 337f0853c9e6a77647b0f499beedafea5d6facfb9f2d488a624f88b03df2be72b8a0e7f9118a3ff811377d534912039a3311815700d2b6d2313f82f736f9eb6e - languageName: node - linkType: hard - -"railroad-diagrams@npm:^1.0.0": - version: 1.0.0 - resolution: "railroad-diagrams@npm:1.0.0" - checksum: 81bf8f86870a69fb9ed243102db9ad6416d09c4cb83964490d44717690e07dd982f671503236a1f8af28f4cb79d5d7a87613930f10ac08defa845ceb6764e364 - languageName: node - linkType: hard - "rambda@npm:^7.1.0": version: 7.4.0 resolution: "rambda@npm:7.4.0" @@ -26852,16 +27044,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"randexp@npm:0.4.6": - version: 0.4.6 - resolution: "randexp@npm:0.4.6" - dependencies: - discontinuous-range: 1.0.0 - ret: ~0.1.10 - checksum: 14ee14b6d7f5ce69609b51cc914fb7a7c82ad337820a141c5f762c5ad1fe868f5191ea6e82359aee019b625ee1359486628fa833909d12c3b5dd9571908c3345 - languageName: node - linkType: hard - "randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -27113,6 +27295,18 @@ fsevents@^1.2.7: languageName: node linkType: hard +"react-dom@npm:^18.2.0": + version: 18.2.0 + resolution: "react-dom@npm:18.2.0" + dependencies: + loose-envify: ^1.1.0 + scheduler: ^0.23.0 + peerDependencies: + react: ^18.2.0 + checksum: 66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a + languageName: node + linkType: hard + "react-draggable@npm:^4.4.3, react-draggable@npm:^4.4.4": version: 4.4.4 resolution: "react-draggable@npm:4.4.4" @@ -27126,15 +27320,16 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react-easy-crop@npm:^3.0.0": - version: 3.1.1 - resolution: "react-easy-crop@npm:3.1.1" +"react-easy-crop@npm:^4.5.1": + version: 4.7.3 + resolution: "react-easy-crop@npm:4.7.3" dependencies: - tslib: 1.11.2 + normalize-wheel: ^1.0.1 + tslib: 2.0.1 peerDependencies: react: ">=16.4.0" react-dom: ">=16.4.0" - checksum: 2483613b41fe457b2bb2628b6a2cda103d88d16fa73934077dd2da22d84ffa46c92df90121295b09a9f5b9ca83fad00615d7d58184759a324a8df5e52dac9616 + checksum: b17cbcbe425983f8bc4912617c4ab79d3a58bf2e1ee3984e447b28943ed22d6be687acfa497e4fba68dc560c7b3c6a7f10aff3b114a75eb64286b0518912fb26 languageName: node linkType: hard @@ -27207,14 +27402,14 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react-is@npm:^16.12.0 || ^17.0.0, react-is@npm:^17.0.0, react-is@npm:^17.0.1, react-is@npm:^17.0.2": +"react-is@npm:^16.12.0 || ^17.0.0, react-is@npm:^17.0.1, react-is@npm:^17.0.2": version: 17.0.2 resolution: "react-is@npm:17.0.2" checksum: 2bdb6b93fbb1820b024b496042cce405c57e2f85e777c9aabd55f9b26d145408f9f74f5934676ffdc46f3dcff656d78413a6e43968e7b3f92eea35b3052e9053 languageName: node linkType: hard -"react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0": +"react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: 33977da7a5f1a287936a0c85639fec6ca74f4f15ef1e59a6bc20338fc73dc69555381e211f7a3529b8150a1f71e4225525b41b60b52965bda53ce7d47377ada1 @@ -27487,7 +27682,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react-test-renderer@npm:^17.0.0, react-test-renderer@npm:^17.0.2": +"react-test-renderer@npm:^17.0.2": version: 17.0.2 resolution: "react-test-renderer@npm:17.0.2" dependencies: @@ -27596,6 +27791,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"react@npm:^18.2.0": + version: 18.2.0 + resolution: "react@npm:18.2.0" + dependencies: + loose-envify: ^1.1.0 + checksum: b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 + languageName: node + linkType: hard + "read-cache@npm:^1.0.0": version: 1.0.0 resolution: "read-cache@npm:1.0.0" @@ -28054,13 +28258,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"regextras@npm:^0.8.0": - version: 0.8.0 - resolution: "regextras@npm:0.8.0" - checksum: f236d4778bdb2c69eb70241519ad6b9c9df996c76399abff4330cc49e41bb47c39cfcc03bd18597091e5f3abd3c28a59fd9a43376fb45ac4a2d2ebae1aaf21ce - languageName: node - linkType: hard - "registry-auth-token@npm:^4.0.0": version: 4.2.1 resolution: "registry-auth-token@npm:4.2.1" @@ -28816,13 +29013,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"rememo@npm:^3.0.0": - version: 3.0.0 - resolution: "rememo@npm:3.0.0" - checksum: 71cb43e02e001e204b77eb020582c3d6cf03b5bdefd351be40fd3047b437b7a5e8a7a9b2d9360e6b81b7587759d7e27021f4c1dff15ce3cfe3e3d188d04bf756 - languageName: node - linkType: hard - "rememo@npm:^4.0.0": version: 4.0.1 resolution: "rememo@npm:4.0.1" @@ -28920,6 +29110,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"requestidlecallback@npm:^0.3.0": + version: 0.3.0 + resolution: "requestidlecallback@npm:0.3.0" + checksum: 68a2ff3154788643ccf96436cfaf8ad5bbe2f4d3f4b4d7858ec74681bf7d6a487d17df6a238130ff1e73d0a4a85bdc44b5f945eb79ef7d5552e23fc6288e795f + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -29263,16 +29460,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"rst-selector-parser@npm:^2.2.3": - version: 2.2.3 - resolution: "rst-selector-parser@npm:2.2.3" - dependencies: - lodash.flattendeep: ^4.4.0 - nearley: ^2.7.10 - checksum: b631aca2cb451fbde8d78dbc9a9479f20f1f40565cd8eb63773cb6e2a395ed87b392291986b84c2c7da68b70084e3469fbe958261300a10dff41c87fa3bc58aa - languageName: node - linkType: hard - "rtlcss@npm:^3.1.2": version: 3.1.2 resolution: "rtlcss@npm:3.1.2" @@ -29519,6 +29706,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"scheduler@npm:^0.23.0": + version: 0.23.0 + resolution: "scheduler@npm:0.23.0" + dependencies: + loose-envify: ^1.1.0 + checksum: b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd + languageName: node + linkType: hard + "schema-utils@npm:2.7.0": version: 2.7.0 resolution: "schema-utils@npm:2.7.0" @@ -30732,17 +30928,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.1": - version: 1.2.1 - resolution: "string.prototype.trim@npm:1.2.1" - dependencies: - define-properties: ^1.1.3 - es-abstract: ^1.17.0-next.1 - function-bind: ^1.1.1 - checksum: 2721c3ca6dc6e54d01fac7e9c6650f8de61308ea20443b9d1bad8ba770028f76b636c11b923425e3f8786cdd6d0fd5a416f854888e143d3f9f05bfc0dd229293 - languageName: node - linkType: hard - "string.prototype.trimend@npm:^1.0.6": version: 1.0.6 resolution: "string.prototype.trimend@npm:1.0.6" @@ -31767,13 +31952,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"to-readable-stream@npm:^2.0.0": - version: 2.1.0 - resolution: "to-readable-stream@npm:2.1.0" - checksum: c0d7269a5232a4c4d254073478a7bfdc302f955999d3afbd417af15cbdf98aeacbc66318957426bbe5b84b681e4d0eba4be640bed6c1ee8cf705f500d4521289 - languageName: node - linkType: hard - "to-regex-range@npm:^2.1.0": version: 2.1.1 resolution: "to-regex-range@npm:2.1.1" @@ -32054,10 +32232,10 @@ fsevents@^1.2.7: languageName: node linkType: hard -"tslib@npm:1.11.2": - version: 1.11.2 - resolution: "tslib@npm:1.11.2" - checksum: 19c6407249e67107eef12c0ab0a9786a08d1c5db50919ac3496e975990a4e2f4d5338242fc6130f236639942efc16d5b98d8264629c1b387432cc938d092e171 +"tslib@npm:2.0.1": + version: 2.0.1 + resolution: "tslib@npm:2.0.1" + checksum: 5f370da8ac0e9c7f2440a3fd8013682c042a8eeace93849a44a8d4252770e4830fce3201b0bc5a6045c7e28b80eaebe3a3b48e656aa7b4f9681b9a9d7263cfaf languageName: node linkType: hard @@ -32182,13 +32360,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"type-fest@npm:^0.10.0": - version: 0.10.0 - resolution: "type-fest@npm:0.10.0" - checksum: 6c079d80dce172b4c182238c46add55e77549b9e2a360f08d291f64c2eb5bc72aa955a10389cd55bac0da9464044c9f7317069c8b9ce7557c18b5007874fd5fb - languageName: node - linkType: hard - "type-fest@npm:^0.13.1": version: 0.13.1 resolution: "type-fest@npm:0.13.1" @@ -32891,6 +33062,18 @@ fsevents@^1.2.7: languageName: node linkType: hard +"use-lilius@npm:^2.0.1": + version: 2.0.3 + resolution: "use-lilius@npm:2.0.3" + dependencies: + date-fns: ^2.29.2 + peerDependencies: + react: "*" + react-dom: "*" + checksum: 4f1c1415a559531b62f6af3bc0886f7fcce010477b7938c9b355c79ba35ba613c9ad3d5cafb721f5f0e9b72601a79a5396335555f77ccfbd6f2c4b6c64a735d6 + languageName: node + linkType: hard + "use-memo-one@npm:^1.1.1": version: 1.1.2 resolution: "use-memo-one@npm:1.1.2" @@ -32911,6 +33094,15 @@ fsevents@^1.2.7: languageName: node linkType: hard +"use-sync-external-store@npm:1.2.0": + version: 1.2.0 + resolution: "use-sync-external-store@npm:1.2.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: ac4814e5592524f242921157e791b022efe36e451fe0d4fd4d204322d5433a4fc300d63b0ade5185f8e0735ded044c70bcf6d2352db0f74d097a238cebd2da02 + languageName: node + linkType: hard + "use@npm:^3.1.0": version: 3.1.1 resolution: "use@npm:3.1.1" @@ -33089,6 +33281,21 @@ fsevents@^1.2.7: languageName: node linkType: hard +"valtio@npm:^1.7.0": + version: 1.10.3 + resolution: "valtio@npm:1.10.3" + dependencies: + proxy-compare: 2.5.0 + use-sync-external-store: 1.2.0 + peerDependencies: + react: ">=16.8" + peerDependenciesMeta: + react: + optional: true + checksum: 67fc477911c2a1295b832be8ae65cc2db065de007b87e3608eb6d5886c06e1e87532c4505c015e3b7272ec14024157ab02dd71068f074198844b4e69ef0bf061 + languageName: node + linkType: hard + "value-equal@npm:^1.0.1": version: 1.0.1 resolution: "value-equal@npm:1.0.1" @@ -33974,18 +34181,18 @@ fsevents@^1.2.7: "@types/wordpress__editor": ^10.0.1 "@typescript-eslint/eslint-plugin": ^5.53.0 "@typescript-eslint/parser": ^5.53.0 - "@wordpress/base-styles": ^4.5.0 - "@wordpress/components": ^19.15.0 - "@wordpress/data": ^6.9.0 - "@wordpress/element": ^4.7.0 - "@wordpress/eslint-plugin": ^12.3.0 - "@wordpress/i18n": ^4.9.0 - "@wordpress/icons": ^9.0.0 - "@wordpress/is-shallow-equal": ^4.9.0 - "@wordpress/jest-preset-default": ^8.2.0 - "@wordpress/primitives": ^3.8.0 - "@wordpress/stylelint-config": ^20.0.2 - "@wordpress/url": ^3.10.0 + "@wordpress/base-styles": ^4.13.0 + "@wordpress/components": ^22.1.0 + "@wordpress/data": ^7.6.0 + "@wordpress/element": ^4.20.0 + "@wordpress/eslint-plugin": ^13.6.0 + "@wordpress/i18n": ^4.22.0 + "@wordpress/icons": ^9.13.0 + "@wordpress/is-shallow-equal": ^4.22.0 + "@wordpress/jest-preset-default": ^10.3.0 + "@wordpress/primitives": ^3.20.0 + "@wordpress/stylelint-config": ^21.5.0 + "@wordpress/url": ^3.23.0 babel-loader: ^8.2.3 browserslist: ^4.16.0 bunyan: ^1.8.15 From 1e7cf259149fbba7f906c3f69041d8920b7216fe Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 16:40:48 +0200 Subject: [PATCH 02/56] Noop some type packages with stale @wordpress/data module declarations --- package.json | 2 ++ yarn.lock | 22 ++++------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d9bca24e5fd6b..d2b5ed80e40ba 100644 --- a/package.json +++ b/package.json @@ -292,6 +292,8 @@ }, "resolutions": { "react-dates": "17.1.1", + "@types/wordpress__rich-text": "npm:noop-package@1.0.0", + "@types/wordpress__notices": "npm:noop-package@1.0.0", "@types/react": "^17.0.39", "newspack-components/@wordpress/base-styles": "4.5.0", "newspack-components/@wordpress/components": "19.15.0", diff --git a/yarn.lock b/yarn.lock index 6814ce2940e4e..0692d6c3e7d68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7503,13 +7503,10 @@ __metadata: languageName: node linkType: hard -"@types/wordpress__notices@npm:*": - version: 1.5.4 - resolution: "@types/wordpress__notices@npm:1.5.4" - dependencies: - "@types/react": "*" - "@types/wordpress__data": "*" - checksum: 98559901f709e49e523d677ac1fdb8c0839f0d492b463773a8dd28a1816c08032db9fac74014471bc677775b1ff9c05191e95a69f90213a6e1ce28d46aff0e73 +"@types/wordpress__notices@npm:noop-package@1.0.0, @types/wordpress__rich-text@npm:noop-package@1.0.0": + version: 1.0.0 + resolution: "noop-package@npm:1.0.0" + checksum: f53edc897025b1c2c6d084607ec6588718ff5fc92b1549e97f87453b0404fa15acc12f3b1c7b4fa144f376b73b3bd40e3fe8da4fa89a944dfeb33343afbcf5b4 languageName: node linkType: hard @@ -7524,17 +7521,6 @@ __metadata: languageName: node linkType: hard -"@types/wordpress__rich-text@npm:*": - version: 3.4.5 - resolution: "@types/wordpress__rich-text@npm:3.4.5" - dependencies: - "@types/react": "*" - "@types/wordpress__data": "*" - "@types/wordpress__rich-text": "*" - checksum: e78bacf5304fc65b778330006a96519d2c9fa5fe9f058dd6412baafe91af1c8aab5db91c3e381919640c494f5cc92a2c3b2dade33a0f41365379f2019db1b5a0 - languageName: node - linkType: hard - "@types/ws@npm:^8.5.1": version: 8.5.3 resolution: "@types/ws@npm:8.5.3" From 88e7597db9b68e75f0f6eba89659431954f26b42 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Thu, 9 Feb 2023 17:08:09 +0200 Subject: [PATCH 03/56] Fix some TS errors --- packages/data-stores/src/analyzer/index.ts | 12 +++--------- packages/data-stores/src/auth/index.ts | 10 ++-------- .../automated-transfer-eligibility/index.ts | 10 +--------- .../src/domain-suggestions/index.ts | 12 +++--------- packages/data-stores/src/help-center/index.ts | 12 +++--------- packages/data-stores/src/i18n/index.ts | 10 ++-------- packages/data-stores/src/launch/index.ts | 8 +------- packages/data-stores/src/onboard/index.ts | 10 ++-------- packages/data-stores/src/plans/index.ts | 10 ++-------- packages/data-stores/src/plans/selectors.ts | 18 +++++++++--------- .../data-stores/src/products-list/index.ts | 12 +++--------- packages/data-stores/src/reader/index.ts | 12 +++--------- packages/data-stores/src/site/index.ts | 11 ++--------- packages/data-stores/src/site/selectors.ts | 6 +++--- .../data-stores/src/stepper-internal/index.ts | 10 ++-------- packages/data-stores/src/subscriber/index.ts | 12 +++--------- packages/data-stores/src/user/index.ts | 10 ++-------- .../data-stores/src/wpcom-features/index.ts | 7 +------ 18 files changed, 47 insertions(+), 145 deletions(-) diff --git a/packages/data-stores/src/analyzer/index.ts b/packages/data-stores/src/analyzer/index.ts index 0f61793e75f40..99dd3310252ae 100644 --- a/packages/data-stores/src/analyzer/index.ts +++ b/packages/data-stores/src/analyzer/index.ts @@ -5,24 +5,18 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducers'; import * as selectors from './selectors'; export * from './types'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export type { State }; let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions: createActions(), - controls: controls as any, - reducer: reducer as any, + controls: controls, + reducer: reducer, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< ReturnType< typeof createActions > >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/auth/index.ts b/packages/data-stores/src/auth/index.ts index 4c4459b045716..70d94db087171 100644 --- a/packages/data-stores/src/auth/index.ts +++ b/packages/data-stores/src/auth/index.ts @@ -7,7 +7,6 @@ import { STORE_KEY } from './constants'; import { controls } from './controls'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export * from './types'; export type { State }; @@ -21,21 +20,16 @@ export function register( config: ActionsConfig ): typeof STORE_KEY { throw new Error( 'Could not get all blog access.' ); } ); - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions: createActions( config ), controls: { ...controls, ...dataControls, ...wpcomRequestControls, - } as any, + }, reducer, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< ReturnType< typeof createActions > >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/automated-transfer-eligibility/index.ts b/packages/data-stores/src/automated-transfer-eligibility/index.ts index 32c10f52aa9cf..6f3316ad6f84b 100644 --- a/packages/data-stores/src/automated-transfer-eligibility/index.ts +++ b/packages/data-stores/src/automated-transfer-eligibility/index.ts @@ -5,7 +5,6 @@ import reducer from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; import { State } from './types'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export * from './types'; export type { State }; @@ -15,19 +14,12 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, reducer, resolvers, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore Until createRegistrySelector is typed correctly selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/domain-suggestions/index.ts b/packages/data-stores/src/domain-suggestions/index.ts index b77d0dfb5ad2f..2db77931434af 100644 --- a/packages/data-stores/src/domain-suggestions/index.ts +++ b/packages/data-stores/src/domain-suggestions/index.ts @@ -5,7 +5,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export * from './types'; export * from './constants'; @@ -17,18 +16,13 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, - controls: controls as any, - reducer: reducer as any, + controls, + reducer, resolvers, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/help-center/index.ts b/packages/data-stores/src/help-center/index.ts index 60eeacdcd4231..85017359e7388 100644 --- a/packages/data-stores/src/help-center/index.ts +++ b/packages/data-stores/src/help-center/index.ts @@ -7,7 +7,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; export type { State }; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; let isRegistered = false; @@ -15,10 +14,10 @@ export function register(): typeof STORE_KEY { use( plugins.persistence, persistOptions ); if ( ! isRegistered ) { - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, - reducer: reducer as any, // eslint-disable-line @typescript-eslint/no-explicit-any - controls: { ...controls, ...wpcomRequestControls } as any, + reducer, + controls: { ...controls, ...wpcomRequestControls }, selectors, persist: [ 'site', 'message', 'userDeclaredSite', 'userDeclaredSiteUrl', 'subject' ], } ); @@ -28,9 +27,4 @@ export function register(): typeof STORE_KEY { return STORE_KEY; } -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} - export type { HelpCenterSite } from './types'; diff --git a/packages/data-stores/src/i18n/index.ts b/packages/data-stores/src/i18n/index.ts index 19be0fb41a2eb..a99303c0caeeb 100644 --- a/packages/data-stores/src/i18n/index.ts +++ b/packages/data-stores/src/i18n/index.ts @@ -5,7 +5,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; export type { LocalizedLanguageNames } from './types'; @@ -15,18 +14,13 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { resolvers, actions, controls, - reducer: reducer as any, + reducer, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/launch/index.ts b/packages/data-stores/src/launch/index.ts index 1086c37cb74bb..b9139828b091b 100644 --- a/packages/data-stores/src/launch/index.ts +++ b/packages/data-stores/src/launch/index.ts @@ -5,7 +5,6 @@ import * as actions from './actions'; import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; export type { LaunchStepType } from './types'; @@ -18,7 +17,7 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, controls, reducer, @@ -37,8 +36,3 @@ export function register(): typeof STORE_KEY { } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/onboard/index.ts b/packages/data-stores/src/onboard/index.ts index 9462c2f17aaf9..b7bfc32fb405c 100644 --- a/packages/data-stores/src/onboard/index.ts +++ b/packages/data-stores/src/onboard/index.ts @@ -5,7 +5,6 @@ import * as actions from './actions'; import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; @@ -23,10 +22,10 @@ export function register(): typeof STORE_KEY { } use( plugins.persistence, persistOptions ); - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, controls, - reducer: reducer as any, // eslint-disable-line @typescript-eslint/no-explicit-any + reducer, selectors, persist: [ 'anchorPodcastId', @@ -64,8 +63,3 @@ export function register(): typeof STORE_KEY { isRegistered = true; return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/plans/index.ts b/packages/data-stores/src/plans/index.ts index b47c58285797d..9f75a344da687 100644 --- a/packages/data-stores/src/plans/index.ts +++ b/packages/data-stores/src/plans/index.ts @@ -5,7 +5,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; export type { @@ -39,18 +38,13 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { resolvers, actions, - controls: controls as any, + controls, reducer, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/plans/selectors.ts b/packages/data-stores/src/plans/selectors.ts index 7fe22eaf338f3..ba04e2961eb7a 100644 --- a/packages/data-stores/src/plans/selectors.ts +++ b/packages/data-stores/src/plans/selectors.ts @@ -39,7 +39,7 @@ export const getPlanByProductId = ( return select( STORE_KEY ) .getSupportedPlans( locale ) - .find( ( plan ) => plan.productIds.indexOf( productId ) > -1 ); + .find( ( plan: Plan ) => plan.productIds.indexOf( productId ) > -1 ); }; export const getPlanProductById = ( @@ -52,7 +52,7 @@ export const getPlanProductById = ( return select( STORE_KEY ) .getPlansProducts() - .find( ( product ) => product.productId === productId ); + .find( ( product: PlanProduct ) => product.productId === productId ); }; export const getPlanByPeriodAgnosticSlug = ( @@ -65,19 +65,19 @@ export const getPlanByPeriodAgnosticSlug = ( } return select( STORE_KEY ) .getSupportedPlans( locale ) - .find( ( plan ) => plan.periodAgnosticSlug === slug ); + .find( ( plan: Plan ) => plan.periodAgnosticSlug === slug ); }; export const getDefaultPaidPlan = ( _: State, locale: string ): Plan | undefined => { return select( STORE_KEY ) .getSupportedPlans( locale ) - .find( ( plan ) => plan.periodAgnosticSlug === DEFAULT_PAID_PLAN ); + .find( ( plan: Plan ) => plan.periodAgnosticSlug === DEFAULT_PAID_PLAN ); }; export const getDefaultFreePlan = ( _: State, locale: string ): Plan | undefined => { return select( STORE_KEY ) .getSupportedPlans( locale ) - .find( ( plan ) => plan.periodAgnosticSlug === TIMELESS_PLAN_FREE ); + .find( ( plan: Plan ) => plan.periodAgnosticSlug === TIMELESS_PLAN_FREE ); }; export const getSupportedPlans = ( state: State, _locale: string ): Plan[] => { @@ -99,7 +99,7 @@ export const getPrices = ( _state: State, _locale: string ): Record< StorePlanSl } ); return select( STORE_KEY ) .getPlansProducts() - .reduce( ( prices, plan ) => { + .reduce( ( prices: Record< StorePlanSlug, string >, plan: PlanProduct ) => { prices[ plan.storeSlug ] = plan.price; return prices; }, {} as Record< StorePlanSlug, string > ); @@ -116,7 +116,7 @@ export const getPlanByPath = ( const planProduct = select( STORE_KEY ) .getPlansProducts() - .find( ( product ) => product.pathSlug === path ); + .find( ( product: PlanProduct ) => product.pathSlug === path ); if ( ! planProduct ) { return undefined; @@ -124,7 +124,7 @@ export const getPlanByPath = ( return select( STORE_KEY ) .getSupportedPlans( locale ) - .find( ( plan ) => plan.periodAgnosticSlug === planProduct.periodAgnosticSlug ); + .find( ( plan: Plan ) => plan.periodAgnosticSlug === planProduct.periodAgnosticSlug ); }; export const getPlanProduct = ( @@ -138,7 +138,7 @@ export const getPlanProduct = ( return select( STORE_KEY ) .getPlansProducts() - .find( ( product ) => { + .find( ( product: PlanProduct ) => { const matchesSlug = product.periodAgnosticSlug === periodAgnosticSlug; // The billing period doesn't matter when dealing with free plan const matchesBillingPeriod = diff --git a/packages/data-stores/src/products-list/index.ts b/packages/data-stores/src/products-list/index.ts index e0a0af7ba5a8d..6b7040f4db661 100644 --- a/packages/data-stores/src/products-list/index.ts +++ b/packages/data-stores/src/products-list/index.ts @@ -5,7 +5,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export * from './types'; export type { State }; @@ -15,18 +14,13 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, - controls: controls as any, // eslint-disable-line @typescript-eslint/no-explicit-any - reducer: reducer as any, // eslint-disable-line @typescript-eslint/no-explicit-any + controls, + reducer, resolvers, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/reader/index.ts b/packages/data-stores/src/reader/index.ts index 4636eb8e66ba7..1ac64423f4359 100644 --- a/packages/data-stores/src/reader/index.ts +++ b/packages/data-stores/src/reader/index.ts @@ -6,7 +6,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; export { STORE_KEY }; @@ -18,10 +17,10 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, - controls: controls as any, - reducer: reducer as any, + controls, + reducer, resolvers, selectors, persist: [ 'teams' ], @@ -29,8 +28,3 @@ export function register(): typeof STORE_KEY { } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/site/index.ts b/packages/data-stores/src/site/index.ts index 040fed1b801fb..e024e2fe6589a 100644 --- a/packages/data-stores/src/site/index.ts +++ b/packages/data-stores/src/site/index.ts @@ -6,7 +6,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as resolvers from './resolvers'; import * as selectors from './selectors'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; import type { WpcomClientCredentials } from '../shared-types'; export * from './types'; @@ -19,10 +18,9 @@ export function register( clientCreds: WpcomClientCredentials ): typeof STORE_KE use( plugins.persistence, persistOptions ); isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions: createActions( clientCreds ), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - controls: controls as any, + controls, reducer, resolvers, selectors, @@ -31,8 +29,3 @@ export function register( clientCreds: WpcomClientCredentials ): typeof STORE_KE } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< ReturnType< typeof createActions > >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/site/selectors.ts b/packages/data-stores/src/site/selectors.ts index 65d789d9ed94a..ef871d32b5711 100644 --- a/packages/data-stores/src/site/selectors.ts +++ b/packages/data-stores/src/site/selectors.ts @@ -1,6 +1,6 @@ import { select } from '@wordpress/data'; import { STORE_KEY } from './constants'; -import { SiteLaunchStatus, SiteOption } from './types'; +import { Domain, SiteLaunchStatus, SiteOption } from './types'; import type { State } from './reducer'; export const getState = ( state: State ) => state; @@ -92,12 +92,12 @@ export const getSiteOption = ( state: State, siteId: number, optionName: SiteOpt export const getPrimarySiteDomain = ( _: State, siteId: number ) => select( STORE_KEY ) .getSiteDomains( siteId ) - ?.find( ( domain ) => domain.primary_domain ); + ?.find( ( domain: Domain ) => domain.primary_domain ); export const getSiteSubdomain = ( _: State, siteId: number ) => select( STORE_KEY ) .getSiteDomains( siteId ) - ?.find( ( domain ) => domain.is_subdomain ); + ?.find( ( domain: Domain ) => domain.is_subdomain ); export const getSiteLatestAtomicTransfer = ( state: State, siteId: number ) => { return state.latestAtomicTransferStatus[ siteId ]?.transfer; diff --git a/packages/data-stores/src/stepper-internal/index.ts b/packages/data-stores/src/stepper-internal/index.ts index 10e59e4b2a01d..39450a5f16913 100644 --- a/packages/data-stores/src/stepper-internal/index.ts +++ b/packages/data-stores/src/stepper-internal/index.ts @@ -5,25 +5,19 @@ import * as actions from './actions'; import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; export type { State }; export function register(): typeof STORE_KEY { use( plugins.persistence, persistOptions ); - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, controls, - reducer: reducer as any, // eslint-disable-line @typescript-eslint/no-explicit-any + reducer, selectors, persist: [ 'stepData' ], } ); return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/subscriber/index.ts b/packages/data-stores/src/subscriber/index.ts index 0f61793e75f40..8366741fa76b9 100644 --- a/packages/data-stores/src/subscriber/index.ts +++ b/packages/data-stores/src/subscriber/index.ts @@ -5,24 +5,18 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducers'; import * as selectors from './selectors'; export * from './types'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export type { State }; let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions: createActions(), - controls: controls as any, - reducer: reducer as any, + controls, + reducer, selectors, } ); } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< ReturnType< typeof createActions > >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/user/index.ts b/packages/data-stores/src/user/index.ts index 2d6e427d52ef3..342033abc1c52 100644 --- a/packages/data-stores/src/user/index.ts +++ b/packages/data-stores/src/user/index.ts @@ -5,7 +5,6 @@ import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import { createResolvers } from './resolvers'; import * as selectors from './selectors'; -import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; import type { WpcomClientCredentials } from '../shared-types'; export * from './types'; @@ -15,9 +14,9 @@ let isRegistered = false; export function register( clientCreds: WpcomClientCredentials ): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions: createActions( clientCreds ), - controls: controls as any, + controls, reducer, resolvers: createResolvers( clientCreds ), selectors, @@ -25,8 +24,3 @@ export function register( clientCreds: WpcomClientCredentials ): typeof STORE_KE } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< ReturnType< typeof createActions > >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/wpcom-features/index.ts b/packages/data-stores/src/wpcom-features/index.ts index f5bf522cc2bee..fe2ad47cb9b04 100644 --- a/packages/data-stores/src/wpcom-features/index.ts +++ b/packages/data-stores/src/wpcom-features/index.ts @@ -3,7 +3,6 @@ import { controls } from '@wordpress/data-controls'; import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { SelectFromMap } from '../mapped-types'; import type { Reducer, AnyAction } from 'redux'; export type { State }; @@ -16,7 +15,7 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { controls, reducer: reducer as Reducer< State, AnyAction >, selectors, @@ -24,7 +23,3 @@ export function register(): typeof STORE_KEY { } return STORE_KEY; } - -declare module '@wordpress/data' { - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} From afb56036388aafd342af1021c3d3b00d03fe1e5e Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Thu, 9 Feb 2023 15:57:51 +0200 Subject: [PATCH 04/56] Fix some unit tests --- client/blocks/time-mismatch-warning/test/index.jsx | 6 +----- .../test/plugin-row-formatter.test.tsx | 12 ++++++++++++ .../site-settings/test/form-cloudflare-analytics.jsx | 12 ++++++++++++ .../site-settings/test/form-google-analytics.jsx | 12 ++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/client/blocks/time-mismatch-warning/test/index.jsx b/client/blocks/time-mismatch-warning/test/index.jsx index e9615506a3618..dcdb704acbae4 100644 --- a/client/blocks/time-mismatch-warning/test/index.jsx +++ b/client/blocks/time-mismatch-warning/test/index.jsx @@ -26,11 +26,7 @@ jest.mock( 'calypso/state/preferences/selectors', () => ( { describe( 'TimeMismatchWarning', () => { beforeAll( () => { - jest.spyOn( global, 'Date' ).mockImplementation( () => ( { getTimezoneOffset: () => 240 } ) ); - } ); - - afterAll( () => { - jest.spyOn( global, 'Date' ).mockRestore(); + jest.spyOn( global.Date.prototype, 'getTimezoneOffset' ).mockImplementation( () => 240 ); } ); test( 'to render nothing if no site ID is provided', () => { diff --git a/client/my-sites/plugins/plugin-management-v2/test/plugin-row-formatter.test.tsx b/client/my-sites/plugins/plugin-management-v2/test/plugin-row-formatter.test.tsx index 5962d037ad41c..5469c65040e18 100644 --- a/client/my-sites/plugins/plugin-management-v2/test/plugin-row-formatter.test.tsx +++ b/client/my-sites/plugins/plugin-management-v2/test/plugin-row-formatter.test.tsx @@ -48,6 +48,18 @@ const props = { }; describe( '', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + test( 'should render correctly and show site domain', () => { const { container } = render( ); diff --git a/client/my-sites/site-settings/test/form-cloudflare-analytics.jsx b/client/my-sites/site-settings/test/form-cloudflare-analytics.jsx index ab9eda3985265..406f7501cc3be 100644 --- a/client/my-sites/site-settings/test/form-cloudflare-analytics.jsx +++ b/client/my-sites/site-settings/test/form-cloudflare-analytics.jsx @@ -21,6 +21,18 @@ const props = { }; describe( 'CloudflareAnalyticsSettings basic tests', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + test( 'Cloudflare form should not show upgrade nudge if disabled', () => { render( ); expect( screen.queryByTestId( 'UpsellNudge' ) ).not.toBeInTheDocument(); diff --git a/client/my-sites/site-settings/test/form-google-analytics.jsx b/client/my-sites/site-settings/test/form-google-analytics.jsx index 93dd9f884aafd..46b926317843a 100644 --- a/client/my-sites/site-settings/test/form-google-analytics.jsx +++ b/client/my-sites/site-settings/test/form-google-analytics.jsx @@ -45,6 +45,18 @@ const props = { }; describe( 'GoogleAnalyticsForm basic tests', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + test( 'simple form should not blow up and have proper CSS class', () => { render( ); expect( screen.queryByRole( 'form', { name: /analytics/i } ) ).toBeVisible(); From a63151a2601630e2e623da2e4c93f0dbfabe4c08 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Thu, 9 Feb 2023 20:05:21 +0200 Subject: [PATCH 05/56] Fix TS errors in wpcom-checkout --- .../src/payment-method-store.ts | 4 +-- .../src/payment-methods/alipay.tsx | 26 +++++++++------ .../src/payment-methods/bancontact.tsx | 26 +++++++++------ .../src/payment-methods/eps.tsx | 26 +++++++++------ .../src/payment-methods/giropay.tsx | 26 +++++++++------ .../src/payment-methods/ideal.tsx | 33 +++++++++++-------- .../src/payment-methods/p24.tsx | 33 +++++++++++-------- .../src/payment-methods/sofort.tsx | 26 +++++++++------ 8 files changed, 122 insertions(+), 78 deletions(-) diff --git a/packages/wpcom-checkout/src/payment-method-store.ts b/packages/wpcom-checkout/src/payment-method-store.ts index 3744123694eb9..dc09b12723d57 100644 --- a/packages/wpcom-checkout/src/payment-method-store.ts +++ b/packages/wpcom-checkout/src/payment-method-store.ts @@ -1,4 +1,4 @@ -import { registerStore } from '@wordpress/data'; +import { register } from '@wordpress/data'; export interface StoreStateValue { value: string; @@ -34,6 +34,6 @@ export type StoreActions< N extends string > = Record< ( payload: string ) => StoreAction >; -export interface PaymentMethodStore< N extends string > extends ReturnType< typeof registerStore > { +export interface PaymentMethodStore< N extends string > extends ReturnType< typeof register > { getState: () => StoreState< N >; } diff --git a/packages/wpcom-checkout/src/payment-methods/alipay.tsx b/packages/wpcom-checkout/src/payment-methods/alipay.tsx index bc5f6e394bbb7..6faf38b239ce3 100644 --- a/packages/wpcom-checkout/src/payment-methods/alipay.tsx +++ b/packages/wpcom-checkout/src/payment-methods/alipay.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:alipay-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'alipay'; type NounsInStore = 'customerName'; type AlipayStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -50,7 +45,7 @@ export function createAlipayPaymentMethodStore(): AlipayStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -63,6 +58,17 @@ export function createAlipayPaymentMethodStore(): AlipayStore { } ); } +function useCustomerName() { + const { customerName } = useSelect( ( select ) => { + const store = select( 'alipay' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + }; + }, [] ); + + return customerName; +} + export function createAlipayMethod( { store }: { store: AlipayStore } ): PaymentMethod { return { id: 'alipay', @@ -78,7 +84,7 @@ export function createAlipayMethod( { store }: { store: AlipayStore } ): Payment function AlipayFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'alipay' ).getCustomerName() ); + const customerName = useCustomerName(); const { changeCustomerName } = useDispatch( 'alipay' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -140,7 +146,7 @@ function AlipayPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'alipay' ).getCustomerName() ); + const customerName = useCustomerName(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -256,7 +262,7 @@ function AlipayLogo() { } function AlipaySummary() { - const customerName = useSelect( ( select ) => select( 'alipay' ).getCustomerName() ); + const customerName = useCustomerName(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/bancontact.tsx b/packages/wpcom-checkout/src/payment-methods/bancontact.tsx index 46a21c8d27f22..b3adbcb7def42 100644 --- a/packages/wpcom-checkout/src/payment-methods/bancontact.tsx +++ b/packages/wpcom-checkout/src/payment-methods/bancontact.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:bancontact-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'bancontact'; type NounsInStore = 'customerName'; type BancontactStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -50,7 +45,7 @@ export function createBancontactPaymentMethodStore(): BancontactStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -77,10 +72,21 @@ export function createBancontactMethod( { store }: { store: BancontactStore } ): }; } +function useCustomerName() { + const { customerName } = useSelect( ( select ) => { + const store = select( 'bancontact' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + }; + }, [] ); + + return customerName; +} + function BancontactFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'bancontact' ).getCustomerName() ); + const customerName = useCustomerName(); const { changeCustomerName } = useDispatch( 'bancontact' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -142,7 +148,7 @@ function BancontactPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'bancontact' ).getCustomerName() ); + const customerName = useCustomerName(); if ( ! onClick ) { throw new Error( 'Missing onClick prop; BancontactPayButton must be used as a payment button in CheckoutSubmitButton' @@ -223,7 +229,7 @@ function BancontactLogo() { } function BancontactSummary() { - const customerName = useSelect( ( select ) => select( 'bancontact' ).getCustomerName() ); + const customerName = useCustomerName(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/eps.tsx b/packages/wpcom-checkout/src/payment-methods/eps.tsx index 3e27378eb3a86..064ef772e6581 100644 --- a/packages/wpcom-checkout/src/payment-methods/eps.tsx +++ b/packages/wpcom-checkout/src/payment-methods/eps.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:eps-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'eps'; type NounsInStore = 'customerName'; type EpsStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -50,7 +45,7 @@ export function createEpsPaymentMethodStore(): EpsStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -76,10 +71,21 @@ export function createEpsMethod( { store }: { store: EpsStore } ): PaymentMethod }; } +function useCustomerName() { + const { customerName } = useSelect( ( select ) => { + const store = select( 'eps' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + }; + }, [] ); + + return customerName; +} + function EpsFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'eps' ).getCustomerName() ); + const customerName = useCustomerName(); const { changeCustomerName } = useDispatch( 'eps' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -141,7 +147,7 @@ function EpsPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'eps' ).getCustomerName() ); + const customerName = useCustomerName(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -185,7 +191,7 @@ function ButtonContents( { formStatus, total }: { formStatus: FormStatus; total: } function EpsSummary() { - const customerName = useSelect( ( select ) => select( 'eps' ).getCustomerName() ); + const customerName = useCustomerName(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/giropay.tsx b/packages/wpcom-checkout/src/payment-methods/giropay.tsx index 4cf2ea9474134..7581111a1cee9 100644 --- a/packages/wpcom-checkout/src/payment-methods/giropay.tsx +++ b/packages/wpcom-checkout/src/payment-methods/giropay.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:giropay-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'giropay'; type NounsInStore = 'customerName'; type GiropayStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -51,7 +46,7 @@ export function createGiropayPaymentMethodStore(): GiropayStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -66,6 +61,17 @@ export function createGiropayPaymentMethodStore(): GiropayStore { return store; } +function useCustomerName() { + const { customerName } = useSelect( ( select ) => { + const store = select( 'giropay' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + }; + }, [] ); + + return customerName; +} + export function createGiropayMethod( { store }: { store: GiropayStore } ): PaymentMethod { return { id: 'giropay', @@ -81,7 +87,7 @@ export function createGiropayMethod( { store }: { store: GiropayStore } ): Payme function GiropayFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'giropay' ).getCustomerName() ); + const customerName = useCustomerName(); const { changeCustomerName } = useDispatch( 'giropay' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -143,7 +149,7 @@ function GiropayPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'giropay' ).getCustomerName() ); + const customerName = useCustomerName(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -218,7 +224,7 @@ function GiropayLogoImg( { className }: { className?: string } ) { } function GiropaySummary() { - const customerName = useSelect( ( select ) => select( 'giropay' ).getCustomerName() ); + const customerName = useCustomerName(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/ideal.tsx b/packages/wpcom-checkout/src/payment-methods/ideal.tsx index 722fe6f562c47..1e07a301e10c7 100644 --- a/packages/wpcom-checkout/src/payment-methods/ideal.tsx +++ b/packages/wpcom-checkout/src/payment-methods/ideal.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:ideal-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'ideal'; type NounsInStore = 'customerName' | 'customerBank'; type IdealStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -57,7 +52,7 @@ export function createIdealPaymentMethodStore(): IdealStore { customerName: { value: '', isTouched: false }, customerBank: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -86,11 +81,25 @@ export function createIdealMethod( { store }: { store: IdealStore } ): PaymentMe }; } +function useCustomerData() { + const { customerName, customerBank } = useSelect( ( select ) => { + const store = select( 'ideal' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + customerBank: store.getCustomerBank(), + }; + }, [] ); + + return { + customerName, + customerBank, + }; +} + function IdealFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'ideal' ).getCustomerName() ); - const customerBank = useSelect( ( select ) => select( 'ideal' ).getCustomerBank() ); + const { customerName, customerBank } = useCustomerData(); const { changeCustomerName, changeCustomerBank } = useDispatch( 'ideal' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -271,8 +280,7 @@ function IdealPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'ideal' ).getCustomerName() ); - const customerBank = useSelect( ( select ) => select( 'ideal' ).getCustomerBank() ); + const { customerName, customerBank } = useCustomerData(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -317,8 +325,7 @@ function ButtonContents( { formStatus, total }: { formStatus: FormStatus; total: } function IdealSummary() { - const customerName = useSelect( ( select ) => select( 'ideal' ).getCustomerName() ); - const customerBank = useSelect( ( select ) => select( 'ideal' ).getCustomerBank() ); + const { customerName, customerBank } = useCustomerData(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/p24.tsx b/packages/wpcom-checkout/src/payment-methods/p24.tsx index b1926ea006c8b..d4b7205a1e612 100644 --- a/packages/wpcom-checkout/src/payment-methods/p24.tsx +++ b/packages/wpcom-checkout/src/payment-methods/p24.tsx @@ -16,22 +16,17 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ const debug = debugFactory( 'wpcom-checkout:p24-payment-method' ); -type StoreKey = 'p24'; type NounsInStore = 'customerName' | 'customerEmail'; type P24Store = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -58,7 +53,7 @@ export function createP24PaymentMethodStore(): P24Store { customerName: { value: '', isTouched: false }, customerEmail: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -75,6 +70,21 @@ export function createP24PaymentMethodStore(): P24Store { return store; } +function useCustomerData() { + const { customerName, customerEmail } = useSelect( ( select ) => { + const store = select( 'p24' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + customerEmail: store.getCustomerEmail(), + }; + }, [] ); + + return { + customerName, + customerEmail, + }; +} + export function createP24Method( { store }: { store: P24Store } ): PaymentMethod { return { id: 'p24', @@ -90,8 +100,7 @@ export function createP24Method( { store }: { store: P24Store } ): PaymentMethod function P24Fields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'p24' ).getCustomerName() ); - const customerEmail = useSelect( ( select ) => select( 'p24' ).getCustomerEmail() ); + const { customerName, customerEmail } = useCustomerData(); const { changeCustomerName, changeCustomerEmail } = useDispatch( 'p24' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -164,8 +173,7 @@ function P24PayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'p24' ).getCustomerName() ); - const customerEmail = useSelect( ( select ) => select( 'p24' ).getCustomerEmail() ); + const { customerName, customerEmail } = useCustomerData(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -337,8 +345,7 @@ function P24Logo() { } function P24Summary() { - const customerName = useSelect( ( select ) => select( 'p24' ).getCustomerName() ); - const customerEmail = useSelect( ( select ) => select( 'p24' ).getCustomerEmail() ); + const { customerName, customerEmail } = useCustomerData(); return ( diff --git a/packages/wpcom-checkout/src/payment-methods/sofort.tsx b/packages/wpcom-checkout/src/payment-methods/sofort.tsx index 4118f094cf0ad..cf43b27b5ab0f 100644 --- a/packages/wpcom-checkout/src/payment-methods/sofort.tsx +++ b/packages/wpcom-checkout/src/payment-methods/sofort.tsx @@ -16,21 +16,16 @@ import type { StoreState, } from '../payment-method-store'; import type { PaymentMethod, ProcessPayment, LineItem } from '@automattic/composite-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'wpcom-checkout:sofort-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'sofort'; type NounsInStore = 'customerName'; type SofortStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - const actions: StoreActions< NounsInStore > = { changeCustomerName( payload ) { return { type: 'CUSTOMER_NAME_SET', payload }; @@ -43,6 +38,17 @@ const selectors: StoreSelectorsWithState< NounsInStore > = { }, }; +function useCustomerName() { + const { customerName } = useSelect( ( select ) => { + const store = select( 'sofort' ) as StoreSelectors< NounsInStore >; + return { + customerName: store.getCustomerName(), + }; + }, [] ); + + return customerName; +} + export function createSofortPaymentMethodStore(): SofortStore { debug( 'creating a new sofort payment method store' ); const store = registerStore( 'sofort', { @@ -50,7 +56,7 @@ export function createSofortPaymentMethodStore(): SofortStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -80,7 +86,7 @@ export function createSofortMethod( { store }: { store: SofortStore } ): Payment function SofortFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'sofort' ).getCustomerName() ); + const customerName = useCustomerName(); const { changeCustomerName } = useDispatch( 'sofort' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -142,7 +148,7 @@ function SofortPayButton( { } ) { const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'sofort' ).getCustomerName() ); + const customerName = useCustomerName(); // This must be typed as optional because it's injected by cloning the // element in CheckoutSubmitButton, but the uncloned element does not have @@ -186,7 +192,7 @@ function ButtonContents( { formStatus, total }: { formStatus: FormStatus; total: } function SofortSummary() { - const customerName = useSelect( ( select ) => select( 'sofort' ).getCustomerName() ); + const customerName = useCustomerName(); return ( From 266cc2326e4a0d8de25659832a503905db920250 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 12:58:05 +0200 Subject: [PATCH 06/56] Fix more TS errors --- .../src/automated-transfer-eligibility/selectors.ts | 9 +++++---- .../src/automated-transfer-eligibility/types.ts | 5 ++++- packages/data-stores/src/index.ts | 1 + packages/data-stores/src/subscriber/types.ts | 7 +++++-- packages/subscriber/src/hooks/use-in-progress-state.ts | 10 ++++++++-- packages/subscriber/tsconfig.json | 2 +- packages/tour-kit/tsconfig.json | 2 +- packages/whats-new/tsconfig.json | 3 ++- 8 files changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/data-stores/src/automated-transfer-eligibility/selectors.ts b/packages/data-stores/src/automated-transfer-eligibility/selectors.ts index 147a0b57829d1..5d32c0df46915 100644 --- a/packages/data-stores/src/automated-transfer-eligibility/selectors.ts +++ b/packages/data-stores/src/automated-transfer-eligibility/selectors.ts @@ -5,6 +5,7 @@ import { TransferEligibilityWarning, TransferEligibilityError, TransferEligibility, + TransferSelectFn, } from './types'; export const getAutomatedTransferEligibility = ( @@ -18,7 +19,7 @@ export const getAutomatedTransferEligibility = ( }; export const getEligibilityHolds = createRegistrySelector( - ( select ) => + ( select: TransferSelectFn ) => ( state: State, siteId: number | null ): TransferEligibilityError[] | null => { const transferEligibility = select( STORE_KEY ).getAutomatedTransferEligibility( siteId ); @@ -39,7 +40,7 @@ export const getEligibilityHolds = createRegistrySelector( ); export const getEligibilityWarnings = createRegistrySelector( - ( select ) => + ( select: TransferSelectFn ) => ( state: State, siteId: number | null ): TransferEligibilityWarning[] | null => { const transferEligibility = select( STORE_KEY ).getAutomatedTransferEligibility( siteId ); @@ -66,7 +67,7 @@ export const getEligibilityWarnings = createRegistrySelector( ); export const getNonSubdomainWarnings = createRegistrySelector( - ( select ) => + ( select: TransferSelectFn ) => ( state: State, siteId: number | null ): TransferEligibilityWarning[] | null => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore Until createRegistrySelector is typed correctly @@ -83,7 +84,7 @@ export const getNonSubdomainWarnings = createRegistrySelector( ); export const getWpcomSubdomainWarning = createRegistrySelector( - ( select ) => + ( select: TransferSelectFn ) => ( state: State, siteId: number | null ): TransferEligibilityWarning | null => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore Until createRegistrySelector is typed correctly diff --git a/packages/data-stores/src/automated-transfer-eligibility/types.ts b/packages/data-stores/src/automated-transfer-eligibility/types.ts index 74db5e5016ac6..b161df58e48a3 100644 --- a/packages/data-stores/src/automated-transfer-eligibility/types.ts +++ b/packages/data-stores/src/automated-transfer-eligibility/types.ts @@ -1,5 +1,6 @@ import * as actions from './actions'; -import type { DispatchFromMap } from '../mapped-types'; +import * as selectors from './selectors'; +import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export interface Dispatch { dispatch: DispatchFromMap< typeof actions >; @@ -40,3 +41,5 @@ export type State = { export interface StatusMapping { [ key: string ]: any; } + +export type TransferSelectFn = ( storeKey: string ) => SelectFromMap< typeof selectors >; diff --git a/packages/data-stores/src/index.ts b/packages/data-stores/src/index.ts index 37f01d259b364..bffdd0d63d40d 100644 --- a/packages/data-stores/src/index.ts +++ b/packages/data-stores/src/index.ts @@ -32,6 +32,7 @@ export * from './templates'; export * from './onboard/types'; export * from './domain-suggestions/types'; export * from './plans/types'; +export * from './subscriber/types'; export { Analyzer, diff --git a/packages/data-stores/src/subscriber/types.ts b/packages/data-stores/src/subscriber/types.ts index 07d48c0624769..ed6d70d7cbaaf 100644 --- a/packages/data-stores/src/subscriber/types.ts +++ b/packages/data-stores/src/subscriber/types.ts @@ -1,5 +1,6 @@ import * as actions from './actions'; -import type { DispatchFromMap } from '../mapped-types'; +import * as selectors from './selectors'; +import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export interface SubscriberState { add?: { @@ -48,6 +49,8 @@ export type ImportSubscribersResponse = { export type GetSubscribersImportResponse = ImportJob; export type GetSubscribersImportsResponse = ImportJob[]; -export interface Dispatch { +export interface SubscriberDispatch { dispatch: DispatchFromMap< typeof actions >; } + +export type SubscriberSelect = SelectFromMap< typeof selectors >; diff --git a/packages/subscriber/src/hooks/use-in-progress-state.ts b/packages/subscriber/src/hooks/use-in-progress-state.ts index 202a31e68a255..dec17c3d1c1b2 100644 --- a/packages/subscriber/src/hooks/use-in-progress-state.ts +++ b/packages/subscriber/src/hooks/use-in-progress-state.ts @@ -1,9 +1,15 @@ import { useSelect } from '@wordpress/data'; import { SUBSCRIBER_STORE } from '../store'; +import type { SubscriberSelect } from '@automattic/data-stores'; export function useInProgressState() { - const addSelector = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getAddSubscribersSelector() ); - const importSelector = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getImportSubscribersSelector() ); + const { addSelector, importSelector } = useSelect( ( select ) => { + const subscriber: SubscriberSelect = select( SUBSCRIBER_STORE ); + return { + addSelector: subscriber.addSelector, + importSelector: subscriber.importSelector, + }; + }, [] ); return addSelector?.inProgress || importSelector?.inProgress; } diff --git a/packages/subscriber/tsconfig.json b/packages/subscriber/tsconfig.json index 8c5ab14631edc..e5dc080df83d7 100644 --- a/packages/subscriber/tsconfig.json +++ b/packages/subscriber/tsconfig.json @@ -7,5 +7,5 @@ }, "include": [ "src" ], "exclude": [ "**/test/*" ], - "references": [ { "path": "../viewport" } ] + "references": [ { "path": "../data-stores" }, { "path": "../viewport" } ] } diff --git a/packages/tour-kit/tsconfig.json b/packages/tour-kit/tsconfig.json index 8c5ab14631edc..7ee19755859cb 100644 --- a/packages/tour-kit/tsconfig.json +++ b/packages/tour-kit/tsconfig.json @@ -7,5 +7,5 @@ }, "include": [ "src" ], "exclude": [ "**/test/*" ], - "references": [ { "path": "../viewport" } ] + "references": [ { "path": "../components" }, { "path": "../viewport" } ] } diff --git a/packages/whats-new/tsconfig.json b/packages/whats-new/tsconfig.json index 4603abc9c6144..f0e5cd9ad9296 100644 --- a/packages/whats-new/tsconfig.json +++ b/packages/whats-new/tsconfig.json @@ -1,3 +1,4 @@ { - "extends": "@automattic/calypso-typescript-config/js-package.json" + "extends": "@automattic/calypso-typescript-config/js-package.json", + "references": [ { "path": "../components" } ] } From ba554bbf0815abeee191c09fb1768fc87104ea67 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 16:46:04 +0200 Subject: [PATCH 07/56] Fix TS errors in wpcom-plans-ui data store --- packages/data-stores/src/wpcom-plans-ui/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/data-stores/src/wpcom-plans-ui/index.ts b/packages/data-stores/src/wpcom-plans-ui/index.ts index 95e2d8c81613d..e8963c81d6225 100644 --- a/packages/data-stores/src/wpcom-plans-ui/index.ts +++ b/packages/data-stores/src/wpcom-plans-ui/index.ts @@ -4,7 +4,6 @@ import * as actions from './actions'; import { STORE_KEY } from './constants'; import reducer, { State } from './reducer'; import * as selectors from './selectors'; -import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; import type { WpcomPlansUIAction } from './actions'; import type { Reducer } from 'redux'; @@ -15,7 +14,7 @@ let isRegistered = false; export function register(): typeof STORE_KEY { if ( ! isRegistered ) { isRegistered = true; - registerStore< State >( STORE_KEY, { + registerStore( STORE_KEY, { actions, controls, reducer: reducer as Reducer< State, WpcomPlansUIAction >, @@ -24,8 +23,3 @@ export function register(): typeof STORE_KEY { } return STORE_KEY; } - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} From 868db66054f4fe343a9919737d56b72ceb566469 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 13:55:59 +0200 Subject: [PATCH 08/56] Fix a bunch of other TS errors --- .../starter-page-templates/store.ts | 8 --- .../src/store.ts | 6 -- .../composite-checkout/hooks/wpcom-store.ts | 9 +-- .../payment-methods/credit-card/store.ts | 6 -- .../payment-methods/netbanking.tsx | 41 ++++++----- .../payment-methods/paypal.tsx | 69 +++++++++++++------ .../payment-methods/wechat/index.tsx | 24 ++++--- .../partner-portal/credit-card-form/index.ts | 6 -- packages/data-stores/src/help-center/types.ts | 5 +- packages/data-stores/src/index.ts | 3 +- packages/data-stores/src/plans/types.ts | 4 ++ .../data-stores/src/wpcom-features/types.ts | 4 ++ .../components/domain-categories/index.tsx | 5 +- .../components/help-center-contact-form.tsx | 12 ++-- .../src/components/help-center-container.tsx | 17 +++-- .../src/components/help-center-header.tsx | 6 +- .../components/help-center-more-resources.tsx | 22 +++--- .../src/components/help-center.tsx | 13 ++-- .../help-center/src/components/help-icon.tsx | 7 +- .../src/happychat-window-communicator.ts | 21 +++--- .../src/hooks/use-supported-plans.ts | 11 +-- .../src/plans-accordion-item/index.tsx | 7 +- .../plans-grid/src/plans-accordion/index.tsx | 29 ++++++-- .../plans-grid/src/plans-details/index.tsx | 6 +- packages/plans-grid/src/plans-grid/index.tsx | 7 +- packages/plans-grid/src/plans-table/index.tsx | 7 +- .../plans-grid/src/plans-table/plan-item.tsx | 7 +- .../src/components/add-form/index.tsx | 6 +- .../src/hooks/use-active-job-recognition.ts | 7 +- .../src/hooks/use-in-progress-state.ts | 4 +- .../src/hooks/use-record-add-form-events.ts | 11 ++- 31 files changed, 236 insertions(+), 154 deletions(-) diff --git a/apps/editing-toolkit/editing-toolkit-plugin/starter-page-templates/store.ts b/apps/editing-toolkit/editing-toolkit-plugin/starter-page-templates/store.ts index 3ab0fb58c0795..296f5981b2845 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/starter-page-templates/store.ts +++ b/apps/editing-toolkit/editing-toolkit-plugin/starter-page-templates/store.ts @@ -30,11 +30,3 @@ registerStore( STORE_KEY, { actions, selectors, } ); - -declare module '@wordpress/data' { - function dispatch( key: 'automattic/starter-page-layouts' ): typeof actions; - function select( key: 'automattic/starter-page-layouts' ): { - isOpen: () => ReturnType< typeof selectors.isOpen >; - isPatternPicker: () => ReturnType< typeof selectors.isPatternPicker >; - }; -} diff --git a/apps/editing-toolkit/editing-toolkit-plugin/wpcom-block-editor-nav-sidebar/src/store.ts b/apps/editing-toolkit/editing-toolkit-plugin/wpcom-block-editor-nav-sidebar/src/store.ts index b383f2ae5b52b..d6d769189cfb1 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/wpcom-block-editor-nav-sidebar/src/store.ts +++ b/apps/editing-toolkit/editing-toolkit-plugin/wpcom-block-editor-nav-sidebar/src/store.ts @@ -1,7 +1,6 @@ import { combineReducers, registerStore } from '@wordpress/data'; import { actions, Action } from './actions'; import { STORE_KEY } from './constants'; -import type { DispatchFromMap, SelectFromMap } from '@automattic/data-stores'; import type { Reducer } from 'redux'; const opened: Reducer< boolean, Action > = ( state = false, action ) => { @@ -38,8 +37,3 @@ registerStore( STORE_KEY, { reducer, selectors, } ); - -declare module '@wordpress/data' { - function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >; - function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >; -} diff --git a/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts b/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts index 41473dd75882c..affe0dfe1ac3d 100644 --- a/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts +++ b/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts @@ -1,4 +1,4 @@ -import { registerStore } from '@wordpress/data'; +import { register } from '@wordpress/data'; import { useRef } from 'react'; import { emptyManagedContactDetails, @@ -40,18 +40,13 @@ type WpcomStoreAction = export const STORE_KEY = 'wpcom-checkout'; -export interface WpcomCheckoutStore extends ReturnType< typeof registerStore > { +export interface WpcomCheckoutStore extends ReturnType< typeof register > { getState: () => WpcomStoreState; } export type WpcomCheckoutStoreSelectors = SelectFromMap< typeof selectors >; export type WpcomCheckoutStoreActions = DispatchFromMap< typeof actions >; -declare module '@wordpress/data' { - function select( key: typeof STORE_KEY ): WpcomCheckoutStoreSelectors | undefined; - function dispatch( key: typeof STORE_KEY ): WpcomCheckoutStoreActions | undefined; -} - const actions = { applyDomainContactValidationResults( payload: ManagedContactDetailsErrors ): WpcomStoreAction { return { type: 'APPLY_DOMAIN_CONTACT_VALIDATION_RESULTS', payload }; diff --git a/client/my-sites/checkout/composite-checkout/payment-methods/credit-card/store.ts b/client/my-sites/checkout/composite-checkout/payment-methods/credit-card/store.ts index f8b5c67056d16..745dae0f0dc4c 100644 --- a/client/my-sites/checkout/composite-checkout/payment-methods/credit-card/store.ts +++ b/client/my-sites/checkout/composite-checkout/payment-methods/credit-card/store.ts @@ -8,16 +8,10 @@ import type { CardStoreAction, CardElementType, } from './types'; -import type { DispatchFromMap, SelectFromMap } from '@automattic/data-stores'; import type { StoreStateValue } from '@automattic/wpcom-checkout'; const debug = debugFactory( 'calypso:composite-checkout:credit-card' ); -declare module '@wordpress/data' { - function dispatch( key: 'wpcom-credit-card' ): DispatchFromMap< typeof actions >; - function select( key: 'wpcom-credit-card' ): SelectFromMap< typeof selectors >; -} - export const actions = { changeBrand( payload: string ): CardStoreAction { return { type: 'BRAND_SET', payload }; diff --git a/client/my-sites/checkout/composite-checkout/payment-methods/netbanking.tsx b/client/my-sites/checkout/composite-checkout/payment-methods/netbanking.tsx index 345ba880e889d..8e2525600aacb 100644 --- a/client/my-sites/checkout/composite-checkout/payment-methods/netbanking.tsx +++ b/client/my-sites/checkout/composite-checkout/payment-methods/netbanking.tsx @@ -2,7 +2,7 @@ import { Button, FormStatus, useTotal, useFormStatus } from '@automattic/composi import { snakeToCamelCase } from '@automattic/js-utils'; import { Field } from '@automattic/wpcom-checkout'; import styled from '@emotion/styled'; -import { useSelect, useDispatch, registerStore } from '@wordpress/data'; +import { useSelect, useDispatch, register, registerStore } from '@wordpress/data'; import { sprintf } from '@wordpress/i18n'; import { useI18n } from '@wordpress/react-i18n'; import debugFactory from 'debug'; @@ -25,31 +25,25 @@ import type { StoreStateValue, } from '@automattic/wpcom-checkout'; import type { CalypsoDispatch } from 'calypso/state/types'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'composite-checkout:netbanking-payment-method' ); // Disabling this to make migration easier /* eslint-disable @typescript-eslint/no-use-before-define */ -type StoreKey = 'netbanking'; type NounsInStore = 'customerName'; type FieldsType = Record< string, StoreStateValue >; type NetBankingStoreState< N extends string > = Record< N, StoreStateValue > & { fields: FieldsType; }; -interface NetBankingPaymentMethodStore< N extends string > - extends ReturnType< typeof registerStore > { +interface NetBankingPaymentMethodStore< N extends string > extends ReturnType< typeof register > { getState: () => NetBankingStoreState< N >; } type NetBankingStore = NetBankingPaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( - key: StoreKey - ): StoreSelectors< NounsInStore > & { getFields: () => FieldsType }; - function dispatch( key: StoreKey ): typeof actions; -} +type NetBankingSelectors = StoreSelectors< NounsInStore > & { getFields: () => FieldsType }; const actions = { changeCustomerName( payload: string ) { @@ -85,7 +79,7 @@ export function createNetBankingPaymentMethodStore(): NetBankingStore { customerName: { value: '', isTouched: false }, fields: {}, }, - action + action: AnyAction ) { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -155,7 +149,10 @@ export function createNetBankingMethod( { store }: { store: NetBankingStore } ): function NetBankingFields() { const { __ } = useI18n(); - const fields = useSelect( ( select ) => select( 'netbanking' ).getFields() ); + const fields = useSelect( + ( select ) => ( select( 'netbanking' ) as NetBankingSelectors ).getFields(), + [] + ); const getField = ( key: string ) => fields[ key ] || {}; const getFieldValue = ( key: string ) => getField( key ).value ?? ''; const getErrorMessagesForField = ( key: string ) => { @@ -164,7 +161,10 @@ function NetBankingFields() { }; const { setFieldValue } = useDispatch( 'netbanking' ); - const customerName = useSelect( ( select ) => select( 'netbanking' ).getCustomerName() ); + const customerName = useSelect( + ( select ) => ( select( 'netbanking' ) as NetBankingSelectors ).getCustomerName(), + [] + ); const { changeCustomerName } = useDispatch( 'netbanking' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -238,8 +238,14 @@ function NetBankingPayButton( { const { __ } = useI18n(); const total = useTotal(); const { formStatus } = useFormStatus(); - const customerName = useSelect( ( select ) => select( 'netbanking' ).getCustomerName() ); - const fields = useSelect( ( select ) => select( 'netbanking' ).getFields() ); + const customerName = useSelect( + ( select ) => ( select( 'netbanking' ) as NetBankingSelectors ).getCustomerName(), + [] + ); + const fields = useSelect( + ( select ) => ( select( 'netbanking' ) as NetBankingSelectors ).getFields(), + [] + ); const massagedFields: typeof fields = Object.entries( fields ).reduce( ( accum, [ key, managedValue ] ) => ( { ...accum, @@ -294,7 +300,10 @@ function ButtonContents( { formStatus, total }: { formStatus: FormStatus; total: } function NetBankingSummary() { - const customerName = useSelect( ( select ) => select( 'netbanking' ).getCustomerName() ); + const customerName = useSelect( + ( select ) => ( select( 'netbanking' ) as NetBankingSelectors ).getCustomerName(), + [] + ); return ( diff --git a/client/my-sites/checkout/composite-checkout/payment-methods/paypal.tsx b/client/my-sites/checkout/composite-checkout/payment-methods/paypal.tsx index 3f94a05272d58..22416cf57d7e3 100644 --- a/client/my-sites/checkout/composite-checkout/payment-methods/paypal.tsx +++ b/client/my-sites/checkout/composite-checkout/payment-methods/paypal.tsx @@ -23,6 +23,7 @@ import type { StoreState, ManagedContactDetails, } from '@automattic/wpcom-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'calypso:paypal-payment-method' ); @@ -30,14 +31,10 @@ const debug = debugFactory( 'calypso:paypal-payment-method' ); /* eslint-disable @typescript-eslint/no-use-before-define */ const storeKey = 'paypal'; -type StoreKey = typeof storeKey; type NounsInStore = 'postalCode' | 'countryCode' | 'address1' | 'organization' | 'city' | 'state'; -type PayPalStore = PaymentMethodStore< NounsInStore >; +type PaypalSelectors = StoreSelectors< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} +type PayPalStore = PaymentMethodStore< NounsInStore >; const actions: StoreActions< NounsInStore > = { changePostalCode( payload ) { @@ -93,7 +90,7 @@ export function createPayPalStore(): PayPalStore { city: { value: '', isTouched: false }, state: { value: '', isTouched: false }, }, - action + action: AnyAction ): StoreState< NounsInStore > { switch ( action.type ) { case 'POSTAL_CODE_SET': @@ -177,12 +174,24 @@ function PayPalTaxFields() { const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; const countriesList = useCountryList(); - const postalCode = useSelect( ( select ) => select( storeKey ).getPostalCode() ); - const countryCode = useSelect( ( select ) => select( storeKey ).getCountryCode() ); - const address1 = useSelect( ( select ) => select( storeKey ).getAddress1() ); - const organization = useSelect( ( select ) => select( storeKey ).getOrganization() ); - const city = useSelect( ( select ) => select( storeKey ).getCity() ); - const state = useSelect( ( select ) => select( storeKey ).getState() ); + const postalCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getPostalCode(), + [] + ); + const countryCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getCountryCode(), + [] + ); + const address1 = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getAddress1(), + [] + ); + const organization = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getOrganization(), + [] + ); + const city = useSelect( ( select ) => ( select( storeKey ) as PaypalSelectors ).getCity(), [] ); + const state = useSelect( ( select ) => ( select( storeKey ) as PaypalSelectors ).getState(), [] ); const fields = useMemo( () => ( { postalCode: { ...postalCode, errors: [] }, @@ -244,8 +253,14 @@ function PayPalLabel( { } function TaxLabel() { - const postalCode = useSelect( ( select ) => select( storeKey ).getPostalCode() ); - const countryCode = useSelect( ( select ) => select( storeKey ).getCountryCode() ); + const postalCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getPostalCode(), + [] + ); + const countryCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getCountryCode(), + [] + ); const taxString = [ countryCode.value, postalCode.value ].filter( isValueTruthy ).join( ', ' ); return (
@@ -264,12 +279,24 @@ function PayPalSubmitButton( { const { __ } = useI18n(); const { formStatus } = useFormStatus(); const { transactionStatus } = useTransactionStatus(); - const postalCode = useSelect( ( select ) => select( storeKey )?.getPostalCode() ); - const countryCode = useSelect( ( select ) => select( storeKey )?.getCountryCode() ); - const address1 = useSelect( ( select ) => select( storeKey )?.getAddress1() ); - const organization = useSelect( ( select ) => select( storeKey )?.getOrganization() ); - const city = useSelect( ( select ) => select( storeKey ).getCity() ); - const state = useSelect( ( select ) => select( storeKey ).getState() ); + const postalCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getPostalCode(), + [] + ); + const countryCode = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getCountryCode(), + [] + ); + const address1 = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getAddress1(), + [] + ); + const organization = useSelect( + ( select ) => ( select( storeKey ) as PaypalSelectors ).getOrganization(), + [] + ); + const city = useSelect( ( select ) => ( select( storeKey ) as PaypalSelectors ).getCity(), [] ); + const state = useSelect( ( select ) => ( select( storeKey ) as PaypalSelectors ).getState(), [] ); const handleButtonPress = () => { if ( ! onClick ) { diff --git a/client/my-sites/checkout/composite-checkout/payment-methods/wechat/index.tsx b/client/my-sites/checkout/composite-checkout/payment-methods/wechat/index.tsx index d491600396be9..71e71929b1493 100644 --- a/client/my-sites/checkout/composite-checkout/payment-methods/wechat/index.tsx +++ b/client/my-sites/checkout/composite-checkout/payment-methods/wechat/index.tsx @@ -29,18 +29,13 @@ import type { StoreActions, StoreState, } from '@automattic/wpcom-checkout'; +import type { AnyAction } from 'redux'; const debug = debugFactory( 'calypso:composite-checkout:wechat-payment-method' ); -type StoreKey = 'wechat'; type NounsInStore = 'customerName'; type WeChatStore = PaymentMethodStore< NounsInStore >; -declare module '@wordpress/data' { - function select( key: StoreKey ): StoreSelectors< NounsInStore >; - function dispatch( key: StoreKey ): StoreActions< NounsInStore >; -} - interface WeChatStripeResponse { order_id: number; redirect_url: string; @@ -65,7 +60,7 @@ export function createWeChatPaymentMethodStore(): WeChatStore { state: StoreState< NounsInStore > = { customerName: { value: '', isTouched: false }, }, - action + action: AnyAction ) { switch ( action.type ) { case 'CUSTOMER_NAME_SET': @@ -148,7 +143,10 @@ const WeChatPaymentQRcode = styled( WeChatPaymentQRcodeUnstyled )` function WeChatFields() { const { __ } = useI18n(); - const customerName = useSelect( ( select ) => select( 'wechat' ).getCustomerName() ); + const customerName = useSelect( + ( select ) => ( select( 'wechat' ) as StoreSelectors< NounsInStore > ).getCustomerName(), + [] + ); const { changeCustomerName } = useDispatch( 'wechat' ); const { formStatus } = useFormStatus(); const isDisabled = formStatus !== FormStatus.READY; @@ -184,7 +182,10 @@ function WeChatPayButton( { const total = useTotal(); const { formStatus } = useFormStatus(); const { resetTransaction } = useTransactionStatus(); - const customerName = useSelect( ( select ) => select( 'wechat' ).getCustomerName() ); + const customerName = useSelect( + ( select ) => ( select( 'wechat' ) as StoreSelectors< NounsInStore > ).getCustomerName(), + [] + ); const cartKey = useCartKey(); const { responseCart: cart } = useShoppingCart( cartKey ); const [ stripeResponseWithCode, setStripeResponseWithCode ] = @@ -259,7 +260,10 @@ function ButtonContents( { } function WeChatSummary() { - const customerName = useSelect( ( select ) => select( 'wechat' ).getCustomerName() ); + const customerName = useSelect( + ( select ) => ( select( 'wechat' ) as StoreSelectors< NounsInStore > ).getCustomerName(), + [] + ); return ( diff --git a/client/state/partner-portal/credit-card-form/index.ts b/client/state/partner-portal/credit-card-form/index.ts index 8a2f8e50f478d..76d6df2f387f4 100644 --- a/client/state/partner-portal/credit-card-form/index.ts +++ b/client/state/partner-portal/credit-card-form/index.ts @@ -2,7 +2,6 @@ import { registerStore } from '@wordpress/data'; import * as actions from 'calypso/state/partner-portal/credit-card-form/actions'; import reducer from 'calypso/state/partner-portal/credit-card-form/reducer'; import * as selectors from 'calypso/state/partner-portal/credit-card-form/selectors'; -import type { DispatchFromMap, SelectFromMap } from '@automattic/data-stores'; export function createStoredCreditCardPaymentMethodStore(): Record< string, unknown > { const store = registerStore( 'credit-card', { @@ -13,8 +12,3 @@ export function createStoredCreditCardPaymentMethodStore(): Record< string, unkn return { ...store, actions, selectors }; } - -declare module '@wordpress/data' { - function dispatch( key: 'credit-card' ): DispatchFromMap< typeof actions >; - function select( key: 'credit-card' ): SelectFromMap< typeof selectors >; -} diff --git a/packages/data-stores/src/help-center/types.ts b/packages/data-stores/src/help-center/types.ts index 375dd04f7f300..efbd69462291e 100644 --- a/packages/data-stores/src/help-center/types.ts +++ b/packages/data-stores/src/help-center/types.ts @@ -1,5 +1,6 @@ import * as actions from './actions'; -import type { DispatchFromMap } from '../mapped-types'; +import * as selectors from './selectors'; +import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; export type Location = { pathname: string; @@ -37,3 +38,5 @@ export interface APIFetchOptions { global: boolean; path: string; } + +export type HelpCenterSelect = SelectFromMap< typeof selectors >; diff --git a/packages/data-stores/src/index.ts b/packages/data-stores/src/index.ts index bffdd0d63d40d..a865412ac4721 100644 --- a/packages/data-stores/src/index.ts +++ b/packages/data-stores/src/index.ts @@ -63,4 +63,5 @@ export { getContextResults } from './contextual-help/contextual-help'; export { generateAdminSections } from './contextual-help/admin-sections'; export type { LinksForSection } from './contextual-help/contextual-help'; export * from './contextual-help/constants'; -export type { HelpCenterSite } from './help-center/types'; +export type { HelpCenterSite, HelpCenterSelect } from './help-center/types'; +export type { WpcomFeaturesSelect } from './wpcom-features/types'; diff --git a/packages/data-stores/src/plans/types.ts b/packages/data-stores/src/plans/types.ts index 5219b0e81248e..86a554aa8ae15 100644 --- a/packages/data-stores/src/plans/types.ts +++ b/packages/data-stores/src/plans/types.ts @@ -1,3 +1,5 @@ +import * as selectors from './selectors'; +import type { SelectFromMap } from '../mapped-types'; import type { plansProductSlugs, plansSlugs } from './constants'; export type StorePlanSlug = typeof plansProductSlugs[ number ]; @@ -121,3 +123,5 @@ export interface DetailsAPIResponse { features_by_type: FeaturesByType[]; features: DetailsAPIFeature[]; } + +export type PlansSelect = SelectFromMap< typeof selectors >; diff --git a/packages/data-stores/src/wpcom-features/types.ts b/packages/data-stores/src/wpcom-features/types.ts index 603b2f0df4c79..3b6a484b4b2a1 100644 --- a/packages/data-stores/src/wpcom-features/types.ts +++ b/packages/data-stores/src/wpcom-features/types.ts @@ -1,3 +1,5 @@ +import * as selectors from './selectors'; +import type { SelectFromMap } from '../mapped-types'; import type { PlanSlug } from '../plans'; export type FeatureId = @@ -14,3 +16,5 @@ export interface Feature { id: FeatureId; minSupportedPlan: PlanSlug; } + +export type WpcomFeaturesSelect = SelectFromMap< typeof selectors >; diff --git a/packages/domain-picker/src/components/domain-categories/index.tsx b/packages/domain-picker/src/components/domain-categories/index.tsx index c22f2c0b05e72..aff3a29881f0d 100644 --- a/packages/domain-picker/src/components/domain-categories/index.tsx +++ b/packages/domain-picker/src/components/domain-categories/index.tsx @@ -23,8 +23,9 @@ const DomainPickerCategories: React.FunctionComponent< Props > = ( { onSelect, s onSelect( slug ); }; - const domainCategories = useSelect( ( select ) => - select( DOMAIN_SUGGESTIONS_STORE ).getCategories() + const domainCategories = useSelect( + ( select ) => select( DOMAIN_SUGGESTIONS_STORE ).getCategories(), + [] ); const allCategoriesLabel = __( 'All Categories', __i18n_text_domain__ ); diff --git a/packages/help-center/src/components/help-center-contact-form.tsx b/packages/help-center/src/components/help-center-contact-form.tsx index 503e2ba1171d7..ed1addbb9fe0f 100644 --- a/packages/help-center/src/components/help-center-contact-form.tsx +++ b/packages/help-center/src/components/help-center-contact-form.tsx @@ -40,6 +40,7 @@ import { SitePicker } from '../types'; import { BackButton } from './back-button'; import { HelpCenterOwnershipNotice } from './help-center-notice'; import { SibylArticles } from './help-center-sibyl-articles'; +import type { HelpCenterSelect } from '@automattic/data-stores'; import './help-center-contact-form.scss'; export const SITE_STORE = 'automattic/site'; @@ -166,13 +167,14 @@ export const HelpCenterContactForm = () => { 'CURRENT_SITE' ); const { currentSite, subject, message, userDeclaredSiteUrl } = useSelect( ( select ) => { + const helpCenterSelect: HelpCenterSelect = select( HELP_CENTER_STORE ); return { - currentSite: select( HELP_CENTER_STORE ).getSite(), - subject: select( HELP_CENTER_STORE ).getSubject(), - message: select( HELP_CENTER_STORE ).getMessage(), - userDeclaredSiteUrl: select( HELP_CENTER_STORE ).getUserDeclaredSiteUrl(), + currentSite: helpCenterSelect.getSite(), + subject: helpCenterSelect.getSubject(), + message: helpCenterSelect.getMessage(), + userDeclaredSiteUrl: helpCenterSelect.getUserDeclaredSiteUrl(), }; - } ); + }, [] ); const { setSite, diff --git a/packages/help-center/src/components/help-center-container.tsx b/packages/help-center/src/components/help-center-container.tsx index b0c0f25ae5880..ed23d2b718be9 100644 --- a/packages/help-center/src/components/help-center-container.tsx +++ b/packages/help-center/src/components/help-center-container.tsx @@ -20,6 +20,7 @@ import HelpCenterContent from './help-center-content'; import HelpCenterFooter from './help-center-footer'; import HelpCenterHeader from './help-center-header'; import { HistoryRecorder } from './history-recorder'; +import type { HelpCenterSelect } from '@automattic/data-stores'; interface OptionalDraggableProps extends Partial< DraggableProps > { draggable: boolean; @@ -33,10 +34,13 @@ const OptionalDraggable: FC< OptionalDraggableProps > = ( { draggable, ...props }; const HelpCenterContainer: React.FC< Container > = ( { handleClose, hidden } ) => { - const { show, isMinimized } = useSelect( ( select ) => ( { - show: select( HELP_CENTER_STORE ).isHelpCenterShown(), - isMinimized: select( HELP_CENTER_STORE ).getIsMinimized(), - } ) ); + const { show, isMinimized } = useSelect( + ( select ) => ( { + show: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).isHelpCenterShown(), + isMinimized: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getIsMinimized(), + } ), + [] + ); const { setIsMinimized } = useDispatch( HELP_CENTER_STORE ); @@ -47,8 +51,9 @@ const HelpCenterContainer: React.FC< Container > = ( { handleClose, hidden } ) = } ); const { data: supportAvailability } = useSupportAvailability( 'CHAT' ); const { data } = useHappychatAvailable( Boolean( supportAvailability?.is_user_eligible ) ); - const { history, index } = useSelect( ( select ) => - select( HELP_CENTER_STORE ).getRouterState() + const { history, index } = useSelect( + ( select ) => ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getRouterState(), + [] ); const onDismiss = () => { diff --git a/packages/help-center/src/components/help-center-header.tsx b/packages/help-center/src/components/help-center-header.tsx index ee9c0315a4a90..43329d4b25dfb 100644 --- a/packages/help-center/src/components/help-center-header.tsx +++ b/packages/help-center/src/components/help-center-header.tsx @@ -7,6 +7,7 @@ import { useCallback } from 'react'; import { Route, Switch, useLocation } from 'react-router-dom'; import { HELP_CENTER_STORE } from '../stores'; import type { Header } from '../types'; +import type { HelpCenterSelect } from '@automattic/data-stores'; export function ArticleTitle() { const location = useLocation(); @@ -49,7 +50,10 @@ const SupportModeTitle = () => { }; const HelpCenterHeader = ( { isMinimized = false, onMinimize, onMaximize, onDismiss }: Header ) => { - const unreadCount = useSelect( ( select ) => select( HELP_CENTER_STORE ).getUnreadCount() ); + const unreadCount = useSelect( + ( select ) => ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getUnreadCount(), + [] + ); const classNames = classnames( 'help-center__container-header' ); const { __ } = useI18n(); const formattedUnreadCount = unreadCount > 9 ? '9+' : unreadCount; diff --git a/packages/help-center/src/components/help-center-more-resources.tsx b/packages/help-center/src/components/help-center-more-resources.tsx index a2fb0a90f2bd6..16a73f0aea5d6 100644 --- a/packages/help-center/src/components/help-center-more-resources.tsx +++ b/packages/help-center/src/components/help-center-more-resources.tsx @@ -14,6 +14,7 @@ import { getUserPurchases } from 'calypso/state/purchases/selectors'; import { getSectionName } from 'calypso/state/ui/selectors'; import { NewReleases } from '../icons'; import { HELP_CENTER_STORE } from '../stores'; +import type { HelpCenterSelect } from '@automattic/data-stores'; const circle = ( @@ -36,14 +37,19 @@ export const HelpCenterMoreResources = () => { }; } ); - const { hasSeenWhatsNewModal, doneLoading } = useSelect( ( select ) => ( { - hasSeenWhatsNewModal: select( HELP_CENTER_STORE ).getHasSeenWhatsNewModal(), - doneLoading: select( 'core/data' ).hasFinishedResolution( - HELP_CENTER_STORE, - 'getHasSeenWhatsNewModal', - [] - ), - } ) ); + const { hasSeenWhatsNewModal, doneLoading } = useSelect( + ( select ) => ( { + hasSeenWhatsNewModal: ( + select( HELP_CENTER_STORE ) as HelpCenterSelect + ).getHasSeenWhatsNewModal(), + doneLoading: select( 'core/data' ).hasFinishedResolution( + HELP_CENTER_STORE, + 'getHasSeenWhatsNewModal', + [] + ), + } ), + [] + ); const { setHasSeenWhatsNewModal } = useDispatch( HELP_CENTER_STORE ); diff --git a/packages/help-center/src/components/help-center.tsx b/packages/help-center/src/components/help-center.tsx index b3094e6b2af1b..e96be3e76643c 100644 --- a/packages/help-center/src/components/help-center.tsx +++ b/packages/help-center/src/components/help-center.tsx @@ -17,7 +17,7 @@ import { useStillNeedHelpURL } from '../hooks/use-still-need-help-url'; import { HELP_CENTER_STORE, USER_STORE, SITE_STORE } from '../stores'; import { Container } from '../types'; import HelpCenterContainer from './help-center-container'; - +import type { HelpCenterSelect } from '@automattic/data-stores'; import '../styles.scss'; const HelpCenter: React.FC< Container > = ( { handleClose, hidden } ) => { @@ -28,10 +28,13 @@ const HelpCenter: React.FC< Container > = ( { handleClose, hidden } ) => { const { setUnreadCount } = useDispatch( HELP_CENTER_STORE ); const { setSite } = useDispatch( HELP_CENTER_STORE ); - const { show, isMinimized } = useSelect( ( select ) => ( { - isMinimized: select( HELP_CENTER_STORE ).getIsMinimized(), - show: select( HELP_CENTER_STORE ).isHelpCenterShown(), - } ) ); + const { show, isMinimized } = useSelect( + ( select ) => ( { + isMinimized: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getIsMinimized(), + show: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).isHelpCenterShown(), + } ), + [] + ); const { unreadCount, closeChat } = useHCWindowCommunicator( isMinimized || ! show ); diff --git a/packages/help-center/src/components/help-icon.tsx b/packages/help-center/src/components/help-icon.tsx index 83f8d607ff9cf..b8ab48585d583 100644 --- a/packages/help-center/src/components/help-icon.tsx +++ b/packages/help-center/src/components/help-icon.tsx @@ -1,17 +1,20 @@ import { useSelect } from '@wordpress/data'; import { forwardRef } from 'react'; import { HELP_CENTER_STORE } from '../stores'; +import type { HelpCenterSelect } from '@automattic/data-stores'; const HelpIcon = forwardRef< SVGSVGElement >( ( _, ref ) => { const { unreadCount, doneLoading, hasSeenWhatsNewModal } = useSelect( ( select ) => ( { - unreadCount: select( HELP_CENTER_STORE ).getUnreadCount(), + unreadCount: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getUnreadCount(), doneLoading: select( 'core/data' ).hasFinishedResolution( HELP_CENTER_STORE, 'getHasSeenWhatsNewModal', [] ), - hasSeenWhatsNewModal: select( HELP_CENTER_STORE ).getHasSeenWhatsNewModal(), + hasSeenWhatsNewModal: ( + select( HELP_CENTER_STORE ) as HelpCenterSelect + ).getHasSeenWhatsNewModal(), } ), [] ); diff --git a/packages/help-center/src/happychat-window-communicator.ts b/packages/help-center/src/happychat-window-communicator.ts index 50324e2da4101..e2070ad7ea320 100644 --- a/packages/help-center/src/happychat-window-communicator.ts +++ b/packages/help-center/src/happychat-window-communicator.ts @@ -1,15 +1,9 @@ -/* eslint-disable no-restricted-imports */ -/** - * External Dependencies - */ import { useHappychatAuth, happychatAuthQueryKey } from '@automattic/happychat-connection'; import { useDispatch, useSelect } from '@wordpress/data'; import { useEffect, useState } from '@wordpress/element'; import { useQueryClient } from 'react-query'; -/** - * Internal Dependencies - */ import { HELP_CENTER_STORE } from './stores'; +import type { HelpCenterSelect } from '@automattic/data-stores'; /** * This hook is the bridge between HappyChat and Help Center. @@ -22,14 +16,15 @@ import { HELP_CENTER_STORE } from './stores'; export function useHCWindowCommunicator( isMinimized: boolean ) { const { supportSite, subject, message, chatTag, iframe } = useSelect( ( select ) => { + const helpCenterSelect: HelpCenterSelect = select( HELP_CENTER_STORE ); return { - supportSite: select( HELP_CENTER_STORE ).getSite(), - subject: select( HELP_CENTER_STORE ).getSubject(), - message: select( HELP_CENTER_STORE ).getMessage(), - chatTag: select( HELP_CENTER_STORE ).getChatTag(), - iframe: select( HELP_CENTER_STORE ).getIframe(), + supportSite: helpCenterSelect.getSite(), + subject: helpCenterSelect.getSubject(), + message: helpCenterSelect.getMessage(), + chatTag: helpCenterSelect.getChatTag(), + iframe: helpCenterSelect.getIframe(), }; - } ); + }, [] ); const queryClient = useQueryClient(); const [ unreadCount, setUnreadCount ] = useState( 0 ); const [ chatStatus, setChatStatus ] = useState( '' ); diff --git a/packages/plans-grid/src/hooks/use-supported-plans.ts b/packages/plans-grid/src/hooks/use-supported-plans.ts index e0bf53cf32bdd..000ed894c7f15 100644 --- a/packages/plans-grid/src/hooks/use-supported-plans.ts +++ b/packages/plans-grid/src/hooks/use-supported-plans.ts @@ -1,22 +1,25 @@ import { useSelect } from '@wordpress/data'; import { PLANS_STORE } from '../stores'; -import type { Plans } from '@automattic/data-stores'; +import type { Plans, PlansSelect } from '@automattic/data-stores'; export const useSupportedPlans = ( locale: string, billingPeriod: Plans.PlanBillingPeriod ): { supportedPlans: Plans.Plan[]; maxAnnualDiscount: number } => { const { supportedPlans, annualDiscounts } = useSelect( ( select ) => { - const supportedPlans = select( PLANS_STORE ).getSupportedPlans( locale ); + const supportedPlans = ( select( PLANS_STORE ) as PlansSelect ).getSupportedPlans( locale ); const annualDiscounts = supportedPlans .map( ( plan ) => - select( PLANS_STORE ).getPlanProduct( plan.periodAgnosticSlug, billingPeriod ) + ( select( PLANS_STORE ) as PlansSelect ).getPlanProduct( + plan.periodAgnosticSlug, + billingPeriod + ) ) .map( ( planProduct ) => planProduct?.annualDiscount ) // ensure that no `undefined` values are passed on .filter( ( value ) => !! value ) as number[]; return { supportedPlans, annualDiscounts }; - } ); + }, [] ); // Compute the highest annualDiscount value amongst all supported plans const maxAnnualDiscount = annualDiscounts.reduce( diff --git a/packages/plans-grid/src/plans-accordion-item/index.tsx b/packages/plans-grid/src/plans-accordion-item/index.tsx index beda5cf9cd991..a957a582b4448 100644 --- a/packages/plans-grid/src/plans-accordion-item/index.tsx +++ b/packages/plans-grid/src/plans-accordion-item/index.tsx @@ -7,7 +7,7 @@ import classNames from 'classnames'; import * as React from 'react'; import PlansFeatureList from '../plans-feature-list'; import { PLANS_STORE } from '../stores'; -import type { DomainSuggestions, Plans } from '@automattic/data-stores'; +import type { DomainSuggestions, Plans, PlansSelect } from '@automattic/data-stores'; import './style.scss'; @@ -56,8 +56,9 @@ const PlanAccordionItem: React.FunctionComponent< Props > = ( { const { __, hasTranslation } = useI18n(); const locale = useLocale(); - const planProduct = useSelect( ( select ) => - select( PLANS_STORE ).getPlanProduct( slug, billingPeriod ) + const planProduct = useSelect( + ( select ) => ( select( PLANS_STORE ) as PlansSelect ).getPlanProduct( slug, billingPeriod ), + [] ); // show a nbsp in price while loading to prevent a jump in the UI diff --git a/packages/plans-grid/src/plans-accordion/index.tsx b/packages/plans-grid/src/plans-accordion/index.tsx index 167e8e5a3fe8e..e43809c6e55fc 100644 --- a/packages/plans-grid/src/plans-accordion/index.tsx +++ b/packages/plans-grid/src/plans-accordion/index.tsx @@ -9,7 +9,13 @@ import PlanItem from '../plans-accordion-item'; import PlanItemPlaceholder from '../plans-accordion-item/plans-item-placeholder'; import { PLANS_STORE, WPCOM_FEATURES_STORE } from '../stores'; import type { DisabledPlansMap } from '../plans-table/types'; -import type { DomainSuggestions, Plans, WPCOMFeatures } from '@automattic/data-stores'; +import type { + DomainSuggestions, + Plans, + PlansSelect, + WPCOMFeatures, + WpcomFeaturesSelect, +} from '@automattic/data-stores'; import './style.scss'; @@ -51,18 +57,27 @@ const PlansAccordion: React.FunctionComponent< Props > = ( { // Primary plan const { popularPlan, getPlanProduct } = useSelect( ( select ) => { - const plansStore = select( PLANS_STORE ); + const plansStore: PlansSelect = select( PLANS_STORE ); return { popularPlan: plansStore.getDefaultPaidPlan( locale ), getPlanProduct: plansStore.getPlanProduct, }; - } ); - const recommendedPlanSlug = useSelect( ( select ) => - select( WPCOM_FEATURES_STORE ).getRecommendedPlanSlug( selectedFeatures ) + }, [] ); + const recommendedPlanSlug = useSelect( + ( select ) => + ( select( WPCOM_FEATURES_STORE ) as WpcomFeaturesSelect ).getRecommendedPlanSlug( + selectedFeatures + ), + [] ); - const recommendedPlan = useSelect( ( select ) => - select( PLANS_STORE ).getPlanByPeriodAgnosticSlug( recommendedPlanSlug, locale ) + const recommendedPlan = useSelect( + ( select ) => + ( select( PLANS_STORE ) as PlansSelect ).getPlanByPeriodAgnosticSlug( + recommendedPlanSlug, + locale + ), + [] ); const primaryPlan = recommendedPlan || popularPlan; diff --git a/packages/plans-grid/src/plans-details/index.tsx b/packages/plans-grid/src/plans-details/index.tsx index 38c535ff065a3..afdec231ce1a2 100644 --- a/packages/plans-grid/src/plans-details/index.tsx +++ b/packages/plans-grid/src/plans-details/index.tsx @@ -5,7 +5,7 @@ import { useI18n } from '@wordpress/react-i18n'; import classnames from 'classnames'; import * as React from 'react'; import { PLANS_STORE } from '../stores'; -import type { Plans } from '@automattic/data-stores'; +import type { Plans, PlansSelect } from '@automattic/data-stores'; import './style.scss'; @@ -22,7 +22,7 @@ const PlansDetails: React.FunctionComponent< Props > = ( { onSelect, locale, bil const { __, hasTranslation } = useI18n(); const { supportedPlans, planProducts, features, featuresByType } = useSelect( ( select ) => { - const { getPlanProduct, getFeatures, getFeaturesByType, getSupportedPlans } = + const { getPlanProduct, getFeatures, getFeaturesByType, getSupportedPlans }: PlansSelect = select( PLANS_STORE ); const supportedPlans = getSupportedPlans( locale ); const planProducts = supportedPlans.map( ( plan ) => @@ -35,7 +35,7 @@ const PlansDetails: React.FunctionComponent< Props > = ( { onSelect, locale, bil features: getFeatures( locale ), featuresByType: getFeaturesByType( locale ), }; - } ); + }, [] ); const isLoading = ! supportedPlans?.length; const placeholderPlans = [ 1, 2, 3, 4, 5 ]; diff --git a/packages/plans-grid/src/plans-grid/index.tsx b/packages/plans-grid/src/plans-grid/index.tsx index 83fec1c991efd..32991a2138551 100644 --- a/packages/plans-grid/src/plans-grid/index.tsx +++ b/packages/plans-grid/src/plans-grid/index.tsx @@ -15,7 +15,7 @@ import type { DisabledPlansMap, PopularBadgeVariation, } from '../plans-table/types'; -import type { DomainSuggestions, WPCOMFeatures, Plans } from '@automattic/data-stores'; +import type { DomainSuggestions, WPCOMFeatures, Plans, PlansSelect } from '@automattic/data-stores'; import './style.scss'; @@ -63,7 +63,10 @@ const PlansGrid: React.FunctionComponent< Props > = ( { const { __ } = useI18n(); const selectedPlanBillingPeriod = useSelect( - ( select ) => select( PLANS_STORE ).getPlanProductById( currentPlanProductId )?.billingPeriod + ( select ) => + ( select( PLANS_STORE ) as PlansSelect ).getPlanProductById( currentPlanProductId ) + ?.billingPeriod, + [] ); const [ billingPeriod, setBillingPeriod ] = React.useState< Plans.PlanBillingPeriod >( diff --git a/packages/plans-grid/src/plans-table/index.tsx b/packages/plans-grid/src/plans-table/index.tsx index 67c2d29a658e3..08ee9e10f2a17 100644 --- a/packages/plans-grid/src/plans-table/index.tsx +++ b/packages/plans-grid/src/plans-table/index.tsx @@ -10,7 +10,7 @@ import type { CustomTagLinesMap, DisabledPlansMap, } from './types'; -import type { DomainSuggestions, Plans } from '@automattic/data-stores'; +import type { DomainSuggestions, Plans, PlansSelect } from '@automattic/data-stores'; import './style.scss'; @@ -47,7 +47,10 @@ const PlansTable: React.FunctionComponent< Props > = ( { const [ allPlansExpanded, setAllPlansExpanded ] = useState( defaultAllPlansExpanded ); - const getPlanProduct = useSelect( ( select ) => select( PLANS_STORE ).getPlanProduct ); + const getPlanProduct = useSelect( + ( select ) => ( select( PLANS_STORE ) as PlansSelect ).getPlanProduct, + [] + ); return (
diff --git a/packages/plans-grid/src/plans-table/plan-item.tsx b/packages/plans-grid/src/plans-table/plan-item.tsx index f78c64ed670fa..43daf4dafb76b 100644 --- a/packages/plans-grid/src/plans-table/plan-item.tsx +++ b/packages/plans-grid/src/plans-table/plan-item.tsx @@ -10,7 +10,7 @@ import * as React from 'react'; import PlansFeatureList from '../plans-feature-list'; import { PLANS_STORE } from '../stores'; import type { CTAVariation, PopularBadgeVariation } from './types'; -import type { DomainSuggestions, Plans } from '@automattic/data-stores'; +import type { DomainSuggestions, Plans, PlansSelect } from '@automattic/data-stores'; // TODO: remove when all needed core types are available /*#__PURE__*/ import '../types-patch'; @@ -84,8 +84,9 @@ const PlanItem: React.FunctionComponent< Props > = ( { const { __, hasTranslation } = useI18n(); const locale = useLocale(); - const planProduct = useSelect( ( select ) => - select( PLANS_STORE ).getPlanProduct( slug, billingPeriod ) + const planProduct = useSelect( + ( select ) => ( select( PLANS_STORE ) as PlansSelect ).getPlanProduct( slug, billingPeriod ), + [] ); const [ isOpenInternalState, setIsOpenInternalState ] = React.useState( false ); diff --git a/packages/subscriber/src/components/add-form/index.tsx b/packages/subscriber/src/components/add-form/index.tsx index bc733179fe6fb..6ee13dfa7fc51 100644 --- a/packages/subscriber/src/components/add-form/index.tsx +++ b/packages/subscriber/src/components/add-form/index.tsx @@ -22,6 +22,7 @@ import { useInProgressState } from '../../hooks/use-in-progress-state'; import { RecordTrackEvents, useRecordAddFormEvents } from '../../hooks/use-record-add-form-events'; import { SUBSCRIBER_STORE } from '../../store'; import { tip } from './icon'; +import type { SubscriberSelect } from '@automattic/data-stores'; import './style.scss'; interface Props { @@ -90,7 +91,10 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { const [ emailFormControls, setEmailFormControls ] = useState( emailControlPlaceholder ); const [ submitAttemptCount, setSubmitAttemptCount ] = useState( 0 ); const [ submitBtnReady, setIsSubmitBtnReady ] = useState( isSubmitButtonReady() ); - const importSelector = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getImportSubscribersSelector() ); + const importSelector = useSelect( + ( s ) => ( s( SUBSCRIBER_STORE ) as SubscriberSelect ).getImportSubscribersSelector(), + [] + ); const [ formFileUploadElement ] = useState( createElement( FormFileUpload, { name: 'import', diff --git a/packages/subscriber/src/hooks/use-active-job-recognition.ts b/packages/subscriber/src/hooks/use-active-job-recognition.ts index 30585885806a0..a296a9f030c02 100644 --- a/packages/subscriber/src/hooks/use-active-job-recognition.ts +++ b/packages/subscriber/src/hooks/use-active-job-recognition.ts @@ -2,6 +2,7 @@ import { Subscriber } from '@automattic/data-stores'; import { useDispatch, useSelect } from '@wordpress/data'; import { useEffect } from 'react'; import { SUBSCRIBER_STORE } from '../store'; +import type { SubscriberSelect } from '@automattic/data-stores'; type ImportJob = Subscriber.ImportJob; type ImportJobStatus = Subscriber.ImportJobStatus; @@ -12,7 +13,11 @@ export function useActiveJobRecognition( siteId: number ) { const ACTIVE_STATE: ImportJobStatus[] = [ 'pending', 'importing' ]; const { getSubscribersImports, importCsvSubscribersUpdate } = useDispatch( SUBSCRIBER_STORE ); - const imports = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getImportJobsSelector() ) || []; + const imports = + useSelect( + ( s ) => ( s( SUBSCRIBER_STORE ) as SubscriberSelect ).getImportJobsSelector(), + [] + ) || []; const jobs = imports.filter( ( x: ImportJob ) => ACTIVE_STATE.includes( x.status ) ); const activeJob = jobs.length ? jobs[ 0 ] : undefined; diff --git a/packages/subscriber/src/hooks/use-in-progress-state.ts b/packages/subscriber/src/hooks/use-in-progress-state.ts index dec17c3d1c1b2..246af031bd594 100644 --- a/packages/subscriber/src/hooks/use-in-progress-state.ts +++ b/packages/subscriber/src/hooks/use-in-progress-state.ts @@ -6,8 +6,8 @@ export function useInProgressState() { const { addSelector, importSelector } = useSelect( ( select ) => { const subscriber: SubscriberSelect = select( SUBSCRIBER_STORE ); return { - addSelector: subscriber.addSelector, - importSelector: subscriber.importSelector, + addSelector: subscriber.getAddSubscribersSelector(), + importSelector: subscriber.getImportSubscribersSelector(), }; }, [] ); diff --git a/packages/subscriber/src/hooks/use-record-add-form-events.ts b/packages/subscriber/src/hooks/use-record-add-form-events.ts index f6c5067387508..af7c603f0e4db 100644 --- a/packages/subscriber/src/hooks/use-record-add-form-events.ts +++ b/packages/subscriber/src/hooks/use-record-add-form-events.ts @@ -2,6 +2,7 @@ import { useSelect } from '@wordpress/data'; import { useEffect, useRef } from 'react'; import { SUBSCRIBER_STORE } from '../store'; import { useInProgressState } from './use-in-progress-state'; +import type { SubscriberSelect } from '@automattic/data-stores'; export type RecordTrackEvents = ( eventName: string, @@ -12,8 +13,14 @@ export function useRecordAddFormEvents( recordTracksEvent?: RecordTrackEvents, f const trackEventPrefix = 'calypso_subscriber_add_form'; const inProgress = useInProgressState(); const prevInProgress = useRef( inProgress ); - const addSelector = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getAddSubscribersSelector() ); - const importSelector = useSelect( ( s ) => s( SUBSCRIBER_STORE ).getImportSubscribersSelector() ); + const addSelector = useSelect( + ( s ) => ( s( SUBSCRIBER_STORE ) as SubscriberSelect ).getAddSubscribersSelector(), + [] + ); + const importSelector = useSelect( + ( s ) => ( s( SUBSCRIBER_STORE ) as SubscriberSelect ).getImportSubscribersSelector(), + [] + ); useEffect( () => { recordTracksEvent?.( `${ trackEventPrefix }_display`, { From 2760aa8fd3e9ec24cad3bb2ddf93831b95b6b171 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 14:23:24 +0200 Subject: [PATCH 09/56] Fix a bunch of other TS errors --- .../src/domain-suggestions/types.ts | 4 ++++ packages/data-stores/src/index.ts | 1 + packages/data-stores/src/launch/types.ts | 4 ++++ packages/data-stores/src/site/types.ts | 5 ++++- .../components/domain-categories/index.tsx | 3 ++- .../src/hooks/use-domain-availabilities.ts | 5 ++++- .../src/hooks/use-domain-suggestions.ts | 12 ++++++++--- .../src/components/help-center-launchpad.tsx | 6 +++++- .../src/components/help-center-search.tsx | 6 +++++- packages/launch/src/focused-launch/index.tsx | 8 +++++--- .../src/focused-launch/plan-details/index.tsx | 11 +++++++--- .../src/focused-launch/summary/index.tsx | 20 +++++++++++-------- packages/launch/src/hooks/use-cart.ts | 16 +++++++++------ .../launch/src/hooks/use-domain-search.ts | 3 ++- .../launch/src/hooks/use-domain-selection.ts | 12 +++++++---- .../launch/src/hooks/use-domain-suggestion.ts | 19 ++++++++++-------- packages/launch/src/hooks/use-on-launch.ts | 11 +++++++--- packages/launch/src/hooks/use-plans.tsx | 4 ++-- packages/launch/src/hooks/use-site.ts | 5 +++-- 19 files changed, 107 insertions(+), 48 deletions(-) diff --git a/packages/data-stores/src/domain-suggestions/types.ts b/packages/data-stores/src/domain-suggestions/types.ts index c6b0c0b9a9099..b3c9b21aaf80a 100644 --- a/packages/data-stores/src/domain-suggestions/types.ts +++ b/packages/data-stores/src/domain-suggestions/types.ts @@ -1,4 +1,6 @@ +import * as selectors from './selectors'; import type { DataStatus } from './constants'; +import type { SelectFromMap } from '../mapped-types'; export interface DomainSuggestionQuery { /** @@ -257,3 +259,5 @@ export interface DomainSuggestionState { export type DomainAvailabilities = Record< string, DomainAvailability | undefined >; export type DomainSuggestionSelectorOptions = Partial< Exclude< DomainSuggestionQuery, 'query' > >; + +export type DomainSuggestionsSelect = SelectFromMap< typeof selectors >; diff --git a/packages/data-stores/src/index.ts b/packages/data-stores/src/index.ts index a865412ac4721..6071b665c7baa 100644 --- a/packages/data-stores/src/index.ts +++ b/packages/data-stores/src/index.ts @@ -33,6 +33,7 @@ export * from './onboard/types'; export * from './domain-suggestions/types'; export * from './plans/types'; export * from './subscriber/types'; +export * from './launch/types'; export { Analyzer, diff --git a/packages/data-stores/src/launch/types.ts b/packages/data-stores/src/launch/types.ts index f0b33e0e2ff7c..661863b9d7d71 100644 --- a/packages/data-stores/src/launch/types.ts +++ b/packages/data-stores/src/launch/types.ts @@ -1,4 +1,8 @@ +import * as selectors from './selectors'; import type { LaunchStep } from './data'; +import type { SelectFromMap } from '../mapped-types'; import type { ValuesType } from 'utility-types'; export type LaunchStepType = ValuesType< typeof LaunchStep >; + +export type LaunchSelect = SelectFromMap< typeof selectors >; diff --git a/packages/data-stores/src/site/types.ts b/packages/data-stores/src/site/types.ts index eaeb0c9eb1476..9c2c0fef8d446 100644 --- a/packages/data-stores/src/site/types.ts +++ b/packages/data-stores/src/site/types.ts @@ -1,5 +1,6 @@ +import * as selectors from './selectors'; import type { ActionCreators } from './actions'; -import type { DispatchFromMap } from '../mapped-types'; +import type { DispatchFromMap, SelectFromMap } from '../mapped-types'; import type { FeatureId } from '../wpcom-features'; export interface Dispatch { @@ -489,6 +490,8 @@ export interface CurrentTheme { id: string; } +export type SiteSelect = SelectFromMap< typeof selectors >; + export interface SourceSiteMigrationDetails { status: string; target_blog_id?: number; diff --git a/packages/domain-picker/src/components/domain-categories/index.tsx b/packages/domain-picker/src/components/domain-categories/index.tsx index aff3a29881f0d..d53d29593281d 100644 --- a/packages/domain-picker/src/components/domain-categories/index.tsx +++ b/packages/domain-picker/src/components/domain-categories/index.tsx @@ -6,6 +6,7 @@ import { useI18n } from '@wordpress/react-i18n'; import classNames from 'classnames'; import * as React from 'react'; import { DOMAIN_SUGGESTIONS_STORE } from '../../constants'; +import type { DomainSuggestionsSelect } from '@automattic/data-stores'; import './style.scss'; @@ -24,7 +25,7 @@ const DomainPickerCategories: React.FunctionComponent< Props > = ( { onSelect, s }; const domainCategories = useSelect( - ( select ) => select( DOMAIN_SUGGESTIONS_STORE ).getCategories(), + ( select ) => ( select( DOMAIN_SUGGESTIONS_STORE ) as DomainSuggestionsSelect ).getCategories(), [] ); diff --git a/packages/domain-picker/src/hooks/use-domain-availabilities.ts b/packages/domain-picker/src/hooks/use-domain-availabilities.ts index a2067098e143f..e6e6ae92468b5 100644 --- a/packages/domain-picker/src/hooks/use-domain-availabilities.ts +++ b/packages/domain-picker/src/hooks/use-domain-availabilities.ts @@ -1,8 +1,11 @@ import { useSelect } from '@wordpress/data'; import { DOMAIN_SUGGESTIONS_STORE } from '../constants'; +import type { DomainSuggestionsSelect } from '@automattic/data-stores'; export function useDomainAvailabilities() { return useSelect( ( select ) => { - return select( DOMAIN_SUGGESTIONS_STORE ).getDomainAvailabilities(); + return ( + select( DOMAIN_SUGGESTIONS_STORE ) as DomainSuggestionsSelect + ).getDomainAvailabilities(); }, [] ); } diff --git a/packages/domain-picker/src/hooks/use-domain-suggestions.ts b/packages/domain-picker/src/hooks/use-domain-suggestions.ts index 77b1dc01137b1..dbcc8c28b12ae 100644 --- a/packages/domain-picker/src/hooks/use-domain-suggestions.ts +++ b/packages/domain-picker/src/hooks/use-domain-suggestions.ts @@ -6,7 +6,10 @@ import { DOMAIN_QUERY_MINIMUM_LENGTH, } from '../constants'; import type { DataStatus } from '@automattic/data-stores/src/domain-suggestions/constants'; -import type { DomainSuggestion } from '@automattic/data-stores/src/domain-suggestions/types'; +import type { + DomainSuggestion, + DomainSuggestionsSelect, +} from '@automattic/data-stores/src/domain-suggestions/types'; type DomainSuggestionsResult = { allDomainSuggestions: DomainSuggestion[] | undefined; @@ -34,8 +37,11 @@ export function useDomainSuggestions( if ( ! domainSearch || domainSearch.length < DOMAIN_QUERY_MINIMUM_LENGTH ) { return; } - const { getDomainSuggestions, getDomainState, getDomainErrorMessage } = - select( DOMAIN_SUGGESTIONS_STORE ); + const { + getDomainSuggestions, + getDomainState, + getDomainErrorMessage, + }: DomainSuggestionsSelect = select( DOMAIN_SUGGESTIONS_STORE ); const retryRequest = (): void => { invalidateResolutionForStoreSelector( '__internalGetDomainSuggestions' ); diff --git a/packages/help-center/src/components/help-center-launchpad.tsx b/packages/help-center/src/components/help-center-launchpad.tsx index 01e0499d3016f..cdb1806bae95c 100644 --- a/packages/help-center/src/components/help-center-launchpad.tsx +++ b/packages/help-center/src/components/help-center-launchpad.tsx @@ -9,6 +9,7 @@ import { useI18n } from '@wordpress/react-i18n'; import { useSelector } from 'react-redux'; import { getSectionName, getSelectedSiteId } from 'calypso/state/ui/selectors'; import { SITE_STORE } from '../stores'; +import type { SiteSelect } from '@automattic/data-stores'; const getEnvironmentHostname = () => { try { @@ -30,7 +31,10 @@ export const HelpCenterLaunchpad = () => { const { __ } = useI18n(); const siteId = useSelector( ( state ) => getSelectedSiteId( state ) ); - const site = useSelect( ( select ) => siteId && select( SITE_STORE ).getSite( siteId ) ); + const site = useSelect( + ( select ) => siteId && ( select( SITE_STORE ) as SiteSelect ).getSite( siteId ), + [] + ); let siteIntent = site && site?.options?.site_intent; let siteSlug = site && new URL( site.URL ).host; diff --git a/packages/help-center/src/components/help-center-search.tsx b/packages/help-center/src/components/help-center-search.tsx index 96c016fd5dce4..fbb9c98646ea8 100644 --- a/packages/help-center/src/components/help-center-search.tsx +++ b/packages/help-center/src/components/help-center-search.tsx @@ -15,6 +15,7 @@ import HelpCenterSearchResults from './help-center-search-results'; import './help-center-search.scss'; import './help-center-launchpad.scss'; import { SibylArticles } from './help-center-sibyl-articles'; +import type { SiteSelect } from '@automattic/data-stores'; export const HelpCenterSearch = () => { const history = useHistory(); @@ -25,7 +26,10 @@ export const HelpCenterSearch = () => { const [ searchQuery, setSearchQuery ] = useState( query || '' ); const siteId = useSelector( ( state ) => getSelectedSiteId( state ) ); - const site = useSelect( ( select ) => siteId && select( SITE_STORE ).getSite( siteId ) ); + const site = useSelect( + ( select ) => siteId && ( select( SITE_STORE ) as SiteSelect ).getSite( siteId ), + [] + ); let launchpadEnabled = site && site?.options.launchpad_screen === 'full'; if ( ! launchpadEnabled ) { diff --git a/packages/launch/src/focused-launch/index.tsx b/packages/launch/src/focused-launch/index.tsx index 66fc6107dd118..82fd7db2f48fd 100644 --- a/packages/launch/src/focused-launch/index.tsx +++ b/packages/launch/src/focused-launch/index.tsx @@ -9,6 +9,7 @@ import PlanDetails from './plan-details'; import { Route as FocusedLaunchRoute } from './route'; import Success from './success'; import Summary from './summary'; +import type { LaunchSelect } from '@automattic/data-stores'; import './style.scss'; @@ -16,10 +17,11 @@ const FocusedLaunch: React.FunctionComponent = () => { const { hasPaidPlan, isSiteLaunched, isSiteLaunching } = useSite(); const [ hasSelectedDomain, selectedPlanProductId ] = useSelect( ( select ) => { - const { planProductId } = select( LAUNCH_STORE ).getState(); + const launchSelect: LaunchSelect = select( LAUNCH_STORE ); + const { planProductId } = launchSelect.getState(); - return [ select( LAUNCH_STORE ).hasSelectedDomainOrSubdomain(), planProductId ]; - } ); + return [ launchSelect.hasSelectedDomainOrSubdomain(), planProductId ]; + }, [] ); // @TODO: extract to some hook for reusability (Eg: use-products-from-cart) // If there is no selected domain, but there is a domain in cart, diff --git a/packages/launch/src/focused-launch/plan-details/index.tsx b/packages/launch/src/focused-launch/plan-details/index.tsx index 46946f327d1f6..4949e5b9b71a2 100644 --- a/packages/launch/src/focused-launch/plan-details/index.tsx +++ b/packages/launch/src/focused-launch/plan-details/index.tsx @@ -9,12 +9,17 @@ import * as React from 'react'; import { useHistory } from 'react-router-dom'; import { LAUNCH_STORE } from '../../stores'; import GoBackButton from '../go-back-button'; +import type { LaunchSelect } from '@automattic/data-stores'; const PlanDetails: React.FunctionComponent = () => { const locale = useLocale(); - const domain = useSelect( ( select ) => select( LAUNCH_STORE ).getSelectedDomain() ); - const selectedPlanProductId = useSelect( ( select ) => - select( LAUNCH_STORE ).getSelectedPlanProductId() + const domain = useSelect( + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedDomain(), + [] + ); + const selectedPlanProductId = useSelect( + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), + [] ); const history = useHistory(); diff --git a/packages/launch/src/focused-launch/summary/index.tsx b/packages/launch/src/focused-launch/summary/index.tsx index 2cbbebfc04e30..af64819787194 100644 --- a/packages/launch/src/focused-launch/summary/index.tsx +++ b/packages/launch/src/focused-launch/summary/index.tsx @@ -32,6 +32,7 @@ import FocusedLaunchSummaryItem, { TrailingContentSide, } from './focused-launch-summary-item'; import type { Plan, PlanProduct } from '../../stores'; +import type { LaunchSelect, PlansSelect } from '@automattic/data-stores'; import './style.scss'; @@ -279,19 +280,22 @@ const PlanStep: React.FunctionComponent< PlanStepProps > = ( { const { setPlanProductId } = useDispatch( LAUNCH_STORE ); - const [ selectedPlanProductId, billingPeriod ] = useSelect( ( select ) => [ - select( LAUNCH_STORE ).getSelectedPlanProductId(), - select( LAUNCH_STORE ).getLastPlanBillingPeriod(), - ] ); + const [ selectedPlanProductId, billingPeriod ] = useSelect( + ( select ) => [ + ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), + ( select( LAUNCH_STORE ) as LaunchSelect ).getLastPlanBillingPeriod(), + ], + [] + ); const { selectedPlan, selectedPlanProduct } = useSelect( ( select ) => { - const plansStore = select( PLANS_STORE ); + const plansStore: PlansSelect = select( PLANS_STORE ); return { selectedPlan: plansStore.getPlanByProductId( selectedPlanProductId, locale ), selectedPlanProduct: plansStore.getPlanProductById( selectedPlanProductId ), }; - } ); + }, [] ); // persist non-default selected paid plan if it's paid in order to keep displaying it in the plan picker const [ nonDefaultPaidPlan, setNonDefaultPaidPlan ] = React.useState< Plan | undefined >(); @@ -512,7 +516,7 @@ const Summary: React.FunctionComponent = () => { const [ hasSelectedDomain, isSiteTitleStepVisible, selectedDomain, selectedPlanProductId ] = useSelect( ( select ) => { - const launchStore = select( LAUNCH_STORE ); + const launchStore: LaunchSelect = select( LAUNCH_STORE ); const { isSiteTitleStepVisible, domain, planProductId } = launchStore.getState(); return [ @@ -524,7 +528,7 @@ const Summary: React.FunctionComponent = () => { }, [] ); const isSelectedPlanPaid = useSelect( - ( select ) => select( LAUNCH_STORE ).isSelectedPlanPaid(), + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).isSelectedPlanPaid(), [] ); diff --git a/packages/launch/src/hooks/use-cart.ts b/packages/launch/src/hooks/use-cart.ts index 91600ee92daee..284d60df7cbfc 100644 --- a/packages/launch/src/hooks/use-cart.ts +++ b/packages/launch/src/hooks/use-cart.ts @@ -5,6 +5,7 @@ import LaunchContext from '../context'; import { useSiteDomains, useHasEcommercePlan } from '../hooks'; import { LAUNCH_STORE, SITE_STORE, PLANS_STORE } from '../stores'; import { getDomainProduct, getPlanProductForFlow } from '../utils'; +import type { LaunchSelect, PlansSelect } from '@automattic/data-stores'; type LaunchCart = { goToCheckout: () => Promise< void >; // used in gutenboarding-launch @@ -17,15 +18,18 @@ export function useCart(): LaunchCart { const locale = useLocale(); - const [ planProductId, domain ] = useSelect( ( select ) => [ - select( LAUNCH_STORE ).getSelectedPlanProductId(), - select( LAUNCH_STORE ).getSelectedDomain(), - ] ); + const [ planProductId, domain ] = useSelect( + ( select ) => [ + ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), + ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedDomain(), + ], + [] + ); const { planProduct, isEcommercePlan } = useSelect( ( select ) => { - const plansStore = select( PLANS_STORE ); - const plan = plansStore.getPlanByProductId( planProductId, locale ); + const plansStore: PlansSelect = select( PLANS_STORE ); + const plan = plansStore.getPlanByProductId( planProductId as number, locale ); return { planProduct: plansStore.getPlanProductById( planProductId as number ), isEcommercePlan: plansStore.isPlanEcommerce( plan?.periodAgnosticSlug ), diff --git a/packages/launch/src/hooks/use-domain-search.ts b/packages/launch/src/hooks/use-domain-search.ts index 65a945051c679..1ab422c4ad465 100644 --- a/packages/launch/src/hooks/use-domain-search.ts +++ b/packages/launch/src/hooks/use-domain-search.ts @@ -4,6 +4,7 @@ import { useSelect, useDispatch } from '@wordpress/data'; import { LAUNCH_STORE } from '../stores'; import { useSiteDomains } from './use-site-domains'; import { useSite, useTitle } from './'; +import type { LaunchSelect } from '@automattic/data-stores'; export function useDomainSearch(): { domainSearch: string; @@ -11,7 +12,7 @@ export function useDomainSearch(): { setDomainSearch: ( search: string ) => void; } { const existingDomainSearch = useSelect( - ( select ) => select( LAUNCH_STORE ).getDomainSearch(), + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getDomainSearch(), [] ); const { isDefaultTitle, title } = useTitle(); diff --git a/packages/launch/src/hooks/use-domain-selection.ts b/packages/launch/src/hooks/use-domain-selection.ts index b5f8387fcc4fe..217338edda22b 100644 --- a/packages/launch/src/hooks/use-domain-selection.ts +++ b/packages/launch/src/hooks/use-domain-selection.ts @@ -7,6 +7,7 @@ import { LAUNCH_STORE, SITE_STORE, PLANS_STORE, DOMAIN_SUGGESTIONS_STORE } from import { isDomainProduct } from '../utils'; import { useSiteDomains } from './use-site-domains'; import type { DomainProduct } from '../utils'; +import type { DomainSuggestionsSelect, LaunchSelect, PlansSelect } from '@automattic/data-stores'; import type { ResponseCartProduct } from '@automattic/shopping-cart'; export function useDomainProductFromCart(): DomainProduct | undefined { @@ -40,7 +41,9 @@ export function useDomainSuggestionFromCart(): DomainSuggestions.DomainSuggestio if ( ! domainName ) { return; } - return select( DOMAIN_SUGGESTIONS_STORE ).isAvailable( domainName ); + return ( select( DOMAIN_SUGGESTIONS_STORE ) as DomainSuggestionsSelect ).isAvailable( + domainName + ); }, [ domainName ] ); @@ -91,9 +94,10 @@ export function useDomainSelection(): DomainSelection { domain: selectedDomain, planProductId, confirmedDomainSelection, - } = useSelect( ( select ) => select( LAUNCH_STORE ).getState() ); - const isPlanFree = useSelect( ( select ) => - select( PLANS_STORE ).isPlanProductFree( planProductId ) + } = useSelect( ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getState(), [] ); + const isPlanFree = useSelect( + ( select ) => ( select( PLANS_STORE ) as PlansSelect ).isPlanProductFree( planProductId ), + [] ); const { siteSubdomain, hasPaidDomain, sitePrimaryDomain } = useSiteDomains(); diff --git a/packages/launch/src/hooks/use-domain-suggestion.ts b/packages/launch/src/hooks/use-domain-suggestion.ts index 620408572d771..d42b9b34d74ea 100644 --- a/packages/launch/src/hooks/use-domain-suggestion.ts +++ b/packages/launch/src/hooks/use-domain-suggestion.ts @@ -2,7 +2,7 @@ import { useLocale } from '@automattic/i18n-utils'; import { useSelect } from '@wordpress/data'; import { DOMAIN_SUGGESTIONS_STORE } from '../stores'; import { useDomainSearch } from './'; -import type { DomainSuggestions } from '@automattic/data-stores'; +import type { DomainSuggestions, DomainSuggestionsSelect } from '@automattic/data-stores'; export function useDomainSuggestion(): DomainSuggestions.DomainSuggestion | undefined { const locale = useLocale(); @@ -13,13 +13,16 @@ export function useDomainSuggestion(): DomainSuggestions.DomainSuggestion | unde if ( ! domainSearch || domainSearch.length < 2 ) { return; } - return select( DOMAIN_SUGGESTIONS_STORE ).getDomainSuggestions( domainSearch, { - // Avoid `only_wordpressdotcom` — it seems to fail to find results sometimes - include_wordpressdotcom: false, - include_dotblogsubdomain: false, - quantity: 1, // this will give the recommended domain only - locale, - } ); + return ( select( DOMAIN_SUGGESTIONS_STORE ) as DomainSuggestionsSelect ).getDomainSuggestions( + domainSearch, + { + // Avoid `only_wordpressdotcom` — it seems to fail to find results sometimes + include_wordpressdotcom: false, + include_dotblogsubdomain: false, + quantity: 1, // this will give the recommended domain only + locale, + } + ); }, [ domainSearch ] )?.[ 0 ]; diff --git a/packages/launch/src/hooks/use-on-launch.ts b/packages/launch/src/hooks/use-on-launch.ts index 8b86c6714e512..bf29e654fcb35 100644 --- a/packages/launch/src/hooks/use-on-launch.ts +++ b/packages/launch/src/hooks/use-on-launch.ts @@ -4,14 +4,19 @@ import LaunchContext from '../context'; import { useCart, useSiteDomains } from '../hooks'; import { LAUNCH_STORE, PLANS_STORE } from '../stores'; import { useSite } from './'; +import type { LaunchSelect, PlansSelect } from '@automattic/data-stores'; // Hook used exclusively in Step-by-step launch flow until it will be using Editor Checkout Modal export const useOnLaunch = () => { const { siteId, redirectTo } = useContext( LaunchContext ); - const { planProductId } = useSelect( ( select ) => select( LAUNCH_STORE ).getState() ); - const isPlanFree = useSelect( ( select ) => - select( PLANS_STORE ).isPlanProductFree( planProductId ) + const { planProductId } = useSelect( + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getState(), + [] + ); + const isPlanFree = useSelect( + ( select ) => ( select( PLANS_STORE ) as PlansSelect ).isPlanProductFree( planProductId ), + [] ); const { isSiteLaunched } = useSite(); diff --git a/packages/launch/src/hooks/use-plans.tsx b/packages/launch/src/hooks/use-plans.tsx index 73db42d33f7aa..7d9df0d450054 100644 --- a/packages/launch/src/hooks/use-plans.tsx +++ b/packages/launch/src/hooks/use-plans.tsx @@ -5,7 +5,7 @@ import LaunchContext from '../context'; import { PLANS_STORE, SITE_STORE } from '../stores'; import { isPlanProduct } from '../utils'; import type { PlanProductForFlow } from '../utils'; -import type { Plans } from '@automattic/data-stores'; +import type { Plans, PlansSelect } from '@automattic/data-stores'; import type { ResponseCartProduct } from '@automattic/shopping-cart'; export function usePlans( billingPeriod: Plans.PlanBillingPeriod = 'ANNUALLY' ): { @@ -18,7 +18,7 @@ export function usePlans( billingPeriod: Plans.PlanBillingPeriod = 'ANNUALLY' ): return useSelect( ( select ) => { - const plansStore = select( PLANS_STORE ); + const plansStore: PlansSelect = select( PLANS_STORE ); const defaultFreePlan = plansStore.getDefaultFreePlan( locale ); const defaultPaidPlan = plansStore.getDefaultPaidPlan( locale ); diff --git a/packages/launch/src/hooks/use-site.ts b/packages/launch/src/hooks/use-site.ts index 76aed3c21bd9c..70ee0dedb3a6f 100644 --- a/packages/launch/src/hooks/use-site.ts +++ b/packages/launch/src/hooks/use-site.ts @@ -2,13 +2,14 @@ import { useSelect } from '@wordpress/data'; import { useContext } from 'react'; import LaunchContext from '../context'; import { SITE_STORE } from '../stores'; +import type { SiteSelect } from '@automattic/data-stores'; export function useSite() { const { siteId } = useContext( LaunchContext ); const [ site, isSiteLaunched, isSiteLaunching, isLoading ] = useSelect( ( select ) => { - const siteStore = select( SITE_STORE ); + const siteStore: SiteSelect = select( SITE_STORE ); return [ siteStore.getSite( siteId ), @@ -21,7 +22,7 @@ export function useSite() { ); return { - sitePlan: site?.plan, + sitePlan: site && site?.plan, hasPaidPlan: site && ! site.plan?.is_free, // sometimes plan will not be available: https://github.com/Automattic/wp-calypso/pull/44895 isSiteLaunched, isSiteLaunching, From bb07c0037698e2070bcb0db649ea81d5d4464076 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 14:31:01 +0200 Subject: [PATCH 10/56] Fix a bunch more TS errors --- packages/data-stores/src/index.ts | 1 + packages/data-stores/src/user/types.ts | 4 ++++ packages/help-center/src/components/help-center.tsx | 9 ++++++--- packages/launch/src/focused-launch/success/index.tsx | 5 +++-- packages/launch/src/hooks/use-has-ecommerce-plan.ts | 5 +++-- packages/launch/src/hooks/use-site-domains.ts | 11 ++++++++--- packages/launch/src/hooks/use-title.ts | 8 ++++++-- packages/launch/src/launch/index.tsx | 6 ++++-- 8 files changed, 35 insertions(+), 14 deletions(-) diff --git a/packages/data-stores/src/index.ts b/packages/data-stores/src/index.ts index 6071b665c7baa..9a54f53773d00 100644 --- a/packages/data-stores/src/index.ts +++ b/packages/data-stores/src/index.ts @@ -34,6 +34,7 @@ export * from './domain-suggestions/types'; export * from './plans/types'; export * from './subscriber/types'; export * from './launch/types'; +export * from './user/types'; export { Analyzer, diff --git a/packages/data-stores/src/user/types.ts b/packages/data-stores/src/user/types.ts index a4a9837d809d1..344327b568b7d 100644 --- a/packages/data-stores/src/user/types.ts +++ b/packages/data-stores/src/user/types.ts @@ -1,3 +1,5 @@ +import * as selectors from './selectors'; +import type { SelectFromMap } from '../mapped-types'; import type { Action } from 'redux'; export interface CurrentUser { @@ -77,3 +79,5 @@ export interface CreateAccountParams { export interface CreateAccountAction extends Action { params?: CreateAccountParams; } + +export type UserSelect = SelectFromMap< typeof selectors >; diff --git a/packages/help-center/src/components/help-center.tsx b/packages/help-center/src/components/help-center.tsx index e96be3e76643c..34ceb7e4a288c 100644 --- a/packages/help-center/src/components/help-center.tsx +++ b/packages/help-center/src/components/help-center.tsx @@ -17,7 +17,7 @@ import { useStillNeedHelpURL } from '../hooks/use-still-need-help-url'; import { HELP_CENTER_STORE, USER_STORE, SITE_STORE } from '../stores'; import { Container } from '../types'; import HelpCenterContainer from './help-center-container'; -import type { HelpCenterSelect } from '@automattic/data-stores'; +import type { HelpCenterSelect, SiteSelect, UserSelect } from '@automattic/data-stores'; import '../styles.scss'; const HelpCenter: React.FC< Container > = ( { handleClose, hidden } ) => { @@ -51,10 +51,13 @@ const HelpCenter: React.FC< Container > = ( { handleClose, hidden } ) => { const siteId = useSelector( ( state ) => getSelectedSiteId( state ) ); const primarySiteId = useSelector( ( state ) => getPrimarySiteId( state ) ); - useSelect( ( select ) => select( USER_STORE ).getCurrentUser() ); + useSelect( ( select ) => ( select( USER_STORE ) as UserSelect ).getCurrentUser(), [] ); const currentSite = window?.helpCenterData?.currentSite; - const site = useSelect( ( select ) => select( SITE_STORE ).getSite( siteId || primarySiteId ) ); + const site = useSelect( + ( select ) => ( select( SITE_STORE ) as SiteSelect ).getSite( siteId || primarySiteId ), + [] + ); setSite( currentSite ? currentSite : site ); useSupportAvailability( 'CHAT' ); diff --git a/packages/launch/src/focused-launch/success/index.tsx b/packages/launch/src/focused-launch/success/index.tsx index ddd88e6e2065b..40630677dcd39 100644 --- a/packages/launch/src/focused-launch/success/index.tsx +++ b/packages/launch/src/focused-launch/success/index.tsx @@ -9,6 +9,7 @@ import * as React from 'react'; import LaunchContext from '../../context'; import { useSiteDomains, useHasEcommercePlan } from '../../hooks'; import { LAUNCH_STORE, SITE_STORE } from '../../stores'; +import type { LaunchSelect, SiteSelect } from '@automattic/data-stores'; import './style.scss'; @@ -19,12 +20,12 @@ const Success: React.FunctionComponent = () => { React.useContext( LaunchContext ); const isSiteLaunching = useSelect( - ( select ) => select( SITE_STORE ).isSiteLaunching( siteId ), + ( select ) => ( select( SITE_STORE ) as SiteSelect ).isSiteLaunching( siteId ), [] ); const [ isSelectedPlanPaid, selectedDomain ] = useSelect( ( select ) => { - const launchStore = select( LAUNCH_STORE ); + const launchStore: LaunchSelect = select( LAUNCH_STORE ); return [ launchStore.isSelectedPlanPaid(), launchStore.getSelectedDomain() ]; }, [] ); diff --git a/packages/launch/src/hooks/use-has-ecommerce-plan.ts b/packages/launch/src/hooks/use-has-ecommerce-plan.ts index d82fa83836423..fd3ad44fb45e6 100644 --- a/packages/launch/src/hooks/use-has-ecommerce-plan.ts +++ b/packages/launch/src/hooks/use-has-ecommerce-plan.ts @@ -1,18 +1,19 @@ import { useLocale } from '@automattic/i18n-utils'; import { useSelect } from '@wordpress/data'; import { LAUNCH_STORE, PLANS_STORE } from '../stores'; +import type { LaunchSelect, PlansSelect } from '@automattic/data-stores'; export function useHasEcommercePlan(): boolean { const locale = useLocale(); const planProductId = useSelect( - ( select ) => select( LAUNCH_STORE ).getSelectedPlanProductId(), + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), [] ); const isEcommercePlan = useSelect( ( select ) => { - const plansStore = select( PLANS_STORE ); + const plansStore: PlansSelect = select( PLANS_STORE ); const plan = plansStore.getPlanByProductId( planProductId, locale ); return plansStore.isPlanEcommerce( plan?.periodAgnosticSlug ); }, diff --git a/packages/launch/src/hooks/use-site-domains.ts b/packages/launch/src/hooks/use-site-domains.ts index 76f4bdc06089d..cec803692f855 100644 --- a/packages/launch/src/hooks/use-site-domains.ts +++ b/packages/launch/src/hooks/use-site-domains.ts @@ -2,13 +2,18 @@ import { useSelect } from '@wordpress/data'; import { useContext } from 'react'; import LaunchContext from '../context'; import { SITE_STORE } from '../stores'; +import type { SiteSelect } from '@automattic/data-stores'; export function useSiteDomains() { const { siteId } = useContext( LaunchContext ); - const sitePrimaryDomain = useSelect( ( select ) => - select( SITE_STORE ).getPrimarySiteDomain( siteId ) + const sitePrimaryDomain = useSelect( + ( select ) => ( select( SITE_STORE ) as SiteSelect ).getPrimarySiteDomain( siteId ), + [] + ); + const siteSubdomain = useSelect( + ( select ) => ( select( SITE_STORE ) as SiteSelect ).getSiteSubdomain( siteId ), + [] ); - const siteSubdomain = useSelect( ( select ) => select( SITE_STORE ).getSiteSubdomain( siteId ) ); const hasPaidDomain = sitePrimaryDomain && ! sitePrimaryDomain?.is_subdomain; return { diff --git a/packages/launch/src/hooks/use-title.ts b/packages/launch/src/hooks/use-title.ts index bbdf7062fa7df..a4d247fffcd44 100644 --- a/packages/launch/src/hooks/use-title.ts +++ b/packages/launch/src/hooks/use-title.ts @@ -5,6 +5,7 @@ import { useContext, useEffect } from 'react'; import { useDebouncedCallback } from 'use-debounce'; import LaunchContext from '../context'; import { SITE_STORE, LAUNCH_STORE } from '../stores'; +import type { LaunchSelect, SiteSelect } from '@automattic/data-stores'; export function useTitle() { const { siteId } = useContext( LaunchContext ); @@ -12,10 +13,13 @@ export function useTitle() { const locale = useLocale(); const existingSiteTitle = useSelect( - ( select ) => select( SITE_STORE ).getSiteTitle( siteId ), + ( select ) => ( select( SITE_STORE ) as SiteSelect ).getSiteTitle( siteId ), [ siteId ] ); - const launchSiteTitle = useSelect( ( select ) => select( LAUNCH_STORE ).getSiteTitle(), [] ); + const launchSiteTitle = useSelect( + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getSiteTitle(), + [] + ); const updateTitle = useDispatch( LAUNCH_STORE ).setSiteTitle; const saveSiteTitle = useDispatch( SITE_STORE ).saveSiteTitle; diff --git a/packages/launch/src/launch/index.tsx b/packages/launch/src/launch/index.tsx index 384da8526611f..59774c4ca6b65 100644 --- a/packages/launch/src/launch/index.tsx +++ b/packages/launch/src/launch/index.tsx @@ -10,6 +10,7 @@ import LaunchContext, { LaunchContextProps } from '../context'; import FocusedLaunch from '../focused-launch'; import Success from '../focused-launch/success'; import { LAUNCH_STORE, SITE_STORE } from '../stores'; +import type { LaunchSelect } from '@automattic/data-stores'; import './styles.scss'; interface FocusedLaunchModalProps extends Omit< LaunchContextProps, 'flow' > { @@ -27,8 +28,9 @@ const FocusedLaunchModal: React.FunctionComponent< FocusedLaunchModalProps > = ( isInIframe, isLaunchImmediately, } ) => { - const { isModalDismissible, isModalTitleVisible } = useSelect( ( select ) => - select( LAUNCH_STORE ).getState() + const { isModalDismissible, isModalTitleVisible } = useSelect( + ( select ) => ( select( LAUNCH_STORE ) as LaunchSelect ).getState(), + [] ); const { launchSite } = useDispatch( SITE_STORE ); From 97bdf7f4e7e459221cecf070c368556bd2e3ec6b Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 15:00:05 +0200 Subject: [PATCH 11/56] Fix type confusion --- .../src/focused-launch/summary/index.tsx | 32 +++++++++---------- packages/launch/src/hooks/use-cart.ts | 10 +++--- packages/launch/src/hooks/use-site.ts | 14 ++++---- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/launch/src/focused-launch/summary/index.tsx b/packages/launch/src/focused-launch/summary/index.tsx index af64819787194..b82dce94d7f7c 100644 --- a/packages/launch/src/focused-launch/summary/index.tsx +++ b/packages/launch/src/focused-launch/summary/index.tsx @@ -280,13 +280,12 @@ const PlanStep: React.FunctionComponent< PlanStepProps > = ( { const { setPlanProductId } = useDispatch( LAUNCH_STORE ); - const [ selectedPlanProductId, billingPeriod ] = useSelect( - ( select ) => [ - ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), - ( select( LAUNCH_STORE ) as LaunchSelect ).getLastPlanBillingPeriod(), - ], - [] - ); + const { selectedPlanProductId, billingPeriod } = useSelect( ( select ) => { + return { + selectedPlanProductId: ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), + billingPeriod: ( select( LAUNCH_STORE ) as LaunchSelect ).getLastPlanBillingPeriod(), + }; + }, [] ); const { selectedPlan, selectedPlanProduct } = useSelect( ( select ) => { const plansStore: PlansSelect = select( PLANS_STORE ); @@ -514,17 +513,18 @@ type StepIndexRenderFunction = ( renderOptions: { const Summary: React.FunctionComponent = () => { const { siteId } = React.useContext( LaunchContext ); - const [ hasSelectedDomain, isSiteTitleStepVisible, selectedDomain, selectedPlanProductId ] = + const { hasSelectedDomain, isSiteTitleStepVisible, selectedDomain, selectedPlanProductId } = useSelect( ( select ) => { const launchStore: LaunchSelect = select( LAUNCH_STORE ); - const { isSiteTitleStepVisible, domain, planProductId } = launchStore.getState(); - - return [ - launchStore.hasSelectedDomainOrSubdomain(), - isSiteTitleStepVisible, - domain, - planProductId, - ]; + const launchStoreState = launchStore.getState(); + const { domain, planProductId } = launchStoreState; + + return { + hasSelectedDomain: launchStore.hasSelectedDomainOrSubdomain(), + isSiteTitleStepVisible: launchStoreState.isSiteTitleStepVisible, + selectedDomain: domain, + selectedPlanProductId: planProductId, + }; }, [] ); const isSelectedPlanPaid = useSelect( diff --git a/packages/launch/src/hooks/use-cart.ts b/packages/launch/src/hooks/use-cart.ts index 284d60df7cbfc..5f6f379e7aa5d 100644 --- a/packages/launch/src/hooks/use-cart.ts +++ b/packages/launch/src/hooks/use-cart.ts @@ -18,11 +18,11 @@ export function useCart(): LaunchCart { const locale = useLocale(); - const [ planProductId, domain ] = useSelect( - ( select ) => [ - ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), - ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedDomain(), - ], + const { planProductId, domain } = useSelect( + ( select ) => ( { + planProductId: ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedPlanProductId(), + domain: ( select( LAUNCH_STORE ) as LaunchSelect ).getSelectedDomain(), + } ), [] ); diff --git a/packages/launch/src/hooks/use-site.ts b/packages/launch/src/hooks/use-site.ts index 70ee0dedb3a6f..76da20af89c23 100644 --- a/packages/launch/src/hooks/use-site.ts +++ b/packages/launch/src/hooks/use-site.ts @@ -7,16 +7,16 @@ import type { SiteSelect } from '@automattic/data-stores'; export function useSite() { const { siteId } = useContext( LaunchContext ); - const [ site, isSiteLaunched, isSiteLaunching, isLoading ] = useSelect( + const { site, isSiteLaunched, isSiteLaunching, isLoading } = useSelect( ( select ) => { const siteStore: SiteSelect = select( SITE_STORE ); - return [ - siteStore.getSite( siteId ), - siteStore.isSiteLaunched( siteId ), - siteStore.isSiteLaunching( siteId ), - siteStore.isFetchingSiteDetails(), - ]; + return { + site: siteStore.getSite( siteId ), + isSiteLaunched: siteStore.isSiteLaunched( siteId ), + isSiteLaunching: siteStore.isSiteLaunching( siteId ), + isLoading: siteStore.isFetchingSiteDetails(), + }; }, [ siteId ] ); From 990750a46662ab3585166fe8f0e494cb93fad34e Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Mon, 13 Feb 2023 15:04:55 +0200 Subject: [PATCH 12/56] Add core/data temp placeholder types --- .../src/components/help-center-more-resources.tsx | 6 +++++- packages/help-center/src/components/help-icon.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/help-center/src/components/help-center-more-resources.tsx b/packages/help-center/src/components/help-center-more-resources.tsx index 16a73f0aea5d6..2608bb5e4beb7 100644 --- a/packages/help-center/src/components/help-center-more-resources.tsx +++ b/packages/help-center/src/components/help-center-more-resources.tsx @@ -22,6 +22,10 @@ const circle = ( ); +type CoreDataPlaceholder = { + hasFinishedResolution: ( ...args: unknown[] ) => boolean; +}; + export const HelpCenterMoreResources = () => { const { __ } = useI18n(); const sectionName = useSelector( getSectionName ); @@ -42,7 +46,7 @@ export const HelpCenterMoreResources = () => { hasSeenWhatsNewModal: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getHasSeenWhatsNewModal(), - doneLoading: select( 'core/data' ).hasFinishedResolution( + doneLoading: ( select( 'core/data' ) as CoreDataPlaceholder ).hasFinishedResolution( HELP_CENTER_STORE, 'getHasSeenWhatsNewModal', [] diff --git a/packages/help-center/src/components/help-icon.tsx b/packages/help-center/src/components/help-icon.tsx index b8ab48585d583..f659b8a7c3036 100644 --- a/packages/help-center/src/components/help-icon.tsx +++ b/packages/help-center/src/components/help-icon.tsx @@ -3,11 +3,15 @@ import { forwardRef } from 'react'; import { HELP_CENTER_STORE } from '../stores'; import type { HelpCenterSelect } from '@automattic/data-stores'; +type CoreDataPlaceholder = { + hasFinishedResolution: ( ...args: unknown[] ) => boolean; +}; + const HelpIcon = forwardRef< SVGSVGElement >( ( _, ref ) => { const { unreadCount, doneLoading, hasSeenWhatsNewModal } = useSelect( ( select ) => ( { unreadCount: ( select( HELP_CENTER_STORE ) as HelpCenterSelect ).getUnreadCount(), - doneLoading: select( 'core/data' ).hasFinishedResolution( + doneLoading: ( select( 'core/data' ) as CoreDataPlaceholder ).hasFinishedResolution( HELP_CENTER_STORE, 'getHasSeenWhatsNewModal', [] From 6b1ac777d68bffaaf3cb151a8516b0acf941d4c9 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 17:09:07 +0200 Subject: [PATCH 13/56] deduplicate packages --- yarn.lock | 343 +++++------------------------------------------------- 1 file changed, 30 insertions(+), 313 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0692d6c3e7d68..61f36dcbd6b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6842,7 +6842,7 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:*, @types/lodash@npm:^4.14.172, @types/lodash@npm:^4.14.179": +"@types/lodash@npm:*, @types/lodash@npm:^4.14.179": version: 4.14.179 resolution: "@types/lodash@npm:4.14.179" checksum: 653e45c277e405577c1e4f5baeb0040589b805aa8dabea334c93e1ae44949f6071361754dbf933202de3fb73119f3ee12f317d0f0213168bb806d1ee7478b0ce @@ -7038,12 +7038,12 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:*, @types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^17.0.11": - version: 17.0.13 - resolution: "@types/react-dom@npm:17.0.13" +"@types/react-dom@npm:*, @types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^18.0.6": + version: 18.0.11 + resolution: "@types/react-dom@npm:18.0.11" dependencies: "@types/react": "*" - checksum: 245e353626f3e75eb27ae797a5f6390aab2d8be19f1fb426ebf69a3393e8fcbcc54471397bc226e54f28de188084d8a3b9f86883c7cbad27cc5ea0ae8d2d0158 + checksum: 8bf1e3f710221a937613df4d192f3b9e5a30e5c3103cac52c5210fb56b79f7a8cc66137d3bc5c9d92d375165a97fae53284724191bc01cb9898564fa02595569 languageName: node linkType: hard @@ -7056,12 +7056,12 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18.0.6": - version: 18.0.11 - resolution: "@types/react-dom@npm:18.0.11" +"@types/react-dom@npm:^17.0.11": + version: 17.0.13 + resolution: "@types/react-dom@npm:17.0.13" dependencies: "@types/react": "*" - checksum: 8bf1e3f710221a937613df4d192f3b9e5a30e5c3103cac52c5210fb56b79f7a8cc66137d3bc5c9d92d375165a97fae53284724191bc01cb9898564fa02595569 + checksum: 245e353626f3e75eb27ae797a5f6390aab2d8be19f1fb426ebf69a3393e8fcbcc54471397bc226e54f28de188084d8a3b9f86883c7cbad27cc5ea0ae8d2d0158 languageName: node linkType: hard @@ -8192,18 +8192,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/a11y@npm:^3.13.0": - version: 3.13.0 - resolution: "@wordpress/a11y@npm:3.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/dom-ready": ^3.13.0 - "@wordpress/i18n": ^4.13.0 - checksum: 506496a689fd5052e356a764dca6dcc17403b91531b94ea9ddc0844d29914f15a2ba2c4f69c71a64fe6e566ba70cd522ff2ad3807d6ff18761307d5d8b23b0f0 - languageName: node - linkType: hard - -"@wordpress/a11y@npm:^3.22.0, @wordpress/a11y@npm:^3.27.0": +"@wordpress/a11y@npm:^3.13.0, @wordpress/a11y@npm:^3.22.0, @wordpress/a11y@npm:^3.27.0": version: 3.27.0 resolution: "@wordpress/a11y@npm:3.27.0" dependencies: @@ -8550,30 +8539,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/compose@npm:^5.11.0": - version: 5.11.0 - resolution: "@wordpress/compose@npm:5.11.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@types/lodash": ^4.14.172 - "@types/mousetrap": ^1.6.8 - "@wordpress/deprecated": ^3.13.0 - "@wordpress/dom": ^3.13.0 - "@wordpress/element": ^4.11.0 - "@wordpress/is-shallow-equal": ^4.13.0 - "@wordpress/keycodes": ^3.13.0 - "@wordpress/priority-queue": ^2.13.0 - clipboard: ^2.0.8 - lodash: ^4.17.21 - mousetrap: ^1.6.5 - use-memo-one: ^1.1.1 - peerDependencies: - react: ^17.0.0 - checksum: 561bbbed104d9f51c88c4ba50375d6a4b58a9fdb96a3668df3181e7d22b091f92ed8e245c6105b8c1aa38c059aab969e66a0c768bb6d8c37bb465e586418996c - languageName: node - linkType: hard - -"@wordpress/compose@npm:^5.13.0, @wordpress/compose@npm:^5.20.0": +"@wordpress/compose@npm:^5.11.0, @wordpress/compose@npm:^5.20.0": version: 5.20.0 resolution: "@wordpress/compose@npm:5.20.0" dependencies: @@ -8656,30 +8622,6 @@ __metadata: languageName: node linkType: hard -"@wordpress/data@npm:^6.13.0": - version: 6.15.0 - resolution: "@wordpress/data@npm:6.15.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/compose": ^5.13.0 - "@wordpress/deprecated": ^3.15.0 - "@wordpress/element": ^4.13.0 - "@wordpress/is-shallow-equal": ^4.15.0 - "@wordpress/priority-queue": ^2.15.0 - "@wordpress/redux-routine": ^4.15.0 - equivalent-key-map: ^0.2.2 - is-plain-obj: ^4.1.0 - is-promise: ^4.0.0 - lodash: ^4.17.21 - redux: ^4.1.2 - turbo-combine-reducers: ^1.0.2 - use-memo-one: ^1.1.1 - peerDependencies: - react: ^17.0.0 - checksum: 5e8f9e62d52b62b17aadd9e83b8812973cd425d7c5937378b32036e862b372967233fc042d1ad83907bae22ad4b3194925bf9be2d7aaf4abcf6efec30fefb3e7 - languageName: node - linkType: hard - "@wordpress/data@npm:^7.6.0": version: 7.6.0 resolution: "@wordpress/data@npm:7.6.0" @@ -8729,18 +8671,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/date@npm:^4.13.0": - version: 4.13.0 - resolution: "@wordpress/date@npm:4.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - moment: ^2.22.1 - moment-timezone: ^0.5.31 - checksum: 2e245bece4efda7b783c800a55004dda5199f7c10b42892f8f14bf2885e747003bf3e5c96a5c575a37631107656a49780fae02900975a0683ba19ab187ae1a91 - languageName: node - linkType: hard - -"@wordpress/date@npm:^4.22.0": +"@wordpress/date@npm:^4.13.0, @wordpress/date@npm:^4.22.0": version: 4.27.0 resolution: "@wordpress/date@npm:4.27.0" dependencies: @@ -8764,17 +8695,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/deprecated@npm:^3.13.0, @wordpress/deprecated@npm:^3.8.0": - version: 3.13.0 - resolution: "@wordpress/deprecated@npm:3.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/hooks": ^3.13.0 - checksum: 9a62783134dabac4210e8001c34d6b9237a9657552cb8a482501133080fb7f885273580abcfe69cd05bfe27110292b2c49192408e8c7f56d0ec6c346da3ab68f - languageName: node - linkType: hard - -"@wordpress/deprecated@npm:^3.15.0, @wordpress/deprecated@npm:^3.22.0, @wordpress/deprecated@npm:^3.27.0": +"@wordpress/deprecated@npm:^3.13.0, @wordpress/deprecated@npm:^3.22.0, @wordpress/deprecated@npm:^3.27.0": version: 3.27.0 resolution: "@wordpress/deprecated@npm:3.27.0" dependencies: @@ -8784,15 +8705,6 @@ __metadata: languageName: node linkType: hard -"@wordpress/dom-ready@npm:^3.13.0": - version: 3.13.0 - resolution: "@wordpress/dom-ready@npm:3.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - checksum: 03b4b7db1b67115c3aef6c0f9bc3bca0a1e3d8445c449dd77d6703114ce132071b3ec87a0810cbe385947ebf4edbb043730d01f56e1937d0fda70075315b332c - languageName: node - linkType: hard - "@wordpress/dom-ready@npm:^3.22.0, @wordpress/dom-ready@npm:^3.27.0": version: 3.27.0 resolution: "@wordpress/dom-ready@npm:3.27.0" @@ -8802,18 +8714,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/dom@npm:^3.13.0": - version: 3.13.0 - resolution: "@wordpress/dom@npm:3.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/deprecated": ^3.8.0 - lodash: ^4.17.21 - checksum: a5a00c12e9064916862e08c741f5ae9feca14a1a44f64634e61852542f2c0f71457214f124bbc3d93f66dcb7f27df8c8710fd3b501f4b2ed7bb287431d902ade - languageName: node - linkType: hard - -"@wordpress/dom@npm:^3.22.0, @wordpress/dom@npm:^3.27.0": +"@wordpress/dom@npm:^3.13.0, @wordpress/dom@npm:^3.22.0, @wordpress/dom@npm:^3.27.0": version: 3.27.0 resolution: "@wordpress/dom@npm:3.27.0" dependencies: @@ -9002,23 +8903,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/element@npm:^4.1.1, @wordpress/element@npm:^4.11.0, @wordpress/element@npm:^4.18.0": - version: 4.19.0 - resolution: "@wordpress/element@npm:4.19.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@types/react": ^17.0.37 - "@types/react-dom": ^17.0.11 - "@wordpress/escape-html": ^2.21.0 - change-case: ^4.1.2 - is-plain-object: ^5.0.0 - react: ^17.0.2 - react-dom: ^17.0.2 - checksum: cde942333d2910491f23953d1421308ff424544660d7e4066383120f18fd53561b917d79d4d9977a5fdb8f0826c9f8083876eaf50d97ce35256c937040ffa0ad - languageName: node - linkType: hard - -"@wordpress/element@npm:^4.13.0, @wordpress/element@npm:^4.20.0": +"@wordpress/element@npm:^4.1.1, @wordpress/element@npm:^4.11.0, @wordpress/element@npm:^4.20.0": version: 4.20.0 resolution: "@wordpress/element@npm:4.20.0" dependencies: @@ -9081,16 +8966,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/escape-html@npm:^2.13.0, @wordpress/escape-html@npm:^2.2.0, @wordpress/escape-html@npm:^2.21.0, @wordpress/escape-html@npm:^2.9.0": - version: 2.21.0 - resolution: "@wordpress/escape-html@npm:2.21.0" - dependencies: - "@babel/runtime": ^7.16.0 - checksum: 25ab1bd24162945858458f1efffe9642d63a217cd41ebbd01856b9f855110f44c9e47d752744c2ed06715c62a43e2ecc5f8310d2adc4ab88c571cccf095593bf - languageName: node - linkType: hard - -"@wordpress/escape-html@npm:^2.22.0, @wordpress/escape-html@npm:^2.27.0": +"@wordpress/escape-html@npm:^2.13.0, @wordpress/escape-html@npm:^2.2.0, @wordpress/escape-html@npm:^2.22.0, @wordpress/escape-html@npm:^2.27.0, @wordpress/escape-html@npm:^2.9.0": version: 2.27.0 resolution: "@wordpress/escape-html@npm:2.27.0" dependencies: @@ -9156,16 +9032,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/hooks@npm:^3.13.0, @wordpress/hooks@npm:^3.21.0, @wordpress/hooks@npm:^3.9.0": - version: 3.21.0 - resolution: "@wordpress/hooks@npm:3.21.0" - dependencies: - "@babel/runtime": ^7.16.0 - checksum: 3d63aef536dc382ce926d58877176a33c57976012c8e8a7aeaa54384da309fe7307f1d388f562d5584599db752091f9e3e4b24dcdeb63450a2a4fc9bdc7b94c6 - languageName: node - linkType: hard - -"@wordpress/hooks@npm:^3.22.0, @wordpress/hooks@npm:^3.27.0": +"@wordpress/hooks@npm:^3.13.0, @wordpress/hooks@npm:^3.22.0, @wordpress/hooks@npm:^3.27.0, @wordpress/hooks@npm:^3.9.0": version: 3.27.0 resolution: "@wordpress/hooks@npm:3.27.0" dependencies: @@ -9200,23 +9067,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/i18n@npm:^4.13.0, @wordpress/i18n@npm:^4.2.4": - version: 4.21.0 - resolution: "@wordpress/i18n@npm:4.21.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/hooks": ^3.21.0 - gettext-parser: ^1.3.1 - memize: ^1.1.0 - sprintf-js: ^1.1.1 - tannin: ^1.2.0 - bin: - pot-to-php: tools/pot-to-php.js - checksum: 70b4f11acafa42b5d63cdf2fa196813c70dac22d93600aa8df55efc72926902d7a8ce29521b2a80a9aaf464128d25f0543ce723bb14c3eaf33f7b56739219594 - languageName: node - linkType: hard - -"@wordpress/i18n@npm:^4.22.0, @wordpress/i18n@npm:^4.27.0": +"@wordpress/i18n@npm:^4.13.0, @wordpress/i18n@npm:^4.2.4, @wordpress/i18n@npm:^4.22.0, @wordpress/i18n@npm:^4.27.0": version: 4.27.0 resolution: "@wordpress/i18n@npm:4.27.0" dependencies: @@ -9243,7 +9094,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/icons@npm:^9.13.0": +"@wordpress/icons@npm:^9.13.0, @wordpress/icons@npm:^9.4.0": version: 9.18.0 resolution: "@wordpress/icons@npm:9.18.0" dependencies: @@ -9254,17 +9105,6 @@ __metadata: languageName: node linkType: hard -"@wordpress/icons@npm:^9.4.0": - version: 9.11.0 - resolution: "@wordpress/icons@npm:9.11.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/element": ^4.18.0 - "@wordpress/primitives": ^3.18.0 - checksum: 101063fb7d5ea60b63be65f00f54f858d63fb4edc326941181c77447818d005c85eab61873a57130dbbc0cb76ade818da847d7f01d4de520361855ed09020e0a - languageName: node - linkType: hard - "@wordpress/interface@npm:^4.21.0": version: 4.21.0 resolution: "@wordpress/interface@npm:4.21.0" @@ -9289,16 +9129,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/is-shallow-equal@npm:^4.13.0": - version: 4.13.0 - resolution: "@wordpress/is-shallow-equal@npm:4.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - checksum: 021285643f7d9c148ef21a819a849f21081622d90835271b8ea74ece6a52bcb852efc11b30304955cd9caefd1dbb5c2e78a4c2807e978a76ccfdea3a4780a371 - languageName: node - linkType: hard - -"@wordpress/is-shallow-equal@npm:^4.15.0, @wordpress/is-shallow-equal@npm:^4.22.0, @wordpress/is-shallow-equal@npm:^4.27.0": +"@wordpress/is-shallow-equal@npm:^4.13.0, @wordpress/is-shallow-equal@npm:^4.22.0, @wordpress/is-shallow-equal@npm:^4.27.0": version: 4.27.0 resolution: "@wordpress/is-shallow-equal@npm:4.27.0" dependencies: @@ -9347,18 +9178,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/keycodes@npm:^3.13.0": - version: 3.13.0 - resolution: "@wordpress/keycodes@npm:3.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/i18n": ^4.13.0 - lodash: ^4.17.21 - checksum: b57e796bc1f35a3457e78119799f4009c80d36f7ab902ccfb85ffb306ee6cdc157069fd5f39e4f3a7ee74507e2cb65daf3f76f11c5efe9dc44e053f04652600a - languageName: node - linkType: hard - -"@wordpress/keycodes@npm:^3.22.0, @wordpress/keycodes@npm:^3.27.0": +"@wordpress/keycodes@npm:^3.13.0, @wordpress/keycodes@npm:^3.22.0, @wordpress/keycodes@npm:^3.27.0": version: 3.27.0 resolution: "@wordpress/keycodes@npm:3.27.0" dependencies: @@ -9477,18 +9297,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/primitives@npm:^3.1.1, @wordpress/primitives@npm:^3.11.0, @wordpress/primitives@npm:^3.18.0": - version: 3.18.0 - resolution: "@wordpress/primitives@npm:3.18.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/element": ^4.18.0 - classnames: ^2.3.1 - checksum: 5090684e11d80d94fcf813dda71c0fcdadf036006509a448de54f7eb63ded6d668d7fa246b9f1f923b11268afac6c0aca4c1fd7f9cfb5d82055923cad6d607af - languageName: node - linkType: hard - -"@wordpress/primitives@npm:^3.20.0, @wordpress/primitives@npm:^3.25.0": +"@wordpress/primitives@npm:^3.1.1, @wordpress/primitives@npm:^3.11.0, @wordpress/primitives@npm:^3.20.0, @wordpress/primitives@npm:^3.25.0": version: 3.25.0 resolution: "@wordpress/primitives@npm:3.25.0" dependencies: @@ -9499,16 +9308,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/priority-queue@npm:^2.13.0": - version: 2.13.0 - resolution: "@wordpress/priority-queue@npm:2.13.0" - dependencies: - "@babel/runtime": ^7.16.0 - checksum: 39909befa2c8f66684c82fbe436bafd1d6db018a5c8e803f14ed142500b9ea18dadfcc9f1cb659b1ab10f0bcaf7ba4dd62e8d9d731e094907a1eb272d2997bf1 - languageName: node - linkType: hard - -"@wordpress/priority-queue@npm:^2.15.0, @wordpress/priority-queue@npm:^2.22.0, @wordpress/priority-queue@npm:^2.27.0": +"@wordpress/priority-queue@npm:^2.22.0, @wordpress/priority-queue@npm:^2.27.0": version: 2.27.0 resolution: "@wordpress/priority-queue@npm:2.27.0" dependencies: @@ -9548,7 +9348,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/redux-routine@npm:^4.15.0, @wordpress/redux-routine@npm:^4.22.0, @wordpress/redux-routine@npm:^4.27.0": +"@wordpress/redux-routine@npm:^4.22.0, @wordpress/redux-routine@npm:^4.27.0": version: 4.27.0 resolution: "@wordpress/redux-routine@npm:4.27.0" dependencies: @@ -9583,28 +9383,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/rich-text@npm:^5.11.0": - version: 5.11.0 - resolution: "@wordpress/rich-text@npm:5.11.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@wordpress/a11y": ^3.13.0 - "@wordpress/compose": ^5.11.0 - "@wordpress/data": ^6.13.0 - "@wordpress/element": ^4.11.0 - "@wordpress/escape-html": ^2.13.0 - "@wordpress/i18n": ^4.13.0 - "@wordpress/keycodes": ^3.13.0 - lodash: ^4.17.21 - memize: ^1.1.0 - rememo: ^4.0.0 - peerDependencies: - react: ^17.0.0 - checksum: 132e79666c8e53498a3b687095f469122408b39a64e206b48eb2fc441a8067ce728d3b50dabbe4e125fc28cce29bcd1d7ccd6fcdcc86710dadca6625f54b52d4 - languageName: node - linkType: hard - -"@wordpress/rich-text@npm:^5.20.0": +"@wordpress/rich-text@npm:^5.11.0, @wordpress/rich-text@npm:^5.20.0": version: 5.20.0 resolution: "@wordpress/rich-text@npm:5.20.0" dependencies: @@ -9779,14 +9558,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/warning@npm:^2.13.0": - version: 2.13.0 - resolution: "@wordpress/warning@npm:2.13.0" - checksum: f7f1fd837d157309889b1c8b3c91ff64d3f802e7492546af9aa39db2399ab69d25b3bc59f53e56fbaafc37d215b383440cd8ce419cbc96579dffdc68d778e16a - languageName: node - linkType: hard - -"@wordpress/warning@npm:^2.22.0, @wordpress/warning@npm:^2.27.0": +"@wordpress/warning@npm:^2.13.0, @wordpress/warning@npm:^2.22.0, @wordpress/warning@npm:^2.27.0": version: 2.27.0 resolution: "@wordpress/warning@npm:2.27.0" checksum: 64df4b157c3ea592dd33ae293ca5e0020f0dace8047cd8d925aa396276b9656c48b3cca48e1564a9308321c69ce248fb382ac63b9571a5f684ddb6934dae0b09 @@ -11986,21 +11758,6 @@ __metadata: languageName: node linkType: hard -"cacheable-request@npm:^7.0.1": - version: 7.0.1 - resolution: "cacheable-request@npm:7.0.1" - dependencies: - clone-response: ^1.0.2 - get-stream: ^5.1.0 - http-cache-semantics: ^4.0.0 - keyv: ^4.0.0 - lowercase-keys: ^2.0.0 - normalize-url: ^4.1.0 - responselike: ^2.0.0 - checksum: 79996bd3fcf2b61f3af4c909a5d71a116fb9fd900ed0038b8c13476a6b652d1cc8689d9fd73a98c3fb2bf3268bc08dd52e8ff5aaea29aa98f747a000bb2fa506 - languageName: node - linkType: hard - "cacheable-request@npm:^7.0.2": version: 7.0.2 resolution: "cacheable-request@npm:7.0.2" @@ -14696,14 +14453,7 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: d6136eee869057fea7a829aa2d10073ed49db5216e42a77cc737dd385334aab9b68dae22020a00c24c073d5f79cbbdd3f11b8d4fc87700d112ddaa0e1f968ef2 - languageName: node - linkType: hard - -"deepmerge@npm:^4.3.0": +"deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.0": version: 4.3.0 resolution: "deepmerge@npm:4.3.0" checksum: 7ff5c6294b3316c1bc6bca9d3ef2193c1d7beec4e62252db8bcb8a6366d85b924850492eb1a746a5f33d609862e03dfb907ce9fa8769583300f65f20a337cec5 @@ -18625,26 +18375,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"got@npm:^11.7.0": - version: 11.8.2 - resolution: "got@npm:11.8.2" - dependencies: - "@sindresorhus/is": ^4.0.0 - "@szmarczak/http-timer": ^4.0.5 - "@types/cacheable-request": ^6.0.1 - "@types/responselike": ^1.0.0 - cacheable-lookup: ^5.0.3 - cacheable-request: ^7.0.1 - decompress-response: ^6.0.0 - http2-wrapper: ^1.0.0-beta.5.2 - lowercase-keys: ^2.0.0 - p-cancelable: ^2.0.0 - responselike: ^2.0.0 - checksum: 12fc2f5ffeed74746b75764c304f9dcd679edb593a9d079e8235ca3a2a112ab500702a81f693573a389c198c678f9b0e827921a20cdb29c90dc8897a37432419 - languageName: node - linkType: hard - -"got@npm:^11.8.5": +"got@npm:^11.7.0, got@npm:^11.8.5": version: 11.8.6 resolution: "got@npm:11.8.6" dependencies: @@ -20555,13 +20286,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"is-plain-obj@npm:^4.1.0": - version: 4.1.0 - resolution: "is-plain-obj@npm:4.1.0" - checksum: 32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e - languageName: node - linkType: hard - "is-plain-object@npm:3.0.1": version: 3.0.1 resolution: "is-plain-object@npm:3.0.1" @@ -23813,7 +23537,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"moment-timezone@npm:^0.5.31, moment-timezone@npm:^0.5.40": +"moment-timezone@npm:^0.5.40": version: 0.5.40 resolution: "moment-timezone@npm:0.5.40" dependencies: @@ -23822,14 +23546,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"moment@npm:>= 2.9.0, moment@npm:>=1.6.0, moment@npm:^2.19.3, moment@npm:^2.22.1, moment@npm:^2.26.0": - version: 2.27.0 - resolution: "moment@npm:2.27.0" - checksum: ea5b2fd73c8ad9070fc82c21ccb6226f7556c27a6a305e64371a3d1223729e9f9e75da59c3114160f21f9181e74f6d245534093179825eb20bf0f40ec7495d92 - languageName: node - linkType: hard - -"moment@npm:^2.29.4": +"moment@npm:>= 2.9.0, moment@npm:>=1.6.0, moment@npm:^2.19.3, moment@npm:^2.26.0, moment@npm:^2.29.4": version: 2.29.4 resolution: "moment@npm:2.29.4" checksum: 844c6f3ce42862ac9467c8ca4f5e48a00750078682cc5bda1bc0e50cc7ca88e2115a0f932d65a06e4a90e26cb78892be9b3ca3dd6546ca2c4d994cebb787fc2b From 787a9f2003701f3e9b3db683754b367098486544 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 17:10:19 +0200 Subject: [PATCH 14/56] Ignore some logs --- .yarnrc.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.yarnrc.yml b/.yarnrc.yml index 850a550b6bd67..b916ec28a41b6 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -111,6 +111,10 @@ logFilters: pattern: "@automattic/global-styles@workspace:packages/global-styles provides react-dom (*) with version 17.0.2, which doesn't satisfy what @wordpress/block-editor and some of its descendants request" - level: discard pattern: "@automattic/global-styles@workspace:packages/global-styles provides react-dom (*) with version 17.0.2, which doesn't satisfy what @wordpress/components and some of its descendants request" + - level: discard + pattern: "@wordpress/data-controls@npm:2.27.0 doesn't provide react (p90380), requested by @wordpress/data" + - level: discard + pattern: "@wordpress/notices@npm:3.27.0 doesn't provide react (pcdad4), requested by @wordpress/data" nodeLinker: node-modules From 2fd2d1550c78170c6a3a20d34722c10d769b02dc Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 14 Feb 2023 12:08:55 +0200 Subject: [PATCH 15/56] Fix another failing test --- .../sites-overview/site-card/test/site-card.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-card/test/site-card.tsx b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-card/test/site-card.tsx index e437728e188ee..6d7bdfe39c2af 100644 --- a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-card/test/site-card.tsx +++ b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-card/test/site-card.tsx @@ -12,6 +12,18 @@ import SiteCard from '../index'; import type { SiteData } from '../../types'; describe( '', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + nock( 'https://public-api.wordpress.com' ) .persist() .get( '/rest/v1.1/jetpack-blogs/1234/test-connection?is_stale_connection_healthy=true' ) From 0684633727414dc6e3b4a1532a93929e052b2eb6 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 14 Feb 2023 12:15:35 +0200 Subject: [PATCH 16/56] Fix a couple more tests --- .../site-table-row/test/site-table-row.tsx | 36 ++++++++++++------- .../site-table/test/site-table.tsx | 28 ++++++++++----- 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table-row/test/site-table-row.tsx b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table-row/test/site-table-row.tsx index 12b61e6873247..a1f0954e0c643 100644 --- a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table-row/test/site-table-row.tsx +++ b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table-row/test/site-table-row.tsx @@ -13,6 +13,18 @@ import SiteTableRow from '../index'; import type { SiteData } from '../../types'; describe( '', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + nock( 'https://public-api.wordpress.com' ) .persist() .get( '/rest/v1.1/jetpack-blogs/1234/test-connection?is_stale_connection_healthy=true' ) @@ -91,19 +103,19 @@ describe( '', () => { const store = mockStore( initialState ); const queryClient = new QueryClient(); - const { getByText } = render( - - - - - - -
-
-
- ); - test( 'should render correctly and have the error message and the link to fix the issue', async () => { + const { getByText } = render( + + + + + + +
+
+
+ ); + await waitFor( () => { expect( getByText( 'Jetpack is unable to connect to this site' ) ).toBeVisible(); expect( getByText( /fix now/i ) ).toBeVisible(); diff --git a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table/test/site-table.tsx b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table/test/site-table.tsx index 617eea59337dd..db9424ddb2d31 100644 --- a/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table/test/site-table.tsx +++ b/client/jetpack-cloud/sections/agency-dashboard/sites-overview/site-table/test/site-table.tsx @@ -14,6 +14,18 @@ import SiteTable from '../index'; import type { SiteData } from '../../types'; describe( '', () => { + beforeAll( () => { + window.matchMedia = jest.fn().mockImplementation( ( query ) => { + return { + matches: true, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + }; + } ); + } ); + nock( 'https://public-api.wordpress.com' ) .persist() .get( '/rest/v1.1/jetpack-blogs/1234/test-connection?is_stale_connection_healthy=true' ) @@ -96,15 +108,15 @@ describe( '', () => { const store = mockStore( initialState ); const queryClient = new QueryClient(); - const { getByTestId } = render( - - - - - - ); - test( 'should render correctly and have href and status for each row', () => { + const { getByTestId } = render( + + + + + + ); + const backupEle = getByTestId( `row-${ blogId }-backup` ); expect( backupEle.getAttribute( 'href' ) ).toEqual( `/backup/${ siteUrl }` ); expect( backupEle.getElementsByClassName( 'sites-overview__badge' )[ 0 ].textContent ).toEqual( From b8e4a206383cdb92e5249d036ce0de4bf4699873 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 14 Feb 2023 12:05:06 +0200 Subject: [PATCH 17/56] Fix a bad import --- .../my-sites/checkout/composite-checkout/hooks/wpcom-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts b/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts index affe0dfe1ac3d..603ae9d499931 100644 --- a/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts +++ b/client/my-sites/checkout/composite-checkout/hooks/wpcom-store.ts @@ -1,4 +1,4 @@ -import { register } from '@wordpress/data'; +import { register, registerStore } from '@wordpress/data'; import { useRef } from 'react'; import { emptyManagedContactDetails, From 39c8d53e214a950582c38cc9d2321f52c529d3ba Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 28 Feb 2023 17:56:08 +0200 Subject: [PATCH 18/56] Force @wordpress/element resolution --- package.json | 3 +- yarn.lock | 159 +++++---------------------------------------------- 2 files changed, 17 insertions(+), 145 deletions(-) diff --git a/package.json b/package.json index d2b5ed80e40ba..b2c4d72e7b1d2 100644 --- a/package.json +++ b/package.json @@ -301,7 +301,8 @@ "newspack-components/@wordpress/i18n": "4.9.0", "keytar@npm:7.7.0/node-addon-api": "3.1.0", "lzma-native": "^8.0.5", - "@wordpress/interface@^4.8.0": "patch:@wordpress/interface@npm%3A4.8.0#./.yarn/patches/@wordpress-interface-npm-4.8.0-8a39ad37cf.patch" + "@wordpress/interface@^4.8.0": "patch:@wordpress/interface@npm%3A4.8.0#./.yarn/patches/@wordpress-interface-npm-4.8.0-8a39ad37cf.patch", + "@wordpress/element": "4.20.0" }, "packageManager": "yarn@3.2.3", "dependenciesMeta": { diff --git a/yarn.lock b/yarn.lock index 61f36dcbd6b94..65dffdff482c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7038,7 +7038,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:*, @types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^18.0.6": +"@types/react-dom@npm:*, @types/react-dom@npm:>=16.9.0": version: 18.0.11 resolution: "@types/react-dom@npm:18.0.11" dependencies: @@ -7047,15 +7047,6 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^16.9.0": - version: 16.9.10 - resolution: "@types/react-dom@npm:16.9.10" - dependencies: - "@types/react": ^16 - checksum: a04cb6a9fce8153f12f1f93897fc083c47fe8d7bc0a027c266b12740f2551f215e45b430ddfb42c6ac8aa99591492150bf660dc698f4706e0dd76210d2773080 - languageName: node - linkType: hard - "@types/react-dom@npm:^17.0.11": version: 17.0.13 resolution: "@types/react-dom@npm:17.0.13" @@ -8858,52 +8849,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/element@npm:4.7.0": - version: 4.7.0 - resolution: "@wordpress/element@npm:4.7.0" - dependencies: - "@babel/runtime": ^7.16.0 - "@types/react": ^17.0.37 - "@types/react-dom": ^17.0.11 - "@wordpress/escape-html": ^2.9.0 - lodash: ^4.17.21 - react: ^17.0.2 - react-dom: ^17.0.2 - checksum: 9c2a3ac25688e870e514910eb60a315fb9ef88a19772eb8e8e6554cff3073c8cb9f9d4b79ab6eeaafaa38d3e7cd2b01002793cb33496e150df9dadea6b41c7d0 - languageName: node - linkType: hard - -"@wordpress/element@npm:^2.14.0": - version: 2.20.3 - resolution: "@wordpress/element@npm:2.20.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@types/react": ^16.9.0 - "@types/react-dom": ^16.9.0 - "@wordpress/escape-html": ^1.12.2 - lodash: ^4.17.19 - react: ^16.13.1 - react-dom: ^16.13.1 - checksum: dc2a6dce18bf6fb98b27d5ee13591c6c0134d573bd2d20b9a7512d019d3378ea2b4c3d2161dfba019e2ab8529d91d36b8e66d4cdaef66a4f3e8f59cb31c86546 - languageName: node - linkType: hard - -"@wordpress/element@npm:^3.0.0": - version: 3.2.0 - resolution: "@wordpress/element@npm:3.2.0" - dependencies: - "@babel/runtime": ^7.13.10 - "@types/react": ^16.9.0 - "@types/react-dom": ^16.9.0 - "@wordpress/escape-html": ^2.2.0 - lodash: ^4.17.21 - react: ^17.0.1 - react-dom: ^17.0.1 - checksum: 2d1dfb79bf3e83520c99c8285df368aae26cb9019c7c36016df45ea177651323238eca9b55b986b075a1af2cffa2e2f333ca1b90ef8be3337a2cdb5136791118 - languageName: node - linkType: hard - -"@wordpress/element@npm:^4.1.1, @wordpress/element@npm:^4.11.0, @wordpress/element@npm:^4.20.0": +"@wordpress/element@npm:4.20.0": version: 4.20.0 resolution: "@wordpress/element@npm:4.20.0" dependencies: @@ -8919,19 +8865,18 @@ __metadata: languageName: node linkType: hard -"@wordpress/element@npm:^5.4.0": - version: 5.4.0 - resolution: "@wordpress/element@npm:5.4.0" +"@wordpress/element@npm:4.7.0": + version: 4.7.0 + resolution: "@wordpress/element@npm:4.7.0" dependencies: "@babel/runtime": ^7.16.0 - "@types/react": ^18.0.21 - "@types/react-dom": ^18.0.6 - "@wordpress/escape-html": ^2.27.0 - change-case: ^4.1.2 - is-plain-object: ^5.0.0 - react: ^18.2.0 - react-dom: ^18.2.0 - checksum: a63a4dc2dea7b83be946f3a86d367eb8e2917c198167ff8a44994b6ef635721b48dc5c44d9429396c86ad1ccf26913e5b8981ddb83c7e0e0b79679c336a9e302 + "@types/react": ^17.0.37 + "@types/react-dom": ^17.0.11 + "@wordpress/escape-html": ^2.9.0 + lodash: ^4.17.21 + react: ^17.0.2 + react-dom: ^17.0.2 + checksum: 9c2a3ac25688e870e514910eb60a315fb9ef88a19772eb8e8e6554cff3073c8cb9f9d4b79ab6eeaafaa38d3e7cd2b01002793cb33496e150df9dadea6b41c7d0 languageName: node linkType: hard @@ -8957,16 +8902,7 @@ __metadata: languageName: node linkType: hard -"@wordpress/escape-html@npm:^1.12.2": - version: 1.12.2 - resolution: "@wordpress/escape-html@npm:1.12.2" - dependencies: - "@babel/runtime": ^7.13.10 - checksum: abd56635445acbe051eeb32dbeb99c4b432d77235dcb9aa21537c3656920342f090affab0b86ca44e18c18a77bd3515eb557ffab3b0bba4959fd3d63f39fcdb6 - languageName: node - linkType: hard - -"@wordpress/escape-html@npm:^2.13.0, @wordpress/escape-html@npm:^2.2.0, @wordpress/escape-html@npm:^2.22.0, @wordpress/escape-html@npm:^2.27.0, @wordpress/escape-html@npm:^2.9.0": +"@wordpress/escape-html@npm:^2.13.0, @wordpress/escape-html@npm:^2.22.0, @wordpress/escape-html@npm:^2.9.0": version: 2.27.0 resolution: "@wordpress/escape-html@npm:2.27.0" dependencies: @@ -26971,7 +26907,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react-dom@npm:>=16.8 <18, react-dom@npm:^17.0.1, react-dom@npm:^17.0.2": +"react-dom@npm:>=16.8 <18, react-dom@npm:^17.0.2": version: 17.0.2 resolution: "react-dom@npm:17.0.2" dependencies: @@ -26984,32 +26920,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react-dom@npm:^16.13.1": - version: 16.13.1 - resolution: "react-dom@npm:16.13.1" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - prop-types: ^15.6.2 - scheduler: ^0.19.1 - peerDependencies: - react: ^16.13.1 - checksum: 2408bf4a022f5386da72f2eb7f8cc3e68d2cfd76d338d1cc77afcc6b11fc40d94fd8ebe43e39aec7ef1122f0c08992f9aba50ce4195fc2fc69fe0b515e12b273 - languageName: node - linkType: hard - -"react-dom@npm:^18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" - dependencies: - loose-envify: ^1.1.0 - scheduler: ^0.23.0 - peerDependencies: - react: ^18.2.0 - checksum: 66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a - languageName: node - linkType: hard - "react-draggable@npm:^4.4.3, react-draggable@npm:^4.4.4": version: 4.4.4 resolution: "react-draggable@npm:4.4.4" @@ -27473,7 +27383,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react@npm:>=16.8 <18, react@npm:^17.0.1, react@npm:^17.0.2": +"react@npm:>=16.8 <18, react@npm:^17.0.2": version: 17.0.2 resolution: "react@npm:17.0.2" dependencies: @@ -27483,26 +27393,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"react@npm:^16.13.1": - version: 16.13.1 - resolution: "react@npm:16.13.1" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - prop-types: ^15.6.2 - checksum: 4d6ad44cd5c12511218ad179df94919b5c1c328d078160a9f39ae7d31738c427a9b6bbcf9fb4745f4c4f534ddab8529acc24e7cd9dce086c76e3478422256fb3 - languageName: node - linkType: hard - -"react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" - dependencies: - loose-envify: ^1.1.0 - checksum: b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 - languageName: node - linkType: hard - "read-cache@npm:^1.0.0": version: 1.0.0 resolution: "read-cache@npm:1.0.0" @@ -29389,16 +29279,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"scheduler@npm:^0.19.1": - version: 0.19.1 - resolution: "scheduler@npm:0.19.1" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: 9658932a73148a93d791c064b331d9690ddfecc4de25bcd6c9b89f5f1166e3d23d9c31c1595d66565e5ffbb34d47035cb14841aba6444bc266bfcd215cefe9c0 - languageName: node - linkType: hard - "scheduler@npm:^0.20.2": version: 0.20.2 resolution: "scheduler@npm:0.20.2" @@ -29409,15 +29289,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" - dependencies: - loose-envify: ^1.1.0 - checksum: b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd - languageName: node - linkType: hard - "schema-utils@npm:2.7.0": version: 2.7.0 resolution: "schema-utils@npm:2.7.0" From 3070be4c50f04d50abbf20683bf6d4aa011ca2a7 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Thu, 23 Feb 2023 13:12:46 +0200 Subject: [PATCH 19/56] Fix more code style errors --- .../src/components/add-form/index.tsx | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/packages/subscriber/src/components/add-form/index.tsx b/packages/subscriber/src/components/add-form/index.tsx index 6ee13dfa7fc51..9640f61cebccc 100644 --- a/packages/subscriber/src/components/add-form/index.tsx +++ b/packages/subscriber/src/components/add-form/index.tsx @@ -43,7 +43,7 @@ interface Props { } export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { - const __ = useTranslate(); + const translate = useTranslate(); const HANDLED_ERROR = { IMPORT_LIMIT: 'subscriber_import_limit_reached', IMPORT_BLOCKED: 'blocked_import', @@ -56,7 +56,7 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { showSubtitle, showCsvUpload, showFormManualListLabel, - submitBtnName = __( 'Add subscribers' ), + submitBtnName = translate( 'Add subscribers' ), submitBtnAlwaysEnable, allowEmptyFormSubmit, manualListEmailInviting, @@ -76,9 +76,9 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { */ const emailControlMaxNum = 6; const emailControlPlaceholder = [ - __( 'sibling@example.com' ), - __( 'parents@example.com' ), - __( 'friend@example.com' ), + translate( 'sibling@example.com' ), + translate( 'parents@example.com' ), + translate( 'friend@example.com' ), ]; const inProgress = useInProgressState(); const prevInProgress = useRef( inProgress ); @@ -214,7 +214,7 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { currentEmailFormControlsNum === validEmailsNum ) { const controls = Array.from( emailFormControls ); - controls.push( __( 'Add another email' ) ); + controls.push( translate( 'Add another email' ) ); setEmailFormControls( controls ); } @@ -263,14 +263,14 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { switch ( error.code ) { case HANDLED_ERROR.IMPORT_LIMIT: return createInterpolateElement( - __( + translate( 'We couldn’t import your subscriber list as you’ve hit the 100 email limit for our free plan. The good news? You can upload a list of any size after upgrading to any paid plan. If you’d like to import a smaller list now, you can upload a different file.' ), { uploadBtn: formFileUploadElement } ); case HANDLED_ERROR.IMPORT_BLOCKED: - return __( + return translate( 'We ran into a security issue with your subscriber list. It’s nothing to worry about. If you reach out to our support team when you’ve finished setting things up, they’ll help resolve this for you.' ); @@ -288,7 +288,7 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { ! isSelectedFileValid && ( { createInterpolateElement( - __( + translate( 'Sorry, you can only upload CSV files right now. Most providers will let you export this from your settings. Select another file' ), { uploadBtn: formFileUploadElement } @@ -300,11 +300,11 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { function renderEmptyFormValidationMsg() { const validationMsg = showCsvUpload - ? __( + ? translate( "You'll need to add at least one email address " + 'or upload a CSV file of current subscribers to continue.' ) - : __( "You'll need to add at least one subscriber to continue." ); + : translate( "You'll need to add at least one subscriber to continue." ); return ( !! submitAttemptCount && @@ -319,7 +319,7 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { emailControlMaxNum === isValidEmails.filter( ( x ) => x ).length && ( - { __( 'Great start! You’ll be able to add more subscribers after setup.' ) } + { translate( 'Great start! You’ll be able to add more subscribers after setup.' ) } ) ); @@ -332,7 +332,7 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { { createInterpolateElement( sprintf( /* translators: the first string variable shows CTA button name */ - __( + translate( 'By clicking "%s", you represent that you\'ve obtained the appropriate consent to email each person. ' ), submitBtnName @@ -354,10 +354,12 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => { function renderImportCsvLabel() { const ariaLabelMsg = isSiteOnFreePlan - ? __( + ? translate( 'Or bring your mailing list up to 100 emails from other newsletter services by uploading a CSV file.' ) - : __( 'Or bring your mailing list from other newsletter services by uploading a CSV file.' ); + : translate( + 'Or bring your mailing list from other newsletter services by uploading a CSV file.' + ); return ( isSelectedFileValid && @@ -365,10 +367,10 @@ export const AddSubscriberForm: FunctionComponent< Props > = ( props ) => {