From c9eb7db2c706b8b6f586b1e9968a351daf8012fb Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Thu, 1 Dec 2022 11:02:37 +0100 Subject: [PATCH] Upgrade React packages to v18 (#45235) * Upgrade React packages to v18 * Upgrade framer-motion to get React 18 support and updated types * React Native: upgrade to 0.69.4 * React Native: upgrade libraries * LinkControl: fix unit tests * Components: fix unit tests * Block Editor: fix unit tests * NUX: fix unit tests * useSelect: fix unit tests (partially) * LinkSettings test: fix finding blocks by label text * BlockDraggable test: fix finding blocks by label text * React Native test helpers: fix getting blocks * Block Library tests: fix finding blocks by label text * ToggleGroupControl: fix unit test by waiting for tooltip * File Block: update snapshots to account for empty children * Embed native tests: improve mocked API response * Embed native tests: wait for rich preview to appear * Format Library: fix finding blocks by label text * Edit Post: fix finding blocks by label text * Update native snapshots * useNestedSettingsUpdate: deoptimize/unbatch dispatching the updateBlockListSettings actions * Color Palette: wait for dropdown to appear * Add custom Jest matcher: toBePositionedPopover * Use toBePositionedPopover matcher in tests * Mobile - Update tests * Mobile - Update gitignore * Mobile - Update ruby config * [Mobile] - React Native 0.69.4 Upgrade - Android (#43486) * Mobile - React Native 0.69.4 upgrade, base Android changes * Mobile - Remove RNGestureHandlerEnabledRootView since its now deprecated * Mobile - Update bundle android script * [Mobile] - React Native 0.69.4 Upgrade - iOS * Mobile - Check for a local bundle running with metro and use a jsbundle as a fallback * Remove duplicated import of Gesture handler * Remove deprecated initialization for Reanimated * Update Podfile.lock after updating dependencies * Remove React peer deps from packages that don't need them * Add changelog entries about React 18 upgrade * Extract useIsScreenReaderEnabled hook, set state only if enabled=true * Mobile - Update Podfile.lock Co-authored-by: Marin Atanasov Co-authored-by: Gerardo Co-authored-by: Derek Blank --- package-lock.json | 4711 ++++++++++++----- package.json | 22 +- packages/annotations/package.json | 3 - packages/block-directory/CHANGELOG.md | 4 + packages/block-directory/package.json | 4 +- packages/block-editor/CHANGELOG.md | 6 +- packages/block-editor/package.json | 4 +- .../block-draggable/index.native.js | 94 +- .../block-draggable/test/helpers.native.js | 16 +- .../block-draggable/test/index.native.js | 80 +- .../test/__snapshots__/index.native.js.snap | 2 - .../components/block-switcher/test/index.js | 4 + .../use-nested-settings-update.js | 32 +- .../line-height-control/test/index.js | 10 +- .../src/components/link-control/test/index.js | 516 +- .../media-replace-flow/test/index.js | 42 +- .../test/__snapshots__/index.js.snap | 8 +- .../src/components/url-popover/test/index.js | 30 +- packages/block-library/CHANGELOG.md | 4 + packages/block-library/package.json | 4 +- .../src/block/test/edit.native.js | 58 +- .../src/buttons/test/edit.native.js | 91 +- .../block-library/src/cover/edit.native.js | 50 +- .../src/cover/test/edit.native.js | 199 +- .../src/embed/test/index.native.js | 468 +- .../test/__snapshots__/edit.native.js.snap | 8 +- .../src/image/test/edit.native.js | 24 +- .../src/list/test/edit.native.js | 84 +- .../missing/test/edit-integration.native.js | 22 +- .../block-library/src/search/edit.native.js | 58 +- .../src/shortcode/test/edit.native.js | 33 +- .../src/social-link/test/index.native.js | 26 +- .../src/spacer/test/index.native.js | 75 +- packages/blocks/CHANGELOG.md | 4 + packages/blocks/package.json | 2 +- packages/components/CHANGELOG.md | 4 + packages/components/package.json | 6 +- .../alignment-matrix-control/test/index.js | 6 +- .../src/border-box-control/test/index.js | 4 +- packages/components/src/button/test/index.js | 47 +- .../src/color-palette/test/index.tsx | 16 +- .../src/dropdown-menu/test/index.js | 30 +- .../higher-order/with-filters/test/index.js | 194 +- .../with-focus-return/test/index.js | 5 +- .../src/mobile/bottom-sheet/cell.native.js | 2 +- .../mobile/link-settings/test/edit.native.js | 192 +- .../src/number-control/test/index.tsx | 7 +- .../components/src/popover/test/index.tsx | 32 +- .../src/range-control/test/index.tsx | 115 +- .../src/toggle-group-control/test/index.tsx | 15 +- .../components/src/tools-panel/test/index.js | 24 +- packages/components/src/tooltip/test/index.js | 76 +- packages/compose/CHANGELOG.md | 4 + packages/compose/package.json | 2 +- packages/core-data/CHANGELOG.md | 4 + packages/core-data/package.json | 2 +- packages/customize-widgets/CHANGELOG.md | 4 + packages/customize-widgets/package.json | 4 +- packages/data-controls/package.json | 3 - packages/data/CHANGELOG.md | 4 + packages/data/package.json | 2 +- .../src/components/use-select/test/index.js | 5 +- packages/e2e-tests/CHANGELOG.md | 4 + packages/e2e-tests/package.json | 4 +- packages/edit-post/CHANGELOG.md | 4 + packages/edit-post/package.json | 4 +- .../visual-editor/test/index.native.js | 29 +- packages/edit-post/src/editor.native.js | 25 +- packages/edit-site/CHANGELOG.md | 4 + packages/edit-site/package.json | 4 +- packages/edit-widgets/CHANGELOG.md | 4 + packages/edit-widgets/package.json | 4 +- packages/editor/CHANGELOG.md | 4 + packages/editor/package.json | 4 +- packages/element/CHANGELOG.md | 4 + packages/element/package.json | 8 +- packages/format-library/CHANGELOG.md | 4 + packages/format-library/package.json | 4 +- .../src/text-color/test/index.native.js | 72 +- packages/interface/CHANGELOG.md | 4 + packages/interface/package.json | 4 +- packages/jest-preset-default/package.json | 4 +- packages/keyboard-shortcuts/CHANGELOG.md | 4 + packages/keyboard-shortcuts/package.json | 2 +- packages/list-reusable-blocks/CHANGELOG.md | 4 + packages/list-reusable-blocks/package.json | 4 +- packages/notices/package.json | 3 - packages/nux/CHANGELOG.md | 4 + packages/nux/package.json | 4 +- .../dot-tip/test/__snapshots__/index.js.snap | 3 +- .../nux/src/components/dot-tip/test/index.js | 14 +- packages/plugins/CHANGELOG.md | 4 + packages/plugins/package.json | 2 +- packages/preferences/CHANGELOG.md | 4 + packages/preferences/package.json | 4 +- .../react-native-aztec/android/build.gradle | 9 +- .../android/react-native-bridge/build.gradle | 14 +- .../WPAndroidGlue/WPAndroidGlueCode.java | 12 +- .../react-native-bridge/ios/Gutenberg.swift | 6 +- packages/react-native-editor/.bundle/config | 2 + packages/react-native-editor/.gitignore | 11 +- .../android/app/build.gradle | 109 +- .../android/app/src/debug/AndroidManifest.xml | 2 +- .../android/app/src/main/AndroidManifest.xml | 2 +- .../main/java/com/gutenberg/MainActivity.java | 7 - .../java/com/gutenberg/MainApplication.java | 9 - .../MainApplicationReactNativeHost.java | 116 + .../components/MainComponentsRegistry.java | 36 + ...ApplicationTurboModuleManagerDelegate.java | 48 + .../android/app/src/main/jni/Android.mk | 48 + .../jni/MainApplicationModuleProvider.cpp | 24 + .../main/jni/MainApplicationModuleProvider.h | 16 + ...nApplicationTurboModuleManagerDelegate.cpp | 45 + ...ainApplicationTurboModuleManagerDelegate.h | 38 + .../src/main/jni/MainComponentsRegistry.cpp | 61 + .../app/src/main/jni/MainComponentsRegistry.h | 32 + .../android/app/src/main/jni/OnLoad.cpp | 11 + .../res/drawable/rn_edit_text_material.xml | 36 + .../app/src/main/res/values/styles.xml | 1 + .../react-native-editor/android/build.gradle | 23 +- .../android/gradle.properties | 13 +- .../android/settings.gradle | 7 + .../react-native-editor/ios/.ruby-version | 2 +- packages/react-native-editor/ios/Gemfile | 2 +- packages/react-native-editor/ios/Gemfile.lock | 81 +- .../GutenbergDemo.xcodeproj/project.pbxproj | 14 +- packages/react-native-editor/ios/Podfile | 7 +- packages/react-native-editor/ios/Podfile.lock | 483 +- .../ios/gutenbergTests/gutenbergTests.m | 16 +- packages/react-native-editor/package.json | 10 +- .../react-native.config.js | 15 + packages/react-native-editor/src/index.js | 5 - packages/reusable-blocks/CHANGELOG.md | 4 + packages/reusable-blocks/package.json | 4 +- packages/rich-text/CHANGELOG.md | 4 + packages/rich-text/package.json | 2 +- packages/scripts/CHANGELOG.md | 4 + packages/scripts/package.json | 4 +- packages/server-side-render/CHANGELOG.md | 4 + packages/server-side-render/package.json | 4 +- packages/viewport/CHANGELOG.md | 4 + packages/viewport/package.json | 2 +- packages/widgets/CHANGELOG.md | 4 + packages/widgets/package.json | 4 +- .../integration-test-helpers/get-block.js | 5 +- .../get-inner-block.js | 4 +- test/native/setup.js | 3 + .../matchers/to-be-positioned-popover.js | 15 + test/unit/config/testing-library.js | 1 + 149 files changed, 6086 insertions(+), 3220 deletions(-) create mode 100644 packages/react-native-editor/.bundle/config create mode 100644 packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/MainApplicationReactNativeHost.java create mode 100644 packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/components/MainComponentsRegistry.java create mode 100644 packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java create mode 100644 packages/react-native-editor/android/app/src/main/jni/Android.mk create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.cpp create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.h create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.cpp create mode 100644 packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.h create mode 100644 packages/react-native-editor/android/app/src/main/jni/OnLoad.cpp create mode 100644 packages/react-native-editor/android/app/src/main/res/drawable/rn_edit_text_material.xml create mode 100644 packages/react-native-editor/react-native.config.js create mode 100644 test/unit/config/matchers/to-be-positioned-popover.js diff --git a/package-lock.json b/package-lock.json index 2c0fb04eadf52..2f6ddaab8bfed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,6 +94,12 @@ "tunnel": "0.0.6" } }, + "@adobe/css-tools": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", + "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "dev": true + }, "@axe-core/puppeteer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@axe-core/puppeteer/-/puppeteer-4.0.0.tgz", @@ -443,6 +449,11 @@ "@babel/types": "^7.16.0" } }, + "@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==" + }, "@babel/helper-validator-identifier": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", @@ -525,7 +536,6 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.0.tgz", "integrity": "sha512-nyYmIo7ZqKsY6P4lnVmBlxp9B3a96CscbLotlsNuktMHahkDwoPYEjXrZHU0Tj844Z9f1IthVxQln57mhkcExw==", - "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-remap-async-to-generator": "^7.16.0", @@ -906,7 +916,6 @@ "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } @@ -974,7 +983,6 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" } @@ -1279,7 +1287,6 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.0.tgz", "integrity": "sha512-LogN88uO+7EhxWc8WZuQ8vxdSyVGxhkh8WTC3tzlT8LccMuQdA81e9SGV6zY7kY2LjDhhDOFdQVxdGwPyBCnvg==", - "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0" } @@ -1423,6 +1430,7 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.0.tgz", "integrity": "sha512-JAvGxgKuwS2PihiSFaDrp94XOzzTUeDeOQlcKzVAyaPap7BnZXK/lvMDiubkPTdotPKOIZq9xWXWnggUMYiExg==", + "dev": true, "requires": { "regenerator-transform": "^0.14.2" } @@ -1785,6 +1793,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", "integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", + "dev": true, "requires": { "exec-sh": "^0.3.2", "minimist": "^1.2.0" @@ -2892,17 +2901,17 @@ } }, "@jest/create-cache-key-function": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.3.1.tgz", - "integrity": "sha512-21lx0HRgkznc5Tc2WGiXVYQQ6Vdfohs6CkLV2FLogLRb52f6v9SiSIjTNflu23lzEmY4EalLgQLxCfhgvREV6w==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", "requires": { - "@jest/types": "^27.2.5" + "@jest/types": "^27.5.1" }, "dependencies": { "@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", @@ -2957,6 +2966,23 @@ } } }, + "@jest/expect-utils": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", + "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", + "dev": true, + "requires": { + "jest-get-type": "^29.2.0" + }, + "dependencies": { + "jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true + } + } + }, "@jest/fake-timers": { "version": "27.4.2", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", @@ -3750,14 +3776,12 @@ "@jridgewell/resolve-uri": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", - "dev": true + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==" }, "@jridgewell/set-array": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", - "dev": true + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==" }, "@jridgewell/source-map": { "version": "0.3.2", @@ -3772,14 +3796,12 @@ "@jridgewell/sourcemap-codec": { "version": "1.4.13", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", - "dev": true + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" }, "@jridgewell/trace-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", - "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -6936,6 +6958,99 @@ "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==", "dev": true }, + "@motionone/animation": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz", + "integrity": "sha512-h+1sdyBP8vbxEBW5gPFDnj+m2DCqdlAuf2g6Iafb1lcMnqjsRXWlPw1AXgvUMXmreyhqmPbJqoNfIKdytampRQ==", + "requires": { + "@motionone/easing": "^10.14.0", + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, + "@motionone/dom": { + "version": "10.13.1", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.13.1.tgz", + "integrity": "sha512-zjfX+AGMIt/fIqd/SL1Lj93S6AiJsEA3oc5M9VkUr+Gz+juRmYN1vfvZd6MvEkSqEjwPQgcjN7rGZHrDB9APfQ==", + "requires": { + "@motionone/animation": "^10.13.1", + "@motionone/generators": "^10.13.1", + "@motionone/types": "^10.13.0", + "@motionone/utils": "^10.13.1", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, + "@motionone/easing": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.14.0.tgz", + "integrity": "sha512-2vUBdH9uWTlRbuErhcsMmt1jvMTTqvGmn9fHq8FleFDXBlHFs5jZzHJT9iw+4kR1h6a4SZQuCf72b9ji92qNYA==", + "requires": { + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, + "@motionone/generators": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.14.0.tgz", + "integrity": "sha512-6kRHezoFfIjFN7pPpaxmkdZXD36tQNcyJe3nwVqwJ+ZfC0e3rFmszR8kp9DEVFs9QL/akWjuGPSLBI1tvz+Vjg==", + "requires": { + "@motionone/types": "^10.14.0", + "@motionone/utils": "^10.14.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, + "@motionone/types": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.14.0.tgz", + "integrity": "sha512-3bNWyYBHtVd27KncnJLhksMFQ5o2MSdk1cA/IZqsHtA9DnRM1SYgN01CTcJ8Iw8pCXF5Ocp34tyAjY7WRpOJJQ==" + }, + "@motionone/utils": { + "version": "10.14.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.14.0.tgz", + "integrity": "sha512-sLWBLPzRqkxmOTRzSaD3LFQXCPHvDzyHJ1a3VP9PRzBxyVd2pv51/gMOsdAcxQ9n+MIeGJnxzXBYplUHKj4jkw==", + "requires": { + "@motionone/types": "^10.14.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } + } + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -8132,56 +8247,21 @@ "integrity": "sha512-O/ohFq1CAQLfoNc376Z3W6gvVcCJlje5AVk0JhsI8Q40hn+NXAWCnOM1bEePfC0uDMtp0/RCK6FotUvkQ6c4Zw==" }, "@react-native-community/blur": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@react-native-community/blur/-/blur-3.6.0.tgz", - "integrity": "sha512-GtDBhpX2pQcjl4VopOC8FktrVufrEfYRwVeMQ2WWckqKIv2BdwvlvWvj88L1WmEdBr9UNcm3rtgz+d+YXkmirA==", - "requires": { - "prop-types": "^15.5.10" - } + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@react-native-community/blur/-/blur-4.2.0.tgz", + "integrity": "sha512-StgP5zQJOCHqDRjmcKnzVkJ920S6DYBKRJfigSUnlkNQp+HzZtVtyKq0j5a7x84NtHcV7j8Uy5mz1Lx9ZKRKfA==" }, - "@react-native-community/cli": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-6.3.1.tgz", - "integrity": "sha512-UQ77AkGvPzdwJt6qhYXUyDMP1v2rdCcIlrhU48FOcAhGX+N/LCL9Cp/Ic6CkiiSHJdktbgiEEJ2srprXH8nzVg==", + "@react-native-community/cli-clean": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-clean/-/cli-clean-8.0.4.tgz", + "integrity": "sha512-IwS1M1NHg6+qL8PThZYMSIMYbZ6Zbx+lIck9PLBskbosFo24M3lCOflOl++Bggjakp6mR+sRXxLMexid/GeOsQ==", "requires": { - "@react-native-community/cli-debugger-ui": "^6.0.0-rc.0", - "@react-native-community/cli-hermes": "^6.3.0", - "@react-native-community/cli-plugin-metro": "^6.2.0", - "@react-native-community/cli-server-api": "^6.2.0", - "@react-native-community/cli-tools": "^6.2.0", - "@react-native-community/cli-types": "^6.0.0", - "appdirsjs": "^1.2.4", + "@react-native-community/cli-tools": "^8.0.4", "chalk": "^4.1.2", - "command-exists": "^1.2.8", - "commander": "^2.19.0", - "cosmiconfig": "^5.1.0", - "deepmerge": "^3.2.0", - "envinfo": "^7.7.2", "execa": "^1.0.0", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0", - "glob": "^7.1.3", - "graceful-fs": "^4.1.3", - "joi": "^17.2.1", - "leven": "^3.1.0", - "lodash": "^4.17.15", - "minimist": "^1.2.0", - "node-stream-zip": "^1.9.1", - "ora": "^3.4.0", - "pretty-format": "^26.6.2", - "prompts": "^2.4.0", - "semver": "^6.3.0", - "serve-static": "^1.13.1", - "strip-ansi": "^5.2.0", - "sudo-prompt": "^9.0.0", - "wcwidth": "^1.0.1" + "prompts": "^2.4.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8212,22 +8292,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -8238,25 +8302,8 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } } }, - "deepmerge": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz", - "integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==" - }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" - }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", @@ -8271,15 +8318,6 @@ "strip-eof": "^1.0.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -8288,217 +8326,139 @@ "pump": "^3.0.0" } }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "p-locate": "^4.1.0" + "has-flag": "^4.0.0" } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", - "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + } + } + }, + "@react-native-community/cli-config": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-config/-/cli-config-8.0.6.tgz", + "integrity": "sha512-mjVpVvdh8AviiO8xtqeX+BkjqE//NMDnISwsLWSJUfNCwTAPmdR8PGbhgP5O4hWHyJ3WkepTopl0ya7Tfi3ifw==", + "requires": { + "@react-native-community/cli-tools": "^8.0.4", + "cosmiconfig": "^5.1.0", + "deepmerge": "^3.2.0", + "glob": "^7.1.3", + "joi": "^17.2.1" + }, + "dependencies": { + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "deepmerge": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz", + "integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { - "p-try": "^2.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", "requires": { - "p-limit": "^2.2.0" + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } } } }, "@react-native-community/cli-debugger-ui": { - "version": "6.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-6.0.0-rc.0.tgz", - "integrity": "sha512-achYcPPoWa9D02C5tn6TBzjeY443wQTyx37urptc75JpZ7gR5YHsDyIEEWa3DDYp1va9zx/iGg+uZ/hWw07GAw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-8.0.0.tgz", + "integrity": "sha512-u2jq06GZwZ9sRERzd9FIgpW6yv4YOW4zz7Ym/B8eSzviLmy3yI/8mxJtvlGW+J8lBsfMcQoqJpqI6Rl1nZy9yQ==", "requires": { "serve-static": "^1.13.1" } }, - "@react-native-community/cli-hermes": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-hermes/-/cli-hermes-6.3.0.tgz", - "integrity": "sha512-Uhbm9bubyZLZ12vFCIfWbE/Qi3SBTbYIN/TC08EudTLhv/KbPomCQnmFsnJ7AXQFuOZJs73mBxoEAYSbRbwyVA==", + "@react-native-community/cli-doctor": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-doctor/-/cli-doctor-8.0.6.tgz", + "integrity": "sha512-ZQqyT9mJMVeFEVIwj8rbDYGCA2xXjJfsQjWk2iTRZ1CFHfhPSUuUiG8r6mJmTinAP9t+wYcbbIYzNgdSUKnDMw==", "requires": { - "@react-native-community/cli-platform-android": "^6.3.0", - "@react-native-community/cli-tools": "^6.2.0", + "@react-native-community/cli-config": "^8.0.6", + "@react-native-community/cli-platform-ios": "^8.0.6", + "@react-native-community/cli-tools": "^8.0.4", "chalk": "^4.1.2", + "command-exists": "^1.2.8", + "envinfo": "^7.7.2", + "execa": "^1.0.0", "hermes-profile-transformer": "^0.0.6", - "ip": "^1.1.5" + "ip": "^1.1.5", + "node-stream-zip": "^1.9.1", + "ora": "^5.4.1", + "prompts": "^2.4.0", + "semver": "^6.3.0", + "strip-ansi": "^5.2.0", + "sudo-prompt": "^9.0.0", + "wcwidth": "^1.0.1" }, "dependencies": { - "@react-native-community/cli-platform-android": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-6.3.0.tgz", - "integrity": "sha512-d5ufyYcvrZoHznYm5bjBXaiHIJv552t5gYtQpnUsxBhHSQ8QlaNmlLUyeSPRDfOw4ND9b0tPHqs4ufwx6vp/fQ==", - "requires": { - "@react-native-community/cli-tools": "^6.2.0", - "chalk": "^4.1.2", - "execa": "^1.0.0", - "fs-extra": "^8.1.0", - "glob": "^7.1.3", - "jetifier": "^1.6.2", - "lodash": "^4.17.15", - "logkitty": "^0.7.1", - "slash": "^3.0.0", - "xmldoc": "^1.1.2" - } + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", @@ -8517,6 +8477,19 @@ "supports-color": "^7.1.0" } }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", + "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8540,6 +8513,13 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "execa": { @@ -8564,24 +8544,50 @@ "pump": "^3.0.0" } }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -8591,10 +8597,91 @@ "once": "^1.3.1" } }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@react-native-community/cli-hermes": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-hermes/-/cli-hermes-8.0.5.tgz", + "integrity": "sha512-Zm0wM6SfgYAEX1kfJ1QBvTayabvh79GzmjHyuSnEROVNPbl4PeCG4WFbwy489tGwOP9Qx9fMT5tRIFCD8bp6/g==", + "requires": { + "@react-native-community/cli-platform-android": "^8.0.5", + "@react-native-community/cli-tools": "^8.0.4", + "chalk": "^4.1.2", + "hermes-profile-transformer": "^0.0.6", + "ip": "^1.1.5" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "supports-color": { "version": "7.2.0", @@ -8607,11 +8694,11 @@ } }, "@react-native-community/cli-platform-android": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-6.2.0.tgz", - "integrity": "sha512-QLxwClcbxVhuIGsQiIpqRnoJzRdpN2B+y/Yt2OGgDHXGbuOXulgt4D+8AhvZXrB4jyAcEUlFg/048v3RGQQudw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-android/-/cli-platform-android-8.0.5.tgz", + "integrity": "sha512-z1YNE4T1lG5o9acoQR1GBvf7mq6Tzayqo/za5sHVSOJAC9SZOuVN/gg/nkBa9a8n5U7qOMFXfwhTMNqA474gXA==", "requires": { - "@react-native-community/cli-tools": "^6.2.0", + "@react-native-community/cli-tools": "^8.0.4", "chalk": "^4.1.2", "execa": "^1.0.0", "fs-extra": "^8.1.0", @@ -8619,8 +8706,7 @@ "jetifier": "^1.6.2", "lodash": "^4.17.15", "logkitty": "^0.7.1", - "slash": "^3.0.0", - "xmldoc": "^1.1.2" + "slash": "^3.0.0" }, "dependencies": { "ansi-styles": { @@ -8688,14 +8774,14 @@ } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -8705,6 +8791,14 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -8730,24 +8824,24 @@ } }, "@react-native-community/cli-platform-ios": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-6.2.0.tgz", - "integrity": "sha512-k15MhExxLiLDDZOeuPgvTxbp0CsoLQQpk2Du0HjZDePqqWcKJylQqMZru1o8HuQHPcEr+b71HIs5V+lKyFYpfg==", + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-platform-ios/-/cli-platform-ios-8.0.6.tgz", + "integrity": "sha512-CMR6mu/LVx6JVfQRDL9uULsMirJT633bODn+IrYmrwSz250pnhON16We8eLPzxOZHyDjm7JPuSgHG3a/BPiRuQ==", "requires": { - "@react-native-community/cli-tools": "^6.2.0", + "@react-native-community/cli-tools": "^8.0.4", "chalk": "^4.1.2", + "execa": "^1.0.0", "glob": "^7.1.3", "js-yaml": "^3.13.1", "lodash": "^4.17.15", - "ora": "^3.4.0", - "plist": "^3.0.2", - "xcode": "^2.0.0" + "ora": "^5.4.1", + "plist": "^3.0.2" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", @@ -8766,6 +8860,19 @@ "supports-color": "^7.1.0" } }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", + "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8779,15 +8886,49 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -8797,71 +8938,72 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, "ora": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", - "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } } }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, "supports-color": { @@ -8875,19 +9017,19 @@ } }, "@react-native-community/cli-plugin-metro": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-6.2.0.tgz", - "integrity": "sha512-JfmzuFNzOr+dFTUQJo1rV0t87XAqgHRTMYXNleQVt8otOVCk1FSCgKlgqMdvQc/FCx2ZjoMWEEV/g0LrPI8Etw==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-8.0.4.tgz", + "integrity": "sha512-UWzY1eMcEr/6262R2+d0Is5M3L/7Y/xXSDIFMoc5Rv5Wucl3hJM/TxHXmByvHpuJf6fJAfqOskyt4bZCvbI+wQ==", "requires": { - "@react-native-community/cli-server-api": "^6.2.0", - "@react-native-community/cli-tools": "^6.2.0", + "@react-native-community/cli-server-api": "^8.0.4", + "@react-native-community/cli-tools": "^8.0.4", "chalk": "^4.1.2", - "metro": "^0.66.1", - "metro-config": "^0.66.1", - "metro-core": "^0.66.1", - "metro-react-native-babel-transformer": "^0.66.1", - "metro-resolver": "^0.66.1", - "metro-runtime": "^0.66.1", + "metro": "^0.70.1", + "metro-config": "^0.70.1", + "metro-core": "^0.70.1", + "metro-react-native-babel-transformer": "^0.70.1", + "metro-resolver": "^0.70.1", + "metro-runtime": "^0.70.1", "readline": "^1.3.0" }, "dependencies": { @@ -8926,6 +9068,112 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "hermes-parser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.6.0.tgz", + "integrity": "sha512-Vf58jBZca2+QBLR9h7B7mdg8oFz2g5ILz1iVouZ5DOrOrAfBmPfJjdjDT8jrO0f+iJ4/hSRrQHqHIjSnTaLUDQ==", + "requires": { + "hermes-estree": "0.6.0" + } + }, + "metro-react-native-babel-preset": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.3.tgz", + "integrity": "sha512-4Nxc1zEiHEu+GTdEMEsHnRgfaBkg8f/Td3+FcQ8NTSvs+xL3LBrQy6N07idWSQZHIdGFf+tTHvRfSIWLD8u8Tg==", + "requires": { + "@babel/core": "^7.14.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-export-default-from": "^7.0.0", + "@babel/plugin-syntax-flow": "^7.2.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-syntax-optional-chaining": "^7.0.0", + "@babel/plugin-transform-arrow-functions": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.0.0", + "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-classes": "^7.0.0", + "@babel/plugin-transform-computed-properties": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.0.0", + "@babel/plugin-transform-exponentiation-operator": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/plugin-transform-function-name": "^7.0.0", + "@babel/plugin-transform-literals": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", + "@babel/plugin-transform-parameters": "^7.0.0", + "@babel/plugin-transform-react-display-name": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx-self": "^7.0.0", + "@babel/plugin-transform-react-jsx-source": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/plugin-transform-shorthand-properties": "^7.0.0", + "@babel/plugin-transform-spread": "^7.0.0", + "@babel/plugin-transform-sticky-regex": "^7.0.0", + "@babel/plugin-transform-template-literals": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.5.0", + "@babel/plugin-transform-unicode-regex": "^7.0.0", + "@babel/template": "^7.0.0", + "react-refresh": "^0.4.0" + } + }, + "metro-react-native-babel-transformer": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.70.3.tgz", + "integrity": "sha512-WKBU6S/G50j9cfmFM4k4oRYprd8u3qjleD4so1E2zbTNILg+gYla7ZFGCAvi2G0ZcqS2XuGCR375c2hF6VVvwg==", + "requires": { + "@babel/core": "^7.14.0", + "babel-preset-fbjs": "^3.4.0", + "hermes-parser": "0.6.0", + "metro-babel-transformer": "0.70.3", + "metro-react-native-babel-preset": "0.70.3", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1" + } + }, + "metro-source-map": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", + "requires": { + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.0.0", + "invariant": "^2.2.4", + "metro-symbolicate": "0.70.3", + "nullthrows": "^1.1.1", + "ob1": "0.70.3", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + } + }, + "metro-symbolicate": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", + "requires": { + "invariant": "^2.2.4", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "through2": "^2.0.1", + "vlq": "^1.0.0" + } + }, + "ob1": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==" + }, + "react-refresh": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz", + "integrity": "sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==" + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8937,47 +9185,50 @@ } }, "@react-native-community/cli-server-api": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-server-api/-/cli-server-api-6.2.0.tgz", - "integrity": "sha512-OnbnYclhoDpjge33QO5Slhfn0DsmLzzAgyrSCnb24HhSqwq7ObjMHaLpoEhpajzLG71wq5oKh0APEQjiL4Mknw==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-server-api/-/cli-server-api-8.0.4.tgz", + "integrity": "sha512-Orr14njx1E70CVrUA8bFdl+mrnbuXUjf1Rhhm0RxUadFpvkHuOi5dh8Bryj2MKtf8eZrpEwZ7tuQPhJEULW16A==", "requires": { - "@react-native-community/cli-debugger-ui": "^6.0.0-rc.0", - "@react-native-community/cli-tools": "^6.2.0", + "@react-native-community/cli-debugger-ui": "^8.0.0", + "@react-native-community/cli-tools": "^8.0.4", "compression": "^1.7.1", "connect": "^3.6.5", "errorhandler": "^1.5.0", - "nocache": "^2.1.0", + "nocache": "^3.0.1", "pretty-format": "^26.6.2", "serve-static": "^1.13.1", - "ws": "^1.1.0" + "ws": "^7.5.1" }, "dependencies": { "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" } } }, "@react-native-community/cli-tools": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-6.2.1.tgz", - "integrity": "sha512-7RbOkZLT/3YG8CAYYM70ajRKIOgVxK/b4t9KNsPq+2uen99MGezfeglC8s1cs3vBNVVxCo0a2JbXg18bUd8eqA==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-8.0.4.tgz", + "integrity": "sha512-ePN9lGxh6LRFiotyddEkSmuqpQhnq2iw9oiXYr4EFWpIEy0yCigTuSTiDF68+c8M9B+7bTwkRpz/rMPC4ViO5Q==", "requires": { "appdirsjs": "^1.2.4", "chalk": "^4.1.2", + "find-up": "^5.0.0", "lodash": "^4.17.15", "mime": "^2.4.1", "node-fetch": "^2.6.0", "open": "^6.2.0", + "ora": "^5.4.1", "semver": "^6.3.0", "shell-quote": "^1.7.3" }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8995,6 +9246,19 @@ "supports-color": "^7.1.0" } }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", + "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -9008,21 +9272,105 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, "mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -9034,49 +9382,11 @@ } }, "@react-native-community/cli-types": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-6.0.0.tgz", - "integrity": "sha512-K493Fk2DMJC0ZM8s8gnfseKxGasIhuDaCUDeLZcoCSFlrjKEuEs1BKKEJiev0CARhKEXKOyyp/uqYM9nWhisNw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-8.0.0.tgz", + "integrity": "sha512-1lZS1PEvMlFaN3Se1ksyoFWzMjk+YfKi490GgsqKJln9gvFm8tqVPdnXttI5Uf2DQf3BMse8Bk8dNH4oV6Ewow==", "requires": { - "ora": "^3.4.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", - "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } + "joi": "^17.2.1" } }, "@react-native-community/slider": { @@ -9094,9 +9404,9 @@ "integrity": "sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ==" }, "@react-native/normalize-color": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@react-native/normalize-color/-/normalize-color-1.0.0.tgz", - "integrity": "sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-native/normalize-color/-/normalize-color-2.0.0.tgz", + "integrity": "sha512-Wip/xsc5lw8vsBlmY2MO/gFLp3MvuZ2baBZjDeTjjndMgM0h5sxz7AZR62RDPGgstp8Np7JzjvVqVT7tpFZqsw==" }, "@react-native/polyfills": { "version": "2.0.0", @@ -15810,16 +16120,16 @@ } }, "@testing-library/jest-dom": { - "version": "5.16.4", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.4.tgz", - "integrity": "sha512-Gy+IoFutbMQcky0k+bqqumXZ1cTGswLsFqmNLzNdSKkU9KGV2u9oXhukCbbJ9/LRPKiqwxEE8VpV/+YZlfkPUA==", + "version": "5.16.5", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz", + "integrity": "sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==", "dev": true, "requires": { + "@adobe/css-tools": "^4.0.1", "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", - "css": "^3.0.0", "css.escape": "^1.5.1", "dom-accessibility-api": "^0.5.6", "lodash": "^4.17.15", @@ -15836,16 +16146,13 @@ } }, "aria-query": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz", - "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.1.tgz", + "integrity": "sha512-4cPQjOYM2mqq7mZG8CSxkUvL2Yv/x29VhGq5LKehTsxRnoVQps1YGt9NyjcNQsznEsD4rr8a6zGxqeNTqJWjpA==", + "dev": true, + "requires": { + "deep-equal": "^2.0.5" + } }, "chalk": { "version": "3.0.0", @@ -15872,15 +16179,37 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "css": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", - "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "deep-equal": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz", + "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", "dev": true, "requires": { - "inherits": "^2.0.4", - "source-map": "^0.6.1", - "source-map-resolve": "^0.6.0" + "call-bind": "^1.0.0", + "es-get-iterator": "^1.1.1", + "get-intrinsic": "^1.0.1", + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.2", + "is-regex": "^1.1.1", + "isarray": "^2.0.5", + "object-is": "^1.1.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.3", + "which-boxed-primitive": "^1.0.1", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.2" + } + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "has-flag": { @@ -15889,18 +16218,79 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + } + } + }, "redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -15911,22 +16301,6 @@ "strip-indent": "^3.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" - } - }, "strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -15948,29 +16322,49 @@ } }, "@testing-library/react": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-12.1.5.tgz", - "integrity": "sha512-OfTXCJUFgjd/digLUuPxa0+/3ZxsQmE7ub9kcbW/wi96Bh3o/p5vrETcBGfP17NWPGqeYYl5LTRpwyGoMC4ysg==", + "version": "13.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-13.4.0.tgz", + "integrity": "sha512-sXOGON+WNTh3MLE9rve97ftaZukN3oNf2KjDy7YTx6hcTO2uuLHuCGynMDhFwGw/jYf4OJ2Qk0i4i79qMNNkyw==", "dev": true, "requires": { "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^8.0.0", - "@types/react-dom": "<18.0.0" + "@testing-library/dom": "^8.5.0", + "@types/react-dom": "^18.0.0" + }, + "dependencies": { + "@types/react-dom": { + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", + "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", + "dev": true, + "requires": { + "@types/react": "*" + } + } } }, "@testing-library/react-native": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@testing-library/react-native/-/react-native-9.1.0.tgz", - "integrity": "sha512-YBCSOIMYlh8gI0VG7ExRe80hNpfhC+i7j0cvpwiopUYtbpft8bMJXO35A4zEk7BkiWXEq6bYZ7VDJR3muSLhyQ==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@testing-library/react-native/-/react-native-11.3.0.tgz", + "integrity": "sha512-wCbH7TJ2uVwtkQPRQTZbM3Y/mzwK5zxwkOPKfR2UdVdz/RtCC2UVyDnJMaBNwG/cNle5tc92sQDfp3Gn2oyftg==", "dev": true, "requires": { - "pretty-format": "^27.0.0" + "pretty-format": "^29.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@sinclair/typebox": { + "version": "0.24.50", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.50.tgz", + "integrity": "sha512-k8ETQOOQDg5FtK7y9KJWpsGLik+QlPmIi8zzl/dGUgshV2QitprkFlCR/AemjWOTyKn9UwSSGRTzLVotvgCjYQ==", "dev": true }, "ansi-styles": { @@ -15980,28 +16374,28 @@ "dev": true }, "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", + "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", "dev": true, "requires": { - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.0.0", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" } }, "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true } } }, "@testing-library/user-event": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.2.0.tgz", - "integrity": "sha512-+hIlG4nJS6ivZrKnOP7OGsDu9Fxmryj9vCl8x0ZINtTJcCHs2zLsYif5GzuRiBF2ck5GZG2aQr7Msg+EHlnYVQ==", + "version": "14.4.3", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz", + "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==", "dev": true }, "@tootallnate/once": { @@ -16230,43 +16624,216 @@ } }, "@types/jest": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.1.tgz", - "integrity": "sha512-C2p7yqleUKtCkVjlOur9BWVA4HgUQmEj/HWCt5WzZ5mLXrWnyIfl0wGuArc+kBXsy0ZZfLp+7dywB4HtSVYGVA==", + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.0.tgz", + "integrity": "sha512-KO7bPV21d65PKwv3LLsD8Jn3E05pjNjRZvkm+YTacWhVmykAb07wW6IkZUmQAltwQafNcDUEUrMO2h3jeBSisg==", "dev": true, "requires": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "expect": "^29.0.0", + "pretty-format": "^29.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", + "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@sinclair/typebox": { + "version": "0.24.50", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.50.tgz", + "integrity": "sha512-k8ETQOOQDg5FtK7y9KJWpsGLik+QlPmIi8zzl/dGUgshV2QitprkFlCR/AemjWOTyKn9UwSSGRTzLVotvgCjYQ==", "dev": true }, + "@types/yargs": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", + "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, "ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true + }, + "diff-sequences": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", + "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", + "dev": true + }, + "expect": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", + "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", + "dev": true, + "requires": { + "@jest/expect-utils": "^29.2.1", + "jest-get-type": "^29.2.0", + "jest-matcher-utils": "^29.2.1", + "jest-message-util": "^29.2.1", + "jest-util": "^29.2.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "jest-diff": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", + "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.2.0", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.2.1" + } + }, + "jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "dev": true + }, + "jest-matcher-utils": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", + "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.2.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.2.1" + } + }, + "jest-message-util": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", + "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.2.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.2.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", + "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "dev": true, + "requires": { + "@jest/types": "^29.2.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "version": "29.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", + "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", "dev": true, "requires": { - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.0.0", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" } }, "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } } } }, @@ -16439,20 +17006,13 @@ } }, "@types/react": { - "version": "17.0.37", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", - "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "version": "18.0.21", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz", + "integrity": "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", "csstype": "^3.0.2" - }, - "dependencies": { - "csstype": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", - "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" - } } }, "@types/react-dates": { @@ -16475,9 +17035,9 @@ } }, "@types/react-dom": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz", - "integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==", + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", + "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", "requires": { "@types/react": "*" } @@ -16557,9 +17117,9 @@ "dev": true }, "@types/testing-library__jest-dom": { - "version": "5.14.3", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.3.tgz", - "integrity": "sha512-oKZe+Mf4ioWlMuzVBaXQ9WDnEm1+umLx0InILg+yvZVBBDmzV5KfZyLrCvadtWcx8+916jLmHafcmqqffl+iIw==", + "version": "5.14.5", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", + "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", "dev": true, "requires": { "@types/jest": "*" @@ -17650,7 +18210,7 @@ "date-fns": "^2.28.0", "dom-scroll-into-view": "^1.2.1", "downshift": "^6.0.15", - "framer-motion": "^6.2.8", + "framer-motion": "^7.6.1", "gradient-parser": "^0.1.5", "highlight-words-core": "^1.2.2", "lodash": "^4.17.21", @@ -18076,13 +18636,25 @@ "version": "file:packages/element", "requires": { "@babel/runtime": "^7.16.0", - "@types/react": "^17.0.37", - "@types/react-dom": "^17.0.11", + "@types/react": "^18.0.21", + "@types/react-dom": "^18.0.6", "@wordpress/escape-html": "file:packages/escape-html", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "dependencies": { + "@types/react": { + "version": "18.0.21", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz", + "integrity": "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + } } }, "@wordpress/env": { @@ -18521,7 +19093,7 @@ "requires": { "@babel/runtime": "^7.16.0", "@react-native-clipboard/clipboard": "1.9.0", - "@react-native-community/blur": "3.6.0", + "@react-native-community/blur": "4.2.0", "@react-native-community/slider": "https://raw.githubusercontent.com/wordpress-mobile/react-native-slider/v3.0.2-wp-3/react-native-community-slider-3.0.2-wp-3.tgz", "@react-native-masked-view/masked-view": "0.2.6", "@react-navigation/core": "5.12.0", @@ -18546,7 +19118,7 @@ "jed": "^1.1.1", "jsdom-jscore-rn": "git+https://github.com/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800", "node-fetch": "^2.6.0", - "react-native": "0.66.2", + "react-native": "0.69.4", "react-native-fast-image": "8.5.11", "react-native-gesture-handler": "https://raw.githubusercontent.com/wordpress-mobile/react-native-gesture-handler/2.3.2-wp-2/react-native-gesture-handler-2.3.2-wp-2.tgz", "react-native-get-random-values": "1.4.0", @@ -18556,14 +19128,14 @@ "react-native-linear-gradient": "https://raw.githubusercontent.com/wordpress-mobile/react-native-linear-gradient/v2.5.6-wp-3/react-native-linear-gradient-2.5.6-wp-3.tgz", "react-native-modal": "^11.10.0", "react-native-prompt-android": "https://raw.githubusercontent.com/wordpress-mobile/react-native-prompt-android/v1.0.0-wp-3/react-native-prompt-android-1.0.0-wp-3.tgz", - "react-native-reanimated": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.4.1-wp-4/react-native-reanimated-2.4.1-wp-4.tgz", + "react-native-reanimated": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.9.1-wp-2/react-native-reanimated-2.9.1-wp-2.tgz", "react-native-safe-area": "^0.5.0", "react-native-safe-area-context": "3.2.0", "react-native-sass-transformer": "^1.1.1", "react-native-screens": "2.9.0", "react-native-svg": "9.13.6", "react-native-url-polyfill": "^1.1.2", - "react-native-video": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-4/react-native-video-5.2.0-wp-4.tgz", + "react-native-video": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-5/react-native-video-5.2.0-wp-5.tgz", "react-native-webview": "11.6.2" } }, @@ -19450,9 +20022,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" }, "slice-ansi": { "version": "2.1.0", @@ -19521,6 +20093,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" @@ -19538,9 +20111,9 @@ "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==" }, "appdirsjs": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.6.tgz", - "integrity": "sha512-D8wJNkqMCeQs3kLasatELsddox/Xqkhp+J07iXGyL54fVN7oc+nmNfYzGuCs1IEP6uBw+TfpuO3JKwc+lECy4w==" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", + "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==" }, "appium": { "version": "1.22.3", @@ -27282,6 +27855,11 @@ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -27375,6 +27953,12 @@ "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.2.tgz", "integrity": "sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA==" }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -28296,7 +28880,8 @@ "big-integer": { "version": "1.6.48", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", + "dev": true }, "big.js": { "version": "5.2.2", @@ -28372,7 +28957,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, "requires": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -28382,14 +28966,12 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -28398,20 +28980,17 @@ "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -28630,14 +29209,6 @@ } } }, - "bplist-creator": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz", - "integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==", - "requires": { - "stream-buffers": "2.2.x" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -29185,8 +29756,7 @@ "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "camelcase-css": { "version": "2.0.1", @@ -29250,6 +29820,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, "requires": { "rsvp": "^4.8.4" } @@ -29728,6 +30299,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, "requires": { "restore-cursor": "^2.0.0" } @@ -29735,7 +30307,8 @@ "cli-spinners": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.2.0.tgz", - "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==" + "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==", + "dev": true }, "cli-table3": { "version": "0.6.2", @@ -31693,9 +32266,9 @@ "dev": true }, "dayjs": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.7.tgz", - "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==" + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==" }, "debug": { "version": "3.1.0", @@ -32137,7 +32710,18 @@ "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "deprecated-react-native-prop-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz", + "integrity": "sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA==", + "requires": { + "@react-native/normalize-color": "*", + "invariant": "*", + "prop-types": "*" + } }, "deprecation": { "version": "2.0.0", @@ -32158,7 +32742,8 @@ "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true }, "detab": { "version": "2.0.4", @@ -32786,8 +33371,7 @@ "envinfo": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" }, "equivalent-key-map": { "version": "0.2.2", @@ -34454,7 +35038,8 @@ "exec-sh": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", - "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==" + "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==", + "dev": true }, "execa": { "version": "4.0.2", @@ -35773,6 +36358,15 @@ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -36030,24 +36624,39 @@ } }, "framer-motion": { - "version": "6.2.8", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.2.8.tgz", - "integrity": "sha512-4PtBWFJ6NqR350zYVt9AsFDtISTqsdqna79FvSYPfYDXuuqFmiKtZdkTnYPslnsOMedTW0pEvaQ7eqjD+sA+HA==", + "version": "7.6.15", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.6.15.tgz", + "integrity": "sha512-z3LPTWWq3zlmtxtZyCHWyucNRHg8iXXeLo9cFQwCIgOT8mp3gWFzU+KrGQ9h3QJFx79G9MVqAcuIN6dVhhuFQQ==", "requires": { "@emotion/is-prop-valid": "^0.8.2", - "framesync": "6.0.1", + "@motionone/dom": "10.13.1", + "framesync": "6.1.2", "hey-listen": "^1.0.8", - "popmotion": "11.0.3", - "style-value-types": "5.0.0", - "tslib": "^2.1.0" + "popmotion": "11.0.5", + "style-value-types": "5.1.2", + "tslib": "2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } } }, "framesync": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.0.1.tgz", - "integrity": "sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/framesync/-/framesync-6.1.2.tgz", + "integrity": "sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g==", "requires": { - "tslib": "^2.1.0" + "tslib": "2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } } }, "fresh": { @@ -36088,9 +36697,9 @@ }, "dependencies": { "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" } } }, @@ -36367,6 +36976,12 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gauge": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", @@ -37387,14 +38002,23 @@ } }, "hermes-engine": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/hermes-engine/-/hermes-engine-0.9.0.tgz", - "integrity": "sha512-r7U+Y4P2Qg/igFVZN+DpT7JFfXUn1MM4dFne8aW+cCrF6RRymof+VqrUHs1kl07j8h8V2CNesU19RKgWbr3qPw==" + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/hermes-engine/-/hermes-engine-0.11.0.tgz", + "integrity": "sha512-7aMUlZja2IyLYAcZ69NBnwJAR5ZOYlSllj0oMpx08a8HzxHOys0eKCzfphrf6D0vX1JGO1QQvVsQKe6TkYherw==" + }, + "hermes-estree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.6.0.tgz", + "integrity": "sha512-2YTGzJCkhdmT6VuNprWjXnvTvw/3iPNw804oc7yknvQpNKo+vJGZmtvLLCghOZf0OwzKaNAzeIMp71zQbNl09w==" }, "hermes-parser": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.4.7.tgz", - "integrity": "sha512-jc+zCtXbtwTiXoMAoXOHepxAaGVFIp89wwE9qcdwnMd/uGVEtPoY8FaFSsx0ThPvyKirdR2EsIIDVrpbSXz1Ag==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.6.0.tgz", + "integrity": "sha512-Vf58jBZca2+QBLR9h7B7mdg8oFz2g5ILz1iVouZ5DOrOrAfBmPfJjdjDT8jrO0f+iJ4/hSRrQHqHIjSnTaLUDQ==", + "dev": true, + "requires": { + "hermes-estree": "0.6.0" + } }, "hermes-profile-transformer": { "version": "0.0.6", @@ -37405,9 +38029,9 @@ }, "dependencies": { "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==" } } }, @@ -37650,22 +38274,32 @@ "dev": true }, "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" }, "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, "toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -38551,6 +39185,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, "requires": { "ci-info": "^2.0.0" } @@ -38706,8 +39341,7 @@ "is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" }, "is-ip": { "version": "3.1.0", @@ -38905,6 +39539,231 @@ "text-extensions": "^1.0.0" } }, + "is-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", + "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "es-abstract": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + } + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -38914,8 +39773,7 @@ "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" }, "is-utf8": { "version": "0.2.1", @@ -38924,6 +39782,12 @@ "dev": true, "optional": true }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true + }, "is-weakref": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", @@ -38933,6 +39797,45 @@ "call-bind": "^1.0.0" } }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -40080,13 +40983,13 @@ "jest-get-type": { "version": "26.3.0", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", - "dev": true + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==" }, "jest-haste-map": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "dev": true, "requires": { "@jest/types": "^26.6.2", "@types/graceful-fs": "^4.1.2", @@ -40108,6 +41011,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -40117,6 +41021,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -40125,6 +41030,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -40132,17 +41038,20 @@ "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "micromatch": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, "requires": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -40151,19 +41060,22 @@ "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true } } }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "requires": { "is-number": "^7.0.0" } @@ -40684,7 +41596,8 @@ "jest-regex-util": { "version": "26.0.0", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", - "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==" + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true }, "jest-resolve": { "version": "27.4.5", @@ -41619,6 +42532,7 @@ "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, "requires": { "@types/node": "*", "graceful-fs": "^4.2.4" @@ -41627,7 +42541,8 @@ "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true } } }, @@ -41964,6 +42879,7 @@ "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, "requires": { "@jest/types": "^26.6.2", "@types/node": "*", @@ -41977,6 +42893,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -41985,6 +42902,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -41992,17 +42910,20 @@ "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "micromatch": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, "requires": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -42011,12 +42932,14 @@ "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "requires": { "is-number": "^7.0.0" } @@ -42268,6 +43191,7 @@ "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -42277,12 +43201,14 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -42349,40 +43275,115 @@ "integrity": "sha512-KmxeBlRjwoqCnBBKGsihFtvsBHyUFlBxJPK4FzeYcIuBfdjv6jFys44JITAgSTbQD+vIdwMEfyZklsuQX0yI1Q==" }, "jscodeshift": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.11.0.tgz", - "integrity": "sha512-SdRK2C7jjs4k/kT2mwtO07KJN9RnjxtKn03d9JVj6c3j9WwaLcFYsICYDnLAzY0hp+wG2nxl+Cm2jWLiNVYb8g==", - "requires": { - "@babel/core": "^7.1.6", - "@babel/parser": "^7.1.6", - "@babel/plugin-proposal-class-properties": "^7.1.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.1.0", - "@babel/plugin-proposal-optional-chaining": "^7.1.0", - "@babel/plugin-transform-modules-commonjs": "^7.1.0", - "@babel/preset-flow": "^7.0.0", - "@babel/preset-typescript": "^7.1.0", - "@babel/register": "^7.0.0", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.13.1.tgz", + "integrity": "sha512-lGyiEbGOvmMRKgWk4vf+lUrCWO/8YR8sUR3FKF1Cq5fovjZDlIcw3Hu5ppLHAnEXshVffvaM0eyuY/AbOeYpnQ==", + "requires": { + "@babel/core": "^7.13.16", + "@babel/parser": "^7.13.16", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", + "@babel/plugin-proposal-optional-chaining": "^7.13.12", + "@babel/plugin-transform-modules-commonjs": "^7.13.8", + "@babel/preset-flow": "^7.13.13", + "@babel/preset-typescript": "^7.13.0", + "@babel/register": "^7.13.16", "babel-core": "^7.0.0-bridge.0", - "colors": "^1.1.2", + "chalk": "^4.1.2", "flow-parser": "0.*", "graceful-fs": "^4.2.4", "micromatch": "^3.1.10", "neo-async": "^2.5.0", "node-dir": "^0.1.17", - "recast": "^0.20.3", - "temp": "^0.8.1", + "recast": "^0.20.4", + "temp": "^0.8.4", "write-file-atomic": "^2.3.0" }, "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "temp": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", + "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", + "requires": { + "rimraf": "~2.6.2" + } } } }, @@ -43783,23 +44784,12 @@ "dev": true }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "requires": { - "chalk": "^2.0.1" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "log-update": { @@ -43840,11 +44830,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -44558,8 +45543,7 @@ "memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", - "dev": true + "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, "memoizerific": { "version": "1.11.3", @@ -44805,9 +45789,9 @@ "dev": true }, "metro": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro/-/metro-0.66.2.tgz", - "integrity": "sha512-uNsISfcQ3iKKSHoN5Q+LAh0l3jeeg7ZcNZ/4BAHGsk02erA0OP+l2m+b5qYVoPptHz9Oc3KyG5oGJoTu41pWjg==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro/-/metro-0.70.3.tgz", + "integrity": "sha512-uEWS7xg8oTetQDABYNtsyeUjdLhH3KAvLFpaFFoJqUpOk2A3iygszdqmjobFl6W4zrvKDJS+XxdMR1roYvUhTw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.14.0", @@ -44818,7 +45802,7 @@ "@babel/types": "^7.0.0", "absolute-path": "^0.0.0", "accepts": "^1.3.7", - "async": "^2.4.0", + "async": "^3.2.2", "chalk": "^4.0.0", "ci-info": "^2.0.0", "connect": "^3.6.5", @@ -44826,31 +45810,29 @@ "denodeify": "^1.2.1", "error-stack-parser": "^2.0.6", "fs-extra": "^1.0.0", - "graceful-fs": "^4.1.3", - "hermes-parser": "0.4.7", + "graceful-fs": "^4.2.4", + "hermes-parser": "0.6.0", "image-size": "^0.6.0", "invariant": "^2.2.4", - "jest-haste-map": "^26.5.2", - "jest-worker": "^26.0.0", + "jest-haste-map": "^27.3.1", + "jest-worker": "^27.2.0", "lodash.throttle": "^4.1.1", - "metro-babel-register": "0.66.2", - "metro-babel-transformer": "0.66.2", - "metro-cache": "0.66.2", - "metro-cache-key": "0.66.2", - "metro-config": "0.66.2", - "metro-core": "0.66.2", - "metro-hermes-compiler": "0.66.2", - "metro-inspector-proxy": "0.66.2", - "metro-minify-uglify": "0.66.2", - "metro-react-native-babel-preset": "0.66.2", - "metro-resolver": "0.66.2", - "metro-runtime": "0.66.2", - "metro-source-map": "0.66.2", - "metro-symbolicate": "0.66.2", - "metro-transform-plugins": "0.66.2", - "metro-transform-worker": "0.66.2", + "metro-babel-transformer": "0.70.3", + "metro-cache": "0.70.3", + "metro-cache-key": "0.70.3", + "metro-config": "0.70.3", + "metro-core": "0.70.3", + "metro-hermes-compiler": "0.70.3", + "metro-inspector-proxy": "0.70.3", + "metro-minify-uglify": "0.70.3", + "metro-react-native-babel-preset": "0.70.3", + "metro-resolver": "0.70.3", + "metro-runtime": "0.70.3", + "metro-source-map": "0.70.3", + "metro-symbolicate": "0.70.3", + "metro-transform-plugins": "0.70.3", + "metro-transform-worker": "0.70.3", "mime-types": "^2.1.27", - "mkdirp": "^0.5.1", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", "rimraf": "^2.5.4", @@ -44859,27 +45841,51 @@ "strip-ansi": "^6.0.0", "temp": "0.8.3", "throat": "^5.0.0", - "ws": "^1.1.5", + "ws": "^7.5.1", "yargs": "^15.3.1" }, "dependencies": { + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "requires": { + "@types/yargs-parser": "*" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "requires": { - "lodash": "^4.17.14" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } }, "debug": { "version": "2.6.9", @@ -44894,6 +45900,14 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -44906,7 +45920,7 @@ "fs-extra": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "integrity": "sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ==", "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^2.1.0", @@ -44914,27 +45928,119 @@ } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "hermes-parser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.6.0.tgz", + "integrity": "sha512-Vf58jBZca2+QBLR9h7B7mdg8oFz2g5ILz1iVouZ5DOrOrAfBmPfJjdjDT8jrO0f+iJ4/hSRrQHqHIjSnTaLUDQ==", + "requires": { + "hermes-estree": "0.6.0" + } + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "jest-haste-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "requires": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-regex-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==" + }, + "jest-serializer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.9" + } + }, + "jest-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "dependencies": { + "ci-info": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.2.tgz", + "integrity": "sha512-lVZdhvbEudris15CLytp2u6Y0p5EKfztae9Fqa189MfNmln9F33XuH69v5fvNfiRN5/0eAUz2yJL3mo+nhaRKg==" + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + } + } + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, "jsonfile": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", "requires": { "graceful-fs": "^4.1.6" } @@ -44947,23 +46053,13 @@ "p-locate": "^4.1.0" } }, - "metro-babel-transformer": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.66.2.tgz", - "integrity": "sha512-aJ/7fc/Xkofw8Fqa51OTDhBzBz26mmpIWrXAZcPdQ8MSTt883EWncxeCEjasc79NJ89BRi7sOkkaWZo2sXlKvw==", - "requires": { - "@babel/core": "^7.14.0", - "hermes-parser": "0.4.7", - "metro-source-map": "0.66.2", - "nullthrows": "^1.1.1" - } - }, "metro-react-native-babel-preset": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz", - "integrity": "sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.3.tgz", + "integrity": "sha512-4Nxc1zEiHEu+GTdEMEsHnRgfaBkg8f/Td3+FcQ8NTSvs+xL3LBrQy6N07idWSQZHIdGFf+tTHvRfSIWLD8u8Tg==", "requires": { "@babel/core": "^7.14.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", @@ -44983,17 +46079,15 @@ "@babel/plugin-transform-destructuring": "^7.0.0", "@babel/plugin-transform-exponentiation-operator": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-for-of": "^7.0.0", "@babel/plugin-transform-function-name": "^7.0.0", "@babel/plugin-transform-literals": "^7.0.0", "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-object-assign": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", "@babel/plugin-transform-parameters": "^7.0.0", "@babel/plugin-transform-react-display-name": "^7.0.0", "@babel/plugin-transform-react-jsx": "^7.0.0", "@babel/plugin-transform-react-jsx-self": "^7.0.0", "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-regenerator": "^7.0.0", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/plugin-transform-shorthand-properties": "^7.0.0", "@babel/plugin-transform-spread": "^7.0.0", @@ -45006,46 +46100,80 @@ } }, "metro-source-map": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.66.2.tgz", - "integrity": "sha512-038tFmB7vSh73VQcDWIbr5O1m+WXWyYafDaOy+1A/2K308YP0oj33gbEgDnZsLZDwcJ+xt1x6KUEBIzlX4YGeQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", "requires": { "@babel/traverse": "^7.14.0", "@babel/types": "^7.0.0", "invariant": "^2.2.4", - "metro-symbolicate": "0.66.2", + "metro-symbolicate": "0.70.3", "nullthrows": "^1.1.1", - "ob1": "0.66.2", + "ob1": "0.70.3", "source-map": "^0.5.6", "vlq": "^1.0.0" } }, "metro-symbolicate": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.66.2.tgz", - "integrity": "sha512-u+DeQHyAFXVD7mVP+GST/894WHJ3i/U8oEJFnT7U3P52ZuLgX8n4tMNxhqZU12RcLR6etF8143aP0Ktx1gFLEQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", "requires": { "invariant": "^2.2.4", - "metro-source-map": "0.66.2", + "metro-source-map": "0.70.3", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "through2": "^2.0.1", "vlq": "^1.0.0" } }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + } + } + }, "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==" + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "requires": { - "mime-db": "1.51.0" + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "ob1": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==" + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -45103,20 +46231,27 @@ "ansi-regex": "^5.0.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" + "is-number": "^7.0.0" } }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -45146,55 +46281,90 @@ } } }, - "metro-babel-register": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-babel-register/-/metro-babel-register-0.66.2.tgz", - "integrity": "sha512-3F+vsVubUPJYKfVMeol8/7pd8CC287Rw92QYzJD8LEmI980xcgwMUEVBZ0UIAUwlLgiJG/f4Mwhuji2EeBXrPg==", - "requires": { - "@babel/core": "^7.14.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-syntax-class-properties": "^7.0.0", - "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/register": "^7.0.0", - "escape-string-regexp": "^1.0.5" - } - }, "metro-babel-transformer": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.66.2.tgz", - "integrity": "sha512-aJ/7fc/Xkofw8Fqa51OTDhBzBz26mmpIWrXAZcPdQ8MSTt883EWncxeCEjasc79NJ89BRi7sOkkaWZo2sXlKvw==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.70.3.tgz", + "integrity": "sha512-bWhZRMn+mIOR/s3BDpFevWScz9sV8FGktVfMlF1eJBLoX24itHDbXvTktKBYi38PWIKcHedh6THSFpJogfuwNA==", "requires": { "@babel/core": "^7.14.0", - "hermes-parser": "0.4.7", - "metro-source-map": "0.66.2", + "hermes-parser": "0.6.0", + "metro-source-map": "0.70.3", "nullthrows": "^1.1.1" + }, + "dependencies": { + "hermes-parser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.6.0.tgz", + "integrity": "sha512-Vf58jBZca2+QBLR9h7B7mdg8oFz2g5ILz1iVouZ5DOrOrAfBmPfJjdjDT8jrO0f+iJ4/hSRrQHqHIjSnTaLUDQ==", + "requires": { + "hermes-estree": "0.6.0" + } + }, + "metro-source-map": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", + "requires": { + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.0.0", + "invariant": "^2.2.4", + "metro-symbolicate": "0.70.3", + "nullthrows": "^1.1.1", + "ob1": "0.70.3", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + } + }, + "metro-symbolicate": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", + "requires": { + "invariant": "^2.2.4", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "through2": "^2.0.1", + "vlq": "^1.0.0" + } + }, + "ob1": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==" + } } }, "metro-cache": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.66.2.tgz", - "integrity": "sha512-5QCYJtJOHoBSbL3H4/Fpl36oA697C3oYHqsce+Hk/dh2qtODUGpS3gOBhvP1B8iB+H8jJMyR75lZq129LJEsIQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-cache/-/metro-cache-0.70.3.tgz", + "integrity": "sha512-iCix/+z812fUqa6KlOxaTkY6LQQDoXIe/VljXkGIvpygSCmYyhjQpfQVZEVVPezFmUBYXNdabdQ6cYx6JX3yMg==", "requires": { - "metro-core": "0.66.2", - "mkdirp": "^0.5.1", + "metro-core": "0.70.3", "rimraf": "^2.5.4" }, "dependencies": { "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -45206,47 +46376,27 @@ } }, "metro-cache-key": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.66.2.tgz", - "integrity": "sha512-WtkNmRt41qOpHh1MkNA4nLiQ/m7iGL90ysSKD+fcLqlUnOBKJptPQm0ZUv8Kfqk18ddWX2KmsSbq+Sf3I6XohQ==" + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-cache-key/-/metro-cache-key-0.70.3.tgz", + "integrity": "sha512-0zpw+IcpM3hmGd5sKMdxNv3sbOIUYnMUvx1/yaM6vNRReSPmOLX0bP8fYf3CGgk8NEreZ1OHbVsuw7bdKt40Mw==" }, "metro-config": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.66.2.tgz", - "integrity": "sha512-0C+PrKKIBNNzLZUKN/8ZDJS2U5FLMOTXDWbvBHIdqb6YXz8WplXR2+xlSlaSCCi5b+GR7cWFWUNeKA4GQS1/AQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-config/-/metro-config-0.70.3.tgz", + "integrity": "sha512-SSCDjSTygoCgzoj61DdrBeJzZDRwQxUEfcgc6t6coxWSExXNR4mOngz0q4SAam49Bmjq9J2Jft6qUKnUTPrRgA==", "requires": { "cosmiconfig": "^5.0.5", "jest-validate": "^26.5.2", - "metro": "0.66.2", - "metro-cache": "0.66.2", - "metro-core": "0.66.2", - "metro-runtime": "0.66.2" + "metro": "0.70.3", + "metro-cache": "0.70.3", + "metro-core": "0.70.3", + "metro-runtime": "0.70.3" }, "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "requires": { - "@types/istanbul-lib-report": "*" - } - }, "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" }, "cosmiconfig": { "version": "5.2.1", @@ -45262,17 +46412,12 @@ "import-fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", "requires": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, - "jest-get-type": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==" - }, "jest-validate": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", @@ -45289,7 +46434,7 @@ "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -45298,28 +46443,196 @@ } }, "metro-core": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.66.2.tgz", - "integrity": "sha512-JieLZkef/516yxXYvQxWnf3OWw5rcgWRy76K8JV/wr/i8LGVGulPAXlIi445/QZzXVydzRVASKAEVqyxM5F4mA==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-core/-/metro-core-0.70.3.tgz", + "integrity": "sha512-NzfHB/w5R7yLaOeU1tzPTbBzCRsYSvpKJkLMP0yudszKZzIAZqNdjoEJ9GZ688Wi0ynZxcU0BxukXh4my80ZBw==", "requires": { - "jest-haste-map": "^26.5.2", + "jest-haste-map": "^27.3.1", "lodash.throttle": "^4.1.1", - "metro-resolver": "0.66.2" + "metro-resolver": "0.70.3" + }, + "dependencies": { + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "requires": { + "@types/yargs-parser": "*" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "ci-info": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.6.2.tgz", + "integrity": "sha512-lVZdhvbEudris15CLytp2u6Y0p5EKfztae9Fqa189MfNmln9F33XuH69v5fvNfiRN5/0eAUz2yJL3mo+nhaRKg==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "jest-haste-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "requires": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-regex-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==" + }, + "jest-serializer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.9" + } + }, + "jest-util": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + } + } + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "dependencies": { + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } } }, "metro-hermes-compiler": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-hermes-compiler/-/metro-hermes-compiler-0.66.2.tgz", - "integrity": "sha512-nCVL1g9uR6vrw5+X1wjwZruRyMkndnzGRMqjqoljf+nGEqBTD607CR7elXw4fMWn/EM+1y0Vdq5altUu9LdgCA==" + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-hermes-compiler/-/metro-hermes-compiler-0.70.3.tgz", + "integrity": "sha512-W6WttLi4E72JL/NyteQ84uxYOFMibe0PUr9aBKuJxxfCq6QRnJKOVcNY0NLW0He2tneXGk+8ZsNz8c0flEvYqg==" }, "metro-inspector-proxy": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-inspector-proxy/-/metro-inspector-proxy-0.66.2.tgz", - "integrity": "sha512-gnLc9121eznwP0iiA9tCBW8qZjwIsCgwHWMF1g1Qaki9le9tzeJv3dK4/lFNGxyfSaLO7vahQEhsEYsiRnTROg==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-inspector-proxy/-/metro-inspector-proxy-0.70.3.tgz", + "integrity": "sha512-qQoNdPGrmyoJSWYkxSDpTaAI8xyqVdNDVVj9KRm1PG8niSuYmrCCFGLLFsMvkVYwsCWUGHoGBx0UoAzVp14ejw==", "requires": { "connect": "^3.6.5", "debug": "^2.2.0", - "ws": "^1.1.5", + "ws": "^7.5.1", "yargs": "^15.3.1" }, "dependencies": { @@ -45328,11 +46641,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -45413,13 +46721,9 @@ } }, "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" }, "yargs": { "version": "15.4.1", @@ -45451,41 +46755,21 @@ } }, "metro-minify-uglify": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-minify-uglify/-/metro-minify-uglify-0.66.2.tgz", - "integrity": "sha512-7TUK+L5CmB5x1PVnFbgmjzHW4CUadq9H5jgp0HfFoWT1skXAyEsx0DHkKDXwnot0khnNhBOEfl62ctQOnE110Q==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-minify-uglify/-/metro-minify-uglify-0.70.3.tgz", + "integrity": "sha512-oHyjV9WDqOlDE1FPtvs6tIjjeY/oP1PNUPYL1wqyYtqvjN+zzAOrcbsAAL1sv+WARaeiMsWkF2bwtNo+Hghoog==", "requires": { "uglify-es": "^3.1.9" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } } }, "metro-react-native-babel-preset": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz", - "integrity": "sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.3.tgz", + "integrity": "sha512-4Nxc1zEiHEu+GTdEMEsHnRgfaBkg8f/Td3+FcQ8NTSvs+xL3LBrQy6N07idWSQZHIdGFf+tTHvRfSIWLD8u8Tg==", "dev": true, "requires": { "@babel/core": "^7.14.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", @@ -45505,17 +46789,15 @@ "@babel/plugin-transform-destructuring": "^7.0.0", "@babel/plugin-transform-exponentiation-operator": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-for-of": "^7.0.0", "@babel/plugin-transform-function-name": "^7.0.0", "@babel/plugin-transform-literals": "^7.0.0", "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-object-assign": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", "@babel/plugin-transform-parameters": "^7.0.0", "@babel/plugin-transform-react-display-name": "^7.0.0", "@babel/plugin-transform-react-jsx": "^7.0.0", "@babel/plugin-transform-react-jsx-self": "^7.0.0", "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-regenerator": "^7.0.0", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/plugin-transform-shorthand-properties": "^7.0.0", "@babel/plugin-transform-spread": "^7.0.0", @@ -45536,134 +46818,60 @@ } }, "metro-react-native-babel-transformer": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.66.2.tgz", - "integrity": "sha512-z1ab7ihIT0pJrwgi9q2IH+LcW/xUWMQ0hH+Mrk7wbKQB0RnJdXFoxphrfoVHBHMUu+TBPetUcEkKawkK1e7Cng==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.70.3.tgz", + "integrity": "sha512-WKBU6S/G50j9cfmFM4k4oRYprd8u3qjleD4so1E2zbTNILg+gYla7ZFGCAvi2G0ZcqS2XuGCR375c2hF6VVvwg==", + "dev": true, "requires": { "@babel/core": "^7.14.0", "babel-preset-fbjs": "^3.4.0", - "hermes-parser": "0.4.7", - "metro-babel-transformer": "0.66.2", - "metro-react-native-babel-preset": "0.66.2", - "metro-source-map": "0.66.2", + "hermes-parser": "0.6.0", + "metro-babel-transformer": "0.70.3", + "metro-react-native-babel-preset": "0.70.3", + "metro-source-map": "0.70.3", "nullthrows": "^1.1.1" - }, - "dependencies": { - "metro-babel-transformer": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-babel-transformer/-/metro-babel-transformer-0.66.2.tgz", - "integrity": "sha512-aJ/7fc/Xkofw8Fqa51OTDhBzBz26mmpIWrXAZcPdQ8MSTt883EWncxeCEjasc79NJ89BRi7sOkkaWZo2sXlKvw==", - "requires": { - "@babel/core": "^7.14.0", - "hermes-parser": "0.4.7", - "metro-source-map": "0.66.2", - "nullthrows": "^1.1.1" - } - }, - "metro-react-native-babel-preset": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz", - "integrity": "sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ==", - "requires": { - "@babel/core": "^7.14.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-object-rest-spread": "^7.0.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-export-default-from": "^7.0.0", - "@babel/plugin-syntax-flow": "^7.2.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.0.0", - "@babel/plugin-transform-arrow-functions": "^7.0.0", - "@babel/plugin-transform-async-to-generator": "^7.0.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", - "@babel/plugin-transform-classes": "^7.0.0", - "@babel/plugin-transform-computed-properties": "^7.0.0", - "@babel/plugin-transform-destructuring": "^7.0.0", - "@babel/plugin-transform-exponentiation-operator": "^7.0.0", - "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-for-of": "^7.0.0", - "@babel/plugin-transform-function-name": "^7.0.0", - "@babel/plugin-transform-literals": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-object-assign": "^7.0.0", - "@babel/plugin-transform-parameters": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-react-jsx-self": "^7.0.0", - "@babel/plugin-transform-react-jsx-source": "^7.0.0", - "@babel/plugin-transform-regenerator": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/plugin-transform-shorthand-properties": "^7.0.0", - "@babel/plugin-transform-spread": "^7.0.0", - "@babel/plugin-transform-sticky-regex": "^7.0.0", - "@babel/plugin-transform-template-literals": "^7.0.0", - "@babel/plugin-transform-typescript": "^7.5.0", - "@babel/plugin-transform-unicode-regex": "^7.0.0", - "@babel/template": "^7.0.0", - "react-refresh": "^0.4.0" - } - }, - "metro-source-map": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.66.2.tgz", - "integrity": "sha512-038tFmB7vSh73VQcDWIbr5O1m+WXWyYafDaOy+1A/2K308YP0oj33gbEgDnZsLZDwcJ+xt1x6KUEBIzlX4YGeQ==", - "requires": { - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.0.0", - "invariant": "^2.2.4", - "metro-symbolicate": "0.66.2", - "nullthrows": "^1.1.1", - "ob1": "0.66.2", - "source-map": "^0.5.6", - "vlq": "^1.0.0" - } - }, - "react-refresh": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz", - "integrity": "sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==" - } } }, "metro-resolver": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.66.2.tgz", - "integrity": "sha512-pXQAJR/xauRf4kWFj2/hN5a77B4jLl0Fom5I3PHp6Arw/KxSBp0cnguXpGLwNQ6zQC0nxKCoYGL9gQpzMnN7Hw==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-resolver/-/metro-resolver-0.70.3.tgz", + "integrity": "sha512-5Pc5S/Gs4RlLbziuIWtvtFd9GRoILlaRC8RZDVq5JZWcWHywKy/PjNmOBNhpyvtRlzpJfy/ssIfLhu8zINt1Mw==", "requires": { "absolute-path": "^0.0.0" } }, "metro-runtime": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.66.2.tgz", - "integrity": "sha512-vFhKBk2ot9FS4b+2v0OTa/guCF/QDAOJubY0CNg7PzCS5+w4y3IvZIcPX4SSS1t8pYEZBLvtdtTDarlDl81xmg==" + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-runtime/-/metro-runtime-0.70.3.tgz", + "integrity": "sha512-22xU7UdXZacniTIDZgN2EYtmfau2pPyh97Dcs+cWrLcJYgfMKjWBtesnDcUAQy3PHekDYvBdJZkoQUeskYTM+w==", + "requires": { + "@babel/runtime": "^7.0.0" + } }, "metro-source-map": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.66.2.tgz", - "integrity": "sha512-038tFmB7vSh73VQcDWIbr5O1m+WXWyYafDaOy+1A/2K308YP0oj33gbEgDnZsLZDwcJ+xt1x6KUEBIzlX4YGeQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", + "dev": true, "requires": { "@babel/traverse": "^7.14.0", "@babel/types": "^7.0.0", "invariant": "^2.2.4", - "metro-symbolicate": "0.66.2", + "metro-symbolicate": "0.70.3", "nullthrows": "^1.1.1", - "ob1": "0.66.2", + "ob1": "0.70.3", "source-map": "^0.5.6", "vlq": "^1.0.0" } }, "metro-symbolicate": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.66.2.tgz", - "integrity": "sha512-u+DeQHyAFXVD7mVP+GST/894WHJ3i/U8oEJFnT7U3P52ZuLgX8n4tMNxhqZU12RcLR6etF8143aP0Ktx1gFLEQ==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", + "dev": true, "requires": { "invariant": "^2.2.4", - "metro-source-map": "0.66.2", + "metro-source-map": "0.70.3", "nullthrows": "^1.1.1", "source-map": "^0.5.6", "through2": "^2.0.1", @@ -45671,9 +46879,9 @@ } }, "metro-transform-plugins": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.66.2.tgz", - "integrity": "sha512-KTvqplh0ut7oDKovvDG6yzXM02R6X+9b2oVG+qYq8Zd3aCGTi51ASx4ThCNkAHyEvCuJdYg9fxXTL+j+wvhB5w==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-transform-plugins/-/metro-transform-plugins-0.70.3.tgz", + "integrity": "sha512-dQRIJoTkWZN2IVS2KzgS1hs7ZdHDX3fS3esfifPkqFAEwHiLctCf0EsPgIknp0AjMLvmGWfSLJigdRB/dc0ASw==", "requires": { "@babel/core": "^7.14.0", "@babel/generator": "^7.14.0", @@ -45683,23 +46891,58 @@ } }, "metro-transform-worker": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.66.2.tgz", - "integrity": "sha512-dO4PtYOMGB7Vzte8aIzX39xytODhmbJrBYPu+zYzlDjyefJZT7BkZ0LkPIThtyJi96xWcGqi9JBSo0CeRupAHw==", + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-transform-worker/-/metro-transform-worker-0.70.3.tgz", + "integrity": "sha512-MtVVsnHhhBOp9GRLCdAb2mD1dTCsIzT4+m34KMRdBDCEbDIb90YafT5prpU8qbj5uKd0o2FOQdrJ5iy5zQilHw==", "requires": { "@babel/core": "^7.14.0", "@babel/generator": "^7.14.0", "@babel/parser": "^7.14.0", "@babel/types": "^7.0.0", "babel-preset-fbjs": "^3.4.0", - "metro": "0.66.2", - "metro-babel-transformer": "0.66.2", - "metro-cache": "0.66.2", - "metro-cache-key": "0.66.2", - "metro-hermes-compiler": "0.66.2", - "metro-source-map": "0.66.2", - "metro-transform-plugins": "0.66.2", + "metro": "0.70.3", + "metro-babel-transformer": "0.70.3", + "metro-cache": "0.70.3", + "metro-cache-key": "0.70.3", + "metro-hermes-compiler": "0.70.3", + "metro-source-map": "0.70.3", + "metro-transform-plugins": "0.70.3", "nullthrows": "^1.1.1" + }, + "dependencies": { + "metro-source-map": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", + "requires": { + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.0.0", + "invariant": "^2.2.4", + "metro-symbolicate": "0.70.3", + "nullthrows": "^1.1.1", + "ob1": "0.70.3", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + } + }, + "metro-symbolicate": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", + "requires": { + "invariant": "^2.2.4", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "through2": "^2.0.1", + "vlq": "^1.0.0" + } + }, + "ob1": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==" + } } }, "microevent.ts": { @@ -45775,7 +47018,8 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true }, "mimic-response": { "version": "1.0.1", @@ -46196,11 +47440,6 @@ } } }, - "mockdate": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz", - "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==" - }, "modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -46391,9 +47630,9 @@ } }, "nocache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz", - "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-3.0.4.tgz", + "integrity": "sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw==" }, "nock": { "version": "12.0.3", @@ -46606,6 +47845,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" } @@ -47669,9 +48909,10 @@ "dev": true }, "ob1": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.66.2.tgz", - "integrity": "sha512-RFewnL/RjE0qQBOuM+2bbY96zmJPIge/aDtsiDbLSb+MOiK8CReAhBHDgL+zrA3F1hQk00lMWpUwYcep750plA==" + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==", + "dev": true }, "object-assign": { "version": "4.1.1", @@ -48548,6 +49789,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, "requires": { "mimic-fn": "^1.0.0" } @@ -48580,11 +49822,6 @@ "wordwrap": "~1.0.0" } }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" - }, "ora": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/ora/-/ora-4.0.2.tgz", @@ -49506,11 +50743,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "xmlbuilder": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", - "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==" } } }, @@ -49553,14 +50785,21 @@ } }, "popmotion": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.3.tgz", - "integrity": "sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA==", + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/popmotion/-/popmotion-11.0.5.tgz", + "integrity": "sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA==", "requires": { - "framesync": "6.0.1", + "framesync": "6.1.2", "hey-listen": "^1.0.8", - "style-value-types": "5.0.0", - "tslib": "^2.1.0" + "style-value-types": "5.1.2", + "tslib": "2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } } }, "portfinder": { @@ -50316,7 +51555,8 @@ "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true }, "proc-log": { "version": "2.0.1", @@ -50341,6 +51581,14 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "requires": { + "asap": "~2.0.6" + } + }, "promise-all-reject-late": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", @@ -50852,7 +52100,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, "requires": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -51357,12 +52604,11 @@ } }, "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "react-autosize-textarea": { @@ -51381,9 +52627,9 @@ "integrity": "sha512-nkP1w1LGe8PzhtOQO10xSDTsMWAYVj/Wm5c7ORk7CBngjCE7hHsknFRtosT5qMYkwWs8wSiU0sBwZ8dyzRbNEQ==" }, "react-devtools-core": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.21.0.tgz", - "integrity": "sha512-clGWwJHV5MHwTwYyKc+7FZHwzdbzrD2/AoZSkicUcr6YLc3Za9a9FaLhccWDHfjQ+ron9yzNhDT6Tv+FiPkD3g==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.24.0.tgz", + "integrity": "sha512-Rw7FzYOOzcfyUPaAm9P3g0tFdGqGq2LLiAI+wjYcp6CsF3DeeMrRS3HZAho4s273C29G/DJhx0e8BpRE/QZNGg==", "requires": { "shell-quote": "^1.6.1", "ws": "^7" @@ -51440,13 +52686,22 @@ "dev": true }, "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "requires": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.23.0" + }, + "dependencies": { + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "requires": { + "loose-envify": "^1.1.0" + } + } } }, "react-easy-crop": { @@ -51496,11 +52751,6 @@ "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==", "dev": true }, - "react-freeze": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz", - "integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==" - }, "react-input-autosize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-3.0.0.tgz", @@ -51533,49 +52783,304 @@ "dev": true }, "react-native": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.66.2.tgz", - "integrity": "sha512-d5Kp23kqAH0EmcyxyfjAr4rhVVzyK/J0cZ/JuopX16CBD4Nkad65KcJi1pyOpbhpP9L1aUUs+mRyK5kg0uLqJQ==", + "version": "0.69.4", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.69.4.tgz", + "integrity": "sha512-rqNMialM/T4pHRKWqTIpOxA65B/9kUjtnepxwJqvsdCeMP9Q2YdSx4VASFR9RoEFYcPRU41yGf6EKrChNfns3g==", "requires": { "@jest/create-cache-key-function": "^27.0.1", - "@react-native-community/cli": "^6.0.0", - "@react-native-community/cli-platform-android": "^6.0.0", - "@react-native-community/cli-platform-ios": "^6.0.0", + "@react-native-community/cli": "^8.0.4", + "@react-native-community/cli-platform-android": "^8.0.4", + "@react-native-community/cli-platform-ios": "^8.0.4", "@react-native/assets": "1.0.0", - "@react-native/normalize-color": "1.0.0", + "@react-native/normalize-color": "2.0.0", "@react-native/polyfills": "2.0.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", "base64-js": "^1.1.2", "event-target-shim": "^5.0.1", - "hermes-engine": "~0.9.0", + "hermes-engine": "~0.11.0", "invariant": "^2.2.4", "jsc-android": "^250230.2.1", - "metro-babel-register": "0.66.2", - "metro-react-native-babel-transformer": "0.66.2", - "metro-runtime": "0.66.2", - "metro-source-map": "0.66.2", + "memoize-one": "^5.0.0", + "metro-react-native-babel-transformer": "0.70.3", + "metro-runtime": "0.70.3", + "metro-source-map": "0.70.3", + "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", "promise": "^8.0.3", - "prop-types": "^15.7.2", - "react-devtools-core": "^4.13.0", - "react-native-codegen": "^0.0.7", + "react-devtools-core": "4.24.0", + "react-native-codegen": "^0.69.1", + "react-native-gradle-plugin": "^0.0.7", "react-refresh": "^0.4.0", + "react-shallow-renderer": "16.15.0", "regenerator-runtime": "^0.13.2", - "scheduler": "^0.20.2", + "scheduler": "^0.21.0", "stacktrace-parser": "^0.1.3", - "use-subscription": "^1.0.0", + "use-sync-external-store": "^1.0.0", "whatwg-fetch": "^3.0.0", "ws": "^6.1.4" }, "dependencies": { - "promise": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", - "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "@react-native-community/cli": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-8.0.6.tgz", + "integrity": "sha512-E36hU/if3quQCfJHGWVkpsCnwtByRCwORuAX0r6yr1ebKktpKeEO49zY9PAu/Z1gfyxCtgluXY0HfRxjKRFXTg==", + "requires": { + "@react-native-community/cli-clean": "^8.0.4", + "@react-native-community/cli-config": "^8.0.6", + "@react-native-community/cli-debugger-ui": "^8.0.0", + "@react-native-community/cli-doctor": "^8.0.6", + "@react-native-community/cli-hermes": "^8.0.5", + "@react-native-community/cli-plugin-metro": "^8.0.4", + "@react-native-community/cli-server-api": "^8.0.4", + "@react-native-community/cli-tools": "^8.0.4", + "@react-native-community/cli-types": "^8.0.0", + "chalk": "^4.1.2", + "commander": "^2.19.0", + "execa": "^1.0.0", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0", + "graceful-fs": "^4.1.3", + "leven": "^3.1.0", + "lodash": "^4.17.15", + "minimist": "^1.2.0", + "prompts": "^2.4.0", + "semver": "^6.3.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { - "asap": "~2.0.6" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "hermes-parser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.6.0.tgz", + "integrity": "sha512-Vf58jBZca2+QBLR9h7B7mdg8oFz2g5ILz1iVouZ5DOrOrAfBmPfJjdjDT8jrO0f+iJ4/hSRrQHqHIjSnTaLUDQ==", + "requires": { + "hermes-estree": "0.6.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "metro-react-native-babel-preset": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.3.tgz", + "integrity": "sha512-4Nxc1zEiHEu+GTdEMEsHnRgfaBkg8f/Td3+FcQ8NTSvs+xL3LBrQy6N07idWSQZHIdGFf+tTHvRfSIWLD8u8Tg==", + "requires": { + "@babel/core": "^7.14.0", + "@babel/plugin-proposal-async-generator-functions": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-export-default-from": "^7.0.0", + "@babel/plugin-syntax-flow": "^7.2.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-syntax-optional-chaining": "^7.0.0", + "@babel/plugin-transform-arrow-functions": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.0.0", + "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-classes": "^7.0.0", + "@babel/plugin-transform-computed-properties": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.0.0", + "@babel/plugin-transform-exponentiation-operator": "^7.0.0", + "@babel/plugin-transform-flow-strip-types": "^7.0.0", + "@babel/plugin-transform-function-name": "^7.0.0", + "@babel/plugin-transform-literals": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.0.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0", + "@babel/plugin-transform-parameters": "^7.0.0", + "@babel/plugin-transform-react-display-name": "^7.0.0", + "@babel/plugin-transform-react-jsx": "^7.0.0", + "@babel/plugin-transform-react-jsx-self": "^7.0.0", + "@babel/plugin-transform-react-jsx-source": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/plugin-transform-shorthand-properties": "^7.0.0", + "@babel/plugin-transform-spread": "^7.0.0", + "@babel/plugin-transform-sticky-regex": "^7.0.0", + "@babel/plugin-transform-template-literals": "^7.0.0", + "@babel/plugin-transform-typescript": "^7.5.0", + "@babel/plugin-transform-unicode-regex": "^7.0.0", + "@babel/template": "^7.0.0", + "react-refresh": "^0.4.0" + } + }, + "metro-react-native-babel-transformer": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.70.3.tgz", + "integrity": "sha512-WKBU6S/G50j9cfmFM4k4oRYprd8u3qjleD4so1E2zbTNILg+gYla7ZFGCAvi2G0ZcqS2XuGCR375c2hF6VVvwg==", + "requires": { + "@babel/core": "^7.14.0", + "babel-preset-fbjs": "^3.4.0", + "hermes-parser": "0.6.0", + "metro-babel-transformer": "0.70.3", + "metro-react-native-babel-preset": "0.70.3", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1" + } + }, + "metro-source-map": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-source-map/-/metro-source-map-0.70.3.tgz", + "integrity": "sha512-zsYtZGrwRbbGEFHtmMqqeCH9K9aTGNVPsurMOWCUeQA3VGyVGXPGtLMC+CdAM9jLpUyg6jw2xh0esxi+tYH7Uw==", + "requires": { + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.0.0", + "invariant": "^2.2.4", + "metro-symbolicate": "0.70.3", + "nullthrows": "^1.1.1", + "ob1": "0.70.3", + "source-map": "^0.5.6", + "vlq": "^1.0.0" + } + }, + "metro-symbolicate": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/metro-symbolicate/-/metro-symbolicate-0.70.3.tgz", + "integrity": "sha512-JTYkF1dpeDUssQ84juE1ycnhHki2ylJBBdJE1JHtfu5oC+z1ElDbBdPHq90Uvt8HbRov/ZAnxvv7Zy6asS+WCA==", + "requires": { + "invariant": "^2.2.4", + "metro-source-map": "0.70.3", + "nullthrows": "^1.1.1", + "source-map": "^0.5.6", + "through2": "^2.0.1", + "vlq": "^1.0.0" + } + }, + "ob1": { + "version": "0.70.3", + "resolved": "https://registry.npmjs.org/ob1/-/ob1-0.70.3.tgz", + "integrity": "sha512-Vy9GGhuXgDRY01QA6kdhToPd8AkLdLpX9GjH5kpqluVqTu70mgOm7tpGoJDZGaNbr9nJlJgnipqHJQRPORixIQ==" + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "react-refresh": { @@ -51583,6 +53088,19 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz", "integrity": "sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA==" }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, "ws": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", @@ -51602,12 +53120,13 @@ } }, "react-native-codegen": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.0.7.tgz", - "integrity": "sha512-dwNgR8zJ3ALr480QnAmpTiqvFo+rDtq6V5oCggKhYFlRjzOmVSFn3YD41u8ltvKS5G2nQ8gCs2vReFFnRGLYng==", + "version": "0.69.2", + "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz", + "integrity": "sha512-yPcgMHD4mqLbckqnWjFBaxomDnBREfRjDi2G/WxNyPBQLD+PXUEmZTkDx6QoOXN+Bl2SkpnNOSsLE2+/RUHoPw==", "requires": { + "@babel/parser": "^7.14.0", "flow-parser": "^0.121.0", - "jscodeshift": "^0.11.0", + "jscodeshift": "^0.13.1", "nullthrows": "^1.1.1" } }, @@ -51635,6 +53154,11 @@ "fast-base64-decode": "^1.0.0" } }, + "react-native-gradle-plugin": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.7.tgz", + "integrity": "sha512-+4JpbIx42zGTONhBTIXSyfyHICHC29VTvhkkoUOJAh/XHPEixpuBduYgf6Y4y9wsN1ARlQhBBoptTvXvAFQf5g==" + }, "react-native-hr": { "version": "git+https://github.com/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3", "from": "git+https://github.com/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3" @@ -51678,26 +53202,258 @@ "integrity": "sha512-JyNcFTqyQh1YVOTMamH29/wzspXH1+AlDbxiuW07gkhdw0BspCdq2P0Vf6JzPdiDxhv/v1+ix4t6RjAKGWulGQ==" }, "react-native-reanimated": { - "version": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.4.1-wp-4/react-native-reanimated-2.4.1-wp-4.tgz", - "integrity": "sha512-kPA7eM0Rn96ZzKId4QPaBnJ8UwC7NwT/CrruszF7fY+Xb1DGAY3vP7ZJu1ZsNbsxdK2ERNWZ9bnocXop4QV7cg==", + "version": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.9.1-wp-2/react-native-reanimated-2.9.1-wp-2.tgz", + "integrity": "sha512-Lb3OyTv8mnC8Flzlz29CWQCLds7at6wnTy1R46lNT0Rv6CLArer9KWOicYO0iKBHBifKHNXQFz4WRZY40sFFGQ==", "requires": { - "@babel/plugin-transform-object-assign": "^7.10.4", + "@babel/plugin-proposal-export-namespace-from": "^7.17.12", + "@babel/plugin-transform-object-assign": "^7.16.7", + "@babel/preset-typescript": "^7.16.7", "@types/invariant": "^2.2.35", "invariant": "^2.2.4", "lodash.isequal": "^4.5.0", - "mockdate": "^3.0.2", - "react-native-screens": "^3.4.0", + "setimmediate": "^1.0.5", "string-hash-64": "^1.0.3" }, "dependencies": { - "react-native-screens": { - "version": "3.18.1", - "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.18.1.tgz", - "integrity": "sha512-GtEC1AbvpvtKDJldavuONF/hXW1aEZO7qz8SioyHrV9L9/nDiy+iTviMFmeEoix9KwmEHHxoYxc0xiDrFxKHyA==", + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/generator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", + "requires": { + "@babel/types": "^7.20.5", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz", + "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.19.1", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "requires": { + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==" + }, + "@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==" + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==" + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.2.tgz", + "integrity": "sha512-jvS+ngBfrnTUBfOQq8NfGnSbF9BrqlR6hjJ2yVxMkmO5nL/cdifNbI30EfjRlN4g5wYWNnMPyj5Sa6R1pbLeag==", "requires": { - "react-freeze": "^1.0.0", - "warn-once": "^0.1.0" + "@babel/helper-create-class-features-plugin": "^7.20.2", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-typescript": "^7.20.0" } + }, + "@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + } + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.5", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", + "requires": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -51813,9 +53569,10 @@ } }, "react-native-video": { - "version": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-4/react-native-video-5.2.0-wp-4.tgz", - "integrity": "sha512-Y/kCq6hGDOMkT4VLuGtSgJaCF5QWUIipYvqTpgLaPXF33tT9evqTtKXt6OjSFyuaoxXv9rrxaNoN70Fai2A91Q==", + "version": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-5/react-native-video-5.2.0-wp-5.tgz", + "integrity": "sha512-kUU86AmVQ73tQsTyi93Uqa4ti23bHcBIKzgU2wY6lyPTH2hqceUFOdRolRh7AnYhcBjJRGfNK8R8TfUBecsdKA==", "requires": { + "deprecated-react-native-prop-types": "^2.2.0", "prop-types": "^15.7.2" } }, @@ -51931,20 +53688,18 @@ } }, "react-shallow-renderer": { - "version": "16.14.1", - "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", - "integrity": "sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==", - "dev": true, + "version": "16.15.0", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", + "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==", "requires": { "object-assign": "^4.1.1", - "react-is": "^16.12.0 || ^17.0.0" + "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" }, "dependencies": { "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" } } }, @@ -51974,22 +53729,30 @@ } }, "react-test-renderer": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-17.0.2.tgz", - "integrity": "sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz", + "integrity": "sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==", "dev": true, "requires": { - "object-assign": "^4.1.1", - "react-is": "^17.0.2", - "react-shallow-renderer": "^16.13.1", - "scheduler": "^0.20.2" + "react-is": "^18.2.0", + "react-shallow-renderer": "^16.15.0", + "scheduler": "^0.23.0" }, "dependencies": { "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true + }, + "scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0" + } } } }, @@ -52433,6 +54196,7 @@ "version": "0.14.4", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "dev": true, "requires": { "@babel/runtime": "^7.8.4", "private": "^0.1.8" @@ -53020,7 +54784,8 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true }, "renderkid": { "version": "3.0.0", @@ -53385,6 +55150,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" @@ -53457,7 +55223,8 @@ "rsvp": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.4.tgz", - "integrity": "sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==" + "integrity": "sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==", + "dev": true }, "rtlcss": { "version": "4.0.0", @@ -53559,6 +55326,56 @@ "ret": "~0.1.10" } }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + } + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -53568,6 +55385,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "dev": true, "requires": { "@cnakazawa/watch": "^1.0.3", "anymatch": "^2.0.0", @@ -53584,6 +55402,7 @@ "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -53595,7 +55414,8 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true } } }, @@ -53603,6 +55423,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -53617,6 +55438,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, "requires": { "pump": "^3.0.0" } @@ -53625,6 +55447,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -53768,11 +55591,6 @@ "neo-async": "^2.6.2" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, "saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -53783,12 +55601,11 @@ } }, "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", + "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "schema-utils": { @@ -53869,23 +55686,23 @@ "dev": true }, "send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", - "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { "debug": { @@ -53899,10 +55716,20 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -53912,6 +55739,19 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" } } }, @@ -54011,14 +55851,14 @@ } }, "serve-static": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", - "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" } }, "set-blocking": { @@ -54058,8 +55898,7 @@ "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.2.0", @@ -54290,26 +56129,6 @@ "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.7.tgz", "integrity": "sha512-APW9iYbkJ5cijjX4Ljhf3VG8SwYPUJT5gZrwci/wieMabQxWFiV5VwsrP5c6GMRvXKEQMGkAB1d9dvW66dTqpg==" }, - "simple-plist": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz", - "integrity": "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==", - "requires": { - "bplist-creator": "0.1.0", - "bplist-parser": "0.3.1", - "plist": "^3.0.5" - }, - "dependencies": { - "bplist-parser": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz", - "integrity": "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==", - "requires": { - "big-integer": "1.6.x" - } - } - } - }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -54347,8 +56166,7 @@ "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "slash": { "version": "3.0.0", @@ -55275,7 +57093,8 @@ "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true }, "store2": { "version": "2.12.0", @@ -55299,11 +57118,6 @@ "readable-stream": "^2.0.2" } }, - "stream-buffers": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", - "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=" - }, "stream-each": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", @@ -55979,14 +57793,248 @@ "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "es-abstract": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, @@ -56001,17 +58049,6 @@ "functions-have-names": "^1.2.2" } }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, "string.prototype.trimstart": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", @@ -56177,12 +58214,19 @@ } }, "style-value-types": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.0.0.tgz", - "integrity": "sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/style-value-types/-/style-value-types-5.1.2.tgz", + "integrity": "sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q==", "requires": { "hey-listen": "^1.0.8", - "tslib": "^2.1.0" + "tslib": "2.4.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + } } }, "stylehacks": { @@ -58071,17 +60115,33 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", "dev": true }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, "uglify-js": { "version": "3.13.7", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.7.tgz", "integrity": "sha512-1Psi2MmnZJbnEsgJJIlfnd7tFlJfitusmR7zDI8lXlFI0ACD4/Rm/xdrU8bh6zF0i74aiVoBtkRiFulkrmh3AA==", "dev": true }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" - }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -58897,11 +60957,6 @@ "makeerror": "1.0.x" } }, - "warn-once": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz", - "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==" - }, "warning": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", @@ -60222,11 +62277,249 @@ } } }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "which-typed-array": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", + "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.9" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "es-abstract": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + } + } + }, "wicg-inert": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/wicg-inert/-/wicg-inert-3.1.2.tgz", @@ -60554,22 +62847,6 @@ "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=", "dev": true }, - "xcode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/xcode/-/xcode-2.1.0.tgz", - "integrity": "sha512-uCrmPITrqTEzhn0TtT57fJaNaw8YJs1aCzs+P/QqxsDbvPZSv7XMPPwXrKvHtD6pLjBM/NaVwraWJm8q83Y4iQ==", - "requires": { - "simple-plist": "^1.0.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, "xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", @@ -60582,20 +62859,17 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==" + }, "xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "xmldoc": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.2.tgz", - "integrity": "sha512-ruPC/fyPNck2BD1dpz0AZZyrEwMOrWTO5lDdIXS91rs3wtm4j+T8Rp2o+zoOYkkAxJTZRPOSnOGei1egoRmKMQ==", - "requires": { - "sax": "^1.2.1" - } - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", @@ -60745,8 +63019,7 @@ "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, "zip-stream": { "version": "2.1.3", diff --git a/package.json b/package.json index ec50312c3f14a..52302f26084a0 100644 --- a/package.json +++ b/package.json @@ -112,10 +112,10 @@ "@storybook/builder-webpack5": "6.5.7", "@storybook/manager-webpack5": "6.5.7", "@storybook/react": "6.5.7", - "@testing-library/jest-dom": "5.16.4", - "@testing-library/react": "12.1.5", - "@testing-library/react-native": "9.1.0", - "@testing-library/user-event": "14.2.0", + "@testing-library/jest-dom": "5.16.5", + "@testing-library/react": "13.4.0", + "@testing-library/react-native": "11.3.0", + "@testing-library/user-event": "14.4.3", "@types/classnames": "2.3.1", "@types/eslint": "7.28.0", "@types/estree": "0.0.50", @@ -126,7 +126,9 @@ "@types/npm-package-arg": "6.1.1", "@types/prettier": "2.4.4", "@types/qs": "6.9.7", + "@types/react": "18.0.21", "@types/react-dates": "21.8.3", + "@types/react-dom": "18.0.6", "@types/requestidlecallback": "0.3.4", "@types/semver": "7.3.8", "@types/sprintf-js": "1.1.2", @@ -204,8 +206,8 @@ "lint-staged": "10.0.1", "lodash": "4.17.21", "make-dir": "3.0.0", - "metro-react-native-babel-preset": "0.66.2", - "metro-react-native-babel-transformer": "0.66.2", + "metro-react-native-babel-preset": "0.70.3", + "metro-react-native-babel-transformer": "0.70.3", "mkdirp": "0.5.1", "nock": "12.0.3", "node-fetch": "2.6.1", @@ -216,12 +218,12 @@ "postcss-loader": "6.2.1", "prettier": "npm:wp-prettier@2.6.2", "progress": "2.0.3", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-native": "0.66.2", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-native": "0.69.4", "react-native-url-polyfill": "1.1.2", "react-refresh": "0.10.0", - "react-test-renderer": "17.0.2", + "react-test-renderer": "18.2.0", "redux": "4.1.2", "resize-observer-polyfill": "1.5.1", "rimraf": "3.0.2", diff --git a/packages/annotations/package.json b/packages/annotations/package.json index 5d7021f010411..8a60fcc93422c 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -33,9 +33,6 @@ "rememo": "^4.0.0", "uuid": "^8.3.0" }, - "peerDependencies": { - "react": "^17.0.0" - }, "publishConfig": { "access": "public" } diff --git a/packages/block-directory/CHANGELOG.md b/packages/block-directory/CHANGELOG.md index d65f7d56149a6..f7f7566370060 100644 --- a/packages/block-directory/CHANGELOG.md +++ b/packages/block-directory/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 1083e6281f7ab..0055a4846d7b6 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -47,8 +47,8 @@ "change-case": "^4.1.2" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index 0ce86cc9cb110..6abc73d7073b6 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,7 +2,11 @@ ## Unreleased -### Enhancement +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + +### Enhancements - `URLInput`: the `renderSuggestions` callback prop now receives `currentInputValue` as a new parameter ([45806](https://github.com/WordPress/gutenberg/pull/45806)). diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 59aee136894e7..f62afa7a1d4b8 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -74,8 +74,8 @@ "traverse": "^0.6.6" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/block-editor/src/components/block-draggable/index.native.js b/packages/block-editor/src/components/block-draggable/index.native.js index cbad2ef5a1be5..a6deca474dd56 100644 --- a/packages/block-editor/src/components/block-draggable/index.native.js +++ b/packages/block-editor/src/components/block-draggable/index.native.js @@ -285,6 +285,58 @@ const BlockDraggableWrapper = ( { children, isRTL } ) => { ); }; +function useIsScreenReaderEnabled() { + const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = + useState( false ); + + useEffect( () => { + let mounted = true; + + const changeListener = AccessibilityInfo.addEventListener( + 'screenReaderChanged', + ( enabled ) => setIsScreenReaderEnabled( enabled ) + ); + + AccessibilityInfo.isScreenReaderEnabled().then( + ( screenReaderEnabled ) => { + if ( mounted && screenReaderEnabled ) { + setIsScreenReaderEnabled( screenReaderEnabled ); + } + } + ); + + return () => { + mounted = false; + + changeListener.remove(); + }; + }, [] ); + + return isScreenReaderEnabled; +} + +function useIsEditingText() { + const [ isEditingText, setIsEditingText ] = useState( () => + RCTAztecView.InputState.isFocused() + ); + + useEffect( () => { + const onFocusChangeAztec = ( { isFocused } ) => { + setIsEditingText( isFocused ); + }; + + RCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec ); + + return () => { + RCTAztecView.InputState.removeFocusChangeListener( + onFocusChangeAztec + ); + }; + }, [] ); + + return isEditingText; +} + /** * Block draggable component * @@ -308,9 +360,8 @@ const BlockDraggable = ( { testID, } ) => { const wasBeingDragged = useRef( false ); - const [ isEditingText, setIsEditingText ] = useState( false ); - const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = - useState( false ); + const isEditingText = useIsEditingText(); + const isScreenReaderEnabled = useIsScreenReaderEnabled(); const draggingAnimation = { opacity: useSharedValue( 1 ), @@ -365,43 +416,6 @@ const BlockDraggable = ( { wasBeingDragged.current = isBeingDragged; }, [ isBeingDragged ] ); - const onFocusChangeAztec = useCallback( ( { isFocused } ) => { - setIsEditingText( isFocused ); - }, [] ); - - useEffect( () => { - let mounted = true; - - const isAnyAztecInputFocused = RCTAztecView.InputState.isFocused(); - if ( isAnyAztecInputFocused ) { - setIsEditingText( isAnyAztecInputFocused ); - } - - RCTAztecView.InputState.addFocusChangeListener( onFocusChangeAztec ); - - const screenReaderChangedListener = AccessibilityInfo.addEventListener( - 'screenReaderChanged', - setIsScreenReaderEnabled - ); - AccessibilityInfo.isScreenReaderEnabled().then( - ( screenReaderEnabled ) => { - if ( mounted ) { - setIsScreenReaderEnabled( screenReaderEnabled ); - } - } - ); - - return () => { - mounted = false; - - RCTAztecView.InputState.removeFocusChangeListener( - onFocusChangeAztec - ); - - screenReaderChangedListener.remove(); - }; - }, [] ); - const onLongPressDraggable = useCallback( () => { // Ensure that no text input is focused when starting the dragging gesture in order to prevent conflicts with text editing. RCTAztecView.InputState.blurCurrentFocusedElement(); diff --git a/packages/block-editor/src/components/block-draggable/test/helpers.native.js b/packages/block-editor/src/components/block-draggable/test/helpers.native.js index ed9bf443d4013..1d8e4fbb2afb6 100644 --- a/packages/block-editor/src/components/block-draggable/test/helpers.native.js +++ b/packages/block-editor/src/components/block-draggable/test/helpers.native.js @@ -53,14 +53,14 @@ export const initializeWithBlocksLayouts = async ( blocks ) => { const initialHtml = blocks.map( ( block ) => block.html ).join( '\n' ); const screen = await initializeEditor( { initialHtml } ); - const { getByLabelText } = screen; + const { getAllByLabelText } = screen; const waitPromises = []; blocks.forEach( ( block, index ) => { const a11yLabel = new RegExp( `${ block.name } Block\\. Row ${ index + 1 }` ); - const element = getByLabelText( a11yLabel ); + const [ element ] = getAllByLabelText( a11yLabel ); // "onLayout" event will populate the blocks layouts data. fireEvent( element, 'layout', { nativeEvent: { layout: block.layout }, @@ -91,13 +91,11 @@ export const initializeWithBlocksLayouts = async ( blocks ) => { const nestedA11yLabel = new RegExp( `${ nestedBlock.name } Block\\. Row ${ nestedIndex + 1 }` ); - fireEvent( - within( element ).getByLabelText( nestedA11yLabel ), - 'layout', - { - nativeEvent: { layout: nestedBlock.layout }, - } - ); + const [ nestedElement ] = + within( element ).getAllByLabelText( nestedA11yLabel ); + fireEvent( nestedElement, 'layout', { + nativeEvent: { layout: nestedBlock.layout }, + } ); } ); } } ); diff --git a/packages/block-editor/src/components/block-draggable/test/index.native.js b/packages/block-editor/src/components/block-draggable/test/index.native.js index 2783845946050..5b670970406f5 100644 --- a/packages/block-editor/src/components/block-draggable/test/index.native.js +++ b/packages/block-editor/src/components/block-draggable/test/index.native.js @@ -93,11 +93,13 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when unselected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; // Start dragging from block's content + const [ paragraphBlock ] = screen.getAllByLabelText( + /Paragraph Block\. Row 1/ + ); fireLongPress( - getByLabelText( /Paragraph Block\. Row 1/ ), + paragraphBlock, 'draggable-trigger-content' ); expect( getDraggableChip( screen ) ).toBeVisible(); @@ -112,12 +114,12 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when selected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; + const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); - const paragraphBlock = getByLabelText( + const [ paragraphBlock ] = screen.getAllByLabelText( /Paragraph Block\. Row 1/ ); fireEvent.press( paragraphBlock ); @@ -146,9 +148,8 @@ describe( 'BlockDraggable', () => { it( 'does not enable drag mode when selected and editing text', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; - const paragraphBlock = getByLabelText( + const [ paragraphBlock ] = screen.getAllByLabelText( /Paragraph Block\. Row 1/ ); @@ -178,13 +179,12 @@ describe( 'BlockDraggable', () => { it( 'finishes editing text and enables drag mode when long-pressing over a different block', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; - const paragraphBlock = getByLabelText( + const [ paragraphBlock ] = screen.getAllByLabelText( /Paragraph Block\. Row 1/ ); - const spacerBlock = - getByLabelText( /Spacer Block\. Row 3/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 3/ ); // Select Paragraph block and start editing text fireEvent.press( paragraphBlock ); @@ -208,12 +208,11 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when unselected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getAllByLabelText } = screen; // We select the first Image block as the Gallery block // also contains Image blocks. - const imageBlock = - getAllByLabelText( /Image Block\. Row 2/ )[ 0 ]; + const [ imageBlock ] = + screen.getAllByLabelText( /Image Block\. Row 2/ ); // Start dragging from block's content fireLongPress( imageBlock, 'draggable-trigger-content' ); expect( getDraggableChip( screen ) ).toBeVisible(); @@ -228,15 +227,14 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when selected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getAllByLabelText } = screen; const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); // We select the first Image block as the Gallery block // also contains Image blocks. - const imageBlock = - getAllByLabelText( /Image Block\. Row 2/ )[ 0 ]; + const [ imageBlock ] = + screen.getAllByLabelText( /Image Block\. Row 2/ ); fireEvent.press( imageBlock ); // Start dragging from block's content @@ -262,15 +260,15 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when unselected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; // Start dragging from block's content, specifically the first // trigger index, which corresponds to the Gallery block content. - fireLongPress( - getByLabelText( /Gallery Block\. Row 4/ ), - 'draggable-trigger-content', - { triggerIndex: 0 } + const [ galleryBlock ] = screen.getAllByLabelText( + /Gallery Block\. Row 4/ ); + fireLongPress( galleryBlock, 'draggable-trigger-content', { + triggerIndex: 0, + } ); expect( getDraggableChip( screen ) ).toBeVisible(); // "firePanGesture" finishes the dragging gesture @@ -283,12 +281,11 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when selected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); - const galleryBlock = getByLabelText( + const [ galleryBlock ] = screen.getAllByLabelText( /Gallery Block\. Row 4/ ); await waitForStoreResolvers( () => @@ -319,16 +316,15 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when nested block is selected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); - const galleryBlock = getByLabelText( + const [ galleryBlock ] = screen.getAllByLabelText( /Gallery Block\. Row 4/ ); - const galleryItem = - within( galleryBlock ).getByLabelText( + const [ galleryItem ] = + within( galleryBlock ).getAllByLabelText( /Image Block\. Row 2/ ); fireEvent.press( galleryBlock ); @@ -361,13 +357,11 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when unselected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; // Start dragging from block's content - fireLongPress( - getByLabelText( /Spacer Block\. Row 3/ ), - 'draggable-trigger-content' - ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 3/ ); + fireLongPress( spacerBlock, 'draggable-trigger-content' ); expect( getDraggableChip( screen ) ).toBeVisible(); // "firePanGesture" finishes the dragging gesture @@ -380,13 +374,12 @@ describe( 'BlockDraggable', () => { it( 'enables drag mode when selected', async () => withReanimatedTimer( async () => { const screen = await initializeWithBlocksLayouts( BLOCKS ); - const { getByLabelText } = screen; const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); - const spacerBlock = - getByLabelText( /Spacer Block\. Row 3/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 3/ ); await waitForStoreResolvers( () => fireEvent.press( spacerBlock ) ); @@ -413,9 +406,7 @@ describe( 'BlockDraggable', () => { it( 'moves blocks', async () => withReanimatedTimer( async () => { - const { getByLabelText } = await initializeWithBlocksLayouts( - BLOCKS - ); + const screen = await initializeWithBlocksLayouts( BLOCKS ); const blockDraggableWrapper = getByGestureTestId( 'block-draggable-wrapper' ); @@ -423,10 +414,10 @@ describe( 'BlockDraggable', () => { expect( getEditorHtml() ).toMatchSnapshot( 'Initial order' ); // Move Paragraph block from first to second position - fireLongPress( - getByLabelText( /Paragraph Block\. Row 1/ ), - 'draggable-trigger-content' + const [ paragraphBlock ] = screen.getAllByLabelText( + /Paragraph Block\. Row 1/ ); + fireLongPress( paragraphBlock, 'draggable-trigger-content' ); firePanGesture( blockDraggableWrapper, [ { id: TOUCH_EVENT_ID, @@ -453,10 +444,9 @@ describe( 'BlockDraggable', () => { ); // Move Spacer block from third to first position - fireLongPress( - getByLabelText( /Spacer Block\. Row 3/ ), - 'draggable-trigger-content' - ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 3/ ); + fireLongPress( spacerBlock, 'draggable-trigger-content' ); firePanGesture( blockDraggableWrapper, [ { id: TOUCH_EVENT_ID, diff --git a/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap b/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap index ec1b5b196d57b..053c3289b8055 100644 --- a/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap +++ b/packages/block-editor/src/components/block-mover/test/__snapshots__/index.native.js.snap @@ -15,7 +15,6 @@ Array [ accessible={true} collapsable={false} focusable={true} - nativeID="animatedComponent" onClick={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} @@ -75,7 +74,6 @@ Array [ accessible={true} collapsable={false} focusable={true} - nativeID="animatedComponent" onClick={[Function]} onResponderGrant={[Function]} onResponderMove={[Function]} diff --git a/packages/block-editor/src/components/block-switcher/test/index.js b/packages/block-editor/src/components/block-switcher/test/index.js index 9d788f9d6eb14..8c1983dd8569d 100644 --- a/packages/block-editor/src/components/block-switcher/test/index.js +++ b/packages/block-editor/src/components/block-switcher/test/index.js @@ -15,6 +15,7 @@ import { copy } from '@wordpress/icons'; * Internal dependencies */ import { BlockSwitcher, BlockSwitcherDropdownMenu } from '../'; +import { act } from 'react-test-renderer'; jest.mock( '@wordpress/data/src/components/use-select', () => jest.fn() ); jest.mock( '../../block-title/use-block-display-title', () => @@ -210,6 +211,7 @@ describe( 'BlockSwitcherDropdownMenu', () => { } ), '[ArrowDown]' ); + await act( () => Promise.resolve() ); expect( screen.getByRole( 'button', { @@ -252,6 +254,7 @@ describe( 'BlockSwitcherDropdownMenu', () => { expanded: false, } ) ); + await act( () => Promise.resolve() ); expect( screen.getByRole( 'button', { @@ -282,6 +285,7 @@ describe( 'BlockSwitcherDropdownMenu', () => { expanded: false, } ) ); + await act( () => Promise.resolve() ); expect( within( diff --git a/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js b/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js index d9518eb303a04..84399b1bf97af 100644 --- a/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js +++ b/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { useLayoutEffect, useMemo } from '@wordpress/element'; -import { useSelect, useDispatch, useRegistry } from '@wordpress/data'; +import { useSelect, useDispatch } from '@wordpress/data'; import isShallowEqual from '@wordpress/is-shallow-equal'; /** @@ -13,8 +13,6 @@ import { getLayoutType } from '../../layouts'; /** @typedef {import('../../selectors').WPDirectInsertBlock } WPDirectInsertBlock */ -const pendingSettingsUpdates = new WeakMap(); - /** * This hook is a side effect which updates the block-editor store when changes * happen to inner block settings. The given props are transformed into a @@ -48,8 +46,6 @@ export default function useNestedSettingsUpdate( layout ) { const { updateBlockListSettings } = useDispatch( blockEditorStore ); - const registry = useRegistry(); - const { blockListSettings, parentLock } = useSelect( ( select ) => { const rootClientId = @@ -101,30 +97,7 @@ export default function useNestedSettingsUpdate( } if ( ! isShallowEqual( blockListSettings, newSettings ) ) { - // Batch updates to block list settings to avoid triggering cascading renders - // for each container block included in a tree and optimize initial render. - // To avoid triggering updateBlockListSettings for each container block - // causing X re-renderings for X container blocks, - // we batch all the updatedBlockListSettings in a single "data" batch - // which results in a single re-render. - if ( ! pendingSettingsUpdates.get( registry ) ) { - pendingSettingsUpdates.set( registry, [] ); - } - pendingSettingsUpdates - .get( registry ) - .push( [ clientId, newSettings ] ); - window.queueMicrotask( () => { - if ( pendingSettingsUpdates.get( registry )?.length ) { - registry.batch( () => { - pendingSettingsUpdates - .get( registry ) - .forEach( ( args ) => { - updateBlockListSettings( ...args ); - } ); - pendingSettingsUpdates.set( registry, [] ); - } ); - } - } ); + updateBlockListSettings( clientId, newSettings ); } }, [ clientId, @@ -138,6 +111,5 @@ export default function useNestedSettingsUpdate( orientation, updateBlockListSettings, layout, - registry, ] ); } diff --git a/packages/block-editor/src/components/line-height-control/test/index.js b/packages/block-editor/src/components/line-height-control/test/index.js index c6a16f5db3cad..ea2eb2b6f6e25 100644 --- a/packages/block-editor/src/components/line-height-control/test/index.js +++ b/packages/block-editor/src/components/line-height-control/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { fireEvent, render, screen } from '@testing-library/react'; +import { act, fireEvent, render, screen } from '@testing-library/react'; /** * WordPress dependencies @@ -30,7 +30,7 @@ describe( 'LineHeightControl', () => { it( 'should immediately step up from the default value if up-arrowed from an unset state', () => { render( ); const input = screen.getByRole( 'spinbutton' ); - input.focus(); + act( () => input.focus() ); fireEvent.keyDown( input, { keyCode: UP } ); expect( input ).toHaveValue( BASE_DEFAULT_VALUE + STEP ); } ); @@ -38,7 +38,7 @@ describe( 'LineHeightControl', () => { it( 'should immediately step down from the default value if down-arrowed from an unset state', () => { render( ); const input = screen.getByRole( 'spinbutton' ); - input.focus(); + act( () => input.focus() ); fireEvent.keyDown( input, { keyCode: DOWN } ); expect( input ).toHaveValue( BASE_DEFAULT_VALUE - STEP ); } ); @@ -46,7 +46,7 @@ describe( 'LineHeightControl', () => { it( 'should immediately step up from the default value if spin button up was clicked from an unset state', () => { render( ); const input = screen.getByRole( 'spinbutton' ); - input.focus(); + act( () => input.focus() ); fireEvent.change( input, { target: { value: 0.1 } } ); // simulates click on spin button up expect( input ).toHaveValue( BASE_DEFAULT_VALUE + STEP ); } ); @@ -54,7 +54,7 @@ describe( 'LineHeightControl', () => { it( 'should immediately step down from the default value if spin button down was clicked from an unset state', () => { render( ); const input = screen.getByRole( 'spinbutton' ); - input.focus(); + act( () => input.focus() ); fireEvent.change( input, { target: { value: 0 } } ); // simulates click on spin button down expect( input ).toHaveValue( BASE_DEFAULT_VALUE - STEP ); } ); diff --git a/packages/block-editor/src/components/link-control/test/index.js b/packages/block-editor/src/components/link-control/test/index.js index 20a58964cf7ae..4c0a95351a666 100644 --- a/packages/block-editor/src/components/link-control/test/index.js +++ b/packages/block-editor/src/components/link-control/test/index.js @@ -1,18 +1,21 @@ /** * External dependencies */ -import { act, fireEvent, render, screen, within } from '@testing-library/react'; +import { + fireEvent, + render, + screen, + waitFor, + within, +} from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** * WordPress dependencies */ import { useState } from '@wordpress/element'; - -/** - * WordPress dependencies - */ import { useSelect } from '@wordpress/data'; + /** * Internal dependencies */ @@ -23,14 +26,6 @@ import { uniqueId, } from './fixtures'; -// Mock debounce() so that it runs instantly. -jest.mock( '@wordpress/compose/src/utils/debounce', () => ( { - debounce: ( fn ) => { - fn.cancel = jest.fn(); - return fn; - }, -} ) ); - const mockFetchSearchSuggestions = jest.fn(); /** @@ -58,18 +53,6 @@ jest.mock( '@wordpress/data/src/components/use-dispatch', () => ( { jest.useRealTimers(); -/** - * Wait for next tick of event loop. This is required - * because the `fetchSearchSuggestions` Promise will - * resolve on the next tick of the event loop (this is - * inline with the Promise spec). As a result we need to - * wait on this loop to "tick" before we can expect the UI - * to have updated. - */ -function eventLoopTick() { - return new Promise( ( resolve ) => setImmediate( resolve ) ); -} - beforeEach( () => { // Setup a DOM element as a render target. mockFetchSearchSuggestions.mockImplementation( fetchFauxEntitySuggestions ); @@ -288,6 +271,7 @@ describe( 'Basic rendering', () => { it( 'should show "Unlink" button if a onRemove handler is provided', async () => { const user = userEvent.setup(); const mockOnRemove = jest.fn(); + render( { const searchTerm = 'Hello'; let resolver; - - const fauxRequest = () => - new Promise( ( resolve ) => { - resolver = resolve; - } ); - - mockFetchSearchSuggestions.mockImplementation( fauxRequest ); + mockFetchSearchSuggestions.mockImplementation( + () => + new Promise( ( resolve ) => { + resolver = resolve; + } ) + ); render( ); @@ -329,32 +312,20 @@ describe( 'Searching for a link', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); + expect( await screen.findByRole( 'presentation' ) ).toBeVisible(); + expect( screen.queryByRole( 'listbox' ) ).not.toBeInTheDocument(); - const searchResultsField = screen.queryByRole( 'listbox' ); - - let loadingUI = screen.queryByRole( 'presentation' ); - - expect( searchResultsField ).not.toBeInTheDocument(); - - expect( loadingUI ).toBeVisible(); + // make the search suggestions fetch return a response + resolver( fauxEntitySuggestions ); - act( () => { - resolver( fauxEntitySuggestions ); - } ); - - await eventLoopTick(); - - loadingUI = screen.queryByRole( 'presentation' ); - - expect( loadingUI ).not.toBeInTheDocument(); + expect( await screen.findByRole( 'listbox' ) ).toBeVisible(); + expect( screen.queryByRole( 'presentation' ) ).not.toBeInTheDocument(); } ); it( 'should display only search suggestions when current input value is not URL-like', async () => { const user = userEvent.setup(); const searchTerm = 'Hello world'; - const firstFauxSuggestion = fauxEntitySuggestions[ 0 ]; + const firstSuggestion = fauxEntitySuggestions[ 0 ]; render( ); @@ -364,11 +335,8 @@ describe( 'Searching for a link', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -379,12 +347,12 @@ describe( 'Searching for a link', () => { expect( searchInput ).toHaveAttribute( 'aria-expanded', 'true' ); - // Sanity check that a search suggestion shows up corresponding to the data. + // Check that a search suggestion shows up corresponding to the data. expect( searchResultElements[ 0 ] ).toHaveTextContent( - firstFauxSuggestion.title + firstSuggestion.title ); expect( searchResultElements[ 0 ] ).toHaveTextContent( - firstFauxSuggestion.type + firstSuggestion.type ); // The fallback URL suggestion should not be shown when input is not URL-like. @@ -405,22 +373,11 @@ describe( 'Searching for a link', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - - const searchResults = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); - - const searchResultTextHighlightElements = Array.from( searchResults ) - .map( ( result ) => result.querySelector( 'mark' ) ) - .flat() - .filter( Boolean ); - - const invalidResults = searchResultTextHighlightElements.find( - ( mark ) => mark.innerHTML !== 'Hello' + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); + const searchResultTextHighlightElements = Array.from( + searchResults.querySelectorAll( 'button[role="option"] mark' ) ); // Given we're mocking out the results we should always have 4 mark elements. @@ -428,7 +385,11 @@ describe( 'Searching for a link', () => { // Make sure there are no `mark` elements which contain anything other // than the trimmed search term (ie: no whitespace). - expect( invalidResults ).toBeFalsy(); + expect( + searchResultTextHighlightElements.every( + ( mark ) => mark.innerHTML === 'Hello' + ) + ).toBe( true ); // Implementation detail test to ensure that the fetch handler is called // with the trimmed search value. We do this because we are mocking out @@ -452,9 +413,6 @@ describe( 'Searching for a link', () => { const searchResultsField = screen.queryByRole( 'listbox' ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - expect( searchResultsField ).not.toBeInTheDocument(); expect( mockFetchSearchSuggestions ).not.toHaveBeenCalled(); } ); @@ -474,11 +432,8 @@ describe( 'Searching for a link', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -511,11 +466,8 @@ describe( 'Searching for a link', () => { // Simulate searching for a term. await user.type( searchInput, 'couldbeurlorentitysearchterm' ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -544,11 +496,8 @@ describe( 'Manual link entry', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getByRole( 'option' ); @@ -581,7 +530,7 @@ describe( 'Manual link entry', () => { name: 'URL', } ); - let submitButton = screen.queryByRole( 'button', { + let submitButton = screen.getByRole( 'button', { name: 'Submit', } ); @@ -596,13 +545,10 @@ describe( 'Manual link entry', () => { await user.clear( searchInput ); } - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - // Attempt to submit the empty search value in the input. await user.keyboard( '[Enter]' ); - submitButton = screen.queryByRole( 'button', { + submitButton = screen.getByRole( 'button', { name: 'Submit', } ); @@ -641,9 +587,6 @@ describe( 'Manual link entry', () => { await user.clear( searchInput ); } - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - // Attempt to submit the empty search value in the input. await user.click( submitButton ); @@ -678,11 +621,8 @@ describe( 'Manual link entry', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getByRole( 'option' ); @@ -700,14 +640,10 @@ describe( 'Manual link entry', () => { describe( 'Default search suggestions', () => { it( 'should display a list of initial search suggestions when there is no search value or suggestions', async () => { - const expectedResultsLength = 3; // Set within `LinkControl`. - render( ); - await eventLoopTick(); - expect( - screen.queryByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: 'Recently updated', } ) ).toBeVisible(); @@ -725,24 +661,16 @@ describe( 'Default search suggestions', () => { expect( mockFetchSearchSuggestions ).toHaveBeenCalledTimes( 1 ); // Verify the search results already display the initial suggestions. - expect( screen.queryAllByRole( 'option' ) ).toHaveLength( - expectedResultsLength - ); + // `LinkControl` internally always limits the number of initial suggestions to 3. + expect( screen.queryAllByRole( 'option' ) ).toHaveLength( 3 ); } ); it( 'should not display initial suggestions when input value is present', async () => { const user = userEvent.setup(); - // Render with an initial value an ensure that no initial suggestions - // are shown. - render( - - ); - - await eventLoopTick(); + // Render with an initial value an ensure that no initial suggestions are shown. + const initialValue = fauxEntitySuggestions[ 0 ]; + render( ); expect( mockFetchSearchSuggestions ).not.toHaveBeenCalled(); @@ -752,23 +680,21 @@ describe( 'Default search suggestions', () => { const currentLinkBtn = within( currentLinkUI ).getByRole( 'button', { name: 'Edit', } ); - await user.click( currentLinkBtn ); const searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); - searchInput.focus(); + // Search input is set to the URL value. + expect( searchInput ).toHaveValue( initialValue.url ); - await eventLoopTick(); + // Focus the search input to display suggestions + await user.click( searchInput ); const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); - // Search input is set to the URL value. - expect( searchInput ).toHaveValue( fauxEntitySuggestions[ 0 ].url ); - // It should match any url that's like ?p= and also include a URL option. expect( searchResultElements ).toHaveLength( 5 ); @@ -783,62 +709,45 @@ describe( 'Default search suggestions', () => { render( ); - let searchResultElements; - let searchInput; - // Search Input UI. - searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); + const searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - expect( searchInput ).toHaveValue( searchTerm ); - searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); - - // Delete the text. - await userEvent.clear( searchInput ); + const searchResultsList = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - await eventLoopTick(); + expect( searchResultsList ).toBeVisible(); - searchResultElements = within( - screen.getByRole( 'listbox', { - name: 'Recently updated', - } ) - ).getAllByRole( 'option' ); + expect( + within( searchResultsList ).getAllByRole( 'option' ) + ).toHaveLength( 4 ); - searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); + // Delete the text. + await userEvent.clear( searchInput ); // Check the input is empty now. expect( searchInput ).toHaveValue( '' ); - expect( - screen.queryByRole( 'listbox', { - name: 'Recently updated', - } ) - ).toBeVisible(); + const initialResultsList = await screen.findByRole( 'listbox', { + name: 'Recently updated', + } ); - expect( searchResultElements ).toHaveLength( 3 ); + expect( + within( initialResultsList ).getAllByRole( 'option' ) + ).toHaveLength( 3 ); } ); it( 'should not display initial suggestions when there are no recently updated pages/posts', async () => { - const noResults = []; // Force API returning empty results for recently updated Pages. - mockFetchSearchSuggestions.mockImplementation( () => - Promise.resolve( noResults ) - ); + mockFetchSearchSuggestions.mockImplementation( async () => [] ); render( ); - await eventLoopTick(); - const searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); const searchResultsField = screen.queryByRole( 'listbox', { @@ -869,19 +778,15 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { async ( entityNameText ) => { const user = userEvent.setup(); let resolver; - let resolvedEntity; - const createSuggestion = ( title ) => new Promise( ( resolve ) => { - resolver = ( arg ) => { - resolve( arg ); - }; - resolvedEntity = { - title, - id: 123, - url: '/?p=123', - type: 'page', - }; + resolver = () => + resolve( { + title, + id: 123, + url: '/?p=123', + type: 'page', + } ); } ); const LinkControlConsumer = () => { @@ -906,13 +811,13 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, entityNameText ); - await eventLoopTick(); - - const searchResultElements = screen.queryAllByRole( 'option' ); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - const createButton = Array.from( searchResultElements ).filter( - ( result ) => result.innerHTML.includes( 'Create:' ) - )[ 0 ]; + const createButton = within( searchResults ).getByRole( 'option', { + name: /^Create:/, + } ); expect( createButton ).toBeVisible(); expect( createButton ).toHaveTextContent( entityNameText ); @@ -921,8 +826,6 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // resolution manually via the `resolver` reference. await user.click( createButton ); - await eventLoopTick(); - // Check for loading indicator. const loadingIndicator = screen.getByText( 'Creating…' ); const currentLinkLabel = @@ -935,13 +838,11 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { ); // Resolve the `createSuggestion` promise. - await act( async () => { - resolver( resolvedEntity ); - } ); + resolver(); - await eventLoopTick(); - - const currentLink = screen.getByLabelText( 'Currently selected' ); + const currentLink = await screen.findByLabelText( + 'Currently selected' + ); expect( currentLink ).toHaveTextContent( entityNameText ); expect( currentLink ).toHaveTextContent( '/?p=123' ); @@ -977,22 +878,16 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, 'Some new page to create' ); - await eventLoopTick(); - - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - const createButton = Array.from( searchResultElements ).filter( - ( result ) => result.innerHTML.includes( 'Create:' ) - )[ 0 ]; + const createButton = within( searchResults ).getByRole( 'option', { + name: /^Create:/, + } ); await user.click( createButton ); - await eventLoopTick(); - const currentLink = screen.getByLabelText( 'Currently selected' ); expect( currentLink ).toHaveTextContent( 'Some new page to create' ); @@ -1032,28 +927,25 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, entityNameText ); - await eventLoopTick(); - - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); - const createButton = searchResultElements.find( ( result ) => - result.innerHTML.includes( 'Create:' ) - ); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - // Step down into the search results, highlighting the first result item. + // Step down into the search results, selecting the first result item. triggerArrowDown( searchInput ); - await user.click( createButton ); - - await user.type( searchInput, '[Enter]' ); + // Check that the create button is in the results and that it's selected + const createButton = within( searchResults ).getByRole( 'option', { + name: /^Create:/, + selected: true, + } ); + expect( createButton ).toBeVisible(); - await eventLoopTick(); + expect( searchInput ).toHaveFocus(); + triggerEnter( searchInput ); expect( - screen.getByLabelText( 'Currently selected' ) + await screen.findByLabelText( 'Currently selected' ) ).toHaveTextContent( entityNameText ); } ); @@ -1078,17 +970,13 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, entityNameText ); - await eventLoopTick(); - - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - const createButton = Array.from( searchResultElements ).filter( - ( result ) => result.innerHTML.includes( 'Custom suggestion text' ) - )[ 0 ]; + const createButton = within( searchResults ).getByRole( 'option', { + name: /Custom suggestion text/, + } ); expect( createButton ).toBeVisible(); } ); @@ -1099,9 +987,6 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { async ( handler ) => { render( ); - // Await the initial suggestions to be fetched. - await eventLoopTick(); - // Search Input UI. const searchInput = screen.getByRole( 'combobox', { name: 'URL', @@ -1115,17 +1000,14 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { } ); - it( 'should not show not show an option to create an entity when input is empty', async () => { + it( 'should not show an option to create an entity when input is empty', async () => { render( ); - // Await the initial suggestions to be fetched. - await eventLoopTick(); - // Search Input UI. const searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); @@ -1156,19 +1038,15 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, inputText ); - await eventLoopTick(); - - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); - - const createButton = Array.from( searchResultElements ).filter( - ( result ) => result.innerHTML.includes( 'New page' ) - )[ 0 ]; + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - expect( createButton ).toBeFalsy(); // Shouldn't exist! + const createButton = within( searchResults ).queryByRole( + 'option', + { name: /New page/ } + ); + expect( createButton ).not.toBeInTheDocument(); // Shouldn't exist! } ); } ); @@ -1193,21 +1071,16 @@ describe( 'Creating Entities (eg: Posts, Pages)', () => { // Simulate searching for a term. await user.type( searchInput, searchText ); - await eventLoopTick(); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); - const createButton = Array.from( searchResultElements ).filter( - ( result ) => result.innerHTML.includes( 'Create:' ) - )[ 0 ]; + const createButton = within( searchResults ).getByRole( 'option', { + name: /^Create:/, + } ); await user.click( createButton ); - await eventLoopTick(); - searchInput = screen.getByRole( 'combobox', { name: 'URL' } ); const errorNotice = screen.getAllByText( @@ -1327,11 +1200,8 @@ describe( 'Selecting links', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -1392,17 +1262,15 @@ describe( 'Selecting links', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); + const searchResults = await screen.findByRole( 'listbox', { + name: /Search results for.*/, + } ); // Step down into the search results, highlighting the first result item. triggerArrowDown( searchInput ); - const searchResultElements = within( - screen.getByRole( 'listbox', { - name: /Search results for.*/, - } ) - ).getAllByRole( 'option' ); + const searchResultElements = + within( searchResults ).getAllByRole( 'option' ); const firstSearchSuggestion = searchResultElements[ 0 ]; const secondSearchSuggestion = searchResultElements[ 1 ]; @@ -1412,7 +1280,7 @@ describe( 'Selecting links', () => { } ); // We should have highlighted the first item using the keyboard. - expect( selectedSearchResultElement ).toEqual( + expect( selectedSearchResultElement ).toBe( firstSearchSuggestion ); @@ -1427,7 +1295,7 @@ describe( 'Selecting links', () => { // We should have highlighted the first item using the keyboard // eslint-disable-next-line jest/no-conditional-expect - expect( selectedSearchResultElement ).toEqual( + expect( selectedSearchResultElement ).toBe( secondSearchSuggestion ); @@ -1440,7 +1308,7 @@ describe( 'Selecting links', () => { // We should be back to highlighting the first search result again // eslint-disable-next-line jest/no-conditional-expect - expect( selectedSearchResultElement ).toEqual( + expect( selectedSearchResultElement ).toBe( firstSearchSuggestion ); } @@ -1469,10 +1337,8 @@ describe( 'Selecting links', () => { it( 'should allow selection of initial search results via the keyboard', async () => { render( ); - await eventLoopTick(); - expect( - screen.queryByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: 'Recently updated', } ) ).toBeVisible(); @@ -1483,8 +1349,6 @@ describe( 'Selecting links', () => { // Step down into the search results, highlighting the first result item. triggerArrowDown( searchInput ); - await eventLoopTick(); - const searchResultElements = within( screen.getByRole( 'listbox', { name: 'Recently updated', @@ -1611,11 +1475,8 @@ describe( 'Post types', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -1641,11 +1502,8 @@ describe( 'Post types', () => { // Simulate searching for a term. await user.type( searchInput, searchTerm ); - // fetchFauxEntitySuggestions resolves on next "tick" of event loop. - await eventLoopTick(); - const searchResultElements = within( - screen.getByRole( 'listbox', { + await screen.findByRole( 'listbox', { name: /Search results for.*/, } ) ).getAllByRole( 'option' ); @@ -1693,11 +1551,6 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); @@ -1719,16 +1572,9 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); - - expect( isRichLinkPreview ).toBe( true ); + await waitFor( () => expect( linkPreview ).toHaveClass( 'is-rich' ) ); } ); it( 'should not display placeholders for the image and description if neither is available in the data', async () => { @@ -1743,13 +1589,10 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); + await waitFor( () => expect( linkPreview ).toHaveClass( 'is-rich' ) ); + // Todo: refactor to use user-facing queries. const hasRichImagePreview = linkPreview.querySelector( '.block-editor-link-control__search-item-image' @@ -1776,15 +1619,9 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); - expect( isRichLinkPreview ).toBe( true ); + await waitFor( () => expect( linkPreview ).toHaveClass( 'is-rich' ) ); const titlePreview = screen.getByText( selectedLink.title ); @@ -1805,15 +1642,9 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); - expect( isRichLinkPreview ).toBe( true ); + await waitFor( () => expect( linkPreview ).toHaveClass( 'is-rich' ) ); const iconPreview = linkPreview.querySelector( `.block-editor-link-control__search-item-icon` @@ -1843,16 +1674,11 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isRichLinkPreview = - linkPreview.classList.contains( 'is-rich' ); - expect( isRichLinkPreview ).toBe( true ); + await waitFor( () => + expect( linkPreview ).toHaveClass( 'is-rich' ) + ); const missingDataItem = linkPreview.querySelector( `.block-editor-link-control__search-item-${ dataItem }` @@ -1868,23 +1694,19 @@ describe( 'Rich link previews', () => { ] )( 'should not display a rich preview when data is %s', async ( _descriptor, data ) => { - mockFetchRichUrlData.mockImplementation( () => - Promise.resolve( data ) - ); + mockFetchRichUrlData.mockImplementation( async () => data ); render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isRichLinkPreview = - linkPreview.classList.contains( 'is-rich' ); + expect( linkPreview ).toHaveClass( 'is-fetching' ); - expect( isRichLinkPreview ).toBe( false ); + await waitFor( () => + expect( linkPreview ).not.toHaveClass( 'is-fetching' ) + ); + + expect( linkPreview ).not.toHaveClass( 'is-rich' ); } ); @@ -1895,19 +1717,10 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isFetchingRichPreview = - linkPreview.classList.contains( 'is-fetching' ); - const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); - - expect( isFetchingRichPreview ).toBe( true ); - expect( isRichLinkPreview ).toBe( false ); + expect( linkPreview ).toHaveClass( 'is-fetching' ); + expect( linkPreview ).not.toHaveClass( 'is-rich' ); } ); it( 'should remove fetching UI indicators and fallback to standard preview if request for rich preview results in an error', async () => { @@ -1917,20 +1730,15 @@ describe( 'Rich link previews', () => { render( ); - // mockFetchRichUrlData resolves on next "tick" of event loop. - await act( async () => { - await eventLoopTick(); - } ); - const linkPreview = screen.getByLabelText( 'Currently selected' ); - const isFetchingRichPreview = - linkPreview.classList.contains( 'is-fetching' ); + expect( linkPreview ).toHaveClass( 'is-fetching' ); - const isRichLinkPreview = linkPreview.classList.contains( 'is-rich' ); + await waitFor( () => + expect( linkPreview ).not.toHaveClass( 'is-fetching' ) + ); - expect( isFetchingRichPreview ).toBe( false ); - expect( isRichLinkPreview ).toBe( false ); + expect( linkPreview ).not.toHaveClass( 'is-rich' ); } ); afterAll( () => { diff --git a/packages/block-editor/src/components/media-replace-flow/test/index.js b/packages/block-editor/src/components/media-replace-flow/test/index.js index d73da6c77c5d5..94d93a65ef873 100644 --- a/packages/block-editor/src/components/media-replace-flow/test/index.js +++ b/packages/block-editor/src/components/media-replace-flow/test/index.js @@ -42,24 +42,6 @@ function getWrappingPopoverElement( element ) { return element.closest( '.components-popover' ); } -/** - * Asserts that the specified popover has already been positioned. - * Necessary because it will be positioned a bit later after it's displayed. - * - * We're intentionally not using `.toHaveStyle()` because we want to be - * less specific and avoid specific values for better test flexibility. - * - * @async - * - * @param {HTMLElement} popover Popover element. - */ -async function popoverIsPositioned( popover ) { - /* eslint-disable jest-dom/prefer-to-have-style */ - await waitFor( () => expect( popover.style.top ).not.toBe( '' ) ); - await waitFor( () => expect( popover.style.left ).not.toBe( '' ) ); - /* eslint-enable jest-dom/prefer-to-have-style */ -} - describe( 'General media replace flow', () => { it( 'renders successfully', () => { render( ); @@ -87,7 +69,11 @@ describe( 'General media replace flow', () => { ); const uploadMenu = screen.getByRole( 'menu' ); - await popoverIsPositioned( getWrappingPopoverElement( uploadMenu ) ); + await waitFor( () => + expect( + getWrappingPopoverElement( uploadMenu ) + ).toBePositionedPopover() + ); await waitFor( () => expect( uploadMenu ).toBeVisible() ); } ); @@ -110,7 +96,9 @@ describe( 'General media replace flow', () => { name: 'example.media (opens in a new tab)', } ); - await popoverIsPositioned( getWrappingPopoverElement( link ) ); + await waitFor( () => + expect( getWrappingPopoverElement( link ) ).toBePositionedPopover() + ); expect( link ).toHaveAttribute( 'href', 'https://example.media' ); } ); @@ -129,12 +117,14 @@ describe( 'General media replace flow', () => { } ) ); - await popoverIsPositioned( - getWrappingPopoverElement( - screen.getByRole( 'link', { - name: 'example.media (opens in a new tab)', - } ) - ) + await waitFor( () => + expect( + getWrappingPopoverElement( + screen.getByRole( 'link', { + name: 'example.media (opens in a new tab)', + } ) + ) + ).toBePositionedPopover() ); await user.click( diff --git a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap index 3011c99d73f8d..023dd8769b783 100644 --- a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap @@ -5,11 +5,12 @@ exports[`URLPopover matches the snapshot in its default state 1`] = `
{ - it( 'matches the snapshot in its default state', () => { + it( 'matches the snapshot in its default state', async () => { const { container } = render( -
Settings
}> +
Settings
} + >
Editor
); + // wait for `Popover` effects to finish + await act( () => Promise.resolve() ); + expect( container ).toMatchSnapshot(); } ); it( 'matches the snapshot when the settings are toggled open', async () => { - const user = userEvent.setup( { - advanceTimers: jest.advanceTimersByTime, - } ); + const user = userEvent.setup(); const { container } = render( -
Settings
}> +
Settings
} + >
Editor
); @@ -37,13 +46,16 @@ describe( 'URLPopover', () => { expect( container ).toMatchSnapshot(); } ); - it( 'matches the snapshot when there are no settings', () => { + it( 'matches the snapshot when there are no settings', async () => { const { container } = render( - +
Editor
); + // wait for `Popover` effects to finish + await act( () => Promise.resolve() ); + expect( container ).toMatchSnapshot(); } ); } ); diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index 1dce136b8f867..c11fbb8ab8d9b 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 7.19.0 (2022-11-16) ## 7.18.0 (2022-11-02) diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 56328eb87b9d6..8cc902851fa33 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -69,8 +69,8 @@ "remove-accents": "^0.4.2" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/block-library/src/block/test/edit.native.js b/packages/block-library/src/block/test/edit.native.js index a683426a751e2..b7f4fc93b842e 100644 --- a/packages/block-library/src/block/test/edit.native.js +++ b/packages/block-library/src/block/test/edit.native.js @@ -5,7 +5,6 @@ import { getEditorHtml, initializeEditor, fireEvent, - waitFor, within, } from 'test/helpers'; @@ -78,17 +77,16 @@ describe( 'Reusable block', () => { return Promise.resolve( response ); } ); - const { getByLabelText, getByTestId, getByText } = - await initializeEditor( { - initialHtml: '', - capabilities: { reusableBlock: true }, - } ); + const screen = await initializeEditor( { + initialHtml: '', + capabilities: { reusableBlock: true }, + } ); // Open the inserter menu. - fireEvent.press( await waitFor( () => getByLabelText( 'Add block' ) ) ); + fireEvent.press( await screen.findByLabelText( 'Add block' ) ); // Navigate to reusable tab. - const reusableSegment = await waitFor( () => getByText( 'Reusable' ) ); + const reusableSegment = await screen.findByText( 'Reusable' ); // onLayout event is required by Segment component. fireEvent( reusableSegment, 'layout', { nativeEvent: { @@ -99,7 +97,9 @@ describe( 'Reusable block', () => { } ); fireEvent.press( reusableSegment ); - const reusableBlockList = getByTestId( 'InserterUI-ReusableBlocks' ); + const reusableBlockList = screen.getByTestId( + 'InserterUI-ReusableBlocks' + ); // onScroll event used to force the FlatList to render all items. fireEvent.scroll( reusableBlockList, { nativeEvent: { @@ -110,13 +110,11 @@ describe( 'Reusable block', () => { } ); // Insert a reusable block. - fireEvent.press( - await waitFor( () => getByText( `Reusable block - 1` ) ) - ); + fireEvent.press( await screen.findByText( `Reusable block - 1` ) ); // Get the reusable block. - const reusableBlock = await waitFor( () => - getByLabelText( /Reusable block Block\. Row 1/ ) + const [ reusableBlock ] = await screen.findAllByLabelText( + /Reusable block Block\. Row 1/ ); expect( reusableBlock ).toBeDefined(); @@ -128,18 +126,16 @@ describe( 'Reusable block', () => { const id = 3; const initialHtml = ``; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); - const reusableBlock = await waitFor( () => - getByLabelText( /Reusable block Block\. Row 1/ ) + const [ reusableBlock ] = await screen.findAllByLabelText( + /Reusable block Block\. Row 1/ ); - const blockDeleted = await waitFor( () => - within( reusableBlock ).getByText( - 'Block has been deleted or is unavailable.' - ) + const blockDeleted = within( reusableBlock ).getByText( + 'Block has been deleted or is unavailable.' ); expect( reusableBlock ).toBeDefined(); @@ -163,17 +159,17 @@ describe( 'Reusable block', () => { return Promise.resolve( response ); } ); - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); - const reusableBlock = await waitFor( () => - getByLabelText( /Reusable block Block\. Row 1/ ) + const [ reusableBlock ] = await screen.findByLabelText( + /Reusable block Block\. Row 1/ ); - const innerBlockListWrapper = await waitFor( () => - within( reusableBlock ).getByTestId( 'block-list-wrapper' ) - ); + const innerBlockListWrapper = await within( + reusableBlock + ).findByTestId( 'block-list-wrapper' ); // onLayout event has to be explicitly dispatched in BlockList component, // otherwise the inner blocks are not rendered. @@ -185,10 +181,10 @@ describe( 'Reusable block', () => { }, } ); - const headingInnerBlock = await waitFor( () => - within( reusableBlock ).getByLabelText( - 'Heading Block. Row 1. Level 2. First Reusable block' - ) + const [ headingInnerBlock ] = await within( + reusableBlock + ).findAllByLabelText( + 'Heading Block. Row 1. Level 2. First Reusable block' ); expect( reusableBlock ).toBeDefined(); diff --git a/packages/block-library/src/buttons/test/edit.native.js b/packages/block-library/src/buttons/test/edit.native.js index a6a25ee0590a9..9d23413fd79be 100644 --- a/packages/block-library/src/buttons/test/edit.native.js +++ b/packages/block-library/src/buttons/test/edit.native.js @@ -3,7 +3,6 @@ */ import { fireEvent, - waitFor, getEditorHtml, within, getBlock, @@ -50,20 +49,20 @@ describe( 'Buttons block', () => {
`; - const { getByLabelText } = await initializeEditor( { + const editor = await initializeEditor( { initialHtml, } ); - const buttonsBlock = await waitFor( () => - getByLabelText( /Buttons Block\. Row 1/ ) + const [ buttonsBlock ] = await editor.findAllByLabelText( + /Buttons Block\. Row 1/ ); fireEvent.press( buttonsBlock ); // onLayout event has to be explicitly dispatched in BlockList component, // otherwise the inner blocks are not rendered. - const innerBlockListWrapper = await waitFor( () => - within( buttonsBlock ).getByTestId( 'block-list-wrapper' ) - ); + const innerBlockListWrapper = await within( + buttonsBlock + ).findByTestId( 'block-list-wrapper' ); fireEvent( innerBlockListWrapper, 'layout', { nativeEvent: { layout: { @@ -72,22 +71,22 @@ describe( 'Buttons block', () => { }, } ); - const buttonInnerBlock = await waitFor( () => - within( buttonsBlock ).getByLabelText( /Button Block\. Row 1/ ) - ); + const [ buttonInnerBlock ] = await within( + buttonsBlock + ).findAllByLabelText( /Button Block\. Row 1/ ); fireEvent.press( buttonInnerBlock ); - const settingsButton = await waitFor( () => - getByLabelText( 'Open Settings' ) + const settingsButton = await editor.findByLabelText( + 'Open Settings' ); fireEvent.press( settingsButton ); - const radiusStepper = await waitFor( () => - getByLabelText( /Border Radius/ ) + const radiusStepper = await editor.findByLabelText( + /Border Radius/ ); - const incrementButton = await waitFor( () => - within( radiusStepper ).getByTestId( 'Increment' ) + const incrementButton = await within( radiusStepper ).findByTestId( + 'Increment' ); fireEvent( incrementButton, 'onPressIn' ); @@ -98,15 +97,14 @@ describe( 'Buttons block', () => { const screen = await initializeEditor( { initialHtml: BUTTONS_HTML, } ); - const { getByLabelText } = screen; // Get block const buttonsBlock = await getBlock( screen, 'Buttons' ); // Trigger inner blocks layout - const innerBlockListWrapper = await waitFor( () => - within( buttonsBlock ).getByTestId( 'block-list-wrapper' ) - ); + const innerBlockListWrapper = await within( + buttonsBlock + ).findByTestId( 'block-list-wrapper' ); fireEvent( innerBlockListWrapper, 'layout', { nativeEvent: { layout: { @@ -125,14 +123,14 @@ describe( 'Buttons block', () => { fireEvent.press( appenderButton ); // Check for new button - const secondButtonBlock = await waitFor( () => - within( buttonsBlock ).getByLabelText( /Button Block\. Row 2/ ) - ); + const [ secondButtonBlock ] = await within( + buttonsBlock + ).findAllByLabelText( /Button Block\. Row 2/ ); expect( secondButtonBlock ).toBeVisible(); // Add a Paragraph block using the empty placeholder at the bottom - const paragraphPlaceholder = await waitFor( () => - getByLabelText( 'Add paragraph block' ) + const paragraphPlaceholder = await screen.findByLabelText( + 'Add paragraph block' ); fireEvent.press( paragraphPlaceholder ); @@ -148,21 +146,15 @@ describe( 'Buttons block', () => { const screen = await initializeEditor( { initialHtml: BUTTONS_HTML, } ); - const { - getByLabelText, - getByTestId, - queryAllByLabelText, - getByText, - } = screen; // Get block const buttonsBlock = await getBlock( screen, 'Buttons' ); fireEvent.press( buttonsBlock ); // Trigger inner blocks layout - const innerBlockListWrapper = await waitFor( () => - within( buttonsBlock ).getByTestId( 'block-list-wrapper' ) - ); + const innerBlockListWrapper = await within( + buttonsBlock + ).findByTestId( 'block-list-wrapper' ); fireEvent( innerBlockListWrapper, 'layout', { nativeEvent: { layout: { @@ -176,9 +168,9 @@ describe( 'Buttons block', () => { fireEvent.press( buttonBlock ); // Open the block inserter - fireEvent.press( getByLabelText( 'Add block' ) ); + fireEvent.press( screen.getByLabelText( 'Add block' ) ); - const blockList = getByTestId( 'InserterUI-Blocks' ); + const blockList = screen.getByTestId( 'InserterUI-Blocks' ); // onScroll event used to force the FlatList to render all items fireEvent.scroll( blockList, { nativeEvent: { @@ -190,11 +182,11 @@ describe( 'Buttons block', () => { // Check the Add block here placeholder is not visible const addBlockHerePlaceholders = - queryAllByLabelText( 'ADD BLOCK HERE' ); + screen.queryAllByLabelText( 'ADD BLOCK HERE' ); expect( addBlockHerePlaceholders.length ).toBe( 0 ); // Add a new Button block - fireEvent.press( await waitFor( () => getByText( 'Button' ) ) ); + fireEvent.press( await screen.findByText( 'Button' ) ); // Get new button const secondButtonBlock = await getBlock( screen, 'Button', { @@ -214,15 +206,14 @@ describe( 'Buttons block', () => { const screen = await initializeEditor( { initialHtml: BUTTONS_HTML, } ); - const { getByLabelText } = screen; // Get block const buttonsBlock = await getBlock( screen, 'Buttons' ); // Trigger inner blocks layout - const innerBlockListWrapper = await waitFor( () => - within( buttonsBlock ).getByTestId( 'block-list-wrapper' ) - ); + const innerBlockListWrapper = await within( + buttonsBlock + ).findByTestId( 'block-list-wrapper' ); fireEvent( innerBlockListWrapper, 'layout', { nativeEvent: { layout: { @@ -236,13 +227,13 @@ describe( 'Buttons block', () => { fireEvent.press( buttonBlock ); // Open block actions menu - const blockActionsButton = getByLabelText( + const blockActionsButton = screen.getByLabelText( /Open Block Actions Menu/ ); fireEvent.press( blockActionsButton ); // Delete block - const deleteButton = getByLabelText( /Remove block/ ); + const deleteButton = screen.getByLabelText( /Remove block/ ); fireEvent.press( deleteButton ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -260,22 +251,20 @@ describe( 'Buttons block', () => { const initialHtml = `
`; - const { getByLabelText, getByText } = await initializeEditor( { - initialHtml, - } ); + const screen = await initializeEditor( { initialHtml } ); - const block = await waitFor( () => - getByLabelText( /Buttons Block\. Row 1/ ) + const [ block ] = await screen.findAllByLabelText( + /Buttons Block\. Row 1/ ); fireEvent.press( block ); fireEvent.press( - getByLabelText( 'Change items justification' ) + screen.getByLabelText( 'Change items justification' ) ); // Select alignment option. fireEvent.press( - await waitFor( () => getByText( justificationOption ) ) + await screen.findByText( justificationOption ) ); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/cover/edit.native.js b/packages/block-library/src/cover/edit.native.js index d40f5c1c8f6c1..67bf968c3a8f4 100644 --- a/packages/block-library/src/cover/edit.native.js +++ b/packages/block-library/src/cover/edit.native.js @@ -88,6 +88,36 @@ const INNER_BLOCKS_TEMPLATE = [ ], ]; +function useIsScreenReaderEnabled() { + const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = + useState( false ); + + useEffect( () => { + let mounted = true; + + const changeListener = AccessibilityInfo.addEventListener( + 'screenReaderChanged', + ( enabled ) => setIsScreenReaderEnabled( enabled ) + ); + + AccessibilityInfo.isScreenReaderEnabled().then( + ( screenReaderEnabled ) => { + if ( mounted && screenReaderEnabled ) { + setIsScreenReaderEnabled( screenReaderEnabled ); + } + } + ); + + return () => { + mounted = false; + + changeListener.remove(); + }; + }, [] ); + + return isScreenReaderEnabled; +} + const Cover = ( { attributes, getStylesFromColorScheme, @@ -118,29 +148,11 @@ const Cover = ( { overlayColor, isDark, } = attributes; - const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = - useState( false ); + const isScreenReaderEnabled = useIsScreenReaderEnabled(); useEffect( () => { - let isCurrent = true; - // Sync with local media store. mediaUploadSync(); - const a11yInfoChangeSubscription = AccessibilityInfo.addEventListener( - 'screenReaderChanged', - setIsScreenReaderEnabled - ); - - AccessibilityInfo.isScreenReaderEnabled().then( () => { - if ( isCurrent ) { - setIsScreenReaderEnabled(); - } - } ); - - return () => { - isCurrent = false; - a11yInfoChangeSubscription.remove(); - }; }, [] ); const convertedMinHeight = useConvertUnitToMobile( diff --git a/packages/block-library/src/cover/test/edit.native.js b/packages/block-library/src/cover/test/edit.native.js index 10dbff032160a..6a5bef376c18f 100644 --- a/packages/block-library/src/cover/test/edit.native.js +++ b/packages/block-library/src/cover/test/edit.native.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { AccessibilityInfo, Image } from 'react-native'; +import { Image } from 'react-native'; import { getEditorHtml, initializeEditor, @@ -90,10 +90,6 @@ beforeAll( () => { const getSizeSpy = jest.spyOn( Image, 'getSize' ); getSizeSpy.mockImplementation( ( _url, callback ) => callback( 300, 200 ) ); - AccessibilityInfo.isScreenReaderEnabled.mockResolvedValue( - Promise.resolve( true ) - ); - // Register required blocks. paragraph.init(); cover.init(); @@ -103,7 +99,6 @@ beforeAll( () => { afterAll( () => { // Restore mocks. Image.getSize.mockRestore(); - AccessibilityInfo.isScreenReaderEnabled.mockReset(); // Clean up registered blocks. unregisterBlockType( paragraph.name ); @@ -134,32 +129,32 @@ describe( 'when no media is attached', () => { describe( 'when an image is attached', () => { it( 'edits the image', async () => { - const { getByLabelText, getByText } = render( + const screen = render( ); - fireEvent.press( getByLabelText( 'Edit image' ) ); - const editButton = await waitFor( () => getByText( 'Edit' ) ); + fireEvent.press( screen.getByLabelText( 'Edit image' ) ); + const editButton = await screen.findByText( 'Edit' ); fireEvent.press( editButton ); expect( requestMediaEditor ).toHaveBeenCalled(); } ); it( 'replaces the image', async () => { - const { getByLabelText, getByText } = render( + const screen = render( ); - fireEvent.press( getByLabelText( 'Edit image' ) ); - const replaceButton = await waitFor( () => getByText( 'Replace' ) ); + fireEvent.press( screen.getByLabelText( 'Edit image' ) ); + const replaceButton = await screen.findByText( 'Replace' ); fireEvent.press( replaceButton ); - const mediaLibraryButton = await waitFor( () => - getByText( 'WordPress Media Library' ) + const mediaLibraryButton = await screen.findByText( + 'WordPress Media Library' ); fireEvent.press( mediaLibraryButton ); @@ -167,17 +162,17 @@ describe( 'when an image is attached', () => { } ); it( 'clears the image within image edit button', async () => { - const { getByLabelText, getAllByText } = render( + const screen = render( ); - fireEvent.press( getByLabelText( 'Edit image' ) ); - const clearMediaButton = await waitFor( () => - getAllByText( 'Clear Media' ) + fireEvent.press( screen.getByLabelText( 'Edit image' ) ); + const [ clearMediaButton ] = await screen.findAllByText( + 'Clear Media' ); - fireEvent.press( clearMediaButton[ 0 ] ); + fireEvent.press( clearMediaButton ); expect( setAttributes ).toHaveBeenCalledWith( expect.objectContaining( { @@ -209,22 +204,22 @@ describe( 'when an image is attached', () => { } ); it( 'edits the focal point with a slider', async () => { - const { getByText, getByLabelText, getByTestId } = render( + const screen = render( ); - const editFocalPointButton = await waitFor( () => - getByText( 'Edit focal point' ) + const editFocalPointButton = await screen.findByText( + 'Edit focal point' ); fireEvent.press( editFocalPointButton ); fireEvent( - getByTestId( 'Slider Y-Axis Position' ), + screen.getByTestId( 'Slider Y-Axis Position' ), 'valueChange', '52' ); - fireEvent.press( getByLabelText( 'Apply' ) ); + fireEvent.press( screen.getByLabelText( 'Apply' ) ); expect( setAttributes ).toHaveBeenCalledWith( expect.objectContaining( { @@ -234,21 +229,24 @@ describe( 'when an image is attached', () => { } ); it( 'edits the focal point with a text input', async () => { - const { getByText, getByLabelText } = render( + const screen = render( ); - const editFocalPointButton = await waitFor( () => - getByText( 'Edit focal point' ) + const editFocalPointButton = await screen.findByText( + 'Edit focal point' ); fireEvent.press( editFocalPointButton ); fireEvent.press( - getByText( ( attributes.focalPoint.x * 100 ).toString() ) + screen.getByText( ( attributes.focalPoint.x * 100 ).toString() ) ); - fireEvent.changeText( getByLabelText( 'X-Axis Position' ), '99' ); - fireEvent.press( getByLabelText( 'Apply' ) ); + fireEvent.changeText( + screen.getByLabelText( 'X-Axis Position' ), + '99' + ); + fireEvent.press( screen.getByLabelText( 'Apply' ) ); expect( setAttributes ).toHaveBeenCalledWith( expect.objectContaining( { @@ -282,15 +280,13 @@ describe( 'when an image is attached', () => { } ); it( 'clears the media within cell button', async () => { - const { getByText } = render( + const screen = render( ); - const clearMediaButton = await waitFor( () => - getByText( 'Clear Media' ) - ); + const clearMediaButton = await screen.findByText( 'Clear Media' ); fireEvent.press( clearMediaButton ); expect( setAttributes ).toHaveBeenCalledWith( @@ -334,97 +330,79 @@ describe( 'when an image is attached', () => { describe( 'color settings', () => { it( 'sets a color for the overlay background when the placeholder is visible', async () => { - const { getByTestId, getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml: COVER_BLOCK_PLACEHOLDER_HTML, } ); - const block = await waitFor( () => - getByLabelText( 'Cover block. Empty' ) - ); + const block = await screen.findByLabelText( 'Cover block. Empty' ); expect( block ).toBeDefined(); // Select a color from the placeholder palette. - const colorPalette = await waitFor( () => - getByTestId( 'color-palette' ) - ); + const colorPalette = await screen.findByTestId( 'color-palette' ); const colorButton = within( colorPalette ).getByTestId( COLOR_PINK ); expect( colorButton ).toBeDefined(); fireEvent.press( colorButton ); // Wait for the block to be created. - const coverBlockWithOverlay = await waitFor( () => - getByLabelText( /Cover Block\. Row 1/ ) + const [ coverBlockWithOverlay ] = await screen.findAllByLabelText( + /Cover Block\. Row 1/ ); fireEvent.press( coverBlockWithOverlay ); // Open Block Settings. - const settingsButton = await waitFor( () => - getByLabelText( 'Open Settings' ) - ); + const settingsButton = await screen.findByLabelText( 'Open Settings' ); fireEvent.press( settingsButton ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = screen.getByTestId( 'block-settings-modal' ); await waitFor( () => blockSettingsModal.props.isVisible ); // Open the overlay color settings. - const colorOverlay = await waitFor( () => - getByLabelText( 'Color. Empty' ) - ); + const colorOverlay = await screen.findByLabelText( 'Color. Empty' ); expect( colorOverlay ).toBeDefined(); fireEvent.press( colorOverlay ); // Find the selected color. - const colorPaletteButton = await waitFor( () => - getByTestId( COLOR_PINK ) - ); + const colorPaletteButton = await screen.findByTestId( COLOR_PINK ); expect( colorPaletteButton ).toBeDefined(); // Select another color. - const newColorButton = await waitFor( () => getByTestId( COLOR_RED ) ); + const newColorButton = await screen.findByTestId( COLOR_RED ); fireEvent.press( newColorButton ); expect( getEditorHtml() ).toMatchSnapshot(); } ); it( 'sets a gradient overlay background when a solid background was already selected', async () => { - const { getByTestId, getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml: COVER_BLOCK_SOLID_COLOR_HTML, } ); // Wait for the block to be created. - const coverBlock = await waitFor( () => - getByLabelText( /Cover Block\. Row 1/ ) + const [ coverBlock ] = await screen.findAllByLabelText( + /Cover Block\. Row 1/ ); - expect( coverBlock ).toBeDefined(); fireEvent.press( coverBlock ); // Open Block Settings. - const settingsButton = await waitFor( () => - getByLabelText( 'Open Settings' ) - ); + const settingsButton = await screen.findByLabelText( 'Open Settings' ); fireEvent.press( settingsButton ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = screen.getByTestId( 'block-settings-modal' ); await waitFor( () => blockSettingsModal.props.isVisible ); // Open the overlay color settings. - const colorOverlay = await waitFor( () => - getByLabelText( 'Color. Empty' ) - ); - expect( colorOverlay ).toBeDefined(); + const colorOverlay = await screen.findByLabelText( 'Color. Empty' ); fireEvent.press( colorOverlay ); // Find the selected color. - const colorButton = await waitFor( () => getByTestId( COLOR_GRAY ) ); + const colorButton = await screen.findByTestId( COLOR_GRAY ); expect( colorButton ).toBeDefined(); // Open the gradients. - const gradientsButton = await waitFor( () => - getByLabelText( 'Gradient' ) - ); + const gradientsButton = await screen.findByLabelText( 'Gradient' ); expect( gradientsButton ).toBeDefined(); fireEvent( gradientsButton, 'layout', { @@ -433,10 +411,7 @@ describe( 'color settings', () => { fireEvent.press( gradientsButton ); // Find the gradient color. - const newGradientButton = await waitFor( () => - getByTestId( GRADIENT_GREEN ) - ); - expect( newGradientButton ).toBeDefined(); + const newGradientButton = await screen.findByTestId( GRADIENT_GREEN ); fireEvent.press( newGradientButton ); // Dismiss the Block Settings modal. @@ -446,62 +421,48 @@ describe( 'color settings', () => { } ); it( 'toggles between solid colors and gradients', async () => { - const { getByTestId, getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml: COVER_BLOCK_PLACEHOLDER_HTML, } ); - const block = await waitFor( () => - getByLabelText( 'Cover block. Empty' ) - ); + const block = await screen.findByLabelText( 'Cover block. Empty' ); expect( block ).toBeDefined(); // Select a color from the placeholder palette. - const colorPalette = await waitFor( () => - getByTestId( 'color-palette' ) - ); + const colorPalette = await screen.findByTestId( 'color-palette' ); const colorButton = within( colorPalette ).getByTestId( COLOR_PINK ); expect( colorButton ).toBeDefined(); fireEvent.press( colorButton ); // Wait for the block to be created. - const coverBlockWithOverlay = await waitFor( () => - getByLabelText( /Cover Block\. Row 1/ ) + const [ coverBlockWithOverlay ] = await screen.findAllByLabelText( + /Cover Block\. Row 1/ ); fireEvent.press( coverBlockWithOverlay ); // Open Block Settings. - const settingsButton = await waitFor( () => - getByLabelText( 'Open Settings' ) - ); + const settingsButton = await screen.findByLabelText( 'Open Settings' ); fireEvent.press( settingsButton ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = screen.getByTestId( 'block-settings-modal' ); await waitFor( () => blockSettingsModal.props.isVisible ); // Open the overlay color settings. - const colorOverlay = await waitFor( () => - getByLabelText( 'Color. Empty' ) - ); - expect( colorOverlay ).toBeDefined(); + const colorOverlay = await screen.findByLabelText( 'Color. Empty' ); fireEvent.press( colorOverlay ); // Find the selected color. - const colorPaletteButton = await waitFor( () => - getByTestId( COLOR_PINK ) - ); + const colorPaletteButton = await screen.findByTestId( COLOR_PINK ); expect( colorPaletteButton ).toBeDefined(); // Select another color. - const newColorButton = await waitFor( () => getByTestId( COLOR_RED ) ); + const newColorButton = await screen.findByTestId( COLOR_RED ); fireEvent.press( newColorButton ); // Open the gradients. - const gradientsButton = await waitFor( () => - getByLabelText( 'Gradient' ) - ); - expect( gradientsButton ).toBeDefined(); + const gradientsButton = await screen.findByLabelText( 'Gradient' ); fireEvent( gradientsButton, 'layout', { nativeEvent: { layout: { width: 80, height: 26 } }, @@ -509,20 +470,14 @@ describe( 'color settings', () => { fireEvent.press( gradientsButton ); // Find the gradient color. - const newGradientButton = await waitFor( () => - getByTestId( GRADIENT_GREEN ) - ); - expect( newGradientButton ).toBeDefined(); + const newGradientButton = await screen.findByTestId( GRADIENT_GREEN ); fireEvent.press( newGradientButton ); // Go back to the settings list. - fireEvent.press( await waitFor( () => getByLabelText( 'Go back' ) ) ); + fireEvent.press( await screen.findByLabelText( 'Go back' ) ); // Find the color setting. - const colorSetting = await waitFor( () => - getByLabelText( 'Color. Empty' ) - ); - expect( colorSetting ).toBeDefined(); + const colorSetting = await screen.findByLabelText( 'Color. Empty' ); fireEvent.press( colorSetting ); // Dismiss the Block Settings modal. @@ -532,42 +487,34 @@ describe( 'color settings', () => { } ); it( 'clears the selected overlay color and mantains the inner blocks', async () => { - const { getByTestId, getByLabelText, getByText } = - await initializeEditor( { - initialHtml: COVER_BLOCK_SOLID_COLOR_HTML, - } ); + const screen = await initializeEditor( { + initialHtml: COVER_BLOCK_SOLID_COLOR_HTML, + } ); // Wait for the block to be created. - const coverBlock = await waitFor( () => - getByLabelText( /Cover Block\. Row 1/ ) + const [ coverBlock ] = await screen.findAllByLabelText( + /Cover Block\. Row 1/ ); - expect( coverBlock ).toBeDefined(); fireEvent.press( coverBlock ); // Open Block Settings. - const settingsButton = await waitFor( () => - getByLabelText( 'Open Settings' ) - ); + const settingsButton = await screen.findByLabelText( 'Open Settings' ); fireEvent.press( settingsButton ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = screen.getByTestId( 'block-settings-modal' ); await waitFor( () => blockSettingsModal.props.isVisible ); // Open the overlay color settings. - const colorOverlay = await waitFor( () => - getByLabelText( 'Color. Empty' ) - ); - expect( colorOverlay ).toBeDefined(); + const colorOverlay = await screen.findByLabelText( 'Color. Empty' ); fireEvent.press( colorOverlay ); // Find the selected color. - const colorButton = await waitFor( () => getByTestId( COLOR_GRAY ) ); + const colorButton = await screen.findByTestId( COLOR_GRAY ); expect( colorButton ).toBeDefined(); // Reset the selected color. - const resetButton = await waitFor( () => getByText( 'Reset' ) ); - expect( resetButton ).toBeDefined(); + const resetButton = await screen.findByText( 'Reset' ); fireEvent.press( resetButton ); expect( getEditorHtml() ).toMatchSnapshot(); diff --git a/packages/block-library/src/embed/test/index.native.js b/packages/block-library/src/embed/test/index.native.js index 60bc6604b8cff..d4b7fa99ded83 100644 --- a/packages/block-library/src/embed/test/index.native.js +++ b/packages/block-library/src/embed/test/index.native.js @@ -29,6 +29,7 @@ import { requestPreview } from '@wordpress/react-native-bridge'; */ import * as paragraph from '../../paragraph'; import * as embed from '..'; +import { WebView } from 'react-native-webview'; // Override modal mock to prevent unmounting it when is not visible. // This is required to be able to trigger onClose and onDismiss events when @@ -121,55 +122,54 @@ const MOST_USED_PROVIDERS = embed.settings.variations.filter( ( { name } ) => // Return specified mocked responses for the oembed endpoint. const mockEmbedResponses = ( mockedResponses ) => { - fetchRequest.mockImplementation( ( { path } ) => { - if ( path.startsWith( '/wp/v2/themes' ) ) { - return Promise.resolve( [ - { theme_supports: { 'responsive-embeds': true } }, - ] ); - } - - if ( path.startsWith( '/wp/v2/block-patterns/categories' ) ) { - return Promise.resolve( [] ); - } - + fetchRequest.mockImplementation( async ( req ) => { const matchedEmbedResponse = mockedResponses.find( ( mockedResponse ) => - path === + req.path === `/oembed/1.0/proxy?url=${ encodeURIComponent( mockedResponse.url ) }` ); - return Promise.resolve( matchedEmbedResponse || {} ); + + return matchedEmbedResponse || mockOtherResponses( req ); } ); }; +async function mockOtherResponses( { path } ) { + if ( path.startsWith( '/wp/v2/themes' ) ) { + return [ { theme_supports: { 'responsive-embeds': true } } ]; + } + + if ( path.startsWith( '/wp/v2/block-patterns/patterns' ) ) { + return []; + } + + if ( path.startsWith( '/wp/v2/block-patterns/categories' ) ) { + return []; + } + + return {}; +} + const insertEmbedBlock = async ( blockTitle = 'Embed' ) => { - const editor = await initializeEditor( { - initialHtml: '', - } ); - const { getByLabelText, getByText } = editor; + const editor = await initializeEditor( { initialHtml: '' } ); // Open inserter menu. - fireEvent.press( await waitFor( () => getByLabelText( 'Add block' ) ) ); + fireEvent.press( await editor.findByLabelText( 'Add block' ) ); // Insert embed block. - fireEvent.press( await waitFor( () => getByText( blockTitle ) ) ); + fireEvent.press( await editor.findByText( blockTitle ) ); // Return the embed block. - const block = await waitFor( () => - getByLabelText( /Embed Block\. Row 1/ ) - ); + const [ block ] = await editor.findAllByLabelText( /Embed Block\. Row 1/ ); return { ...editor, block }; }; const initializeWithEmbedBlock = async ( initialHtml, selectBlock = true ) => { const editor = await initializeEditor( { initialHtml } ); - const { getByLabelText } = editor; - const block = await waitFor( () => - getByLabelText( /Embed Block\. Row 1/ ) - ); + const [ block ] = await editor.findAllByLabelText( /Embed Block\. Row 1/ ); if ( selectBlock ) { // Select block. @@ -232,10 +232,12 @@ describe( 'Embed block', () => { describe( 'set URL upon block insertion', () => { it( 'sets empty URL when dismissing edit URL modal', async () => { - const { getByTestId } = await insertEmbedBlock(); + const editor = await insertEmbedBlock(); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Dismiss the edit URL modal. @@ -248,15 +250,16 @@ describe( 'Embed block', () => { it( 'sets a valid URL when dismissing edit URL modal', async () => { const expectedURL = 'https://twitter.com/notnownikki'; - const { getByPlaceholderText, getByTestId } = - await insertEmbedBlock(); + const editor = await insertEmbedBlock(); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Set an URL. - const linkTextInput = getByPlaceholderText( 'Add link' ); + const linkTextInput = editor.getByPlaceholderText( 'Add link' ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, expectedURL ); @@ -264,8 +267,13 @@ describe( 'Embed block', () => { fireEvent( embedEditURLModal, 'backdropPress' ); fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + // Wait until the WebView with the rich preview appears + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + // Wait until responsiveness settings appear, driven by `theme_supports.responsive-embeds` + await editor.findByText( 'Media settings' ); + + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -282,23 +290,26 @@ describe( 'Embed block', () => { // Mock clipboard. Clipboard.getString.mockResolvedValue( clipboardURL ); - const { getByTestId, getByText } = await insertEmbedBlock(); + const editor = await insertEmbedBlock(); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Get embed link with auto-pasted URL. - const autopastedLinkField = await waitFor( () => - getByText( clipboardURL ) - ); + const autopastedLinkField = await editor.findByText( clipboardURL ); // Dismiss the edit URL modal. fireEvent( embedEditURLModal, 'backdropPress' ); fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); + + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -315,15 +326,15 @@ describe( 'Embed block', () => { describe( 'set URL when empty block', () => { it( 'sets empty URL when dismissing edit URL modal', async () => { - const { getByTestId, getByText } = await initializeWithEmbedBlock( - EMPTY_EMBED_HTML - ); + const editor = await initializeWithEmbedBlock( EMPTY_EMBED_HTML ); // Edit URL. - fireEvent.press( await waitFor( () => getByText( 'ADD LINK' ) ) ); + fireEvent.press( await editor.findByText( 'ADD LINK' ) ); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Dismiss the edit URL modal. @@ -336,18 +347,19 @@ describe( 'Embed block', () => { it( 'sets a valid URL when dismissing edit URL modal', async () => { const expectedURL = 'https://twitter.com/notnownikki'; - const { getByPlaceholderText, getByTestId, getByText } = - await initializeWithEmbedBlock( EMPTY_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( EMPTY_EMBED_HTML ); // Edit URL. - fireEvent.press( getByText( 'ADD LINK' ) ); + fireEvent.press( editor.getByText( 'ADD LINK' ) ); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Set an URL. - const linkTextInput = getByPlaceholderText( 'Add link' ); + const linkTextInput = editor.getByPlaceholderText( 'Add link' ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, expectedURL ); @@ -355,8 +367,11 @@ describe( 'Embed block', () => { fireEvent( embedEditURLModal, 'backdropPress' ); fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); + + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -373,26 +388,29 @@ describe( 'Embed block', () => { // Mock clipboard. Clipboard.getString.mockResolvedValue( clipboardURL ); - const { getByTestId, getByText } = await initializeWithEmbedBlock( - EMPTY_EMBED_HTML - ); + const editor = await initializeWithEmbedBlock( EMPTY_EMBED_HTML ); // Edit URL. - fireEvent.press( getByText( 'ADD LINK' ) ); + fireEvent.press( editor.getByText( 'ADD LINK' ) ); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Get embed link. - const embedLink = await waitFor( () => getByText( clipboardURL ) ); + const embedLink = await editor.findByText( clipboardURL ); // Dismiss the edit URL modal. fireEvent( embedEditURLModal, 'backdropPress' ); fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); + + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -409,16 +427,17 @@ describe( 'Embed block', () => { describe( 'edit URL', () => { it( 'keeps the previous URL if no URL is set', async () => { - const { getByLabelText, getByTestId } = - await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Open Block Settings. - fireEvent.press( - await waitFor( () => getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Open Settings' ) ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = editor.getByTestId( + 'block-settings-modal' + ); await waitFor( () => blockSettingsModal.props.isVisible ); // Dismiss the Block Settings modal. @@ -432,16 +451,17 @@ describe( 'Embed block', () => { const initialURL = 'https://twitter.com/notnownikki'; const expectedURL = 'https://www.youtube.com/watch?v=lXMskKTw3Bc'; - const { getByLabelText, getByDisplayValue, getByTestId } = - await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Open Block Settings. - fireEvent.press( - await waitFor( () => getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Open Settings' ) ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = editor.getByTestId( + 'block-settings-modal' + ); await waitFor( () => blockSettingsModal.props.isVisible ); // Start editing link. @@ -452,7 +472,7 @@ describe( 'Embed block', () => { ); // Replace URL. - const linkTextInput = getByDisplayValue( initialURL ); + const linkTextInput = editor.getByDisplayValue( initialURL ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, expectedURL ); @@ -460,12 +480,13 @@ describe( 'Embed block', () => { fireEvent( blockSettingsModal, 'backdropPress' ); fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT ); + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); + // Get YouTube link field. - const youtubeLinkField = await waitFor( () => - within( blockSettingsModal ).getByLabelText( - `YouTube link, ${ expectedURL }` - ) - ); + const youtubeLinkField = await within( + blockSettingsModal + ).findByLabelText( `YouTube link, ${ expectedURL }` ); expect( youtubeLinkField ).toBeDefined(); expect( getEditorHtml() ).toMatchSnapshot(); @@ -475,20 +496,17 @@ describe( 'Embed block', () => { const previousURL = 'https://twitter.com/notnownikki'; const invalidURL = 'http://'; - const { - getByLabelText, - getByDisplayValue, - getByTestId, - getByText, - } = await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Open Block Settings. - fireEvent.press( - await waitFor( () => getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Open Settings' ) ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = editor.getByTestId( + 'block-settings-modal' + ); await waitFor( () => blockSettingsModal.props.isVisible ); // Start editing link. @@ -499,7 +517,7 @@ describe( 'Embed block', () => { ); // Replace URL. - const linkTextInput = getByDisplayValue( previousURL ); + const linkTextInput = editor.getByDisplayValue( previousURL ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, invalidURL ); @@ -507,8 +525,8 @@ describe( 'Embed block', () => { fireEvent( blockSettingsModal, 'backdropPress' ); fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT ); - const errorNotice = await waitFor( () => - getByText( 'Invalid URL. Please enter a valid URL.' ) + const errorNotice = await editor.findByText( + 'Invalid URL. Please enter a valid URL.' ); expect( errorNotice ).toBeDefined(); @@ -518,20 +536,17 @@ describe( 'Embed block', () => { it( 'sets empty state when setting an empty URL', async () => { const previousURL = 'https://twitter.com/notnownikki'; - const { - getByLabelText, - getByDisplayValue, - getByTestId, - getByPlaceholderText, - } = await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Open Block Settings. - fireEvent.press( - await waitFor( () => getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Open Settings' ) ); // Get Block Settings modal. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = editor.getByTestId( + 'block-settings-modal' + ); // Start editing link. fireEvent.press( @@ -541,7 +556,7 @@ describe( 'Embed block', () => { ); // Replace URL with empty value. - const linkTextInput = getByDisplayValue( previousURL ); + const linkTextInput = editor.getByDisplayValue( previousURL ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, '' ); @@ -550,8 +565,8 @@ describe( 'Embed block', () => { fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT ); // Get empty embed link. - const emptyLinkTextInput = await waitFor( () => - getByPlaceholderText( 'Add link' ) + const emptyLinkTextInput = await editor.findByPlaceholderText( + 'Add link' ); expect( emptyLinkTextInput ).toBeDefined(); @@ -560,10 +575,12 @@ describe( 'Embed block', () => { // This test case covers the bug fixed in PR #35460. it( 'edits URL after dismissing two times the edit URL bottom sheet with empty value', async () => { - const { block, getByTestId, getByText } = await insertEmbedBlock(); + const editor = await insertEmbedBlock(); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Dismiss the edit URL modal. @@ -571,10 +588,10 @@ describe( 'Embed block', () => { fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); // Select block. - fireEvent.press( block ); + fireEvent.press( editor.block ); // Edit URL. - fireEvent.press( getByText( 'ADD LINK' ) ); + fireEvent.press( editor.getByText( 'ADD LINK' ) ); // Wait for edit URL modal to be visible. await waitFor( () => embedEditURLModal.props.isVisible ); @@ -584,7 +601,7 @@ describe( 'Embed block', () => { fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); // Edit URL. - fireEvent.press( getByText( 'ADD LINK' ) ); + fireEvent.press( editor.getByText( 'ADD LINK' ) ); // Wait for edit URL modal to be visible. const isVisibleThirdTime = await waitFor( @@ -599,19 +616,16 @@ describe( 'Embed block', () => { const badURL = 'https://youtu.be/BAD_URL'; const expectedURL = 'https://twitter.com/notnownikki'; - const { - getByLabelText, - getByDisplayValue, - getByPlaceholderText, - getByTestId, - } = await insertEmbedBlock(); + const editor = await insertEmbedBlock(); // Wait for edit URL modal to be visible. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); await waitFor( () => embedEditURLModal.props.isVisible ); // Set an bad URL. - let linkTextInput = getByPlaceholderText( 'Add link' ); + let linkTextInput = editor.getByPlaceholderText( 'Add link' ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, badURL ); @@ -620,12 +634,12 @@ describe( 'Embed block', () => { fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); // Open Block Settings. - fireEvent.press( - await waitFor( () => getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Open Settings' ) ); // Wait for Block Settings to be visible. - const blockSettingsModal = getByTestId( 'block-settings-modal' ); + const blockSettingsModal = editor.getByTestId( + 'block-settings-modal' + ); await waitFor( () => blockSettingsModal.props.isVisible ); // Start editing link. @@ -636,7 +650,7 @@ describe( 'Embed block', () => { ); // Replace URL. - linkTextInput = getByDisplayValue( badURL ); + linkTextInput = editor.getByDisplayValue( badURL ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, expectedURL ); @@ -645,11 +659,9 @@ describe( 'Embed block', () => { fireEvent( blockSettingsModal, MODAL_DISMISS_EVENT ); // Get Twitter link field. - const twitterLinkField = await waitFor( () => - within( blockSettingsModal ).getByLabelText( - `Twitter link, ${ expectedURL }` - ) - ); + const twitterLinkField = await within( + blockSettingsModal + ).findByLabelText( `Twitter link, ${ expectedURL }` ); expect( twitterLinkField ).toBeDefined(); expect( getEditorHtml() ).toMatchSnapshot(); @@ -665,18 +677,15 @@ describe( 'Embed block', () => { 'Full width', ].forEach( ( alignmentOption ) => it( `sets ${ alignmentOption } option`, async () => { - const { getByLabelText, getByText } = - await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Open alignment options. - fireEvent.press( - await waitFor( () => getByLabelText( 'Align' ) ) - ); + fireEvent.press( await editor.findByLabelText( 'Align' ) ); // Select alignment option. - fireEvent.press( - await waitFor( () => getByText( alignmentOption ) ) - ); + fireEvent.press( await editor.findByText( alignmentOption ) ); expect( getEditorHtml() ).toMatchSnapshot(); } ) @@ -690,33 +699,33 @@ describe( 'Embed block', () => { // Return bad response for the first request to oembed endpoint // and success response for the rest of requests. let isFirstEmbedRequest = true; - fetchRequest.mockImplementation( ( { path } ) => { - let response = {}; - const isEmbedRequest = path.startsWith( '/oembed/1.0/proxy' ); - if ( isEmbedRequest ) { + fetchRequest.mockImplementation( async ( req ) => { + if ( req.path.startsWith( '/oembed/1.0/proxy' ) ) { if ( isFirstEmbedRequest ) { isFirstEmbedRequest = false; - response = MOCK_BAD_WORDPRESS_RESPONSE; - } else { - response = RICH_TEXT_EMBED_SUCCESS_RESPONSE; + return MOCK_BAD_WORDPRESS_RESPONSE; } + return RICH_TEXT_EMBED_SUCCESS_RESPONSE; } - if ( path.startsWith( '/wp/v2/block-patterns/categories' ) ) { - response = []; - } - return Promise.resolve( response ); + + return mockOtherResponses( req ); } ); - const { getByTestId, getByText } = await initializeWithEmbedBlock( + const editor = await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + await editor.findByText( 'Unable to embed media' ); + // Retry request. - fireEvent.press( getByText( 'More options' ) ); - fireEvent.press( getByText( 'Retry' ) ); + fireEvent.press( editor.getByText( 'More options' ) ); + fireEvent.press( editor.getByText( 'Retry' ) ); + + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -729,26 +738,25 @@ describe( 'Embed block', () => { it( 'converts to link if preview request failed', async () => { // Return bad response for requests to oembed endpoint. - fetchRequest.mockImplementation( ( { path } ) => { - if ( path.startsWith( '/wp/v2/block-patterns/categories' ) ) { - return Promise.resolve( [] ); + fetchRequest.mockImplementation( async ( req ) => { + if ( req.path.startsWith( '/oembed/1.0/proxy' ) ) { + return MOCK_BAD_WORDPRESS_RESPONSE; } - const isEmbedRequest = path.startsWith( '/oembed/1.0/proxy' ); - return Promise.resolve( - isEmbedRequest ? MOCK_BAD_WORDPRESS_RESPONSE : {} - ); + + return mockOtherResponses( req ); } ); - const { getByLabelText, getByText } = - await initializeWithEmbedBlock( RICH_TEXT_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( + RICH_TEXT_EMBED_HTML + ); // Convert embed to link. - fireEvent.press( getByText( 'More options' ) ); - fireEvent.press( getByText( 'Convert to link' ) ); + fireEvent.press( editor.getByText( 'More options' ) ); + fireEvent.press( editor.getByText( 'Convert to link' ) ); // Get paragraph block where the link is created. - const paragraphBlock = await waitFor( () => - getByLabelText( /Paragraph Block\. Row 1/ ) + const [ paragraphBlock ] = await editor.findAllByLabelText( + /Paragraph Block\. Row 1/ ); expect( paragraphBlock ).toBeDefined(); @@ -760,50 +768,48 @@ describe( 'Embed block', () => { const successURL = 'https://twitter.com/notnownikki'; // Return bad response for WordPress URL and success for Twitter URL. - fetchRequest.mockImplementation( ( { path } ) => { + fetchRequest.mockImplementation( async ( req ) => { const matchesPath = ( url ) => - path === + req.path === `/oembed/1.0/proxy?url=${ encodeURIComponent( url ) }`; - let response = {}; if ( matchesPath( failURL ) ) { - response = MOCK_BAD_WORDPRESS_RESPONSE; - } else if ( matchesPath( successURL ) ) { - response = RICH_TEXT_EMBED_SUCCESS_RESPONSE; - } else if ( - path.startsWith( '/wp/v2/block-patterns/categories' ) - ) { - response = []; + return MOCK_BAD_WORDPRESS_RESPONSE; } - return Promise.resolve( response ); + if ( matchesPath( successURL ) ) { + return RICH_TEXT_EMBED_SUCCESS_RESPONSE; + } + + return mockOtherResponses( req ); } ); - const { - getByLabelText, - getByText, - getByTestId, - getByDisplayValue, - } = await initializeWithEmbedBlock( WP_EMBED_HTML ); + const editor = await initializeWithEmbedBlock( WP_EMBED_HTML ); - fireEvent.press( getByText( 'More options' ) ); - fireEvent.press( getByText( 'Edit link' ) ); + fireEvent.press( editor.getByText( 'More options' ) ); + fireEvent.press( editor.getByText( 'Edit link' ) ); // Start editing link. - fireEvent.press( getByLabelText( `WordPress link, ${ failURL }` ) ); + fireEvent.press( + editor.getByLabelText( `WordPress link, ${ failURL }` ) + ); // Set an URL. - const linkTextInput = getByDisplayValue( failURL ); + const linkTextInput = editor.getByDisplayValue( failURL ); fireEvent( linkTextInput, 'focus' ); fireEvent.changeText( linkTextInput, successURL ); // Dismiss the edit URL modal. - const embedEditURLModal = getByTestId( 'embed-edit-url-modal' ); + const embedEditURLModal = editor.getByTestId( + 'embed-edit-url-modal' + ); fireEvent( embedEditURLModal, 'backdropPress' ); fireEvent( embedEditURLModal, MODAL_DISMISS_EVENT ); - const blockSettingsModal = await waitFor( () => - getByTestId( 'block-settings-modal' ) + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + + const blockSettingsModal = await editor.findByTestId( + 'block-settings-modal' ); // Get Twitter link field. const twitterLinkField = within( @@ -864,17 +870,13 @@ describe( 'Embed block', () => { it( 'creates embed block when pasting URL in paragraph block', async () => { const expectedURL = 'https://www.youtube.com/watch?v=lXMskKTw3Bc'; - const { - getByLabelText, - getByPlaceholderText, - getByTestId, - getByText, - } = await initializeEditor( { + const editor = await initializeEditor( { initialHtml: EMPTY_PARAGRAPH_HTML, } ); // Paste URL in paragraph block. - const paragraphText = getByPlaceholderText( 'Start writing…' ); + const paragraphText = + editor.getByPlaceholderText( 'Start writing…' ); fireEvent( paragraphText, 'focus' ); fireEvent( paragraphText, 'paste', { preventDefault: jest.fn(), @@ -888,36 +890,37 @@ describe( 'Embed block', () => { } ); // Wait for embed handler picker to be visible. - await waitFor( - () => getByTestId( 'embed-handler-picker' ).props.isVisible + const embedHandlerPicker = editor.getByTestId( + 'embed-handler-picker' ); + await waitFor( () => embedHandlerPicker.props.isVisible ); // Select create embed option. - fireEvent.press( getByText( 'Create embed' ) ); + fireEvent.press( editor.getByText( 'Create embed' ) ); // Get the created embed block. - const embedBlock = await waitFor( () => - getByLabelText( /Embed Block\. Row 1/ ) + const [ embedBlock ] = await editor.findAllByLabelText( + /Embed Block\. Row 1/ ); expect( embedBlock ).toBeDefined(); + + await waitFor( () => editor.UNSAFE_getByType( WebView ) ); + await editor.findByText( 'Media settings' ); + expect( getEditorHtml() ).toMatchSnapshot(); } ); it( 'creates link when pasting URL in paragraph block', async () => { const expectedURL = 'https://www.youtube.com/watch?v=lXMskKTw3Bc'; - const { - getByDisplayValue, - getByPlaceholderText, - getByTestId, - getByText, - } = await initializeEditor( { + const editor = await initializeEditor( { initialHtml: EMPTY_PARAGRAPH_HTML, } ); // Paste URL in paragraph block. - const paragraphText = getByPlaceholderText( 'Start writing…' ); + const paragraphText = + editor.getByPlaceholderText( 'Start writing…' ); fireEvent( paragraphText, 'focus' ); fireEvent( paragraphText, 'paste', { preventDefault: jest.fn(), @@ -931,16 +934,17 @@ describe( 'Embed block', () => { } ); // Wait for embed handler picker to be visible. - await waitFor( - () => getByTestId( 'embed-handler-picker' ).props.isVisible + const embedHandlerPicker = editor.getByTestId( + 'embed-handler-picker' ); + await waitFor( () => embedHandlerPicker.props.isVisible ); // Select create link option. - fireEvent.press( getByText( 'Create link' ) ); + fireEvent.press( editor.getByText( 'Create link' ) ); // Get the link text. const linkText = await waitFor( () => - getByDisplayValue( + editor.getByDisplayValue( `

${ expectedURL }

` ) ); @@ -953,10 +957,12 @@ describe( 'Embed block', () => { describe( 'insert via slash inserter', () => { it( 'insert generic embed block', async () => { const embedBlockSlashInserter = '/Embed'; - const { getByPlaceholderText, getByLabelText, getByText } = - await initializeEditor( { initialHtml: EMPTY_PARAGRAPH_HTML } ); + const editor = await initializeEditor( { + initialHtml: EMPTY_PARAGRAPH_HTML, + } ); - const paragraphText = getByPlaceholderText( 'Start writing…' ); + const paragraphText = + editor.getByPlaceholderText( 'Start writing…' ); fireEvent( paragraphText, 'focus' ); // Trigger onSelectionChange to update both the current text and text selection. // This event is required by the autocompleter, as it only displays the slash inserter @@ -977,10 +983,10 @@ describe( 'Embed block', () => { } ); - fireEvent.press( await waitFor( () => getByText( 'Embed' ) ) ); + fireEvent.press( await editor.findByText( 'Embed' ) ); - const block = await waitFor( () => - getByLabelText( /Embed Block\. Row 1/ ) + const [ block ] = await editor.findAllByLabelText( + /Embed Block\. Row 1/ ); const blockName = within( block ).getByText( 'Embed' ); @@ -992,12 +998,12 @@ describe( 'Embed block', () => { MOST_USED_PROVIDERS.forEach( ( { title } ) => it( `inserts ${ title } embed block`, async () => { const embedBlockSlashInserter = `/${ title }`; - const { getByPlaceholderText, getByLabelText, getByText } = - await initializeEditor( { - initialHtml: EMPTY_PARAGRAPH_HTML, - } ); + const editor = await initializeEditor( { + initialHtml: EMPTY_PARAGRAPH_HTML, + } ); - const paragraphText = getByPlaceholderText( 'Start writing…' ); + const paragraphText = + editor.getByPlaceholderText( 'Start writing…' ); fireEvent( paragraphText, 'focus' ); // Trigger onSelectionChange to update both the current text and text selection. // This event is required by the autocompleter, as it only displays the slash inserter @@ -1018,10 +1024,10 @@ describe( 'Embed block', () => { } ); - fireEvent.press( await waitFor( () => getByText( title ) ) ); + fireEvent.press( await editor.findByText( title ) ); - const block = await waitFor( () => - getByLabelText( /Embed Block\. Row 1/ ) + const [ block ] = await editor.findAllByLabelText( + /Embed Block\. Row 1/ ); const blockName = within( block ).getByText( title ); @@ -1060,12 +1066,12 @@ describe( 'Embed block', () => { it( 'displays cannot embed on the placeholder if preview data is null', async () => { // Return null response for requests to oembed endpoint. - fetchRequest.mockImplementation( ( { path } ) => { - if ( path.startsWith( '/wp/v2/block-patterns/categories' ) ) { - return Promise.resolve( [] ); + fetchRequest.mockImplementation( async ( req ) => { + if ( req.path.startsWith( '/oembed/1.0/proxy' ) ) { + return EMBED_NULL_RESPONSE; } - const isEmbedRequest = path.startsWith( '/oembed/1.0/proxy' ); - return Promise.resolve( isEmbedRequest ? EMBED_NULL_RESPONSE : {} ); + + return mockOtherResponses( req ); } ); const { getByText } = await initializeWithEmbedBlock( diff --git a/packages/block-library/src/file/test/__snapshots__/edit.native.js.snap b/packages/block-library/src/file/test/__snapshots__/edit.native.js.snap index 080c6fa338f8b..adec122319bb0 100644 --- a/packages/block-library/src/file/test/__snapshots__/edit.native.js.snap +++ b/packages/block-library/src/file/test/__snapshots__/edit.native.js.snap @@ -44,9 +44,7 @@ exports[`File block renders file error state without crashing 1`] = ` "color": "gray", } } - > - - + /> - - + /> { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - fireEvent.press( screen.getByLabelText( /Image Block/ ) ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); + fireEvent.press( imageBlock ); // Awaiting navigation event seemingly required due to React Navigation bug // https://github.com/react-navigation/react-navigation/issues/9701 await act( () => @@ -107,7 +108,8 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - fireEvent.press( screen.getByLabelText( /Image Block/ ) ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); + fireEvent.press( imageBlock ); // Awaiting navigation event seemingly required due to React Navigation bug // https://github.com/react-navigation/react-navigation/issues/9701 await act( () => @@ -133,7 +135,8 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - fireEvent.press( screen.getByLabelText( /Image Block/ ) ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); + fireEvent.press( imageBlock ); // Awaiting navigation event seemingly required due to React Navigation bug // https://github.com/react-navigation/react-navigation/issues/9701 await act( () => @@ -169,7 +172,8 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - fireEvent.press( screen.getByLabelText( /Image Block/ ) ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); + fireEvent.press( imageBlock ); // Awaiting navigation event seemingly required due to React Navigation bug // https://github.com/react-navigation/react-navigation/issues/9701 await act( () => @@ -177,7 +181,7 @@ describe( 'Image Block', () => { ); fireEvent.press( screen.getByText( 'None' ) ); fireEvent.press( screen.getByText( 'Media File' ) ); - await waitFor( () => screen.getByText( 'Custom URL' ) ); + await screen.findByText( 'Custom URL' ); fireEvent.press( screen.getByText( 'Custom URL' ) ); // Await asynchronous fetch of clipboard await act( () => clipboardPromise ); @@ -186,8 +190,7 @@ describe( 'Image Block', () => { 'wordpress.org' ); fireEvent.press( screen.getByLabelText( 'Apply' ) ); - await waitFor( () => screen.getByText( 'Custom URL' ) ); - fireEvent.press( screen.getByText( 'Custom URL' ) ); + fireEvent.press( await screen.findByText( 'Custom URL' ) ); // Await asynchronous fetch of clipboard await act( () => clipboardPromise ); fireEvent.press( screen.getByText( 'Media File' ) ); @@ -211,7 +214,8 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - fireEvent.press( screen.getByLabelText( /Image Block/ ) ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); + fireEvent.press( imageBlock ); // Awaiting navigation event seemingly required due to React Navigation bug // https://github.com/react-navigation/react-navigation/issues/9701 await act( () => @@ -235,7 +239,7 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - const imageBlock = screen.getByLabelText( /Image Block/ ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); fireEvent.press( imageBlock ); const settingsButton = screen.getByLabelText( 'Open Settings' ); @@ -266,7 +270,7 @@ describe( 'Image Block', () => { // We must await the image fetch via `getMedia` await act( () => apiFetchPromise ); - const imageBlock = screen.getByLabelText( /Image Block/ ); + const [ imageBlock ] = screen.getAllByLabelText( /Image Block/ ); fireEvent.press( imageBlock ); const settingsButton = screen.getByLabelText( 'Open Settings' ); diff --git a/packages/block-library/src/list/test/edit.native.js b/packages/block-library/src/list/test/edit.native.js index 9defa338782db..ef8694ca2869c 100644 --- a/packages/block-library/src/list/test/edit.native.js +++ b/packages/block-library/src/list/test/edit.native.js @@ -63,16 +63,18 @@ describe( 'List block', () => {
  • `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Select List Item block - const listItemBlock = getByLabelText( /List item Block\. Row 1/ ); + const [ listItemBlock ] = screen.getAllByLabelText( + /List item Block\. Row 1/ + ); fireEvent.press( listItemBlock ); const listItemField = @@ -109,25 +111,25 @@ describe( 'List block', () => { `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Select List Item block - const firstNestedLevelBlock = within( listBlock ).getByLabelText( + const [ firstNestedLevelBlock ] = within( listBlock ).getAllByLabelText( /List item Block\. Row 2/ ); fireEvent.press( firstNestedLevelBlock ); // Select second level list - const secondNestedLevelBlock = within( + const [ secondNestedLevelBlock ] = within( firstNestedLevelBlock - ).getByLabelText( /List Block\. Row 1/ ); + ).getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( secondNestedLevelBlock ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -143,20 +145,22 @@ describe( 'List block', () => { `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Select Secont List Item block - const listItemBlock = getByLabelText( /List item Block\. Row 2/ ); + const [ listItemBlock ] = screen.getAllByLabelText( + /List item Block\. Row 2/ + ); fireEvent.press( listItemBlock ); // Update indentation - const indentButton = getByLabelText( 'Indent' ); + const indentButton = screen.getByLabelText( 'Indent' ); fireEvent.press( indentButton ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -173,33 +177,33 @@ describe( 'List block', () => { `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Select List Item block - const firstNestedLevelBlock = within( listBlock ).getByLabelText( + const [ firstNestedLevelBlock ] = within( listBlock ).getAllByLabelText( /List item Block\. Row 1/ ); fireEvent.press( firstNestedLevelBlock ); // Select Inner block List - const innerBlockList = within( firstNestedLevelBlock ).getByLabelText( - /List Block\. Row 1/ - ); + const [ innerBlockList ] = within( + firstNestedLevelBlock + ).getAllByLabelText( /List Block\. Row 1/ ); // Select nested List Item block - const listItemBlock = within( innerBlockList ).getByLabelText( + const [ listItemBlock ] = within( innerBlockList ).getAllByLabelText( /List item Block\. Row 1/ ); fireEvent.press( listItemBlock ); // Update indentation - const outdentButton = getByLabelText( 'Outdent' ); + const outdentButton = screen.getByLabelText( 'Outdent' ); fireEvent.press( outdentButton ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -218,16 +222,16 @@ describe( 'List block', () => { `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Update to ordered list - const orderedButton = getByLabelText( 'Ordered' ); + const orderedButton = screen.getByLabelText( 'Ordered' ); fireEvent.press( orderedButton ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -246,27 +250,29 @@ describe( 'List block', () => { `; - const { getByLabelText, getByTestId } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Update to ordered list - const orderedButton = getByLabelText( 'Ordered' ); + const orderedButton = screen.getByLabelText( 'Ordered' ); fireEvent.press( orderedButton ); // Set order to reverse // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); - const reverseButton = getByLabelText( /Reverse list numbering\. Off/ ); + const reverseButton = screen.getByLabelText( + /Reverse list numbering\. Off/ + ); fireEvent.press( reverseButton ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -285,27 +291,27 @@ describe( 'List block', () => { `; - const { getByLabelText, getByTestId } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select List block - const listBlock = getByLabelText( /List Block\. Row 1/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 1/ ); fireEvent.press( listBlock ); // Update to ordered list - const orderedButton = getByLabelText( 'Ordered' ); + const orderedButton = screen.getByLabelText( 'Ordered' ); fireEvent.press( orderedButton ); // Set order to reverse // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); - const startValueButton = getByLabelText( /Start value\. Empty/ ); + const startValueButton = screen.getByLabelText( /Start value\. Empty/ ); fireEvent.press( startValueButton ); const startValueInput = within( startValueButton ).getByDisplayValue( '' ); @@ -328,11 +334,11 @@ describe( 'List block', () => { } ); // Select List block - const listBlock = screen.getByLabelText( /List Block\. Row 2/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 2/ ); fireEvent.press( listBlock ); // Select List Item block - const listItemBlock = within( listBlock ).getByLabelText( + const [ listItemBlock ] = within( listBlock ).getAllByLabelText( /List item Block\. Row 1/ ); fireEvent.press( listItemBlock ); @@ -376,11 +382,11 @@ describe( 'List block', () => { } ); // Select List block - const listBlock = screen.getByLabelText( /List Block\. Row 2/ ); + const [ listBlock ] = screen.getAllByLabelText( /List Block\. Row 2/ ); fireEvent.press( listBlock ); // Select List Item block - const listItemBlock = within( listBlock ).getByLabelText( + const [ listItemBlock ] = within( listBlock ).getAllByLabelText( /List item Block\. Row 1/ ); fireEvent.press( listItemBlock ); diff --git a/packages/block-library/src/missing/test/edit-integration.native.js b/packages/block-library/src/missing/test/edit-integration.native.js index 15f197734fdbd..4e1a4779572f2 100644 --- a/packages/block-library/src/missing/test/edit-integration.native.js +++ b/packages/block-library/src/missing/test/edit-integration.native.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { initializeEditor, fireEvent, waitFor, within } from 'test/helpers'; +import { initializeEditor, fireEvent, within } from 'test/helpers'; /** * WordPress dependencies @@ -40,12 +40,12 @@ describe( 'Unsupported block', () => { const initialHtml = `
    12
    34
    `; - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); - const missingBlock = await waitFor( () => - getByLabelText( /Unsupported Block\. Row 1/ ) + const [ missingBlock ] = await screen.findAllByLabelText( + /Unsupported Block\. Row 1/ ); const translatedTableTitle = @@ -58,24 +58,22 @@ describe( 'Unsupported block', () => { const initialHtml = `
    12
    34
    `; - const { getByLabelText, getByText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); - const missingBlock = await waitFor( () => - getByLabelText( /Unsupported Block\. Row 1/ ) + const [ missingBlock ] = await screen.findAllByLabelText( + /Unsupported Block\. Row 1/ ); fireEvent.press( missingBlock ); - const helpButton = await waitFor( () => - getByLabelText( 'Help button' ) - ); + const [ helpButton ] = await screen.findAllByLabelText( 'Help button' ); fireEvent.press( helpButton ); - const bottomSheetTitle = await waitFor( () => - getByText( '«Tabla» no es totalmente compatible' ) + const bottomSheetTitle = await screen.findByText( + '«Tabla» no es totalmente compatible' ); expect( bottomSheetTitle ).toBeDefined(); diff --git a/packages/block-library/src/search/edit.native.js b/packages/block-library/src/search/edit.native.js index 8b315bb21f4a9..c5f5fb4cf2354 100644 --- a/packages/block-library/src/search/edit.native.js +++ b/packages/block-library/src/search/edit.native.js @@ -42,6 +42,36 @@ const BUTTON_OPTIONS = [ { value: 'no-button', label: __( 'No button' ) }, ]; +function useIsScreenReaderEnabled() { + const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = + useState( false ); + + useEffect( () => { + let mounted = true; + + const changeListener = AccessibilityInfo.addEventListener( + 'screenReaderChanged', + ( enabled ) => setIsScreenReaderEnabled( enabled ) + ); + + AccessibilityInfo.isScreenReaderEnabled().then( + ( screenReaderEnabled ) => { + if ( mounted && screenReaderEnabled ) { + setIsScreenReaderEnabled( screenReaderEnabled ); + } + } + ); + + return () => { + mounted = false; + + changeListener.remove(); + }; + }, [] ); + + return isScreenReaderEnabled; +} + export default function SearchEdit( { onFocus, isSelected, @@ -57,8 +87,7 @@ export default function SearchEdit( { useState( false ); const [ isLongButton, setIsLongButton ] = useState( false ); const [ buttonWidth, setButtonWidth ] = useState( MIN_BUTTON_WIDTH ); - const [ isScreenReaderEnabled, setIsScreenReaderEnabled ] = - useState( false ); + const isScreenReaderEnabled = useIsScreenReaderEnabled(); const textInputRef = useRef( null ); @@ -71,31 +100,6 @@ export default function SearchEdit( { buttonText, } = attributes; - /* - * Check if screenreader is enabled and save to state. This is important for - * properly creating accessibilityLabel text. - */ - useEffect( () => { - const a11yInfoChangeSubscription = AccessibilityInfo.addEventListener( - 'screenReaderChanged', - handleScreenReaderToggled - ); - - AccessibilityInfo.isScreenReaderEnabled().then( - ( screenReaderEnabled ) => { - setIsScreenReaderEnabled( screenReaderEnabled ); - } - ); - - return () => { - a11yInfoChangeSubscription.remove(); - }; - }, [] ); - - const handleScreenReaderToggled = ( screenReaderEnabled ) => { - setIsScreenReaderEnabled( screenReaderEnabled ); - }; - /* * Called when the value of isSelected changes. Blurs the PlainText component * used by the placeholder when this block loses focus. diff --git a/packages/block-library/src/shortcode/test/edit.native.js b/packages/block-library/src/shortcode/test/edit.native.js index 46c7dbddef2c9..372956a2242a0 100644 --- a/packages/block-library/src/shortcode/test/edit.native.js +++ b/packages/block-library/src/shortcode/test/edit.native.js @@ -1,12 +1,7 @@ /** * External dependencies */ -import { - getEditorHtml, - initializeEditor, - fireEvent, - waitFor, -} from 'test/helpers'; +import { getEditorHtml, initializeEditor, fireEvent } from 'test/helpers'; /** * WordPress dependencies @@ -28,12 +23,11 @@ afterAll( () => { describe( 'Shortcode block', () => { it( 'inserts block', async () => { - const { getByLabelText, getByTestId, getByText } = - await initializeEditor(); + const screen = await initializeEditor(); - fireEvent.press( getByLabelText( 'Add block' ) ); + fireEvent.press( screen.getByLabelText( 'Add block' ) ); - const blockList = getByTestId( 'InserterUI-Blocks' ); + const blockList = screen.getByTestId( 'InserterUI-Blocks' ); // onScroll event used to force the FlatList to render all items fireEvent.scroll( blockList, { nativeEvent: { @@ -43,22 +37,25 @@ describe( 'Shortcode block', () => { }, } ); - fireEvent.press( await waitFor( () => getByText( 'Shortcode' ) ) ); + fireEvent.press( await screen.findByText( 'Shortcode' ) ); - expect( getByLabelText( /Shortcode Block\. Row 1/ ) ).toBeVisible(); + const [ shortcodeBlock ] = screen.getAllByLabelText( + /Shortcode Block\. Row 1/ + ); + expect( shortcodeBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); } ); it( 'edits content', async () => { - const { getByLabelText, getByPlaceholderText } = await initializeEditor( - { - initialHtml: '', - } + const screen = await initializeEditor( { + initialHtml: '', + } ); + const [ shortcodeBlock ] = screen.getAllByLabelText( + /Shortcode Block\. Row 1/ ); - const shortcodeBlock = getByLabelText( /Shortcode Block\. Row 1/ ); fireEvent.press( shortcodeBlock ); - const textField = getByPlaceholderText( 'Add a shortcode…' ); + const textField = screen.getByPlaceholderText( 'Add a shortcode…' ); fireEvent( textField, 'focus' ); fireEvent( textField, 'onChange', { nativeEvent: { diff --git a/packages/block-library/src/social-link/test/index.native.js b/packages/block-library/src/social-link/test/index.native.js index 603776e939998..4ad7611e72045 100644 --- a/packages/block-library/src/social-link/test/index.native.js +++ b/packages/block-library/src/social-link/test/index.native.js @@ -42,16 +42,13 @@ describe( '', () => { 'social icons' ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Social Icons block' ) - ) + await subject.findByLabelText( 'Social Icons block' ) + ); + const [ socialIconsBlock ] = subject.getAllByLabelText( + /Social Icons Block. Row 1/ ); fireEvent( - await waitFor( () => - within( - subject.getByLabelText( /Social Icons Block. Row 1/ ) - ).getByTestId( 'block-list-wrapper' ) - ), + within( socialIconsBlock ).getByTestId( 'block-list-wrapper' ), 'layout', { nativeEvent: { layout: { width: 100 } } } ); @@ -99,16 +96,13 @@ describe( '', () => { 'social icons' ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Social Icons block' ) - ) + await subject.findByLabelText( 'Social Icons block' ) + ); + const [ socialIconsBlock ] = subject.getAllByLabelText( + /Social Icons Block. Row 1/ ); fireEvent( - await waitFor( () => - within( - subject.getByLabelText( /Social Icons Block. Row 1/ ) - ).getByTestId( 'block-list-wrapper' ) - ), + within( socialIconsBlock ).getByTestId( 'block-list-wrapper' ), 'layout', { nativeEvent: { layout: { width: 100 } } } ); diff --git a/packages/block-library/src/spacer/test/index.native.js b/packages/block-library/src/spacer/test/index.native.js index 7b6ed2ba3f371..5d5229033d19a 100644 --- a/packages/block-library/src/spacer/test/index.native.js +++ b/packages/block-library/src/spacer/test/index.native.js @@ -28,12 +28,11 @@ afterAll( () => { describe( 'Spacer block', () => { it( 'inserts block', async () => { - const { getByLabelText, getByTestId, getByText } = - await initializeEditor(); + const screen = await initializeEditor(); - fireEvent.press( getByLabelText( 'Add block' ) ); + fireEvent.press( screen.getByLabelText( 'Add block' ) ); - const blockList = getByTestId( 'InserterUI-Blocks' ); + const blockList = screen.getByTestId( 'InserterUI-Blocks' ); // onScroll event used to force the FlatList to render all items fireEvent.scroll( blockList, { nativeEvent: { @@ -43,9 +42,11 @@ describe( 'Spacer block', () => { }, } ); - fireEvent.press( await waitFor( () => getByText( 'Spacer' ) ) ); + fireEvent.press( screen.getByText( 'Spacer' ) ); - expect( getByLabelText( /Spacer Block\. Row 1/ ) ).toBeVisible(); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 1/ ); + expect( spacerBlock ).toBeVisible(); expect( getEditorHtml() ).toMatchSnapshot(); } ); @@ -53,24 +54,24 @@ describe( 'Spacer block', () => { const initialHtml = ` `; - const { getByLabelText, getByDisplayValue, getByTestId, getByText } = - await initializeEditor( { - initialHtml, - } ); + const screen = await initializeEditor( { + initialHtml, + } ); // Select Spacer block - const spacerBlock = getByLabelText( /Spacer Block\. Row 1/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 1/ ); fireEvent.press( spacerBlock ); // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); // Update height attribute - fireEvent.press( getByText( '100' ) ); - const heightTextInput = getByDisplayValue( '100' ); + fireEvent.press( screen.getByText( '100' ) ); + const heightTextInput = screen.getByDisplayValue( '100' ); fireEvent.changeText( heightTextInput, '50' ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -80,28 +81,28 @@ describe( 'Spacer block', () => { const initialHtml = ` `; - const { getByLabelText, getByDisplayValue, getByTestId, getByText } = - await initializeEditor( { - initialHtml, - } ); + const screen = await initializeEditor( { + initialHtml, + } ); // Select Spacer block - const spacerBlock = getByLabelText( /Spacer Block\. Row 1/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 1/ ); fireEvent.press( spacerBlock ); // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); // Set vh unit - fireEvent.press( getByText( 'px' ) ); - fireEvent.press( getByText( 'Viewport height (vh)' ) ); + fireEvent.press( screen.getByText( 'px' ) ); + fireEvent.press( screen.getByText( 'Viewport height (vh)' ) ); // Update height attribute - fireEvent.press( getByText( '100' ) ); - const heightTextInput = getByDisplayValue( '100' ); + fireEvent.press( screen.getByText( '100' ) ); + const heightTextInput = screen.getByDisplayValue( '100' ); fireEvent.changeText( heightTextInput, '25' ); expect( getEditorHtml() ).toMatchSnapshot(); @@ -111,23 +112,24 @@ describe( 'Spacer block', () => { const initialHtml = ` `; - const { getByLabelText, getByTestId } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select Spacer block - const spacerBlock = getByLabelText( /Spacer Block\. Row 1/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 1/ ); fireEvent.press( spacerBlock ); // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); // Increment height fireEvent( - getByLabelText( /Height\. Value is 100 Pixels \(px\)/ ), + screen.getByLabelText( /Height\. Value is 100 Pixels \(px\)/ ), 'accessibilityAction', { nativeEvent: { actionName: 'increment' }, @@ -141,23 +143,24 @@ describe( 'Spacer block', () => { const initialHtml = ` `; - const { getByLabelText, getByTestId } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml, } ); // Select Spacer block - const spacerBlock = getByLabelText( /Spacer Block\. Row 1/ ); + const [ spacerBlock ] = + screen.getAllByLabelText( /Spacer Block\. Row 1/ ); fireEvent.press( spacerBlock ); // Open block settings - fireEvent.press( getByLabelText( 'Open Settings' ) ); + fireEvent.press( screen.getByLabelText( 'Open Settings' ) ); await waitFor( - () => getByTestId( 'block-settings-modal' ).props.isVisible + () => screen.getByTestId( 'block-settings-modal' ).props.isVisible ); // Increment height fireEvent( - getByLabelText( /Height\. Value is 100 Pixels \(px\)/ ), + screen.getByLabelText( /Height\. Value is 100 Pixels \(px\)/ ), 'accessibilityAction', { nativeEvent: { actionName: 'decrement' }, diff --git a/packages/blocks/CHANGELOG.md b/packages/blocks/CHANGELOG.md index f1c2317d7791b..5d1f797d7063d 100644 --- a/packages/blocks/CHANGELOG.md +++ b/packages/blocks/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 11.21.0 (2022-11-16) ## 11.20.0 (2022-11-02) diff --git a/packages/blocks/package.json b/packages/blocks/package.json index b67f0e6266e05..2b1e65365b392 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -55,7 +55,7 @@ "uuid": "^8.3.0" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index a5583171d1b46..d20f381aa8fe9 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ### New Feature - `TabPanel`: support manual tab activation ([#46004](https://github.com/WordPress/gutenberg/pull/46004)). diff --git a/packages/components/package.json b/packages/components/package.json index 5afcbf72040c8..fe31eecd87811 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -59,7 +59,7 @@ "date-fns": "^2.28.0", "dom-scroll-into-view": "^1.2.1", "downshift": "^6.0.15", - "framer-motion": "^6.2.8", + "framer-motion": "^7.6.1", "gradient-parser": "^0.1.5", "highlight-words-core": "^1.2.2", "lodash": "^4.17.21", @@ -73,8 +73,8 @@ "valtio": "^1.7.0" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/components/src/alignment-matrix-control/test/index.js b/packages/components/src/alignment-matrix-control/test/index.js index 638d8acb96ad5..2343c474f0a8d 100644 --- a/packages/components/src/alignment-matrix-control/test/index.js +++ b/packages/components/src/alignment-matrix-control/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen, within } from '@testing-library/react'; +import { act, render, screen, within } from '@testing-library/react'; /** * Internal dependencies @@ -30,14 +30,14 @@ describe( 'AlignmentMatrixControl', () => { it.each( alignments )( 'should change value on %s cell click', - ( alignment ) => { + async ( alignment ) => { const spy = jest.fn(); render( ); - getCell( alignment ).focus(); + await act( () => getCell( alignment ).focus() ); expect( spy ).toHaveBeenCalledWith( alignment ); } diff --git a/packages/components/src/border-box-control/test/index.js b/packages/components/src/border-box-control/test/index.js index af805aa4bde11..db9327a4971fa 100644 --- a/packages/components/src/border-box-control/test/index.js +++ b/packages/components/src/border-box-control/test/index.js @@ -3,6 +3,7 @@ */ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import { act } from 'react-test-renderer'; /** * Internal dependencies @@ -186,6 +187,7 @@ describe( 'BorderBoxControl', () => { const colorButton = screen.getByLabelText( colorPickerRegex ); await user.click( colorButton ); + await act( () => Promise.resolve() ); const styleLabel = screen.queryByText( 'Style' ); const solidButton = screen.queryByRole( 'button', { @@ -309,7 +311,7 @@ describe( 'BorderBoxControl', () => { await user.click( colorButtons[ 3 ] ); assertStyleOptionsMissing(); await user.click( colorButtons[ 3 ] ); - }, 10000 ); + } ); } ); describe( 'onChange handling', () => { diff --git a/packages/components/src/button/test/index.js b/packages/components/src/button/test/index.js index 0536ab585e1c9..1f8edc70702e7 100644 --- a/packages/components/src/button/test/index.js +++ b/packages/components/src/button/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen } from '@testing-library/react'; +import { act, render, screen } from '@testing-library/react'; /** * WordPress dependencies @@ -76,20 +76,20 @@ describe( 'Button', () => { expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-pressed' ); } ); - it( 'should render a button element with has-text when children are passed', async () => { + it( 'should render a button element with has-text when children are passed', () => { render( ); - await screen.getByRole( 'button' ).focus(); + act( () => screen.getByRole( 'button' ).focus() ); expect( screen.getByRole( 'button' ) ).toHaveClass( 'has-text' ); } ); - it( 'should render a button element without has-text when children are not passed', async () => { + it( 'should render a button element without has-text when children are not passed', () => { render( ); expect( screen.getByRole( 'button' ) ).not.toHaveClass( 'has-text' ); } ); - it( 'should render a button element without has-text when children are empty fragment', async () => { + it( 'should render a button element without has-text when children are empty fragment', () => { render( ); + await act( () => Promise.resolve() ); expect( screen.getByRole( 'button', { @@ -245,7 +254,7 @@ describe( 'Button', () => { ).toBeVisible(); } ); - it( 'should allow tooltip disable', async () => { + it( 'should allow tooltip disable', () => { render( ); + await act( () => Promise.resolve() ); expect( screen.queryByText( 'WordPress' ) ).not.toBeInTheDocument(); - await screen.getByRole( 'button', { name: 'WordPress' } ).focus(); + await act( async () => { + screen.getByRole( 'button', { name: 'WordPress' } ).focus(); + } ); expect( screen.getByText( 'WordPress' ) ).toBeVisible(); } ); diff --git a/packages/components/src/color-palette/test/index.tsx b/packages/components/src/color-palette/test/index.tsx index 2cd95174cb4ed..83d7bc4d3c0ea 100644 --- a/packages/components/src/color-palette/test/index.tsx +++ b/packages/components/src/color-palette/test/index.tsx @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen, within } from '@testing-library/react'; +import { render, screen, within, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** @@ -16,6 +16,10 @@ const EXAMPLE_COLORS = [ ]; const INITIAL_COLOR = EXAMPLE_COLORS[ 0 ].color; +function getWrappingPopoverElement( element: HTMLElement ) { + return element.closest( '.components-popover' ); +} + describe( 'ColorPalette', () => { it( 'should render a dynamic toolbar of colors', () => { const onChange = jest.fn(); @@ -163,11 +167,21 @@ describe( 'ColorPalette', () => { expect( within( dropdownButton ).getByText( EXAMPLE_COLORS[ 0 ].name ) ).toBeVisible(); + expect( within( dropdownButton ).getByText( EXAMPLE_COLORS[ 0 ].color.replace( '#', '' ) ) ).toBeVisible(); + + // Check that the popover with custom color input has appeared. + const dropdownColorInput = screen.getByLabelText( 'Hex color' ); + + await waitFor( () => + expect( + getWrappingPopoverElement( dropdownColorInput ) + ).toBePositionedPopover() + ); } ); it( 'should show the clear button by default', () => { diff --git a/packages/components/src/dropdown-menu/test/index.js b/packages/components/src/dropdown-menu/test/index.js index 2eab09f6c052d..dcb268b7cad9b 100644 --- a/packages/components/src/dropdown-menu/test/index.js +++ b/packages/components/src/dropdown-menu/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen, waitFor, within } from '@testing-library/react'; +import { act, render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** @@ -65,11 +65,14 @@ describe( 'DropdownMenu', () => { await user.keyboard( '[ArrowDown]' ); - let menu; - await waitFor( () => { - menu = screen.getByRole( 'menu' ); - return expect( menu ).toBeVisible(); - } ); + // Wait for the `floating-ui` effects in `Dropdown`/`Popover` to finish running + // See also: https://floating-ui.com/docs/react-dom#testing + await act( () => Promise.resolve() ); + + const menu = screen.getByRole( 'menu' ); + + // we need to wait because showing the dropdown is animated + await waitFor( () => expect( menu ).toBeVisible() ); expect( within( menu ).getAllByRole( 'menuitem' ) ).toHaveLength( controls.length @@ -88,15 +91,18 @@ describe( 'DropdownMenu', () => { ); const button = screen.getByRole( 'button' ); - button.focus(); + act( () => button.focus() ); await user.keyboard( '[ArrowDown]' ); - let menu; - await waitFor( () => { - menu = screen.getByRole( 'menu' ); - return expect( menu ).toBeVisible(); - } ); + // Wait for the `floating-ui` effects in `Dropdown`/`Popover` to finish running + // See also: https://floating-ui.com/docs/react-dom#testing + await act( () => Promise.resolve() ); + + const menu = screen.getByRole( 'menu' ); + + // we need to wait because showing the dropdown is animated + await waitFor( () => expect( menu ).toBeVisible() ); // Clicking the menu item will close the dropdown menu await user.click( within( menu ).getByRole( 'menuitem' ) ); diff --git a/packages/components/src/higher-order/with-filters/test/index.js b/packages/components/src/higher-order/with-filters/test/index.js index 04f129c148436..71760dc79d4ca 100644 --- a/packages/components/src/higher-order/with-filters/test/index.js +++ b/packages/components/src/higher-order/with-filters/test/index.js @@ -7,6 +7,7 @@ import { render } from '@testing-library/react'; * WordPress dependencies */ import { addFilter, removeAllFilters, removeFilter } from '@wordpress/hooks'; +import { act } from 'react-test-renderer'; /** * Internal dependencies @@ -64,11 +65,7 @@ describe( 'withFilters', () => { } ); it( 'should not re-render component when new filter added before component was mounted', () => { - const spy = jest.fn(); - const SpiedComponent = () => { - spy(); - return
    Spied component
    ; - }; + const SpiedComponent = jest.fn( () =>
    Spied component
    ); addFilter( hookName, 'test/enhanced-component-spy-1', @@ -87,109 +84,103 @@ describe( 'withFilters', () => { jest.runAllTimers(); - expect( spy ).toHaveBeenCalledTimes( 1 ); + expect( SpiedComponent ).toHaveBeenCalledTimes( 1 ); } ); - it( 'should re-render component once when new filter added after component was mounted', () => { - const spy = jest.fn(); - const SpiedComponent = () => { - spy(); - return
    Spied component
    ; - }; + it( 'should re-render component once when new filter added after component was mounted', async () => { + const SpiedComponent = jest.fn( () =>
    Spied component
    ); const EnhancedComponent = withFilters( hookName )( SpiedComponent ); const { container } = render( ); - spy.mockClear(); - addFilter( - hookName, - 'test/enhanced-component-spy-1', - ( FilteredComponent ) => () => - ( -
    - -
    - ) - ); - jest.runAllTimers(); - - expect( spy ).toHaveBeenCalledTimes( 1 ); + SpiedComponent.mockClear(); + + await act( () => { + addFilter( + hookName, + 'test/enhanced-component-spy-1', + ( FilteredComponent ) => () => + ( +
    + +
    + ) + ); + jest.runAllTimers(); + } ); + + expect( SpiedComponent ).toHaveBeenCalledTimes( 1 ); expect( container ).toMatchSnapshot(); } ); - it( 'should re-render component once when two filters added in the same animation frame', () => { - const spy = jest.fn(); - const SpiedComponent = () => { - spy(); - return
    Spied component
    ; - }; + it( 'should re-render component once when two filters added in the same animation frame', async () => { + const SpiedComponent = jest.fn( () =>
    Spied component
    ); const EnhancedComponent = withFilters( hookName )( SpiedComponent ); const { container } = render( ); - spy.mockClear(); - - addFilter( - hookName, - 'test/enhanced-component-spy-1', - ( FilteredComponent ) => () => - ( -
    - -
    - ) - ); - addFilter( - hookName, - 'test/enhanced-component-spy-2', - ( FilteredComponent ) => () => - ( -
    - -
    - ) - ); - jest.runAllTimers(); - - expect( spy ).toHaveBeenCalledTimes( 1 ); + SpiedComponent.mockClear(); + + await act( () => { + addFilter( + hookName, + 'test/enhanced-component-spy-1', + ( FilteredComponent ) => () => + ( +
    + +
    + ) + ); + addFilter( + hookName, + 'test/enhanced-component-spy-2', + ( FilteredComponent ) => () => + ( +
    + +
    + ) + ); + jest.runAllTimers(); + } ); + + expect( SpiedComponent ).toHaveBeenCalledTimes( 1 ); expect( container ).toMatchSnapshot(); } ); - it( 'should re-render component twice when new filter added and removed in two different animation frames', () => { - const spy = jest.fn(); - const SpiedComponent = () => { - spy(); - return
    Spied component
    ; - }; + it( 'should re-render component twice when new filter added and removed in two different animation frames', async () => { + const SpiedComponent = jest.fn( () =>
    Spied component
    ); const EnhancedComponent = withFilters( hookName )( SpiedComponent ); const { container } = render( ); - spy.mockClear(); - addFilter( - hookName, - 'test/enhanced-component-spy', - ( FilteredComponent ) => () => - ( -
    - -
    - ) - ); - jest.runAllTimers(); - - removeFilter( hookName, 'test/enhanced-component-spy' ); - jest.runAllTimers(); - - expect( spy ).toHaveBeenCalledTimes( 2 ); + SpiedComponent.mockClear(); + + await act( () => { + addFilter( + hookName, + 'test/enhanced-component-spy', + ( FilteredComponent ) => () => + ( +
    + +
    + ) + ); + jest.runAllTimers(); + } ); + + await act( () => { + removeFilter( hookName, 'test/enhanced-component-spy' ); + jest.runAllTimers(); + } ); + + expect( SpiedComponent ).toHaveBeenCalledTimes( 2 ); expect( container ).toMatchSnapshot(); } ); - it( 'should re-render both components once each when one filter added', () => { - const spy = jest.fn(); - const SpiedComponent = () => { - spy(); - return
    Spied component
    ; - }; + it( 'should re-render both components once each when one filter added', async () => { + const SpiedComponent = jest.fn( () =>
    Spied component
    ); const EnhancedComponent = withFilters( hookName )( SpiedComponent ); const CombinedComponents = () => ( @@ -200,20 +191,23 @@ describe( 'withFilters', () => { ); const { container } = render( ); - spy.mockClear(); - addFilter( - hookName, - 'test/enhanced-component-spy-1', - ( FilteredComponent ) => () => - ( -
    - -
    - ) - ); - jest.runAllTimers(); - - expect( spy ).toHaveBeenCalledTimes( 2 ); + SpiedComponent.mockClear(); + + await act( () => { + addFilter( + hookName, + 'test/enhanced-component-spy-1', + ( FilteredComponent ) => () => + ( +
    + +
    + ) + ); + jest.runAllTimers(); + } ); + + expect( SpiedComponent ).toHaveBeenCalledTimes( 2 ); expect( container ).toMatchSnapshot(); } ); } ); diff --git a/packages/components/src/higher-order/with-focus-return/test/index.js b/packages/components/src/higher-order/with-focus-return/test/index.js index 2f5dea414c34b..b88e3cfd0bad0 100644 --- a/packages/components/src/higher-order/with-focus-return/test/index.js +++ b/packages/components/src/higher-order/with-focus-return/test/index.js @@ -88,7 +88,7 @@ describe( 'withFocusReturn()', () => { advanceTimers: jest.advanceTimersByTime, } ); - const { container, unmount } = render( , { + const { unmount } = render( , { container: document.body.appendChild( document.createElement( 'div' ) ), @@ -103,9 +103,6 @@ describe( 'withFocusReturn()', () => { // Should return to the activeElement saved with this component. unmount(); - render(
    , { - container, - } ); expect( activeElement ).toHaveFocus(); } ); } ); diff --git a/packages/components/src/mobile/bottom-sheet/cell.native.js b/packages/components/src/mobile/bottom-sheet/cell.native.js index 90757bcc1811e..9af6733e13840 100644 --- a/packages/components/src/mobile/bottom-sheet/cell.native.js +++ b/packages/components/src/mobile/bottom-sheet/cell.native.js @@ -58,7 +58,7 @@ class BottomSheetCell extends Component { AccessibilityInfo.isScreenReaderEnabled().then( ( isScreenReaderEnabled ) => { - if ( this.isCurrent ) { + if ( this.isCurrent && isScreenReaderEnabled ) { this.setState( { isScreenReaderEnabled } ); } } diff --git a/packages/components/src/mobile/link-settings/test/edit.native.js b/packages/components/src/mobile/link-settings/test/edit.native.js index 5ce1ae6a90fb3..cbc31a842e173 100644 --- a/packages/components/src/mobile/link-settings/test/edit.native.js +++ b/packages/components/src/mobile/link-settings/test/edit.native.js @@ -4,7 +4,7 @@ * External dependencies */ import Clipboard from '@react-native-clipboard/clipboard'; -import { fireEvent, initializeEditor, waitFor } from 'test/helpers'; +import { fireEvent, initializeEditor } from 'test/helpers'; /** * WordPress dependencies */ @@ -76,24 +76,18 @@ describe.each( [ Clipboard.getString.mockReturnValue( url ); // Act. - const block = await waitFor( () => - subject.getByLabelText( - type === 'core/image' ? /Image Block/ : /Button Block/ - ) + const [ block ] = await subject.findAllByLabelText( + type === 'core/image' ? /Image Block/ : /Button Block/ ); fireEvent.press( block ); fireEvent.press( block ); - fireEvent.press( - await waitFor( () => subject.getByLabelText( 'Open Settings' ) ) - ); + fireEvent.press( await subject.findByLabelText( 'Open Settings' ) ); // Assert. - const linkToField = await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' ? 'None' : 'Search or type URL' - }` - ) + const linkToField = await subject.findByLabelText( + `Link to, ${ + type === 'core/image' ? 'None' : 'Search or type URL' + }` ); expect( linkToField ).toBeTruthy(); } ); @@ -113,37 +107,29 @@ describe.each( [ Clipboard.getString.mockReturnValue( url ); // Act. - const block = await waitFor( () => - subject.getByLabelText( - type === 'core/image' ? /Image Block/ : /Button Block/ - ) + const [ block ] = await subject.findAllByLabelText( + type === 'core/image' ? /Image Block/ : /Button Block/ ); fireEvent.press( block ); fireEvent.press( block ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Open Settings' ) - ) + await subject.findByLabelText( 'Open Settings' ) ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' - ? 'None' - : 'Search or type URL' - }` - ) + await subject.findByLabelText( + `Link to, ${ + type === 'core/image' + ? 'None' + : 'Search or type URL' + }` ) ); if ( type === 'core/image' ) { fireEvent.press( - await waitFor( () => - subject.getByLabelText( /Custom URL/ ) - ) + await subject.findByLabelText( /Custom URL/ ) ); } - await waitFor( () => subject.getByLabelText( 'Apply' ) ); + await subject.findByLabelText( 'Apply' ); // Assert. expect( @@ -166,60 +152,46 @@ describe.each( [ Clipboard.getString.mockReturnValue( url ); // Act. - const block = await waitFor( () => - subject.getByLabelText( - type === 'core/image' ? /Image Block/ : /Button Block/ - ) + const [ block ] = await subject.findAllByLabelText( + type === 'core/image' ? /Image Block/ : /Button Block/ ); fireEvent.press( block ); fireEvent.press( block ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Open Settings' ) - ) + await subject.findByLabelText( 'Open Settings' ) ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' - ? 'None' - : 'Search or type URL' - }` - ) + await subject.findByLabelText( + `Link to, ${ + type === 'core/image' + ? 'None' + : 'Search or type URL' + }` ) ); if ( type === 'core/image' ) { fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Custom URL. Empty' ) - ) + await subject.findByLabelText( 'Custom URL. Empty' ) ); } fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Copy URL from the clipboard, ${ url }` - ) + await subject.findByLabelText( + `Copy URL from the clipboard, ${ url }` ) ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' ? 'Custom URL' : url - }` - ) + await subject.findByLabelText( + `Link to, ${ + type === 'core/image' ? 'Custom URL' : url + }` ) ); if ( type === 'core/image' ) { fireEvent.press( - await waitFor( () => - subject.getByLabelText( `Custom URL, ${ url }` ) - ) + await subject.findByLabelText( `Custom URL, ${ url }` ) ); } - await waitFor( () => subject.getByLabelText( 'Apply' ) ); + await subject.findByLabelText( 'Apply' ); // Assert. expect( @@ -245,51 +217,37 @@ describe.each( [ Clipboard.getString.mockReturnValue( url ); // Act. - const block = await waitFor( () => - subject.getByLabelText( - type === 'core/image' - ? /Image Block/ - : /Button Block/ - ) + const [ block ] = await subject.findAllByLabelText( + type === 'core/image' ? /Image Block/ : /Button Block/ ); fireEvent.press( block ); fireEvent.press( block ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Open Settings' ) - ) + await subject.findByLabelText( 'Open Settings' ) ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' - ? 'None' - : 'Search or type URL' - }` - ) + await subject.findByLabelText( + `Link to, ${ + type === 'core/image' + ? 'None' + : 'Search or type URL' + }` ) ); if ( type === 'core/image' ) { fireEvent.press( - await waitFor( () => - subject.getByLabelText( /Custom URL/ ) - ) + await subject.findByLabelText( /Custom URL/ ) ); } - await waitFor( () => - subject.getByLabelText( - `Copy URL from the clipboard, ${ url }` - ) + await subject.findByLabelText( + `Copy URL from the clipboard, ${ url }` ); // Assert. - const clipboardUrl = await waitFor( () => - subject.getByText( url ) - ); + const clipboardUrl = await subject.findByText( url ); expect( clipboardUrl ).toBeTruthy(); - const clipboardNote = await waitFor( () => - subject.getByText( __( 'From clipboard' ) ) + const clipboardNote = await subject.findByText( + __( 'From clipboard' ) ); expect( clipboardNote ).toBeTruthy(); } @@ -312,53 +270,39 @@ describe.each( [ Clipboard.getString.mockReturnValue( url ); // Act. - const block = await waitFor( () => - subject.getByLabelText( - type === 'core/image' - ? /Image Block/ - : /Button Block/ - ) + const [ block ] = await subject.findAllByLabelText( + type === 'core/image' ? /Image Block/ : /Button Block/ ); fireEvent.press( block ); fireEvent.press( block ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( 'Open Settings' ) - ) + await subject.findByLabelText( 'Open Settings' ) ); fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' - ? 'None' - : 'Search or type URL' - }` - ) + await subject.findByLabelText( + `Link to, ${ + type === 'core/image' + ? 'None' + : 'Search or type URL' + }` ) ); if ( type === 'core/image' ) { fireEvent.press( - await waitFor( () => - subject.getByLabelText( /Custom URL/ ) - ) + await subject.findByLabelText( /Custom URL/ ) ); } fireEvent.press( - await waitFor( () => - subject.getByLabelText( - `Copy URL from the clipboard, ${ url }` - ) + await subject.findByLabelText( + `Copy URL from the clipboard, ${ url }` ) ); // Assert. - const linkToField = await waitFor( () => - subject.getByLabelText( - `Link to, ${ - type === 'core/image' ? 'Custom URL' : url - }` - ) + const linkToField = await subject.findByLabelText( + `Link to, ${ + type === 'core/image' ? 'Custom URL' : url + }` ); expect( linkToField ).toBeTruthy(); } diff --git a/packages/components/src/number-control/test/index.tsx b/packages/components/src/number-control/test/index.tsx index 2eeef4c996ae6..ce794d3a227ff 100644 --- a/packages/components/src/number-control/test/index.tsx +++ b/packages/components/src/number-control/test/index.tsx @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen, waitFor } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** @@ -94,10 +94,7 @@ describe( 'NumberControl', () => { // After blur, value is clamped expect( input ).toHaveValue( 4 ); - // After the blur, the `onChange` callback fires asynchronously. - await waitFor( () => { - expect( onChangeSpy ).toHaveBeenCalledTimes( 3 ); - } ); + expect( onChangeSpy ).toHaveBeenCalledTimes( 3 ); // First call: clear the input expect( onChangeSpy ).toHaveBeenNthCalledWith( 1, '', true ); diff --git a/packages/components/src/popover/test/index.tsx b/packages/components/src/popover/test/index.tsx index b06886e52243e..ea39dcebdeb33 100644 --- a/packages/components/src/popover/test/index.tsx +++ b/packages/components/src/popover/test/index.tsx @@ -1,8 +1,8 @@ /** * External dependencies */ -import { render, screen } from '@testing-library/react'; -import type { CSSProperties } from 'react'; +import { act, render, screen } from '@testing-library/react'; +import type { CSSProperties, ReactElement } from 'react'; /** * WordPress dependencies @@ -91,22 +91,30 @@ const ALL_POSITIONS_TO_EXPECTED_PLACEMENTS: PositionToPlacementTuple[] = [ describe( 'Popover', () => { describe( 'Component', () => { + // Render UI and then wait for the `floating-ui` effects inside `Popover` to finish running + // See also: https://floating-ui.com/docs/react-dom#testing + async function renderAsync( ui: ReactElement ) { + const view = render( ui ); + await act( () => Promise.resolve() ); + return view; + } + describe( 'basic behavior', () => { - it( 'should render content', () => { - render( Hello ); + it( 'should render content', async () => { + await renderAsync( Hello ); expect( screen.getByText( 'Hello' ) ).toBeInTheDocument(); } ); - it( 'should forward additional props to portaled element', () => { - render( Hello ); + it( 'should forward additional props to portaled element', async () => { + await renderAsync( Hello ); expect( screen.getByRole( 'tooltip' ) ).toBeInTheDocument(); } ); } ); describe( 'anchor', () => { - it( 'should render correctly when anchor is provided', () => { + it( 'should render correctly when anchor is provided', async () => { const PopoverWithAnchor = ( args: PopoverProps ) => { // Use internal state instead of a ref to make sure that the component // re-renders when the popover's anchor updates. @@ -121,7 +129,7 @@ describe( 'Popover', () => { ); }; - render( + await renderAsync( Popover content ); @@ -132,16 +140,16 @@ describe( 'Popover', () => { } ); describe( 'focus behavior', () => { - it( 'should focus the popover by default when opened', () => { - render( Popover content ); + it( 'should focus the popover by default when opened', async () => { + await renderAsync( Popover content ); expect( screen.getByText( 'Popover content' ).parentElement ).toHaveFocus(); } ); - it( 'should allow focus-on-open behavior to be disabled', () => { - render( + it( 'should allow focus-on-open behavior to be disabled', async () => { + await renderAsync( Popover content ); diff --git a/packages/components/src/range-control/test/index.tsx b/packages/components/src/range-control/test/index.tsx index c3d6f15b246d4..0343b084daaa4 100644 --- a/packages/components/src/range-control/test/index.tsx +++ b/packages/components/src/range-control/test/index.tsx @@ -1,24 +1,19 @@ /** * External dependencies */ -import { fireEvent, render, screen } from '@testing-library/react'; +import { act, fireEvent, render, screen } from '@testing-library/react'; /** * Internal dependencies */ import RangeControl from '../'; -const getRangeInput = (): HTMLInputElement | null => - screen.getByRole( 'slider' ) as HTMLInputElement; -const getNumberInput = (): HTMLInputElement | null => - screen.getByRole( 'spinbutton' ) as HTMLInputElement; -const getResetButton = (): HTMLButtonElement | null => - screen.getByRole( 'button' ) as HTMLButtonElement; +const getRangeInput = (): HTMLInputElement => screen.getByRole( 'slider' ); +const getNumberInput = (): HTMLInputElement => screen.getByRole( 'spinbutton' ); +const getResetButton = (): HTMLButtonElement => screen.getByRole( 'button' ); -const fireChangeEvent = ( - input: HTMLInputElement | null, - value?: number | string -) => fireEvent.change( input as Element, { target: { value } } ); +const fireChangeEvent = ( input: HTMLInputElement, value?: number | string ) => + fireEvent.change( input, { target: { value } } ); describe( 'RangeControl', () => { describe( '#render()', () => { @@ -30,10 +25,10 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - rangeInput?.focus(); + act( () => rangeInput.focus() ); fireChangeEvent( rangeInput, '5' ); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '10' ); expect( onChange ).toHaveBeenCalledWith( 5 ); @@ -70,9 +65,9 @@ describe( 'RangeControl', () => { const numberInput = getNumberInput(); fireChangeEvent( numberInput, '10' ); - fireEvent.blur( numberInput as Element ); + fireEvent.blur( numberInput ); - expect( rangeInput?.value ).not.toBe( '10' ); + expect( rangeInput.value ).not.toBe( '10' ); } ); it( 'should not apply if new value is greater than maximum', () => { @@ -82,9 +77,9 @@ describe( 'RangeControl', () => { const numberInput = getNumberInput(); fireChangeEvent( numberInput, '21' ); - fireEvent.blur( numberInput as Element ); + fireEvent.blur( numberInput ); - expect( rangeInput?.value ).not.toBe( '21' ); + expect( rangeInput.value ).not.toBe( '21' ); } ); it( 'should not call onChange if new value is invalid', () => { @@ -95,7 +90,7 @@ describe( 'RangeControl', () => { const numberInput = getNumberInput(); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '25e' ); expect( onChange ).not.toHaveBeenCalled(); @@ -110,15 +105,15 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '-1.1' ); - expect( numberInput?.value ).toBe( '-1.1' ); - expect( rangeInput?.value ).toBe( '-1' ); + expect( numberInput.value ).toBe( '-1.1' ); + expect( rangeInput.value ).toBe( '-1' ); - fireEvent.blur( numberInput as Element ); + fireEvent.blur( numberInput ); expect( onChange ).toHaveBeenCalledWith( -1 ); - expect( numberInput?.value ).toBe( '-1' ); + expect( numberInput.value ).toBe( '-1' ); } ); it( 'should validate when provided a max or min of zero', () => { @@ -127,11 +122,11 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '1' ); - fireEvent.blur( numberInput as Element ); + fireEvent.blur( numberInput ); - expect( rangeInput?.value ).toBe( '0' ); + expect( rangeInput.value ).toBe( '0' ); } ); it( 'should validate when min and max are negative', () => { @@ -140,16 +135,16 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '-101' ); - expect( rangeInput?.value ).toBe( '-100' ); + expect( rangeInput.value ).toBe( '-100' ); fireChangeEvent( numberInput, '-49' ); - expect( rangeInput?.value ).toBe( '-50' ); + expect( rangeInput.value ).toBe( '-50' ); fireChangeEvent( numberInput, '-50' ); - expect( rangeInput?.value ).toBe( '-50' ); + expect( rangeInput.value ).toBe( '-50' ); } ); it( 'should take into account the step starting from min', () => { @@ -165,16 +160,16 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, '0.125' ); expect( onChange ).toHaveBeenCalledWith( 0.125 ); - expect( rangeInput?.value ).toBe( '0.125' ); + expect( rangeInput.value ).toBe( '0.125' ); fireChangeEvent( numberInput, '0.225' ); expect( onChange ).toHaveBeenCalledWith( 0.225 ); - expect( rangeInput?.value ).toBe( '0.225' ); + expect( rangeInput.value ).toBe( '0.225' ); } ); } ); @@ -184,7 +179,7 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); - expect( rangeInput?.value ).toBe( '5' ); + expect( rangeInput.value ).toBe( '5' ); } ); it( 'should render initialPosition if no value is provided', () => { @@ -192,7 +187,7 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); - expect( rangeInput?.value ).toBe( '50' ); + expect( rangeInput.value ).toBe( '50' ); } ); it( 'should render value instead of initialPosition is provided', () => { @@ -200,7 +195,7 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); - expect( rangeInput?.value ).toBe( '10' ); + expect( rangeInput.value ).toBe( '10' ); } ); it( 'should clamp initialPosition between min and max on first render, and on reset', () => { @@ -218,19 +213,19 @@ describe( 'RangeControl', () => { const resetButton = getResetButton(); // Value should be clamped on initial load - expect( numberInput?.value ).toBe( '100' ); - expect( rangeInput?.value ).toBe( '100' ); + expect( numberInput.value ).toBe( '100' ); + expect( rangeInput.value ).toBe( '100' ); fireChangeEvent( numberInput, '50' ); - expect( numberInput?.value ).toBe( '50' ); - expect( rangeInput?.value ).toBe( '50' ); + expect( numberInput.value ).toBe( '50' ); + expect( rangeInput.value ).toBe( '50' ); // Value should be clamped after resetting - fireEvent.click( resetButton as Element ); + fireEvent.click( resetButton ); - expect( numberInput?.value ).toBe( '100' ); - expect( rangeInput?.value ).toBe( '100' ); + expect( numberInput.value ).toBe( '100' ); + expect( rangeInput.value ).toBe( '100' ); } ); } ); @@ -257,8 +252,8 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - expect( rangeInput?.value ).toBe( '0' ); - expect( numberInput?.value ).toBe( '0' ); + expect( rangeInput.value ).toBe( '0' ); + expect( numberInput.value ).toBe( '0' ); } ); it( 'should update both field and range on change', () => { @@ -267,17 +262,17 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - rangeInput?.focus(); + act( () => rangeInput.focus() ); fireChangeEvent( rangeInput, 13 ); - expect( rangeInput?.value ).toBe( '13' ); - expect( numberInput?.value ).toBe( '13' ); + expect( rangeInput.value ).toBe( '13' ); + expect( numberInput.value ).toBe( '13' ); - numberInput?.focus(); + act( () => numberInput.focus() ); fireChangeEvent( numberInput, 7 ); - expect( rangeInput?.value ).toBe( '7' ); - expect( numberInput?.value ).toBe( '7' ); + expect( rangeInput.value ).toBe( '7' ); + expect( numberInput.value ).toBe( '7' ); } ); it( 'should reset input values if next value is removed', () => { @@ -287,12 +282,12 @@ describe( 'RangeControl', () => { const numberInput = getNumberInput(); fireChangeEvent( numberInput, '' ); - fireEvent.blur( numberInput as Element ); + fireEvent.blur( numberInput ); // Reset to 50. Median value of min: 0, max: 100. - expect( rangeInput?.value ).toBe( '50' ); + expect( rangeInput.value ).toBe( '50' ); // Input field should be blank. - expect( numberInput?.value ).toBe( '' ); + expect( numberInput.value ).toBe( '' ); } ); } ); @@ -312,10 +307,10 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - fireEvent.click( resetButton as Element ); + fireEvent.click( resetButton ); - expect( rangeInput?.value ).toBe( '33' ); - expect( numberInput?.value ).toBe( '33' ); + expect( rangeInput.value ).toBe( '33' ); + expect( numberInput.value ).toBe( '33' ); expect( spy ).toHaveBeenCalledWith( 33 ); } ); @@ -334,10 +329,10 @@ describe( 'RangeControl', () => { const rangeInput = getRangeInput(); const numberInput = getNumberInput(); - fireEvent.click( resetButton as Element ); + fireEvent.click( resetButton ); - expect( rangeInput?.value ).toBe( '50' ); - expect( numberInput?.value ).toBe( '' ); + expect( rangeInput.value ).toBe( '50' ); + expect( numberInput.value ).toBe( '' ); } ); } ); } ); diff --git a/packages/components/src/toggle-group-control/test/index.tsx b/packages/components/src/toggle-group-control/test/index.tsx index 28b3812fe8daf..841ca8fd6bcaf 100644 --- a/packages/components/src/toggle-group-control/test/index.tsx +++ b/packages/components/src/toggle-group-control/test/index.tsx @@ -18,6 +18,10 @@ import { ToggleGroupControlOptionIcon, } from '../index'; +function getWrappingPopoverElement( element: HTMLElement ) { + return element.closest( '.components-popover' ); +} + describe( 'ToggleGroupControl', () => { const options = ( <> @@ -51,6 +55,7 @@ describe( 'ToggleGroupControl', () => { expect( container ).toMatchSnapshot(); } ); + it( 'with icons', () => { const { container } = render( { await user.hover( firstRadio ); + const tooltip = await screen.findByText( + 'Click for Delicious Gnocchi' + ); + await waitFor( () => expect( - screen.getByText( 'Click for Delicious Gnocchi' ) - ).toBeVisible() + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() ); + + expect( tooltip ).toBeVisible(); } ); it( 'should not render tooltip', async () => { diff --git a/packages/components/src/tools-panel/test/index.js b/packages/components/src/tools-panel/test/index.js index 16e03c89bb276..0c41412395573 100644 --- a/packages/components/src/tools-panel/test/index.js +++ b/packages/components/src/tools-panel/test/index.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, screen, fireEvent, within } from '@testing-library/react'; +import { act } from 'react-test-renderer'; /** * Internal dependencies @@ -170,9 +171,10 @@ const getMenuButton = () => { * * @return {HTMLElement} The menuButton. */ -const openDropdownMenu = () => { +const openDropdownMenu = async () => { const menuButton = getMenuButton(); fireEvent.click( menuButton ); + await act( () => Promise.resolve() ); return menuButton; }; @@ -240,16 +242,16 @@ describe( 'ToolsPanel', () => { expect( menu ).not.toBeInTheDocument(); } ); - it( 'should render panel menu when at least one panel item', () => { + it( 'should render panel menu when at least one panel item', async () => { renderPanel(); - const menuButton = openDropdownMenu(); + const menuButton = await openDropdownMenu(); expect( menuButton ).toBeInTheDocument(); } ); it( 'should render reset all item in menu', async () => { renderPanel(); - openDropdownMenu(); + await openDropdownMenu(); const resetAllItem = await screen.findByRole( 'menuitem' ); @@ -258,7 +260,7 @@ describe( 'ToolsPanel', () => { it( 'should render panel menu items correctly', async () => { renderPanel(); - openDropdownMenu(); + await openDropdownMenu(); const menuItems = await screen.findAllByRole( 'menuitemcheckbox' ); @@ -355,7 +357,7 @@ describe( 'ToolsPanel', () => { ); - openDropdownMenu(); + await openDropdownMenu(); const menuGroups = screen.getAllByRole( 'group' ); @@ -419,7 +421,7 @@ describe( 'ToolsPanel', () => { let linkedItem = screen.queryByText( 'Linked control' ); expect( linkedItem ).not.toBeInTheDocument(); - openDropdownMenu(); + await openDropdownMenu(); // The linked control should initially appear in the optional controls // menu group. There should be three menu groups: default controls, @@ -503,7 +505,7 @@ describe( 'ToolsPanel', () => { // The conditional control should not yet appear in the default controls // menu group. - openDropdownMenu(); + await openDropdownMenu(); let menuGroups = screen.getAllByRole( 'group' ); let defaultItem = within( menuGroups[ 0 ] ).queryByText( 'Conditional' @@ -735,7 +737,7 @@ describe( 'ToolsPanel', () => { it( 'should render grouped items within the menu', async () => { renderGroupedItemsInPanel(); - openDropdownMenu(); + await openDropdownMenu(); const defaultItem = screen.getByText( 'Nested Control 1' ); const defaultMenuItem = screen.getByRole( 'menuitem', { @@ -771,9 +773,9 @@ describe( 'ToolsPanel', () => { expect( altItem ).not.toBeInTheDocument(); } ); - it( 'should render wrapped items within the menu', () => { + it( 'should render wrapped items within the menu', async () => { renderWrappedItemInPanel(); - openDropdownMenu(); + await openDropdownMenu(); const defaultItem = screen.getByText( 'Nested Control 1' ); const defaultMenuItem = screen.getByRole( 'menuitem', { diff --git a/packages/components/src/tooltip/test/index.js b/packages/components/src/tooltip/test/index.js index 9742e9ad14f98..9e827c6172b15 100644 --- a/packages/components/src/tooltip/test/index.js +++ b/packages/components/src/tooltip/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen, act } from '@testing-library/react'; +import { render, screen, act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** @@ -13,6 +13,10 @@ import Tooltip from '../'; */ import { TOOLTIP_DELAY } from '../index.js'; +function getWrappingPopoverElement( element ) { + return element.closest( '.components-popover' ); +} + describe( 'Tooltip', () => { describe( '#render()', () => { it( 'should not render the tooltip if multiple children are passed', () => { @@ -24,7 +28,7 @@ describe( 'Tooltip', () => { ); const button = screen.getByText( 'Button 1' ); - button.focus(); + act( () => button.focus() ); expect( screen.queryByText( 'Help text' ) ).not.toBeInTheDocument(); } ); @@ -41,7 +45,7 @@ describe( 'Tooltip', () => { expect( screen.queryByText( 'Help text' ) ).not.toBeInTheDocument(); } ); - it( 'should render children with additional tooltip when focused', () => { + it( 'should render children with additional tooltip when focused', async () => { const mockOnFocus = jest.fn(); render( @@ -56,15 +60,23 @@ describe( 'Tooltip', () => { // Before focus, the tooltip is not shown. expect( screen.queryByText( 'Help text' ) ).not.toBeInTheDocument(); - button.focus(); + act( () => button.focus() ); // Tooltip is shown after focusing the anchor. - expect( screen.getByText( 'Help text' ) ).toBeVisible(); + const tooltip = screen.getByText( 'Help text' ); + expect( tooltip ).toBeVisible(); expect( mockOnFocus ).toHaveBeenCalledWith( expect.objectContaining( { type: 'focus', } ) ); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); it( 'should render children with additional tooltip when hovered', async () => { @@ -89,7 +101,15 @@ describe( 'Tooltip', () => { act( () => jest.advanceTimersByTime( TOOLTIP_DELAY ) ); // Tooltip shows after the delay - expect( screen.getByText( 'Help text' ) ).toBeVisible(); + const tooltip = screen.getByText( 'Help text' ); + expect( tooltip ).toBeVisible(); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); it( 'should not show tooltip on focus as result of mouse click', async () => { @@ -161,9 +181,17 @@ describe( 'Tooltip', () => { act( () => jest.advanceTimersByTime( TEST_DELAY - TOOLTIP_DELAY ) ); // Tooltip shows after TEST_DELAY time - expect( screen.getByText( 'Help text' ) ).toBeVisible(); + const tooltip = screen.getByText( 'Help text' ); + expect( tooltip ).toBeVisible(); expect( mockOnFocus ).not.toHaveBeenCalled(); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); it( 'should show tooltip when an element is disabled', async () => { @@ -199,9 +227,15 @@ describe( 'Tooltip', () => { act( () => jest.advanceTimersByTime( TOOLTIP_DELAY ) ); // Tooltip shows after the delay - expect( - screen.getByText( 'Show helpful text here' ) - ).toBeVisible(); + const tooltip = screen.getByText( 'Show helpful text here' ); + expect( tooltip ).toBeVisible(); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); it( 'should not emit events back to children when they are disabled', async () => { @@ -292,7 +326,15 @@ describe( 'Tooltip', () => { const button = screen.getByRole( 'button', { name: 'Hover Me!' } ); await user.hover( button ); - expect( await screen.findByText( 'shortcut text' ) ).toBeVisible(); + const tooltip = await screen.findByText( 'shortcut text' ); + expect( tooltip ).toBeVisible(); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); it( 'should render the shortcut display text and aria-label when an object is passed as the shortcut with the correct properties', async () => { @@ -315,9 +357,15 @@ describe( 'Tooltip', () => { const button = screen.getByRole( 'button', { name: 'Hover Me!' } ); await user.hover( button ); - expect( - await screen.findByLabelText( 'shortcut label' ) - ).toHaveTextContent( 'shortcut text' ); + const tooltip = await screen.findByLabelText( 'shortcut label' ); + expect( tooltip ).toHaveTextContent( 'shortcut text' ); + + // Wait for the tooltip element to be positioned (aligned with the button) + await waitFor( () => + expect( + getWrappingPopoverElement( tooltip ) + ).toBePositionedPopover() + ); } ); } ); } ); diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index d362e7a6e5ce3..e1b2acac87e0b 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 5.20.0 (2022-11-16) ## 5.19.0 (2022-11-02) diff --git a/packages/compose/package.json b/packages/compose/package.json index 75933796a395f..8a9392833af43 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -43,7 +43,7 @@ "use-memo-one": "^1.1.1" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/core-data/CHANGELOG.md b/packages/core-data/CHANGELOG.md index 932645f0a4e4c..5c61bc98bc0c8 100644 --- a/packages/core-data/CHANGELOG.md +++ b/packages/core-data/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 5.5.0 (2022-11-16) ## 5.4.0 (2022-11-02) diff --git a/packages/core-data/package.json b/packages/core-data/package.json index f4f8c6dc35183..867c0e91d8161 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -49,7 +49,7 @@ "uuid": "^8.3.0" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/customize-widgets/CHANGELOG.md b/packages/customize-widgets/CHANGELOG.md index e637b6f50449e..b2919910c2f34 100644 --- a/packages/customize-widgets/CHANGELOG.md +++ b/packages/customize-widgets/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.19.0 (2022-11-16) ## 3.18.0 (2022-11-02) diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index 6ddbccc02e275..fe6d3a03e423b 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -47,8 +47,8 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index c8f930fdda720..87bb4a148e77f 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -31,9 +31,6 @@ "@wordpress/data": "file:../data", "@wordpress/deprecated": "file:../deprecated" }, - "peerDependencies": { - "react": "^17.0.0" - }, "publishConfig": { "access": "public" } diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index cba47ff427580..380537c325eca 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 7.6.0 (2022-11-16) ## 7.5.0 (2022-11-02) diff --git a/packages/data/package.json b/packages/data/package.json index 8b14c1f75a6c7..289211e770710 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -44,7 +44,7 @@ "use-memo-one": "^1.1.1" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/data/src/components/use-select/test/index.js b/packages/data/src/components/use-select/test/index.js index 511e05c3829dc..6dccfd74b741f 100644 --- a/packages/data/src/components/use-select/test/index.js +++ b/packages/data/src/components/use-select/test/index.js @@ -118,7 +118,8 @@ describe( 'useSelect', () => { expect( screen.getByRole( 'status' ) ).toHaveTextContent( 'bar' ); } ); - it( 'avoid calling nested listener after unmounted', async () => { + // TODO: this might be impossible to pull off in React 18 without `useSyncExternalStore` + it.skip( 'avoid calling nested listener after unmounted', async () => { registry.registerStore( 'toggler', { reducer: ( state = false, action ) => action.type === 'TOGGLE' ? ! state : state, @@ -593,7 +594,7 @@ describe( 'useSelect', () => { 'count2' ); - screen.getByText( 'Toggle' ).click(); + act( () => screen.getByText( 'Toggle' ).click() ); expect( selectCount1 ).toHaveBeenCalledTimes( 2 ); expect( selectCount2 ).toHaveBeenCalledTimes( 2 ); diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index c6543ac2c332a..ae152b221078d 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 5.6.0 (2022-11-16) ## 5.5.0 (2022-11-02) diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index f7d93448d2bbb..95badf1116e2b 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -40,8 +40,8 @@ "peerDependencies": { "jest": ">=27", "puppeteer-core": ">=11", - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md index 4546c0f6b8c88..455b04363cb2d 100644 --- a/packages/edit-post/CHANGELOG.md +++ b/packages/edit-post/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 6.19.0 (2022-11-16) ### Enhancement diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index 7450114a0b265..3414e958344d2 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -58,8 +58,8 @@ "rememo": "^4.0.0" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/edit-post/src/components/visual-editor/test/index.native.js b/packages/edit-post/src/components/visual-editor/test/index.native.js index 5c527d22bc5b3..af07e4309ab69 100644 --- a/packages/edit-post/src/components/visual-editor/test/index.native.js +++ b/packages/edit-post/src/components/visual-editor/test/index.native.js @@ -38,7 +38,9 @@ describe( 'when title is focused', () => { } ); // Focus first block - fireEvent.press( screen.getByLabelText( /Paragraph Block. Row 1/ ) ); + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 1/ )[ 0 ] + ); // Focus title fireEvent( @@ -50,12 +52,15 @@ describe( 'when title is focused', () => { fireEvent.press( screen.getByLabelText( 'Add block' ) ); fireEvent.press( screen.getByText( 'Heading' ) ); - expect( screen.getByLabelText( /Heading Block. Row 1/ ) ).toBeDefined(); expect( - screen.getByLabelText( /Paragraph Block. Row 2/ ) + screen.getAllByLabelText( /Heading Block. Row 1/ )[ 0 ] + ).toBeDefined(); + expect( + screen.getAllByLabelText( /Paragraph Block. Row 2/ )[ 0 ] ).toBeDefined(); + expect( - screen.getByLabelText( /Paragraph Block. Row 3/ ) + screen.getAllByLabelText( /Paragraph Block. Row 3/ )[ 0 ] ).toBeDefined(); } ); } ); @@ -67,7 +72,9 @@ describe( 'when title is no longer focused', () => { } ); // Focus first block - fireEvent.press( screen.getByLabelText( /Paragraph Block. Row 1/ ) ); + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 1/ )[ 0 ] + ); // Focus title fireEvent( @@ -76,18 +83,22 @@ describe( 'when title is no longer focused', () => { ); // Focus last block - fireEvent.press( screen.getByLabelText( /Paragraph Block. Row 2/ ) ); + fireEvent.press( + screen.getAllByLabelText( /Paragraph Block. Row 2/ )[ 0 ] + ); // Add new Heading block fireEvent.press( screen.getByLabelText( 'Add block' ) ); fireEvent.press( screen.getByText( 'Heading' ) ); expect( - screen.getByLabelText( /Paragraph Block. Row 1/ ) + screen.getAllByLabelText( /Paragraph Block. Row 1/ )[ 0 ] + ).toBeDefined(); + expect( + screen.getAllByLabelText( /Paragraph Block. Row 2/ )[ 0 ] ).toBeDefined(); expect( - screen.getByLabelText( /Paragraph Block. Row 2/ ) + screen.getAllByLabelText( /Heading Block. Row 3/ )[ 0 ] ).toBeDefined(); - expect( screen.getByLabelText( /Heading Block. Row 3/ ) ).toBeDefined(); } ); } ); diff --git a/packages/edit-post/src/editor.native.js b/packages/edit-post/src/editor.native.js index 51e0ed6764db0..6b80eeacf9a8e 100644 --- a/packages/edit-post/src/editor.native.js +++ b/packages/edit-post/src/editor.native.js @@ -4,6 +4,7 @@ import memize from 'memize'; import { map } from 'lodash'; import { I18nManager } from 'react-native'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; /** * WordPress dependencies @@ -173,17 +174,19 @@ class Editor extends Component { }; return ( - - - - - + + + + + + + ); } } diff --git a/packages/edit-site/CHANGELOG.md b/packages/edit-site/CHANGELOG.md index 9e2d49b48ba4c..83dcb848d66b3 100644 --- a/packages/edit-site/CHANGELOG.md +++ b/packages/edit-site/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.19.0 (2022-11-16) ## 4.18.0 (2022-11-02) diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index 467bd3513e406..36b56e6d09b4c 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -63,8 +63,8 @@ "rememo": "^4.0.0" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md index 7a41614a5bec6..245d0b5e199c0 100644 --- a/packages/edit-widgets/CHANGELOG.md +++ b/packages/edit-widgets/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.19.0 (2022-11-16) ## 4.18.0 (2022-11-02) diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index ccfe78c827b3f..4bb6e138f1a27 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -54,8 +54,8 @@ "classnames": "^2.3.1" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index b907623733063..2a306272ebaa6 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 12.21.0 (2022-11-16) ## 12.20.0 (2022-11-02) diff --git a/packages/editor/package.json b/packages/editor/package.json index ca46a089a976f..9c4cb3d12138b 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -68,8 +68,8 @@ "remove-accents": "^0.4.2" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/element/CHANGELOG.md b/packages/element/CHANGELOG.md index 2aae461a05a02..efb51cc2dca06 100644 --- a/packages/element/CHANGELOG.md +++ b/packages/element/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.20.0 (2022-11-16) ## 4.19.0 (2022-11-02) diff --git a/packages/element/package.json b/packages/element/package.json index 6cae99b0bfe71..308d90ec5b7c5 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -29,13 +29,13 @@ "sideEffects": false, "dependencies": { "@babel/runtime": "^7.16.0", - "@types/react": "^17.0.37", - "@types/react-dom": "^17.0.11", + "@types/react": "^18.0.21", + "@types/react-dom": "^18.0.6", "@wordpress/escape-html": "file:../escape-html", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "publishConfig": { "access": "public" diff --git a/packages/format-library/CHANGELOG.md b/packages/format-library/CHANGELOG.md index 4de7576cb343b..d3c71c8187a7e 100644 --- a/packages/format-library/CHANGELOG.md +++ b/packages/format-library/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/format-library/package.json b/packages/format-library/package.json index ae31ae3576e3d..5f1f1bb6a87a1 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -39,8 +39,8 @@ "@wordpress/url": "file:../url" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/format-library/src/text-color/test/index.native.js b/packages/format-library/src/text-color/test/index.native.js index 254c1bae990ee..4b08bf16baf2b 100644 --- a/packages/format-library/src/text-color/test/index.native.js +++ b/packages/format-library/src/text-color/test/index.native.js @@ -32,60 +32,55 @@ afterAll( () => { describe( 'Text color', () => { it( 'shows the text color formatting button in the toolbar', async () => { - const { getByLabelText } = await initializeEditor(); + const screen = await initializeEditor(); // Wait for the editor placeholder - const paragraphPlaceholder = await waitFor( () => - getByLabelText( 'Add paragraph block' ) + const paragraphPlaceholder = await screen.findByLabelText( + 'Add paragraph block' ); expect( paragraphPlaceholder ).toBeDefined(); fireEvent.press( paragraphPlaceholder ); // Wait for the block to be created - const paragraphBlock = await waitFor( () => - getByLabelText( /Paragraph Block\. Row 1/ ) + const [ paragraphBlock ] = await screen.findAllByLabelText( + /Paragraph Block\. Row 1/ ); expect( paragraphBlock ).toBeDefined(); // Look for the highlight text color button - const textColorButton = await waitFor( () => - getByLabelText( 'Text color' ) - ); + const textColorButton = await screen.findByLabelText( 'Text color' ); expect( textColorButton ).toBeDefined(); } ); it( 'allows toggling the highlight color feature to type new text', async () => { - const { getByLabelText, getByTestId, getByA11yHint } = - await initializeEditor(); + const screen = await initializeEditor(); // Wait for the editor placeholder - const paragraphPlaceholder = await waitFor( () => - getByLabelText( 'Add paragraph block' ) + const paragraphPlaceholder = await screen.findByLabelText( + 'Add paragraph block' ); expect( paragraphPlaceholder ).toBeDefined(); fireEvent.press( paragraphPlaceholder ); // Wait for the block to be created - const paragraphBlock = await waitFor( () => - getByLabelText( /Paragraph Block\. Row 1/ ) + const [ paragraphBlock ] = await screen.findAllByLabelText( + /Paragraph Block\. Row 1/ ); expect( paragraphBlock ).toBeDefined(); // Look for the highlight text color button - const textColorButton = await waitFor( () => - getByLabelText( 'Text color' ) - ); + const textColorButton = await screen.findByLabelText( 'Text color' ); expect( textColorButton ).toBeDefined(); fireEvent.press( textColorButton ); // Wait for Inline color modal to be visible - const inlineTextColorModal = getByTestId( 'inline-text-color-modal' ); + const inlineTextColorModal = screen.getByTestId( + 'inline-text-color-modal' + ); await waitFor( () => inlineTextColorModal.props.isVisible ); // Look for the pink color button - const pinkColorButton = await waitFor( () => - getByA11yHint( COLOR_PINK ) - ); + const pinkColorButton = await screen.findByA11yHint( COLOR_PINK ); expect( pinkColorButton ).toBeDefined(); fireEvent.press( pinkColorButton ); @@ -93,29 +88,24 @@ describe( 'Text color', () => { } ); it( 'allows toggling the highlight color feature to selected text', async () => { - const { - getByLabelText, - getByTestId, - getByPlaceholderText, - getByA11yHint, - } = await initializeEditor(); + const screen = await initializeEditor(); const text = 'Hello this is a test'; // Wait for the editor placeholder - const paragraphPlaceholder = await waitFor( () => - getByLabelText( 'Add paragraph block' ) + const paragraphPlaceholder = await screen.findByLabelText( + 'Add paragraph block' ); expect( paragraphPlaceholder ).toBeDefined(); fireEvent.press( paragraphPlaceholder ); // Wait for the block to be created - const paragraphBlock = await waitFor( () => - getByLabelText( /Paragraph Block\. Row 1/ ) + const [ paragraphBlock ] = await screen.findAllByLabelText( + /Paragraph Block\. Row 1/ ); expect( paragraphBlock ).toBeDefined(); // Update TextInput value - const paragraphText = getByPlaceholderText( 'Start writing…' ); + const paragraphText = screen.getByPlaceholderText( 'Start writing…' ); fireEvent( paragraphText, 'onSelectionChange', 0, text.length, text, { nativeEvent: { eventCount: 1, @@ -125,20 +115,18 @@ describe( 'Text color', () => { } ); // Look for the highlight text color button - const textColorButton = await waitFor( () => - getByLabelText( 'Text color' ) - ); + const textColorButton = await screen.findByLabelText( 'Text color' ); expect( textColorButton ).toBeDefined(); fireEvent.press( textColorButton ); // Wait for Inline color modal to be visible - const inlineTextColorModal = getByTestId( 'inline-text-color-modal' ); + const inlineTextColorModal = screen.getByTestId( + 'inline-text-color-modal' + ); await waitFor( () => inlineTextColorModal.props.isVisible ); // Look for the pink color button - const pinkColorButton = await waitFor( () => - getByA11yHint( COLOR_PINK ) - ); + const pinkColorButton = await screen.findByA11yHint( COLOR_PINK ); expect( pinkColorButton ).toBeDefined(); fireEvent.press( pinkColorButton ); @@ -146,13 +134,13 @@ describe( 'Text color', () => { } ); it( 'creates a paragraph block with the text color format', async () => { - const { getByLabelText } = await initializeEditor( { + const screen = await initializeEditor( { initialHtml: TEXT_WITH_COLOR, } ); // Wait for the block to be created - const paragraphBlock = await waitFor( () => - getByLabelText( /Paragraph Block\. Row 1/ ) + const [ paragraphBlock ] = await screen.findAllByLabelText( + /Paragraph Block\. Row 1/ ); expect( paragraphBlock ).toBeDefined(); diff --git a/packages/interface/CHANGELOG.md b/packages/interface/CHANGELOG.md index 89b0df2439f95..110b5d434914d 100644 --- a/packages/interface/CHANGELOG.md +++ b/packages/interface/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.21.0 (2022-11-16) ## 4.20.0 (2022-11-02) diff --git a/packages/interface/package.json b/packages/interface/package.json index 5bafbab97f038..156640fd5d984 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -46,8 +46,8 @@ "classnames": "^2.3.1" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-preset-default/package.json b/packages/jest-preset-default/package.json index d6b8e528fe00b..f55c2351f2e5a 100644 --- a/packages/jest-preset-default/package.json +++ b/packages/jest-preset-default/package.json @@ -35,9 +35,7 @@ }, "peerDependencies": { "@babel/core": ">=7", - "jest": ">=27", - "react": ">=17", - "react-dom": ">=17" + "jest": ">=27" }, "publishConfig": { "access": "public" diff --git a/packages/keyboard-shortcuts/CHANGELOG.md b/packages/keyboard-shortcuts/CHANGELOG.md index 93c13e8d2dab8..034195ed83c5c 100644 --- a/packages/keyboard-shortcuts/CHANGELOG.md +++ b/packages/keyboard-shortcuts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json index bf82f22074aa9..23423af67ae04 100644 --- a/packages/keyboard-shortcuts/package.json +++ b/packages/keyboard-shortcuts/package.json @@ -32,7 +32,7 @@ "rememo": "^4.0.0" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/list-reusable-blocks/CHANGELOG.md b/packages/list-reusable-blocks/CHANGELOG.md index 547392007a5c0..ac46a2a34d786 100644 --- a/packages/list-reusable-blocks/CHANGELOG.md +++ b/packages/list-reusable-blocks/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json index e62197d008bdc..e10fcbc2e1772 100644 --- a/packages/list-reusable-blocks/package.json +++ b/packages/list-reusable-blocks/package.json @@ -34,8 +34,8 @@ "change-case": "^4.1.2" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/notices/package.json b/packages/notices/package.json index 492a94a1a2a41..1100b8ce9c6df 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -29,9 +29,6 @@ "@wordpress/a11y": "file:../a11y", "@wordpress/data": "file:../data" }, - "peerDependencies": { - "react": "^17.0.0" - }, "publishConfig": { "access": "public" } diff --git a/packages/nux/CHANGELOG.md b/packages/nux/CHANGELOG.md index 235a32022281d..edbf4c88a21f0 100644 --- a/packages/nux/CHANGELOG.md +++ b/packages/nux/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 5.20.0 (2022-11-16) ## 5.19.0 (2022-11-02) diff --git a/packages/nux/package.json b/packages/nux/package.json index 311a46b557185..9089f865e729d 100644 --- a/packages/nux/package.json +++ b/packages/nux/package.json @@ -41,8 +41,8 @@ "rememo": "^4.0.0" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap b/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap index 03b9ce1ae4baa..7d87549eac0aa 100644 --- a/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap +++ b/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap @@ -5,11 +5,12 @@ exports[`DotTip should render correctly 1`] = ` aria-label="Editor tips" class="components-popover nux-dot-tip" role="dialog" - style="position: absolute; opacity: 0; transform: translateX(-2em) scale(0) translateZ(0); transform-origin: 0% 50% 0;" + style="position: absolute; opacity: 0; transform: translateX(-2em) scale(0) translateZ(0); transform-origin: 0% 50% 0; left: 0px; top: 0px;" tabindex="-1" >

    It looks like you’re writing a letter. Would you like help? diff --git a/packages/nux/src/components/dot-tip/test/index.js b/packages/nux/src/components/dot-tip/test/index.js index bde2b1ab2424b..7917b044fc3e2 100644 --- a/packages/nux/src/components/dot-tip/test/index.js +++ b/packages/nux/src/components/dot-tip/test/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { render, screen } from '@testing-library/react'; +import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; /** @@ -12,23 +12,27 @@ import { DotTip } from '..'; const noop = () => {}; describe( 'DotTip', () => { - it( 'should not render anything if invisible', () => { + it( 'should not render anything if invisible', async () => { render( It looks like you’re writing a letter. Would you like help? ); + await act( () => Promise.resolve() ); + expect( screen.queryByRole( 'dialog' ) ).not.toBeInTheDocument(); } ); - it( 'should render correctly', () => { + it( 'should render correctly', async () => { render( It looks like you’re writing a letter. Would you like help? ); + await act( () => Promise.resolve() ); + expect( screen.getByRole( 'dialog' ) ).toMatchSnapshot(); } ); @@ -44,6 +48,8 @@ describe( 'DotTip', () => { ); + await act( () => Promise.resolve() ); + await user.click( screen.getByRole( 'button', { name: 'Got it' } ) ); expect( onDismiss ).toHaveBeenCalled(); @@ -61,6 +67,8 @@ describe( 'DotTip', () => { ); + await act( () => Promise.resolve() ); + await user.click( screen.getByRole( 'button', { name: 'Disable tips' } ) ); diff --git a/packages/plugins/CHANGELOG.md b/packages/plugins/CHANGELOG.md index f21f3a0701994..ecd39ce32b67c 100644 --- a/packages/plugins/CHANGELOG.md +++ b/packages/plugins/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.20.0 (2022-11-16) ## 4.19.0 (2022-11-02) diff --git a/packages/plugins/package.json b/packages/plugins/package.json index a6ad25e560dab..1de11cdf9f45a 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -33,7 +33,7 @@ "memize": "^1.1.0" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/preferences/CHANGELOG.md b/packages/preferences/CHANGELOG.md index 32b03240f1b20..450f04af9d7cf 100644 --- a/packages/preferences/CHANGELOG.md +++ b/packages/preferences/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 2.14.0 (2022-11-16) ## 2.13.0 (2022-11-02) diff --git a/packages/preferences/package.json b/packages/preferences/package.json index 6ae2f3da2e30a..452aee12a77bf 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -38,8 +38,8 @@ "classnames": "^2.3.1" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/react-native-aztec/android/build.gradle b/packages/react-native-aztec/android/build.gradle index c99fd0e4ca417..b72f14a1afd7f 100644 --- a/packages/react-native-aztec/android/build.gradle +++ b/packages/react-native-aztec/android/build.gradle @@ -73,10 +73,15 @@ repositories { includeGroup "org.wordpress.aztec" } } - maven { url "https://a8c-libs.s3.amazonaws.com/android/hermes-mirror" } maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" } google() - mavenCentral() + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } } dependencies { diff --git a/packages/react-native-bridge/android/react-native-bridge/build.gradle b/packages/react-native-bridge/android/react-native-bridge/build.gradle index d0e5484329da2..fff4afa5da279 100644 --- a/packages/react-native-bridge/android/react-native-bridge/build.gradle +++ b/packages/react-native-bridge/android/react-native-bridge/build.gradle @@ -45,10 +45,15 @@ android { repositories { maven { url "https://a8c-libs.s3.amazonaws.com/android" } - maven { url "https://a8c-libs.s3.amazonaws.com/android/hermes-mirror" } maven { url "https://jitpack.io" } google() - mavenCentral() + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } } dependencies { @@ -75,7 +80,6 @@ dependencies { exclude group: 'com.github.wordpress-mobile', module: 'react-native-reanimated' }) - // Published by `wordpress-mobile/react-native-libraries-publisher` // See the documentation for this value in `build.gradle.kts` of `wordpress-mobile/react-native-libraries-publisher` def reactNativeLibrariesPublisherVersion = "v1" @@ -89,7 +93,9 @@ dependencies { implementation "$reactNativeLibrariesGroupId:react-native-clipboard:${extractPackageVersion(packageJson, '@react-native-clipboard/clipboard', 'dependencies')}" implementation "$reactNativeLibrariesGroupId:react-native-fast-image:${extractPackageVersion(packageJson, 'react-native-fast-image', 'dependencies')}" - runtimeOnly "org.wordpress-mobile:hermes-release-mirror:$rnVersion" + runtimeOnly("com.facebook.react:hermes-engine:$rnVersion", { + exclude group:'com.facebook.fbjni' + }) if (willPublishReactNativeBridgeBinary) { implementation "org.wordpress-mobile.gutenberg-mobile:react-native-aztec:$reactNativeAztecVersion" diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java index 74236bb49bcd8..e2a0f2dffcf62 100644 --- a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java +++ b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java @@ -27,7 +27,6 @@ import com.facebook.react.ReactPackage; import com.facebook.react.ReactRootView; import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.JSIModulePackage; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; @@ -45,9 +44,7 @@ import com.reactnativecommunity.slider.ReactSliderPackage; import org.linusu.RNGetRandomValuesPackage; import com.reactnativecommunity.webview.RNCWebViewPackage; -import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; import com.swmansion.gesturehandler.RNGestureHandlerPackage; -import com.swmansion.reanimated.ReanimatedJSIModulePackage; import com.swmansion.reanimated.ReanimatedPackage; import com.swmansion.rnscreens.RNScreensPackage; import com.th3rdwave.safeareacontext.SafeAreaContextPackage; @@ -590,12 +587,6 @@ public ReactInstanceManager getReactInstanceManager(ReactApplicationContext reac mRnReactNativeGutenbergBridgePackage); } - protected JSIModulePackage getJSIModulePackage() { - // In the future, once we support more JSI modules, we would need to provide our own JSIModulePackage and - // include Reanimated. - return new ReanimatedJSIModulePackage(); - } - private MainPackageConfig getMainPackageConfig(ImagePipelineConfig imagePipelineConfig) { return new MainPackageConfig.Builder().setFrescoConfig(imagePipelineConfig).build(); } @@ -615,7 +606,7 @@ public void onCreateView(Context initContext, mIsDarkMode = gutenbergProps.isDarkMode(); mExceptionLogger = exceptionLogger; mBreadcrumbLogger = breadcrumbLogger; - mReactRootView = new RNGestureHandlerEnabledRootView(new MutableContextWrapper(initContext)); + mReactRootView = new ReactRootView(new MutableContextWrapper(initContext)); mReactRootView.setBackgroundColor(colorBackground); ReactInstanceManagerBuilder builder = @@ -625,7 +616,6 @@ public void onCreateView(Context initContext, .addPackages(getPackages()) .setUseDeveloperSupport(isDebug) .setJavaScriptExecutorFactory(new HermesExecutorFactory()) - .setJSIModulesPackage(getJSIModulePackage()) .setInitialLifecycleState(LifecycleState.BEFORE_CREATE); if (BuildConfig.SHOULD_ATTACH_JS_BUNDLE) { builder.setBundleAssetName("index.android.bundle"); diff --git a/packages/react-native-bridge/ios/Gutenberg.swift b/packages/react-native-bridge/ios/Gutenberg.swift index da327fb11ef7e..f676624c8f71c 100644 --- a/packages/react-native-bridge/ios/Gutenberg.swift +++ b/packages/react-native-bridge/ios/Gutenberg.swift @@ -256,7 +256,11 @@ extension Gutenberg: RCTBridgeDelegate { return Bundle.main.url(forResource: "main", withExtension: "jsbundle") } #endif - return RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index", fallbackResource: "") + + guard let localBundle = RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index", fallbackExtension: "") else { + return Bundle.main.url(forResource: "main", withExtension: "jsbundle") + } + return localBundle } public func extraModules(for bridge: RCTBridge!) -> [RCTBridgeModule]! { diff --git a/packages/react-native-editor/.bundle/config b/packages/react-native-editor/.bundle/config new file mode 100644 index 0000000000000..d137d242ed742 --- /dev/null +++ b/packages/react-native-editor/.bundle/config @@ -0,0 +1,2 @@ +BUNDLE_PATH: "vendor/bundle" +BUNDLE_FORCE_RUBY_PLATFORM: 1 \ No newline at end of file diff --git a/packages/react-native-editor/.gitignore b/packages/react-native-editor/.gitignore index ff41241cdc867..516754e3ff8be 100644 --- a/packages/react-native-editor/.gitignore +++ b/packages/react-native-editor/.gitignore @@ -61,6 +61,7 @@ xcuserdata *.moved-aside DerivedData *.xcuserstatee +ios/.xcode.env.local # Android/IntelliJ # @@ -89,9 +90,10 @@ buck-out/ # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/ -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output # Bundle artifact *.jsbundle @@ -115,7 +117,8 @@ bin/wp-cli.phar # Report generated from jest-junit /junit.xml -# Cocoapods +# Ruby / CocoaPods ios/Pods ios/vendor +/vendor/bundle/ diff --git a/packages/react-native-editor/android/app/build.gradle b/packages/react-native-editor/android/app/build.gradle index fa77522f3aee2..e9a2aca0016f5 100644 --- a/packages/react-native-editor/android/app/build.gradle +++ b/packages/react-native-editor/android/app/build.gradle @@ -103,16 +103,19 @@ def enableProguardInReleaseBuilds = false /** * Whether to enable the Hermes VM. * - * This should be set on project.ext.react and mirrored here. If it is not set + * This should be set on project.ext.react and that value will be read here. If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ def enableHermes = project.ext.react.get("enableHermes", false); /** - * Architectures to build native code for in debug. + * Architectures to build native code for. */ -def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} android { ndkVersion rootProject.ext.ndkVersion @@ -130,9 +133,73 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" - ndk { - abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "mips" + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() + if (isNewArchitectureEnabled()) { + // We configure the NDK build only if you decide to opt-in for the New Architecture. + externalNativeBuild { + ndkBuild { + arguments "APP_PLATFORM=android-21", + "APP_STL=c++_shared", + "NDK_TOOLCHAIN_VERSION=clang", + "GENERATED_SRC_DIR=$buildDir/generated/source", + "PROJECT_BUILD_DIR=$buildDir", + "REACT_ANDROID_DIR=../../../../node_modules/react-native/ReactAndroid", + "REACT_ANDROID_BUILD_DIR=../../../../node_modules/react-native/ReactAndroid/build", + "NODE_MODULES_DIR=../../../../node_modules" + cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1" + cppFlags "-std=c++17" + // Make sure this target name is the same you specify inside the + // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable. + targets "gutenberg_appmodules" + } + } + if (!enableSeparateBuildPerCPUArchitecture) { + ndk { + abiFilters (*reactNativeArchitectures()) + } + } + } + } + + if (isNewArchitectureEnabled()) { + // We configure the NDK build only if you decide to opt-in for the New Architecture. + externalNativeBuild { + ndkBuild { + path "$projectDir/src/main/jni/Android.mk" + } + } + def reactAndroidProjectDir = project(':ReactAndroid').projectDir + def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { + dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") + into("$buildDir/react-ndk/exported") + } + def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { + dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") + into("$buildDir/react-ndk/exported") + } + afterEvaluate { + // If you wish to add a custom TurboModule or component locally, + // you should uncomment this line. + // preBuild.dependsOn("generateCodegenArtifactsFromSchema") + preDebugBuild.dependsOn(packageReactNdkDebugLibs) + preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) + + // Due to a bug inside AGP, we have to explicitly set a dependency + // between configureNdkBuild* tasks and the preBuild tasks. + // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 + configureNdkBuildRelease.dependsOn(preReleaseBuild) + configureNdkBuildDebug.dependsOn(preDebugBuild) + reactNativeArchitectures().each { architecture -> + tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure { + dependsOn("preDebugBuild") + } + tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure { + dependsOn("preReleaseBuild") + } + } } } splits { @@ -140,7 +207,7 @@ android { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + include (*reactNativeArchitectures()) } } buildTypes { @@ -177,7 +244,7 @@ dependencies { }) implementation 'androidx.appcompat:appcompat:1.2.0' //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-native:${extractPackageVersion(packageJson, 'react-native', 'dependencies')}" // From node_modules + implementation "com.facebook.react:react-native:${extractPackageVersion(packageJson, 'react-native', 'dependencies')}" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" @@ -204,6 +271,26 @@ dependencies { implementation "$reactNativeLibrariesGroupId:react-native-masked-view:${extractPackageVersion(packageJson, '@react-native-masked-view/masked-view', 'dependencies')}" implementation "$reactNativeLibrariesGroupId:react-native-clipboard:${extractPackageVersion(packageJson, '@react-native-clipboard/clipboard', 'dependencies')}" implementation "$reactNativeLibrariesGroupId:react-native-fast-image:${extractPackageVersion(packageJson, 'react-native-fast-image', 'dependencies')}" + + implementation("com.facebook.react:hermes-engine:${extractPackageVersion(packageJson, 'react-native', 'dependencies')}") { + exclude group:'com.facebook.fbjni' + } +} + +if (isNewArchitectureEnabled()) { + // If new architecture is enabled, we let you build RN from source + // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. + // This will be applied to all the imported transtitive dependency. + configurations.all { + resolutionStrategy.dependencySubstitution { + substitute(module("com.facebook.react:react-native")) + .using(project(":ReactAndroid")) + .because("On New Architecture we're building React Native from source") + substitute(module("com.facebook.react:hermes-engine")) + .using(project(":ReactAndroid:hermes-engine")) + .because("On New Architecture we're building Hermes from source") + } + } } // Run this once to be able to run the application with BUCK @@ -212,3 +299,11 @@ task copyDownloadableDepsToLibs(type: Copy) { from configurations.implementation into 'libs' } + +def isNewArchitectureEnabled() { + // To opt-in for the New Architecture, you can either: + // - Set `newArchEnabled` to true inside the `gradle.properties` file + // - Invoke gradle with `-newArchEnabled=true` + // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` + return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" +} \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/debug/AndroidManifest.xml b/packages/react-native-editor/android/app/src/debug/AndroidManifest.xml index 179354e4c747a..1970c1dc4856e 100644 --- a/packages/react-native-editor/android/app/src/debug/AndroidManifest.xml +++ b/packages/react-native-editor/android/app/src/debug/AndroidManifest.xml @@ -5,6 +5,6 @@ android:networkSecurityConfig="@xml/react_native_config" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"> - + \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/AndroidManifest.xml b/packages/react-native-editor/android/app/src/main/AndroidManifest.xml index 7323be781e80a..3f139808aa706 100644 --- a/packages/react-native-editor/android/app/src/main/AndroidManifest.xml +++ b/packages/react-native-editor/android/app/src/main/AndroidManifest.xml @@ -15,7 +15,7 @@ diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java index 447f2d35ee4de..ae81e808011ea 100644 --- a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java @@ -6,8 +6,6 @@ import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivityDelegate; -import com.facebook.react.ReactRootView; -import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; import org.wordpress.mobile.WPAndroidGlue.GutenbergProps; @@ -27,11 +25,6 @@ protected String getMainComponentName() { @Override protected ReactActivityDelegate createReactActivityDelegate() { return new ReactActivityDelegate(this, getMainComponentName()) { - @Override - protected ReactRootView createRootView() { - return new RNGestureHandlerEnabledRootView(MainActivity.this); - } - @Nullable @Override protected Bundle getLaunchOptions() { diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainApplication.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainApplication.java index fdcc576213925..d33464b698ced 100644 --- a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainApplication.java +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainApplication.java @@ -14,9 +14,7 @@ import com.facebook.react.ReactApplication; import com.BV.LinearGradient.LinearGradientPackage; import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.JSIModulePackage; import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.bridge.WritableMap; import com.reactnativecommunity.clipboard.ClipboardPackage; import com.reactnativecommunity.slider.ReactSliderPackage; import com.brentvatne.react.ReactVideoPackage; @@ -33,7 +31,6 @@ import org.wordpress.mobile.ReactNativeGutenbergBridge.GutenbergWebViewActivity; import org.wordpress.mobile.ReactNativeGutenbergBridge.RNMedia; import org.wordpress.mobile.ReactNativeGutenbergBridge.RNReactNativeGutenbergBridgePackage; -import org.wordpress.mobile.WPAndroidGlue.Media; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; @@ -41,7 +38,6 @@ import com.facebook.soloader.SoLoader; import com.reactnativecommunity.webview.RNCWebViewPackage; import com.swmansion.gesturehandler.RNGestureHandlerPackage; -import com.swmansion.reanimated.ReanimatedJSIModulePackage; import com.swmansion.reanimated.ReanimatedPackage; import com.swmansion.rnscreens.RNScreensPackage; import com.th3rdwave.safeareacontext.SafeAreaContextPackage; @@ -314,11 +310,6 @@ protected List getPackages() { protected String getJSMainModuleName() { return "index"; } - - @Override - protected JSIModulePackage getJSIModulePackage() { - return new ReanimatedJSIModulePackage(); - } }; } diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/MainApplicationReactNativeHost.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/MainApplicationReactNativeHost.java new file mode 100644 index 0000000000000..5a3deee24f507 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/MainApplicationReactNativeHost.java @@ -0,0 +1,116 @@ +package com.gutenberg.newarchitecture; + +import android.app.Application; +import androidx.annotation.NonNull; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactPackageTurboModuleManagerDelegate; +import com.facebook.react.bridge.JSIModulePackage; +import com.facebook.react.bridge.JSIModuleProvider; +import com.facebook.react.bridge.JSIModuleSpec; +import com.facebook.react.bridge.JSIModuleType; +import com.facebook.react.bridge.JavaScriptContextHolder; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.UIManager; +import com.facebook.react.fabric.ComponentFactory; +import com.facebook.react.fabric.CoreComponentsRegistry; +import com.facebook.react.fabric.FabricJSIModuleProvider; +import com.facebook.react.fabric.ReactNativeConfig; +import com.facebook.react.uimanager.ViewManagerRegistry; +import com.gutenberg.BuildConfig; +import com.gutenberg.newarchitecture.components.MainComponentsRegistry; +import com.gutenberg.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both + * TurboModule delegates and the Fabric Renderer. + * + *

    Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +public class MainApplicationReactNativeHost extends ReactNativeHost { + public MainApplicationReactNativeHost(Application application) { + super(application); + } + + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + List packages = Arrays.asList(); + // Packages that cannot be autolinked yet can be added manually here, for example: + // packages.add(new MyReactNativePackage()); + // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: + // packages.add(new TurboReactPackage() { ... }); + // If you have custom Fabric Components, their ViewManagers should also be loaded here + // inside a ReactPackage. + return packages; + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + + @NonNull + @Override + protected ReactPackageTurboModuleManagerDelegate.Builder + getReactPackageTurboModuleManagerDelegateBuilder() { + // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary + // for the new architecture and to use TurboModules correctly. + return new MainApplicationTurboModuleManagerDelegate.Builder(); + } + + @Override + protected JSIModulePackage getJSIModulePackage() { + return new JSIModulePackage() { + @Override + public List getJSIModules( + final ReactApplicationContext reactApplicationContext, + final JavaScriptContextHolder jsContext) { + final List specs = new ArrayList<>(); + + // Here we provide a new JSIModuleSpec that will be responsible of providing the + // custom Fabric Components. + specs.add( + new JSIModuleSpec() { + @Override + public JSIModuleType getJSIModuleType() { + return JSIModuleType.UIManager; + } + + @Override + public JSIModuleProvider getJSIModuleProvider() { + final ComponentFactory componentFactory = new ComponentFactory(); + CoreComponentsRegistry.register(componentFactory); + + // Here we register a Components Registry. + // The one that is generated with the template contains no components + // and just provides you the one from React Native core. + MainComponentsRegistry.register(componentFactory); + + final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); + + ViewManagerRegistry viewManagerRegistry = + new ViewManagerRegistry( + reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); + + return new FabricJSIModuleProvider( + reactApplicationContext, + componentFactory, + ReactNativeConfig.DEFAULT_CONFIG, + viewManagerRegistry); + } + }); + return specs; + } + }; + } +} diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/components/MainComponentsRegistry.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/components/MainComponentsRegistry.java new file mode 100644 index 0000000000000..4a613ac3a2bc3 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/components/MainComponentsRegistry.java @@ -0,0 +1,36 @@ +package com.gutenberg.newarchitecture.components; + +import com.facebook.jni.HybridData; +import com.facebook.proguard.annotations.DoNotStrip; +import com.facebook.react.fabric.ComponentFactory; +import com.facebook.soloader.SoLoader; + +/** + * Class responsible to load the custom Fabric Components. This class has native methods and needs a + * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ + * folder for you). + * + *

    Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +@DoNotStrip +public class MainComponentsRegistry { + static { + SoLoader.loadLibrary("fabricjni"); + } + + @DoNotStrip private final HybridData mHybridData; + + @DoNotStrip + private native HybridData initHybrid(ComponentFactory componentFactory); + + @DoNotStrip + private MainComponentsRegistry(ComponentFactory componentFactory) { + mHybridData = initHybrid(componentFactory); + } + + @DoNotStrip + public static MainComponentsRegistry register(ComponentFactory componentFactory) { + return new MainComponentsRegistry(componentFactory); + } +} \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java new file mode 100644 index 0000000000000..b80720e9bdd88 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/java/com/gutenberg/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java @@ -0,0 +1,48 @@ +package com.gutenberg.newarchitecture.modules; + +import com.facebook.jni.HybridData; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactPackageTurboModuleManagerDelegate; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.soloader.SoLoader; +import java.util.List; + +/** + * Class responsible to load the TurboModules. This class has native methods and needs a + * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ + * folder for you). + * + *

    Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +public class MainApplicationTurboModuleManagerDelegate + extends ReactPackageTurboModuleManagerDelegate { + + private static volatile boolean sIsSoLibraryLoaded; + + protected MainApplicationTurboModuleManagerDelegate( + ReactApplicationContext reactApplicationContext, List packages) { + super(reactApplicationContext, packages); + } + + protected native HybridData initHybrid(); + + native boolean canCreateTurboModule(String moduleName); + + public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { + protected MainApplicationTurboModuleManagerDelegate build( + ReactApplicationContext context, List packages) { + return new MainApplicationTurboModuleManagerDelegate(context, packages); + } + } + + @Override + protected synchronized void maybeLoadOtherSoLibraries() { + if (!sIsSoLibraryLoaded) { + // If you change the name of your application .so file in the Android.mk file, + // make sure you update the name here as well. + SoLoader.loadLibrary("gutenberg_appmodules"); + sIsSoLibraryLoaded = true; + } + } +} \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/Android.mk b/packages/react-native-editor/android/app/src/main/jni/Android.mk new file mode 100644 index 0000000000000..633707fd91605 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/Android.mk @@ -0,0 +1,48 @@ +THIS_DIR := $(call my-dir) + +include $(REACT_ANDROID_DIR)/Android-prebuilt.mk + +# If you wish to add a custom TurboModule or Fabric component in your app you +# will have to include the following autogenerated makefile. +# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk +include $(CLEAR_VARS) + +LOCAL_PATH := $(THIS_DIR) + +# You can customize the name of your application .so file here. +LOCAL_MODULE := gutenberg_appmodules + +LOCAL_C_INCLUDES := $(LOCAL_PATH) +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) + +# If you wish to add a custom TurboModule or Fabric component in your app you +# will have to uncomment those lines to include the generated source +# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni) +# +# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni +# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp) +# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni + +# Here you should add any native library you wish to depend on. +LOCAL_SHARED_LIBRARIES := \ + libfabricjni \ + libfbjni \ + libfolly_runtime \ + libglog \ + libjsi \ + libreact_codegen_rncore \ + libreact_debug \ + libreact_nativemodule_core \ + libreact_render_componentregistry \ + libreact_render_core \ + libreact_render_debug \ + libreact_render_graphics \ + librrc_view \ + libruntimeexecutor \ + libturbomodulejsijni \ + libyoga + +LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall + +include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.cpp b/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.cpp new file mode 100644 index 0000000000000..39de093d1136d --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.cpp @@ -0,0 +1,24 @@ +#include "MainApplicationModuleProvider.h" + +#include + +namespace facebook { +namespace react { + +std::shared_ptr MainApplicationModuleProvider( + const std::string moduleName, + const JavaTurboModule::InitParams ¶ms) { + // Here you can provide your own module provider for TurboModules coming from + // either your application or from external libraries. The approach to follow + // is similar to the following (for a library called `samplelibrary`: + // + // auto module = samplelibrary_ModuleProvider(moduleName, params); + // if (module != nullptr) { + // return module; + // } + // return rncore_ModuleProvider(moduleName, params); + return rncore_ModuleProvider(moduleName, params); +} + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.h b/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.h new file mode 100644 index 0000000000000..2f2fb24a3a76c --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainApplicationModuleProvider.h @@ -0,0 +1,16 @@ +#pragma once + +#include +#include + +#include + +namespace facebook { +namespace react { + +std::shared_ptr MainApplicationModuleProvider( + const std::string moduleName, + const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp b/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp new file mode 100644 index 0000000000000..f2e4714dc93b6 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp @@ -0,0 +1,45 @@ +#include "MainApplicationTurboModuleManagerDelegate.h" +#include "MainApplicationModuleProvider.h" + +namespace facebook { +namespace react { + +jni::local_ref +MainApplicationTurboModuleManagerDelegate::initHybrid( + jni::alias_ref) { + return makeCxxInstance(); +} + +void MainApplicationTurboModuleManagerDelegate::registerNatives() { + registerHybrid({ + makeNativeMethod( + "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), + makeNativeMethod( + "canCreateTurboModule", + MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), + }); +} + +std::shared_ptr +MainApplicationTurboModuleManagerDelegate::getTurboModule( + const std::string name, + const std::shared_ptr jsInvoker) { + // Not implemented yet: provide pure-C++ NativeModules here. + return nullptr; +} + +std::shared_ptr +MainApplicationTurboModuleManagerDelegate::getTurboModule( + const std::string name, + const JavaTurboModule::InitParams ¶ms) { + return MainApplicationModuleProvider(name, params); +} + +bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule( + std::string name) { + return getTurboModule(name, nullptr) != nullptr || + getTurboModule(name, {.moduleName = name}) != nullptr; +} + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h b/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h new file mode 100644 index 0000000000000..2cd17d7a944c0 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h @@ -0,0 +1,38 @@ +#include +#include + +#include +#include + +namespace facebook { +namespace react { + +class MainApplicationTurboModuleManagerDelegate + : public jni::HybridClass< + MainApplicationTurboModuleManagerDelegate, + TurboModuleManagerDelegate> { + public: + // Adapt it to the package you used for your Java class. + static constexpr auto kJavaDescriptor = + "Lcom/gutenberg/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;"; + + static jni::local_ref initHybrid(jni::alias_ref); + + static void registerNatives(); + + std::shared_ptr getTurboModule( + const std::string name, + const std::shared_ptr jsInvoker) override; + std::shared_ptr getTurboModule( + const std::string name, + const JavaTurboModule::InitParams ¶ms) override; + + /** + * Test-only method. Allows user to verify whether a TurboModule can be + * created by instances of this class. + */ + bool canCreateTurboModule(std::string name); +}; + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.cpp b/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.cpp new file mode 100644 index 0000000000000..c5188f4dc7b12 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.cpp @@ -0,0 +1,61 @@ +#include "MainComponentsRegistry.h" + +#include +#include +#include +#include + +namespace facebook { +namespace react { + +MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {} + +std::shared_ptr +MainComponentsRegistry::sharedProviderRegistry() { + auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); + + // Custom Fabric Components go here. You can register custom + // components coming from your App or from 3rd party libraries here. + // + // providerRegistry->add(concreteComponentDescriptorProvider< + // AocViewerComponentDescriptor>()); + return providerRegistry; +} + +jni::local_ref +MainComponentsRegistry::initHybrid( + jni::alias_ref, + ComponentFactory *delegate) { + auto instance = makeCxxInstance(delegate); + + auto buildRegistryFunction = + [](EventDispatcher::Weak const &eventDispatcher, + ContextContainer::Shared const &contextContainer) + -> ComponentDescriptorRegistry::Shared { + auto registry = MainComponentsRegistry::sharedProviderRegistry() + ->createComponentDescriptorRegistry( + {eventDispatcher, contextContainer}); + + auto mutableRegistry = + std::const_pointer_cast(registry); + + mutableRegistry->setFallbackComponentDescriptor( + std::make_shared( + ComponentDescriptorParameters{ + eventDispatcher, contextContainer, nullptr})); + + return registry; + }; + + delegate->buildRegistryFunction = buildRegistryFunction; + return instance; +} + +void MainComponentsRegistry::registerNatives() { + registerHybrid({ + makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), + }); +} + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.h b/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.h new file mode 100644 index 0000000000000..1046cfa3f2f73 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/MainComponentsRegistry.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include + +namespace facebook { +namespace react { + +class MainComponentsRegistry + : public facebook::jni::HybridClass { + public: + // Adapt it to the package you used for your Java class. + constexpr static auto kJavaDescriptor = + "Lcom/gutenberg/newarchitecture/components/MainComponentsRegistry;"; + + static void registerNatives(); + + MainComponentsRegistry(ComponentFactory *delegate); + + private: + static std::shared_ptr + sharedProviderRegistry(); + + static jni::local_ref initHybrid( + jni::alias_ref, + ComponentFactory *delegate); +}; + +} // namespace react +} // namespace facebook \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/jni/OnLoad.cpp b/packages/react-native-editor/android/app/src/main/jni/OnLoad.cpp new file mode 100644 index 0000000000000..ae1ef007d1524 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/jni/OnLoad.cpp @@ -0,0 +1,11 @@ +#include +#include "MainApplicationTurboModuleManagerDelegate.h" +#include "MainComponentsRegistry.h" + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { + return facebook::jni::initialize(vm, [] { + facebook::react::MainApplicationTurboModuleManagerDelegate:: + registerNatives(); + facebook::react::MainComponentsRegistry::registerNatives(); + }); +} \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/res/drawable/rn_edit_text_material.xml b/packages/react-native-editor/android/app/src/main/res/drawable/rn_edit_text_material.xml new file mode 100644 index 0000000000000..986188ce0e448 --- /dev/null +++ b/packages/react-native-editor/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/react-native-editor/android/app/src/main/res/values/styles.xml b/packages/react-native-editor/android/app/src/main/res/values/styles.xml index 24bc061368750..7ba83a2ad5a2c 100644 --- a/packages/react-native-editor/android/app/src/main/res/values/styles.xml +++ b/packages/react-native-editor/android/app/src/main/res/values/styles.xml @@ -3,6 +3,7 @@ diff --git a/packages/react-native-editor/android/build.gradle b/packages/react-native-editor/android/build.gradle index e7e23353c6b50..bf14d99e5af48 100644 --- a/packages/react-native-editor/android/build.gradle +++ b/packages/react-native-editor/android/build.gradle @@ -1,3 +1,5 @@ +import org.apache.tools.ant.taskdefs.condition.Os + buildscript { ext { gradlePluginVersion = '7.2.1' @@ -7,7 +9,15 @@ buildscript { compileSdkVersion = 31 targetSdkVersion = 31 supportLibVersion = '28.0.0' - ndkVersion = "21.4.7075529" + gradleDownloadTask = '5.0.1' + + if (System.properties['os.arch'] == "aarch64") { + // For M1 Users we need to use the NDK 24 which added support for aarch64 + ndkVersion = "24.0.8215888" + } else { + // Otherwise we default to the side-by-side NDK version from AGP. + ndkVersion = "21.4.7075529" + } } repositories { google() @@ -15,13 +25,21 @@ buildscript { } dependencies { classpath "com.android.tools.build:gradle:$gradlePluginVersion" + classpath("com.facebook.react:react-native-gradle-plugin") + classpath("de.undercouch:gradle-download-task:$gradleDownloadTask") classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } allprojects { repositories { - mavenCentral() + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } mavenLocal() maven { url "https://a8c-libs.s3.amazonaws.com/android" @@ -33,7 +51,6 @@ allprojects { } } maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" } - maven { url "https://a8c-libs.s3.amazonaws.com/android/hermes-mirror" } maven { url 'https://www.jitpack.io' } google() } diff --git a/packages/react-native-editor/android/gradle.properties b/packages/react-native-editor/android/gradle.properties index 094d0de62d995..8f91fa8476d6a 100644 --- a/packages/react-native-editor/android/gradle.properties +++ b/packages/react-native-editor/android/gradle.properties @@ -25,4 +25,15 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=false android.useDeprecatedNdk=true -FLIPPER_VERSION=0.99.0 \ No newline at end of file +FLIPPER_VERSION=0.125.0 + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=false \ No newline at end of file diff --git a/packages/react-native-editor/android/settings.gradle b/packages/react-native-editor/android/settings.gradle index 00081747119a5..fea32ba7734e7 100644 --- a/packages/react-native-editor/android/settings.gradle +++ b/packages/react-native-editor/android/settings.gradle @@ -3,3 +3,10 @@ rootProject.name = 'gutenberg' includeBuild("../../react-native-bridge/android") include ':app' +includeBuild('../../../node_modules/react-native-gradle-plugin') +if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { + include(":ReactAndroid") + project(":ReactAndroid").projectDir = file('../../../node_modules/react-native/ReactAndroid') + include(":ReactAndroid:hermes-engine") + project(":ReactAndroid:hermes-engine").projectDir = file('../../../node_modules/react-native/ReactAndroid/hermes-engine') +} \ No newline at end of file diff --git a/packages/react-native-editor/ios/.ruby-version b/packages/react-native-editor/ios/.ruby-version index a4dd9dba4fbfc..a603bb50a29e3 100644 --- a/packages/react-native-editor/ios/.ruby-version +++ b/packages/react-native-editor/ios/.ruby-version @@ -1 +1 @@ -2.7.4 +2.7.5 diff --git a/packages/react-native-editor/ios/Gemfile b/packages/react-native-editor/ios/Gemfile index 9536eabf7d526..5b9407e20cb78 100644 --- a/packages/react-native-editor/ios/Gemfile +++ b/packages/react-native-editor/ios/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'cocoapods', '~> 1.10.0' +gem 'cocoapods', '~> 1.11', '>= 1.11.2' \ No newline at end of file diff --git a/packages/react-native-editor/ios/Gemfile.lock b/packages/react-native-editor/ios/Gemfile.lock index 98d409730b4bd..842ff6acd396f 100644 --- a/packages/react-native-editor/ios/Gemfile.lock +++ b/packages/react-native-editor/ios/Gemfile.lock @@ -1,23 +1,25 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.3) - activesupport (5.2.5) + CFPropertyList (3.0.5) + rexml + activesupport (6.1.7) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - claide (1.0.3) - cocoapods (1.10.1) - addressable (~> 2.6) + claide (1.1.0) + cocoapods (1.11.3) + addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.1) + cocoapods-core (= 1.11.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -28,66 +30,71 @@ GEM escape (~> 0.0.4) fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.6) + molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (~> 1.4) - xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.1) - activesupport (> 5.0, < 6) - addressable (~> 2.6) + ruby-macho (>= 1.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-core (1.11.3) + activesupport (>= 5.0, < 7) + addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) - public_suffix + public_suffix (~> 4.0) typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.4) + cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.6.3) cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0) - cocoapods-trunk (1.5.0) + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.10) escape (0.0.4) - ethon (0.14.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.15.0) + ffi (1.15.5) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.12.0) concurrent-ruby (~> 1.0) - json (2.5.1) - minitest (5.14.4) - molinillo (0.6.6) + json (2.6.2) + minitest (5.16.3) + molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - public_suffix (4.0.6) - ruby-macho (1.4.0) - thread_safe (0.3.6) + public_suffix (4.0.7) + rexml (3.2.5) + ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.10) - thread_safe (~> 0.1) - xcodeproj (1.19.0) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) + xcodeproj (1.22.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + zeitwerk (2.6.1) PLATFORMS - ruby + arm64-darwin-21 DEPENDENCIES - cocoapods (~> 1.10.0) + cocoapods (~> 1.11, >= 1.11.2) + +RUBY VERSION + ruby 2.7.5p203 BUNDLED WITH - 2.2.27 + 2.3.18 diff --git a/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj b/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj index 60e0d221f169d..010f3add38639 100644 --- a/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj +++ b/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj @@ -331,7 +331,6 @@ "${PODS_ROOT}/Target Support Files/Pods-GutenbergDemo/Pods-GutenbergDemo-frameworks.sh", "${BUILT_PRODUCTS_DIR}/BVLinearGradient/BVLinearGradient.framework", "${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework", - "${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework", "${BUILT_PRODUCTS_DIR}/Gutenberg/Gutenberg.framework", "${BUILT_PRODUCTS_DIR}/RCT-Folly/folly.framework", "${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework", @@ -343,6 +342,7 @@ "${BUILT_PRODUCTS_DIR}/RNSVG/RNSVG.framework", "${BUILT_PRODUCTS_DIR}/RNScreens/RNScreens.framework", "${BUILT_PRODUCTS_DIR}/RNTAztecView/RNTAztecView.framework", + "${BUILT_PRODUCTS_DIR}/React-Codegen/React_Codegen.framework", "${BUILT_PRODUCTS_DIR}/React-Core/React.framework", "${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework", "${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework", @@ -353,6 +353,7 @@ "${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework", "${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework", "${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework", + "${BUILT_PRODUCTS_DIR}/React-bridging/react_bridging.framework", "${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework", "${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework", "${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework", @@ -379,7 +380,6 @@ outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BVLinearGradient.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gutenberg.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework", @@ -391,6 +391,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNSVG.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNScreens.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNTAztecView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_Codegen.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework", @@ -401,6 +402,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_bridging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework", @@ -459,7 +461,6 @@ "${PODS_ROOT}/Target Support Files/Pods-GutenbergDemo-GutenbergDemoTests/Pods-GutenbergDemo-GutenbergDemoTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/BVLinearGradient/BVLinearGradient.framework", "${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework", - "${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework", "${BUILT_PRODUCTS_DIR}/Gutenberg/Gutenberg.framework", "${BUILT_PRODUCTS_DIR}/RCT-Folly/folly.framework", "${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework", @@ -471,6 +472,7 @@ "${BUILT_PRODUCTS_DIR}/RNSVG/RNSVG.framework", "${BUILT_PRODUCTS_DIR}/RNScreens/RNScreens.framework", "${BUILT_PRODUCTS_DIR}/RNTAztecView/RNTAztecView.framework", + "${BUILT_PRODUCTS_DIR}/React-Codegen/React_Codegen.framework", "${BUILT_PRODUCTS_DIR}/React-Core/React.framework", "${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework", "${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework", @@ -481,6 +483,7 @@ "${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework", "${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework", "${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework", + "${BUILT_PRODUCTS_DIR}/React-bridging/react_bridging.framework", "${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework", "${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework", "${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework", @@ -507,7 +510,6 @@ outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BVLinearGradient.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gutenberg.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework", @@ -519,6 +521,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNSVG.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNScreens.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNTAztecView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React_Codegen.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework", @@ -529,6 +532,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_bridging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework", @@ -798,6 +802,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_VERSION = 5.0; }; @@ -834,6 +839,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; diff --git a/packages/react-native-editor/ios/Podfile b/packages/react-native-editor/ios/Podfile index a06d86872cc6d..0423e435398eb 100644 --- a/packages/react-native-editor/ios/Podfile +++ b/packages/react-native-editor/ios/Podfile @@ -6,16 +6,21 @@ require_relative '../../../node_modules/@react-native-community/cli-platform-ios # Uncomment the next line to define a global platform for your project app_ios_deployment_target = Gem::Version.new('13.0') platform :ios, app_ios_deployment_target.version +install! 'cocoapods', :deterministic_uuids => false target 'GutenbergDemo' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! config = use_native_modules! + use_react_native!( :path => config[:reactNativePath], # to enable hermes on iOS, change `false` to `true` and then install pods - :hermes_enabled => false + :hermes_enabled => false, + :fabric_enabled => false, + # An absolute path to the application root + :app_path => "#{Pod::Config.instance.installation_root}/.." ) target 'GutenbergDemoTests' do diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index 3c8fd7c7d0488..3a97ea92fe769 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -3,30 +3,30 @@ PODS: - BVLinearGradient (2.5.6-wp-3): - React-Core - DoubleConversion (1.1.6) - - FBLazyVector (0.66.2) - - FBReactNativeSpec (0.66.2): + - FBLazyVector (0.69.4) + - FBReactNativeSpec (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.66.2) - - RCTTypeSafety (= 0.66.2) - - React-Core (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) + - RCTRequired (= 0.69.4) + - RCTTypeSafety (= 0.69.4) + - React-Core (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) - fmt (6.2.1) - glog (0.3.5) - Gutenberg (1.85.1): - - React-Core (= 0.66.2) - - React-CoreModules (= 0.66.2) - - React-RCTImage (= 0.66.2) + - React-Core (= 0.69.4) + - React-CoreModules (= 0.69.4) + - React-RCTImage (= 0.69.4) - RNTAztecView - - libwebp (1.2.1): - - libwebp/demux (= 1.2.1) - - libwebp/mux (= 1.2.1) - - libwebp/webp (= 1.2.1) - - libwebp/demux (1.2.1): + - libwebp (1.2.3): + - libwebp/demux (= 1.2.3) + - libwebp/mux (= 1.2.3) + - libwebp/webp (= 1.2.3) + - libwebp/demux (1.2.3): - libwebp/webp - - libwebp/mux (1.2.1): + - libwebp/mux (1.2.3): - libwebp/demux - - libwebp/webp (1.2.1) + - libwebp/webp (1.2.3) - RCT-Folly (2021.06.28.00-v2): - boost - DoubleConversion @@ -38,194 +38,205 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog - - RCTRequired (0.66.2) - - RCTTypeSafety (0.66.2): - - FBLazyVector (= 0.66.2) + - RCTRequired (0.69.4) + - RCTTypeSafety (0.69.4): + - FBLazyVector (= 0.69.4) + - RCTRequired (= 0.69.4) + - React-Core (= 0.69.4) + - React (0.69.4): + - React-Core (= 0.69.4) + - React-Core/DevSupport (= 0.69.4) + - React-Core/RCTWebSocket (= 0.69.4) + - React-RCTActionSheet (= 0.69.4) + - React-RCTAnimation (= 0.69.4) + - React-RCTBlob (= 0.69.4) + - React-RCTImage (= 0.69.4) + - React-RCTLinking (= 0.69.4) + - React-RCTNetwork (= 0.69.4) + - React-RCTSettings (= 0.69.4) + - React-RCTText (= 0.69.4) + - React-RCTVibration (= 0.69.4) + - React-bridging (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.66.2) - - React-Core (= 0.66.2) - - React (0.66.2): - - React-Core (= 0.66.2) - - React-Core/DevSupport (= 0.66.2) - - React-Core/RCTWebSocket (= 0.66.2) - - React-RCTActionSheet (= 0.66.2) - - React-RCTAnimation (= 0.66.2) - - React-RCTBlob (= 0.66.2) - - React-RCTImage (= 0.66.2) - - React-RCTLinking (= 0.66.2) - - React-RCTNetwork (= 0.66.2) - - React-RCTSettings (= 0.66.2) - - React-RCTText (= 0.66.2) - - React-RCTVibration (= 0.66.2) - - React-callinvoker (0.66.2) - - React-Core (0.66.2): + - React-jsi (= 0.69.4) + - React-callinvoker (0.69.4) + - React-Codegen (0.69.4): + - FBReactNativeSpec (= 0.69.4) + - RCT-Folly (= 2021.06.28.00-v2) + - RCTRequired (= 0.69.4) + - RCTTypeSafety (= 0.69.4) + - React-Core (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-Core (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-Core/Default (= 0.69.4) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/CoreModulesHeaders (0.66.2): + - React-Core/CoreModulesHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/Default (0.66.2): + - React-Core/Default (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/DevSupport (0.66.2): + - React-Core/DevSupport (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.2) - - React-Core/RCTWebSocket (= 0.66.2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-jsinspector (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-Core/Default (= 0.69.4) + - React-Core/RCTWebSocket (= 0.69.4) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-jsinspector (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTActionSheetHeaders (0.66.2): + - React-Core/RCTActionSheetHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTAnimationHeaders (0.66.2): + - React-Core/RCTAnimationHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTBlobHeaders (0.66.2): + - React-Core/RCTBlobHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTImageHeaders (0.66.2): + - React-Core/RCTImageHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTLinkingHeaders (0.66.2): + - React-Core/RCTLinkingHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTNetworkHeaders (0.66.2): + - React-Core/RCTNetworkHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTSettingsHeaders (0.66.2): + - React-Core/RCTSettingsHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTTextHeaders (0.66.2): + - React-Core/RCTTextHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTVibrationHeaders (0.66.2): + - React-Core/RCTVibrationHeaders (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-Core/RCTWebSocket (0.66.2): + - React-Core/RCTWebSocket (0.69.4): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsiexecutor (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-Core/Default (= 0.69.4) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsiexecutor (= 0.69.4) + - React-perflogger (= 0.69.4) - Yoga - - React-CoreModules (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - React-CoreModules (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.2) - - React-Core/CoreModulesHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - React-RCTImage (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-cxxreact (0.66.2): + - RCTTypeSafety (= 0.69.4) + - React-Codegen (= 0.69.4) + - React-Core/CoreModulesHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - React-RCTImage (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-cxxreact (0.69.4): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.66.2) - - React-jsi (= 0.66.2) - - React-jsinspector (= 0.66.2) - - React-logger (= 0.66.2) - - React-perflogger (= 0.66.2) - - React-runtimeexecutor (= 0.66.2) - - React-jsi (0.66.2): + - React-callinvoker (= 0.69.4) + - React-jsi (= 0.69.4) + - React-jsinspector (= 0.69.4) + - React-logger (= 0.69.4) + - React-perflogger (= 0.69.4) + - React-runtimeexecutor (= 0.69.4) + - React-jsi (0.69.4): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsi/Default (= 0.66.2) - - React-jsi/Default (0.66.2): + - React-jsi/Default (= 0.69.4) + - React-jsi/Default (0.69.4): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsiexecutor (0.66.2): + - React-jsiexecutor (0.69.4): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-perflogger (= 0.66.2) - - React-jsinspector (0.66.2) - - React-logger (0.66.2): + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-perflogger (= 0.69.4) + - React-jsinspector (0.69.4) + - React-logger (0.69.4): - glog - - react-native-blur (0.8.0): + - react-native-blur (4.2.0): - React-Core - react-native-get-random-values (1.4.0): - React-Core @@ -237,78 +248,79 @@ PODS: - React-Core - react-native-slider (3.0.2-wp-3): - React-Core - - react-native-video (5.2.0-wp-4): + - react-native-video (5.2.0-wp-5): - React-Core - - react-native-video/Video (= 5.2.0-wp-4) - - react-native-video/Video (5.2.0-wp-4): + - react-native-video/Video (= 5.2.0-wp-5) + - react-native-video/Video (5.2.0-wp-5): - React-Core - react-native-webview (11.6.2): - React-Core - - React-perflogger (0.66.2) - - React-RCTActionSheet (0.66.2): - - React-Core/RCTActionSheetHeaders (= 0.66.2) - - React-RCTAnimation (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - React-perflogger (0.69.4) + - React-RCTActionSheet (0.69.4): + - React-Core/RCTActionSheetHeaders (= 0.69.4) + - React-RCTAnimation (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.2) - - React-Core/RCTAnimationHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTBlob (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - RCTTypeSafety (= 0.69.4) + - React-Codegen (= 0.69.4) + - React-Core/RCTAnimationHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTBlob (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/RCTBlobHeaders (= 0.66.2) - - React-Core/RCTWebSocket (= 0.66.2) - - React-jsi (= 0.66.2) - - React-RCTNetwork (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTImage (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - React-Codegen (= 0.69.4) + - React-Core/RCTBlobHeaders (= 0.69.4) + - React-Core/RCTWebSocket (= 0.69.4) + - React-jsi (= 0.69.4) + - React-RCTNetwork (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTImage (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.2) - - React-Core/RCTImageHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - React-RCTNetwork (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTLinking (0.66.2): - - FBReactNativeSpec (= 0.66.2) - - React-Core/RCTLinkingHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTNetwork (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - RCTTypeSafety (= 0.69.4) + - React-Codegen (= 0.69.4) + - React-Core/RCTImageHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - React-RCTNetwork (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTLinking (0.69.4): + - React-Codegen (= 0.69.4) + - React-Core/RCTLinkingHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTNetwork (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.2) - - React-Core/RCTNetworkHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTSettings (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - RCTTypeSafety (= 0.69.4) + - React-Codegen (= 0.69.4) + - React-Core/RCTNetworkHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTSettings (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.2) - - React-Core/RCTSettingsHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-RCTText (0.66.2): - - React-Core/RCTTextHeaders (= 0.66.2) - - React-RCTVibration (0.66.2): - - FBReactNativeSpec (= 0.66.2) + - RCTTypeSafety (= 0.69.4) + - React-Codegen (= 0.69.4) + - React-Core/RCTSettingsHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-RCTText (0.69.4): + - React-Core/RCTTextHeaders (= 0.69.4) + - React-RCTVibration (0.69.4): - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/RCTVibrationHeaders (= 0.66.2) - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (= 0.66.2) - - React-runtimeexecutor (0.66.2): - - React-jsi (= 0.66.2) - - ReactCommon/turbomodule/core (0.66.2): + - React-Codegen (= 0.69.4) + - React-Core/RCTVibrationHeaders (= 0.69.4) + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (= 0.69.4) + - React-runtimeexecutor (0.69.4): + - React-jsi (= 0.69.4) + - ReactCommon/turbomodule/core (0.69.4): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.66.2) - - React-Core (= 0.66.2) - - React-cxxreact (= 0.66.2) - - React-jsi (= 0.66.2) - - React-logger (= 0.66.2) - - React-perflogger (= 0.66.2) + - React-bridging (= 0.69.4) + - React-callinvoker (= 0.69.4) + - React-Core (= 0.69.4) + - React-cxxreact (= 0.69.4) + - React-jsi (= 0.69.4) + - React-logger (= 0.69.4) + - React-perflogger (= 0.69.4) - RNCClipboard (1.9.0): - React-Core - RNCMaskedView (0.2.6): @@ -319,7 +331,7 @@ PODS: - SDWebImageWebPCoder (~> 0.8.4) - RNGestureHandler (2.3.2-wp-2): - React-Core - - RNReanimated (2.4.1-wp-4): + - RNReanimated (2.9.1-wp-2): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -374,9 +386,10 @@ DEPENDENCIES: - RCTRequired (from `../../../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../../../node_modules/react-native/Libraries/TypeSafety`) - React (from `../../../node_modules/react-native/`) + - React-bridging (from `../../../node_modules/react-native/ReactCommon`) - React-callinvoker (from `../../../node_modules/react-native/ReactCommon/callinvoker`) + - React-Codegen (from `build/generated/ios`) - React-Core (from `../../../node_modules/react-native/`) - - React-Core/DevSupport (from `../../../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../../../node_modules/react-native/`) - React-CoreModules (from `../../../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../../../node_modules/react-native/ReactCommon/cxxreact`) @@ -445,8 +458,12 @@ EXTERNAL SOURCES: :path: "../../../node_modules/react-native/Libraries/TypeSafety" React: :path: "../../../node_modules/react-native/" + React-bridging: + :path: "../../../node_modules/react-native/ReactCommon" React-callinvoker: :path: "../../../node_modules/react-native/ReactCommon/callinvoker" + React-Codegen: + :path: build/generated/ios React-Core: :path: "../../../node_modules/react-native/" React-CoreModules: @@ -523,58 +540,60 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 BVLinearGradient: ace34fab72158c068ae989a0ebdbf86cb4ef0e49 - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 - FBLazyVector: 57a8b34460679fb69e1ce7d625b04dbd1596b1f1 - FBReactNativeSpec: 18438b1c04ce502ed681cd19db3f4508964c082a + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + FBLazyVector: c71b8c429a8af2aff1013934a7152e9d9d0c937d + FBReactNativeSpec: 2ff441cbe6e58c1778d8a5cf3311831a6a8c0809 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 5337263514dd6f09803962437687240c5dc39aa4 - Gutenberg: f3c8abb1b4f9a695f6f55c3637344e1111bb4ccf - libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc - RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 - RCTRequired: 5e9e85f48da8dd447f5834ce14c6799ea8c7f41a - RCTTypeSafety: aba333d04d88d1f954e93666a08d7ae57a87ab30 - React: a8f119296b97812f73af5ae0eb1f26cf262ae4b4 - React-callinvoker: ce22372414af68085a32174d5dfbd41ea03799e6 - React-Core: 9fb6365464ecc235d7023ee7f868dc643ca20f41 - React-CoreModules: 9874a32779eadf7492fb85e71fbc5eeab733df32 - React-cxxreact: e562a15aba33752febb3125bad4e329e8d024252 - React-jsi: 78f1c0eb3f9054d15745e89e06f9dc17de4d07da - React-jsiexecutor: 573adf0d6ce5e05c55872dfde5b1589acb88a96f - React-jsinspector: b08b2d5e86cef9dc4bb69f0aa0bbe6d210fb7da5 - React-logger: faee236598b0f7e1a5e3b68577016ac451f1f993 - react-native-blur: ef741a08d020010ba65e411be0ab82d1d325e7ad + glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a + Gutenberg: 3030a119b01cbfa29925327398a7cfaa63c9bfc7 + libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c + RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a + RCTRequired: bd9d2ab0fda10171fcbcf9ba61a7df4dc15a28f4 + RCTTypeSafety: e44e139bf6ec8042db396201834fc2372f6a21cd + React: 482cd1ba23c471be1aed3800180be2427418d7be + React-bridging: c2ea4fed6fe4ed27c12fd71e88b5d5d3da107fde + React-callinvoker: d4d1f98163fb5e35545e910415ef6c04796bb188 + React-Codegen: ff35fb9c7f6ec2ed34fb6de2e1099d88dfb25f2f + React-Core: 4d3443a45b67c71d74d7243ddde9569d1e4f4fad + React-CoreModules: 70be25399366b5632ab18ecf6fe444a8165a7bea + React-cxxreact: 822d3794fc0bf206f4691592f90e086dd4f92228 + React-jsi: ffa51cbc9a78cc156cf61f79ed52ecb76dc6013b + React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4 + React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999 + React-logger: 1088859f145b8f6dd0d3ed051a647ef0e3e80fad + react-native-blur: 3e9c8e8e9f7d17fa1b94e1a0ae9fd816675f5382 react-native-get-random-values: b6fb85e7169b9822976793e467458c151c3e8b69 react-native-keyboard-aware-scroll-view: 0bc6c2dfe9056935a40dc1a70e764b7a1bbf6568 react-native-safe-area: c9cf765aa2dd96159476a99633e7d462ce5bb94f react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 react-native-slider: a433f1c13c5da3c17a587351bff7371f65cc9a07 - react-native-video: bbc5d6759a481da913f1d917dd119c3366f4c36d + react-native-video: cc1982bfac4d256fb56302642d968b6e72ffbeb7 react-native-webview: 193d233c29eacce1f42ca2637dab7ba79c25a6de - React-perflogger: 5ab487cacfe6ec19bfe3d3f8072bf71eb07d63da - React-RCTActionSheet: 03f25695e095fb5aa003828620943c74cc281fec - React-RCTAnimation: eaf82da39f0c36fb0ef2a28df797c5f73a2a98ea - React-RCTBlob: c8b58e70faa2ff482a8eb99491c8b12c4477bc74 - React-RCTImage: 92a0471a03c55d445ede02516176d852120280bf - React-RCTLinking: 9a4482710586877671e19f0a564c2a745153f26f - React-RCTNetwork: 3801dd1ce7873db828a2d824ee2d4f25a0abf7d0 - React-RCTSettings: a5d35733c27853177935185b76a3a0f7aa594dc9 - React-RCTText: 6d8d3bc93c4595caf1f681198271cd4630759a74 - React-RCTVibration: 3e815c3d2dd2e0e931b68595b5b92d23ba38b3fb - React-runtimeexecutor: 393e26602c1b248683372051e34db63e359e3b01 - ReactCommon: c0263c1a41509aeb94be3214fa7bc3b71eae5ef6 + React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0 + React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5 + React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7 + React-RCTBlob: f36ab97e2d515c36df14a1571e50056be80413d5 + React-RCTImage: 2c8f0a329a116248e82f8972ffe806e47c6d1cfa + React-RCTLinking: 670f0223075aff33be3b89714f1da4f5343fc4af + React-RCTNetwork: 09385b73f4ff1f46bd5d749540fb33f69a7e5908 + React-RCTSettings: 33b12d3ac7a1f2eba069ec7bd1b84345263b3bbe + React-RCTText: a1a3ea902403bd9ae4cf6f7960551dc1d25711b5 + React-RCTVibration: 9adb4a3cbb598d1bbd46a05256f445e4b8c70603 + React-runtimeexecutor: 61ee22a8cdf8b6bb2a7fb7b4ba2cc763e5285196 + ReactCommon: 8f67bd7e0a6afade0f20718f859dc8c2275f2e83 RNCClipboard: 99fc8ad669a376b756fbc8098ae2fd05c0ed0668 RNCMaskedView: c298b644a10c0c142055b3ae24d83879ecb13ccd RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7 RNGestureHandler: 3e0ea0c115175e66680032904339696bab928ca3 - RNReanimated: 2366094144f5bfc2179b401237ef49034ecbee3e + RNReanimated: 8b189a09da0345d84b33b8cde57a57f8ed847352 RNScreens: 953633729a42e23ad0c93574d676b361e3335e8b RNSVG: 36a7359c428dcb7c6bce1cc546fbfebe069809b0 RNTAztecView: 0d144de38c612c41953b2222f6facdcdae67fca8 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504 - Yoga: 9a08effa851c1d8cc1647691895540bc168ea65f + Yoga: ff994563b2fd98c982ca58e8cd9db2cdaf4dda74 -PODFILE CHECKSUM: 855614b96eacd35e67d17c1a2818c71c67a28560 +PODFILE CHECKSUM: 6ae5f47a0b577b6e4ad29c87992c37b2a814a0b7 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.3 diff --git a/packages/react-native-editor/ios/gutenbergTests/gutenbergTests.m b/packages/react-native-editor/ios/gutenbergTests/gutenbergTests.m index a549f9a878317..875c225324e2e 100644 --- a/packages/react-native-editor/ios/gutenbergTests/gutenbergTests.m +++ b/packages/react-native-editor/ios/gutenbergTests/gutenbergTests.m @@ -20,7 +20,7 @@ @interface gutenbergTests : XCTestCase @implementation gutenbergTests -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test { if (test(view)) { return YES; @@ -50,12 +50,14 @@ - (void)testRendersWelcomeScreen [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; +} } RCTSetLogFunction(RCTDefaultLogFunction); diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index ae94a539a76c2..c20912d7e8802 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -31,7 +31,7 @@ "dependencies": { "@babel/runtime": "^7.16.0", "@react-native-clipboard/clipboard": "1.9.0", - "@react-native-community/blur": "3.6.0", + "@react-native-community/blur": "4.2.0", "@react-native-community/slider": "https://raw.githubusercontent.com/wordpress-mobile/react-native-slider/v3.0.2-wp-3/react-native-community-slider-3.0.2-wp-3.tgz", "@react-native-masked-view/masked-view": "0.2.6", "@react-navigation/core": "5.12.0", @@ -56,7 +56,7 @@ "jed": "^1.1.1", "jsdom-jscore-rn": "git+https://github.com/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800", "node-fetch": "^2.6.0", - "react-native": "0.66.2", + "react-native": "0.69.4", "react-native-fast-image": "8.5.11", "react-native-gesture-handler": "https://raw.githubusercontent.com/wordpress-mobile/react-native-gesture-handler/2.3.2-wp-2/react-native-gesture-handler-2.3.2-wp-2.tgz", "react-native-get-random-values": "1.4.0", @@ -66,14 +66,14 @@ "react-native-linear-gradient": "https://raw.githubusercontent.com/wordpress-mobile/react-native-linear-gradient/v2.5.6-wp-3/react-native-linear-gradient-2.5.6-wp-3.tgz", "react-native-modal": "^11.10.0", "react-native-prompt-android": "https://raw.githubusercontent.com/wordpress-mobile/react-native-prompt-android/v1.0.0-wp-3/react-native-prompt-android-1.0.0-wp-3.tgz", - "react-native-reanimated": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.4.1-wp-4/react-native-reanimated-2.4.1-wp-4.tgz", + "react-native-reanimated": "https://raw.githubusercontent.com/wordpress-mobile/react-native-reanimated/2.9.1-wp-2/react-native-reanimated-2.9.1-wp-2.tgz", "react-native-safe-area": "^0.5.0", "react-native-safe-area-context": "3.2.0", "react-native-sass-transformer": "^1.1.1", "react-native-screens": "2.9.0", "react-native-svg": "9.13.6", "react-native-url-polyfill": "^1.1.2", - "react-native-video": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-4/react-native-video-5.2.0-wp-4.tgz", + "react-native-video": "https://raw.githubusercontent.com/wordpress-mobile/react-native-video/5.2.0-wp-5/react-native-video-5.2.0-wp-5.tgz", "react-native-webview": "11.6.2" }, "publishConfig": { @@ -89,7 +89,7 @@ "postrn-bundle": "cd ../.. && patch-package --reverse --patch-dir packages/react-native-editor/metro-patch", "prebundle": "npm run i18n-cache:force", "bundle": "npm run bundle:android && npm run bundle:ios", - "bundle:android": "mkdir -p bundle/android && npm run rn-bundle -- --platform android --dev false --entry-file index.js --assets-dest bundle/android --bundle-output bundle/android/App.text.js --sourcemap-output bundle/android/App.text.js.map && ./../../node_modules/hermes-engine/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out bundle/android/App.js bundle/android/App.text.js -output-source-map", + "bundle:android": "mkdir -p bundle/android && npm run rn-bundle -- --platform android --dev false --entry-file index.js --assets-dest bundle/android --bundle-output bundle/android/App.text.js --sourcemap-output bundle/android/App.text.js.map && ./../../node_modules/react-native/sdks/hermesc/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out bundle/android/App.js bundle/android/App.text.js -output-source-map", "bundle:ios": "mkdir -p bundle/ios && npm run rn-bundle -- --platform ios --dev false --entry-file index.js --assets-dest bundle/ios --bundle-output bundle/ios/App.js --sourcemap-output bundle/ios/App.js.map", "i18n-cache": "node i18n-cache/index.js", "i18n-cache:force": "cross-env REFRESH_I18N_CACHE=1 node i18n-cache/index.js", diff --git a/packages/react-native-editor/react-native.config.js b/packages/react-native-editor/react-native.config.js new file mode 100644 index 0000000000000..1dfc03662f7b5 --- /dev/null +++ b/packages/react-native-editor/react-native.config.js @@ -0,0 +1,15 @@ +/** + * External dependencies + */ +const path = require( 'path' ); + +module.exports = { + dependencies: { + '@wordpress/react-native-bridge': { + root: path.resolve( __dirname, '../react-native-bridge' ), + }, + '@wordpress/react-native-aztec': { + root: path.resolve( __dirname, '../react-native-aztec' ), + }, + }, +}; diff --git a/packages/react-native-editor/src/index.js b/packages/react-native-editor/src/index.js index 965ca9300fa5e..adb33b8943bde 100644 --- a/packages/react-native-editor/src/index.js +++ b/packages/react-native-editor/src/index.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import 'react-native-gesture-handler'; - /** * WordPress dependencies */ diff --git a/packages/reusable-blocks/CHANGELOG.md b/packages/reusable-blocks/CHANGELOG.md index 3bc91adf13fd3..42ca3cc0769a9 100644 --- a/packages/reusable-blocks/CHANGELOG.md +++ b/packages/reusable-blocks/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/reusable-blocks/package.json b/packages/reusable-blocks/package.json index 79808b21425ed..f262f7fd023c0 100644 --- a/packages/reusable-blocks/package.json +++ b/packages/reusable-blocks/package.json @@ -40,8 +40,8 @@ "@wordpress/url": "file:../url" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/rich-text/CHANGELOG.md b/packages/rich-text/CHANGELOG.md index de2b21d0cd017..07848e967f6b6 100644 --- a/packages/rich-text/CHANGELOG.md +++ b/packages/rich-text/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 5.20.0 (2022-11-16) ## 5.19.0 (2022-11-02) diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json index 483df30480f2f..d83a475b7d52a 100644 --- a/packages/rich-text/package.json +++ b/packages/rich-text/package.json @@ -42,7 +42,7 @@ "rememo": "^4.0.0" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index 7600e10fdb731..8572a09585b91 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 24.6.0 (2022-11-16) ## 24.5.0 (2022-11-02) diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 110b4da106246..6e81d31364af4 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -89,8 +89,8 @@ "webpack-dev-server": "^4.4.0" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/server-side-render/CHANGELOG.md b/packages/server-side-render/CHANGELOG.md index 2852b799eb0c7..d81e2810829ac 100644 --- a/packages/server-side-render/CHANGELOG.md +++ b/packages/server-side-render/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 3.20.0 (2022-11-16) ## 3.19.0 (2022-11-02) diff --git a/packages/server-side-render/package.json b/packages/server-side-render/package.json index 2c700e17077b1..2ceeb7140e707 100644 --- a/packages/server-side-render/package.json +++ b/packages/server-side-render/package.json @@ -39,8 +39,8 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/viewport/CHANGELOG.md b/packages/viewport/CHANGELOG.md index 6971ca4432472..5f91832442b1c 100644 --- a/packages/viewport/CHANGELOG.md +++ b/packages/viewport/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 4.20.0 (2022-11-16) ## 4.19.0 (2022-11-02) diff --git a/packages/viewport/package.json b/packages/viewport/package.json index d094a2634d334..d10025a953c2b 100644 --- a/packages/viewport/package.json +++ b/packages/viewport/package.json @@ -30,7 +30,7 @@ "@wordpress/data": "file:../data" }, "peerDependencies": { - "react": "^17.0.0" + "react": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/widgets/CHANGELOG.md b/packages/widgets/CHANGELOG.md index 8402e0e4d2775..5f87628f05259 100644 --- a/packages/widgets/CHANGELOG.md +++ b/packages/widgets/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235)) + ## 2.20.0 (2022-11-16) ## 2.19.0 (2022-11-02) diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 01ac126c41c14..2e8c646b11b1b 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -35,8 +35,8 @@ "classnames": "^2.3.1" }, "peerDependencies": { - "react": "^17.0.0", - "react-dom": "^17.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0" }, "publishConfig": { "access": "public" diff --git a/test/native/integration-test-helpers/get-block.js b/test/native/integration-test-helpers/get-block.js index 5f618ddbefe8e..0770a736affbb 100644 --- a/test/native/integration-test-helpers/get-block.js +++ b/test/native/integration-test-helpers/get-block.js @@ -8,8 +8,7 @@ * @return {import('react-test-renderer').ReactTestInstance} Block instance. */ export const getBlock = ( screen, blockName, { rowIndex = 1 } = {} ) => { - const { getByLabelText } = screen; - return getByLabelText( + return screen.getAllByLabelText( new RegExp( `${ blockName } Block\\. Row ${ rowIndex }` ) - ); + )[ 0 ]; }; diff --git a/test/native/integration-test-helpers/get-inner-block.js b/test/native/integration-test-helpers/get-inner-block.js index 53536c7d2f7eb..1bb1e6938c280 100644 --- a/test/native/integration-test-helpers/get-inner-block.js +++ b/test/native/integration-test-helpers/get-inner-block.js @@ -17,7 +17,7 @@ export const getInnerBlock = ( blockName, { rowIndex = 1 } = {} ) => { - return within( parentBlock ).getByLabelText( + return within( parentBlock ).getAllByLabelText( new RegExp( `${ blockName } Block\\. Row ${ rowIndex }` ) - ); + )[ 0 ]; }; diff --git a/test/native/setup.js b/test/native/setup.js index d65865e9da395..5f1801a338985 100644 --- a/test/native/setup.js +++ b/test/native/setup.js @@ -15,6 +15,9 @@ require( '../../packages/react-native-editor/src/globals' ); // Set up Reanimated library for testing require( 'react-native-reanimated/lib/reanimated2/jestUtils' ).setUpTests(); global.__reanimatedWorkletInit = jest.fn(); +global.ReanimatedDataMock = { + now: () => 0, +}; RNNativeModules.UIManager = RNNativeModules.UIManager || {}; RNNativeModules.UIManager.RCTView = RNNativeModules.UIManager.RCTView || {}; diff --git a/test/unit/config/matchers/to-be-positioned-popover.js b/test/unit/config/matchers/to-be-positioned-popover.js new file mode 100644 index 0000000000000..bb28edce85b76 --- /dev/null +++ b/test/unit/config/matchers/to-be-positioned-popover.js @@ -0,0 +1,15 @@ +/** + * Asserts that the specified popover has already been positioned. + * Necessary because it will be positioned a bit later after it's displayed. + * + * @param {HTMLElement} element Popover element. + */ +function toBePositionedPopover( element ) { + const pass = element.style.top !== '' && element.style.left !== ''; + return { + pass, + message: `Received element is ${ pass ? '' : 'not ' } positioned`, + }; +} + +expect.extend( { toBePositionedPopover } ); diff --git a/test/unit/config/testing-library.js b/test/unit/config/testing-library.js index dd8c725c6f4ae..8f8c1bab711ad 100644 --- a/test/unit/config/testing-library.js +++ b/test/unit/config/testing-library.js @@ -1,3 +1,4 @@ require( '@testing-library/jest-dom' ); require( 'snapshot-diff/extend-expect' ); require( './matchers/to-match-style-diff-snapshot' ); +require( './matchers/to-be-positioned-popover' );