diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0ea32ce6af..7208a9ae6c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '12.13.0' + node-version: '12.22.0' - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -39,7 +39,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '12.13.0' + node-version: '12.22.0' - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/.nvmrc b/.nvmrc index bce43c253fe..49a625d6908 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v12.13.0 +v12.22.0 diff --git a/UNRELEASED.md b/UNRELEASED.md index 1c512132431..3bd4b05801a 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -29,5 +29,6 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f - Modernized tests for Avatar, Backdrop, Badge, Banner components([#4306](https://github.com/Shopify/polaris-react/pull/4306)) - Modernized tests for Tooltip, Toast components([#4314](https://github.com/Shopify/polaris-react/pull/4314)) - Modernized tests for AccountConnection, ActionList components([#4316](https://github.com/Shopify/polaris-react/pull/4316)) +- Updated `@shopify/react-testing` to v3.2.0 for React 17 support in tests ([#4349](https://github.com/Shopify/polaris-react/pull/4349)) ### Deprecations diff --git a/dev.yml b/dev.yml index af0f83f8058..0c450fdc759 100644 --- a/dev.yml +++ b/dev.yml @@ -2,7 +2,7 @@ name: polaris-react up: - node: yarn: v1.13.0 - version: v12.13.0 # to be kept in sync with .nvmrc and ci.yml + version: v12.22.0 # to be kept in sync with .nvmrc and ci.yml - git_hooks: pre-commit: pre-commit diff --git a/package.json b/package.json index 0dd3d2b960a..268c5c8bf82 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@rollup/pluginutils": "^3.1.0", "@shopify/jest-dom-mocks": "^2.9.1", "@shopify/postcss-plugin": "^3.1.1", - "@shopify/react-testing": "^2.1.2", + "@shopify/react-testing": "^3.2.0", "@shopify/sewing-kit": "^0.140.0", "@shopify/storybook-a11y-test": "^0.0.1", "@size-limit/preset-small-lib": "^4.10.2", diff --git a/yarn.lock b/yarn.lock index feebd541922..34ba6b6c142 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1971,6 +1971,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@mdx-js/loader@^1.6.19": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.6.22.tgz#d9e8fe7f8185ff13c9c8639c048b123e30d322c4" @@ -2464,14 +2475,14 @@ "@babel/types" ">=7.0.0" webpack-virtual-modules "^0.2.2" -"@shopify/react-testing@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@shopify/react-testing/-/react-testing-2.1.2.tgz#8ad73bbc9978b50404138659033de1918d1e2ffc" - integrity sha512-BlURfFQoPnfh5KTcwWuGtjVZL2S3qCHgPGDWs5LDStSpUIvOhB5ATNdwmH5NB6Wh6jrpkX4vyNZC7eVil43oLg== +"@shopify/react-testing@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@shopify/react-testing/-/react-testing-3.2.0.tgz#496c6282d4d947277f53b27b83db00cb35b82705" + integrity sha512-ynBOJ5NyAhEMfgu2Neir2dWE5YoiVzrl3HR7dzmpqqnEsQn6S4AqtMxjDUChPeVxem0o8ey2C0kxuezphGAd4A== dependencies: - "@shopify/useful-types" "^2.2.0" - jest-matcher-utils "^25.3.0" - react-reconciler "^0.20.2" + "@shopify/useful-types" "^3.0.1" + jest-matcher-utils "^26.6.2" + react-reconciler "^0.26.2" "@shopify/react-universal-provider@^1.1.24": version "1.1.24" @@ -2647,13 +2658,6 @@ resolved "https://registry.yarnpkg.com/@shopify/typescript-configs/-/typescript-configs-2.0.2.tgz#0cea1b090451409ccfceb1c6f3a21ae006ef0cee" integrity sha512-3NBlqnJxKgLp0P7SwD2nR98BtkdhKmVIyL+UggdG4hwHAm4EJ28q21huhEo3yt3j7CMU0a1eJUWsFlh/NMapUQ== -"@shopify/useful-types@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@shopify/useful-types/-/useful-types-2.2.0.tgz#811dfb1921e6c781603c90a76622e0292db11321" - integrity sha512-zJ9s/Wgi5Lv7ns0qieXsnTFRVWJ67qp0H7MvRCAJ1gHo//Z7SlOApXC16OEA3u9sACiLPmcejgqGRObPvQY1YA== - dependencies: - tslib "^1.9.3" - "@shopify/useful-types@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@shopify/useful-types/-/useful-types-2.2.1.tgz#187fe009123e560e2eed6f4d375fb53248a33b0d" @@ -2661,6 +2665,11 @@ dependencies: tslib "^1.14.1" +"@shopify/useful-types@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@shopify/useful-types/-/useful-types-3.0.1.tgz#1021459d49917ce5bff6b0cb6c34df44a49375b9" + integrity sha512-aWjLNyxGxNKLYKs3evYrars9h8OV2Apc1DcZqkFETnm7EMeoFv16feV21xdwpQxj2W9EwCpw7CSmlvadzXxHyA== + "@shopify/webpack-asset-metadata-plugin@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@shopify/webpack-asset-metadata-plugin/-/webpack-asset-metadata-plugin-2.0.2.tgz#c529821c4467cd86eb573b97f4cb3bf8fae5b84b" @@ -7862,6 +7871,11 @@ diff-sequences@^25.2.6: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -11888,6 +11902,16 @@ jest-diff@^25.2.1, jest-diff@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" +jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== + dependencies: + chalk "^4.0.0" + diff-sequences "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + jest-docblock@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" @@ -11935,6 +11959,11 @@ jest-get-type@^25.2.6: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== +jest-get-type@^26.3.0: + version "26.3.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" + integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== + jest-haste-map@^25.5.1: version "25.5.1" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.5.1.tgz#1df10f716c1d94e60a1ebf7798c9fb3da2620943" @@ -12007,7 +12036,7 @@ jest-leak-detector@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-matcher-utils@^25.3.0, jest-matcher-utils@^25.5.0: +jest-matcher-utils@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== @@ -12017,6 +12046,16 @@ jest-matcher-utils@^25.3.0, jest-matcher-utils@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== + dependencies: + chalk "^4.0.0" + jest-diff "^26.6.2" + jest-get-type "^26.3.0" + pretty-format "^26.6.2" + jest-message-util@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.5.0.tgz#ea11d93204cc7ae97456e1d8716251185b8880ea" @@ -15521,6 +15560,16 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== + dependencies: + "@jest/types" "^26.6.2" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^17.0.1" + pretty-hrtime@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" @@ -16092,15 +16141,14 @@ react-popper@^2.2.4: react-fast-compare "^3.0.1" warning "^4.0.2" -react-reconciler@^0.20.2: - version "0.20.4" - resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.20.4.tgz#3da6a95841592f849cb4edd3d38676c86fd920b2" - integrity sha512-kxERc4H32zV2lXMg/iMiwQHOtyqf15qojvkcZ5Ja2CPkjVohHw9k70pdDBwrnQhLVetUJBSYyqU3yqrlVTOajA== +react-reconciler@^0.26.2: + version "0.26.2" + resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.26.2.tgz#bbad0e2d1309423f76cf3c3309ac6c96e05e9d91" + integrity sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" + scheduler "^0.20.2" react-refresh@^0.8.1, react-refresh@^0.8.3: version "0.8.3" @@ -17035,14 +17083,6 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" - integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" @@ -17051,6 +17091,14 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"