diff --git a/.eslintrc b/.eslintrc index d09bfda8d..09e61fedf 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,13 +1,13 @@ { "extends": "@callstack", "rules": { - "react-native/no-raw-text": 0, "no-console": 1, - "react/no-multi-comp": 0, // Ignore certain webpack alias because it can't be resolved "import/no-unresolved": [2, { "ignore": ["^@theme", "^@docusaurus", "^@generated"] }], + "react/no-multi-comp": 0, "react-native/no-color-literals": "off", "react-native/no-inline-styles": "off", + "react-native/no-raw-text": 0, "react-native-a11y/has-valid-accessibility-descriptors": "off", "react-native-a11y/has-valid-accessibility-ignores-invert-colors": 0, "react-native-a11y/has-valid-accessibility-value": "off" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e9deab5b..33580d5f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: test: needs: [install-cache-deps] runs-on: ubuntu-latest - name: Test + name: Test (concurrent) steps: - name: Checkout uses: actions/checkout@v4 @@ -67,10 +67,10 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - test-concurrent: + test-legacy: needs: [install-cache-deps] runs-on: ubuntu-latest - name: Test (concurrent mode) + name: Test (legacy) steps: - name: Checkout uses: actions/checkout@v4 @@ -78,8 +78,8 @@ jobs: - name: Setup Node.js and deps uses: ./.github/actions/setup-deps - - name: Test in concurrent mode - run: CONCURRENT_MODE=1 yarn test:ci + - name: Test in legacy mode + run: CONCURRENT_MODE=0 yarn test:ci test-website: runs-on: ubuntu-latest diff --git a/README.md b/README.md index ac32f38ed..ad79d406c 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,7 @@ This library has a `peerDependencies` listing for `react-test-renderer`. Make su ### Additional Jest matchers -You can use the built-in Jest matchers by adding the following line to your `jest-setup.ts` file (configured using [`setupFilesAfterEnv`](https://jestjs.io/docs/configuration#setupfilesafterenv-array)): - -```ts -import '@testing-library/react-native/extend-expect'; -``` +You can use the built-in Jest matchers automatically by having any import from `@testing-library/react-native` in your test. ## Example diff --git a/babel.config.js b/babel.config.js index a21450b2c..f2c48ffa8 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,17 +1,20 @@ module.exports = { presets: [ - '@babel/preset-typescript', - '@babel/preset-react', [ '@babel/preset-env', { targets: { - node: '14', + node: '18', }, - bugfixes: true, + useBuiltIns: false, + modules: 'commonjs', }, ], + '@babel/preset-react', + '@babel/preset-typescript', + '@babel/preset-flow', ], + plugins: ['@babel/plugin-transform-strict-mode'], env: { test: { presets: ['@react-native/babel-preset'], diff --git a/examples/basic/jest-setup.ts b/examples/basic/jest-setup.ts index cee072367..e69de29bb 100644 --- a/examples/basic/jest-setup.ts +++ b/examples/basic/jest-setup.ts @@ -1,6 +0,0 @@ -import { configure } from '@testing-library/react-native'; - -// Import built-in Jest matchers -import '@testing-library/react-native/extend-expect'; - -configure({ concurrentRoot: true }); diff --git a/examples/basic/jest.config.js b/examples/basic/jest.config.js index 3a8ac87b1..bc8a26721 100644 --- a/examples/basic/jest.config.js +++ b/examples/basic/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - preset: '@testing-library/react-native', + preset: 'react-native', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], setupFilesAfterEnv: ['./jest-setup.ts'], }; diff --git a/examples/basic/package.json b/examples/basic/package.json index 7bc97a695..09767cac3 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@babel/core": "^7.24.0", - "@testing-library/react-native": "^12.8.1", + "@testing-library/react-native": "^13.0.0-beta.0", "@types/eslint": "^8.56.10", "@types/jest": "^29.5.12", "@types/react": "~18.3.12", diff --git a/examples/basic/yarn.lock b/examples/basic/yarn.lock index 4a06ecf62..47a3f6eb5 100644 --- a/examples/basic/yarn.lock +++ b/examples/basic/yarn.lock @@ -90,6 +90,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10c0/4679f7df4dffd5b3e26083ae65228116c3da34c3fff2c11ae11b259a61baec440f51e30fd236f7a0435b9d471acd93d0bc5a95df8213cbf02b1e083503d81b9a + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" @@ -129,6 +138,23 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^7.24.7, @babel/helper-create-class-features-plugin@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/helper-create-class-features-plugin@npm:7.25.0" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.24.7" + "@babel/helper-member-expression-to-functions": "npm:^7.24.8" + "@babel/helper-optimise-call-expression": "npm:^7.24.7" + "@babel/helper-replace-supers": "npm:^7.25.0" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" + "@babel/traverse": "npm:^7.25.0" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10c0/2f8ac36cfeb45d462432acea64c78312cc9180dda7aa9337b77017961e373c323065362d2452f3d6f8bffeb254ff3f7346ac1b25c8ad7b81db813a95924f4053 + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.9" @@ -142,7 +168,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.6.2, @babel/helper-define-polyfill-provider@npm:^0.6.3": +"@babel/helper-define-polyfill-provider@npm:^0.6.2": version: 0.6.3 resolution: "@babel/helper-define-polyfill-provider@npm:0.6.3" dependencies: @@ -157,6 +183,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8" + dependencies: + "@babel/traverse": "npm:^7.24.8" + "@babel/types": "npm:^7.24.8" + checksum: 10c0/7e14a5acc91f6cd26305a4441b82eb6f616bd70b096a4d2099a968f16b26d50207eec0b9ebfc466fefd62bd91587ac3be878117cdfec819b7151911183cb0e5a + languageName: node + linkType: hard + "@babel/helper-member-expression-to-functions@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" @@ -167,6 +203,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10c0/97c57db6c3eeaea31564286e328a9fb52b0313c5cfcc7eee4bc226aebcf0418ea5b6fe78673c0e4a774512ec6c86e309d0f326e99d2b37bfc16a25a032498af0 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-module-imports@npm:7.25.9" @@ -177,6 +223,20 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.24.8": + version: 7.25.2 + resolution: "@babel/helper-module-transforms@npm:7.25.2" + dependencies: + "@babel/helper-module-imports": "npm:^7.24.7" + "@babel/helper-simple-access": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + "@babel/traverse": "npm:^7.25.2" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10c0/adaa15970ace0aee5934b5a633789b5795b6229c6a9cf3e09a7e80aa33e478675eee807006a862aa9aa517935d81f88a6db8a9f5936e3a2a40ec75f8062bc329 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0": version: 7.26.0 resolution: "@babel/helper-module-transforms@npm:7.26.0" @@ -190,6 +250,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-optimise-call-expression@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10c0/ca6a9884705dea5c95a8b3ce132d1e3f2ae951ff74987d400d1d9c215dae9c0f9e29924d8f8e131e116533d182675bc261927be72f6a9a2968eaeeaa51eb1d0f + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" @@ -206,6 +275,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.24.8 + resolution: "@babel/helper-plugin-utils@npm:7.24.8" + checksum: 10c0/0376037f94a3bfe6b820a39f81220ac04f243eaee7193774b983e956c1750883ff236b30785795abbcda43fac3ece74750566830c2daa4d6e3870bb0dff34c2d + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-remap-async-to-generator@npm:7.25.9" @@ -219,6 +295,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/helper-replace-supers@npm:7.25.0" + dependencies: + "@babel/helper-member-expression-to-functions": "npm:^7.24.8" + "@babel/helper-optimise-call-expression": "npm:^7.24.7" + "@babel/traverse": "npm:^7.25.0" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10c0/b4b6650ab3d56c39a259367cd97f8df2f21c9cebb3716fea7bca40a150f8847bfb82f481e98927c7c6579b48a977b5a8f77318a1c6aeb497f41ecd6dbc3fdfef + languageName: node + linkType: hard + "@babel/helper-replace-supers@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-replace-supers@npm:7.25.9" @@ -232,6 +321,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10c0/7230e419d59a85f93153415100a5faff23c133d7442c19e0cd070da1784d13cd29096ee6c5a5761065c44e8164f9f80e3a518c41a0256df39e38f7ad6744fed7 + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-simple-access@npm:7.25.9" @@ -252,6 +351,23 @@ __metadata: languageName: node linkType: hard +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10c0/e3a9b8ac9c262ac976a1bcb5fe59694db5e6f0b4f9e7bdba5c7693b8b5e28113c23bdaa60fe8d3ec32a337091b67720b2053bcb3d5655f5406536c3d0584242b + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 10c0/6361f72076c17fabf305e252bf6d580106429014b3ab3c1f5c4eb3e6d465536ea6b670cc0e9a637a77a9ad40454d3e41361a2909e70e305116a23d68ce094c08 + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-string-parser@npm:7.25.9" @@ -259,6 +375,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-validator-identifier@npm:7.25.9" @@ -266,6 +389,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.24.7": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: 10c0/73db93a34ae89201351288bee7623eed81a54000779462a986105b54ffe82069e764afd15171a428b82e7c7a9b5fec10b5d5603b216317a414062edf5c67a21f + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-validator-option@npm:7.25.9" @@ -295,14 +425,14 @@ __metadata: linkType: hard "@babel/highlight@npm:^7.10.4": - version: 7.25.9 - resolution: "@babel/highlight@npm:7.25.9" + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.24.7" chalk: "npm:^2.4.2" js-tokens: "npm:^4.0.0" picocolors: "npm:^1.0.0" - checksum: 10c0/ae0ed93c151b85a07df42936117fa593ce91563a22dfc8944a90ae7088c9679645c33e00dcd20b081c1979665d65f986241172dae1fc9e5922692fc3ff685a49 + checksum: 10c0/674334c571d2bb9d1c89bdd87566383f59231e16bcdcf5bb7835babdf03c9ae585ca0887a7b25bdf78f303984af028df52831c7989fecebb5101cc132da9393a languageName: node linkType: hard @@ -330,15 +460,15 @@ __metadata: linkType: hard "@babel/plugin-proposal-decorators@npm:^7.12.9": - version: 7.25.9 - resolution: "@babel/plugin-proposal-decorators@npm:7.25.9" + version: 7.24.7 + resolution: "@babel/plugin-proposal-decorators@npm:7.24.7" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/plugin-syntax-decorators": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/plugin-syntax-decorators": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/d7d54644f50a60c47090d70121905ca76534bd7a837c03d25e163ca6ae384b48ef6dcfb125a99f12b3ce7e78e074a33f6fa8c4531c1a46aa31274153f587b05e + checksum: 10c0/fb4e4711f90fed63aa4dfe34fc5f5a5d0af175725181678f462ee0df2b78a23ae83b9424403c6b957edbc07d2abc80f82f3b9f91baf568bdaf85e8196a9138d5 languageName: node linkType: hard @@ -400,7 +530,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-properties@npm:^7.12.13": +"@babel/plugin-syntax-class-properties@npm:^7.8.3": version: 7.12.13 resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: @@ -411,25 +541,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-static-block@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/4464bf9115f4a2d02ce1454411baf9cfb665af1da53709c5c56953e5e2913745b0fcce82982a00463d6facbdd93445c691024e310b91431a1e2f024b158f6371 - languageName: node - linkType: hard - -"@babel/plugin-syntax-decorators@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-syntax-decorators@npm:7.25.9" +"@babel/plugin-syntax-decorators@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-syntax-decorators@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/47e44a7d61b76dac4f18fd61edc186012e084eb8f1fe253c483b0fe90b73366b4ebd2b0b03728e000fd1fdedc8af3aa6e93246caf97183a8d9d42a0eb57ecfcc + checksum: 10c0/d1ecc334af7a5418a6e8ad5e711bf5d5a892ba00e04ba05b90077b9da735585ff8d4141e4fc3ae781b854f48eda9f3a9cfa9f1c80f5f4a697dbded01058a8b63 languageName: node linkType: hard @@ -455,6 +574,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.3" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/5100d658ba563829700cd8d001ddc09f4c0187b1a13de300d729c5b3e87503f75a6d6c99c1794182f7f1a9f546ee009df4f15a0ce36376e206ed0012fa7cdc24 + languageName: node + linkType: hard + "@babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.25.9": version: 7.26.0 resolution: "@babel/plugin-syntax-flow@npm:7.26.0" @@ -466,18 +596,18 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.7": - version: 7.26.0 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" +"@babel/plugin-syntax-flow@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-syntax-flow@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/e594c185b12bfe0bbe7ca78dfeebe870e6d569a12128cac86f3164a075fe0ff70e25ddbd97fd0782906b91f65560c9dc6957716b7b4a68aba2516c9b7455e352 + checksum: 10c0/2f0cb7a78379029707e61f6665634a5b758c8b4ccb602a72d798e41d36b0647c2f2de59f90e0c1d522b026962918e54d82f3aee0c194dc87cd340455aa58562a languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.10.4": +"@babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -499,6 +629,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-syntax-jsx@npm:7.24.7" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/f44d927a9ae8d5ef016ff5b450e1671e56629ddc12e56b938e41fd46e141170d9dfc9a53d6cb2b9a20a7dd266a938885e6a3981c60c052a2e1daed602ac80e51 + languageName: node + linkType: hard + "@babel/plugin-syntax-jsx@npm:^7.25.9, @babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.25.9 resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" @@ -510,7 +651,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: @@ -532,7 +673,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": +"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: @@ -576,25 +717,25 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": +"@babel/plugin-syntax-top-level-await@npm:^7.8.3": version: 7.14.5 - resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/69822772561706c87f0a65bc92d0772cea74d6bc0911537904a676d5ff496a6d3ac4e05a166d8125fce4a16605bace141afc3611074e170a994e66e5397787f3 + checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f languageName: node linkType: hard -"@babel/plugin-syntax-top-level-await@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" +"@babel/plugin-syntax-typescript@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-syntax-typescript@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" + "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f + checksum: 10c0/cdabd2e8010fb0ad15b49c2c270efc97c4bfe109ead36c7bbcf22da7a74bc3e49702fc4f22f12d2d6049e8e22a5769258df1fd05f0420ae45e11bdd5bc07805a languageName: node linkType: hard @@ -709,17 +850,30 @@ __metadata: linkType: hard "@babel/plugin-transform-export-namespace-from@npm:^7.22.11": - version: 7.25.9 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.9" + version: 7.24.7 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/f291ea2ec5f36de9028a00cbd5b32f08af281b8183bf047200ff001f4cb260be56f156b2449f42149448a4a033bd6e86a3a7f06d0c2825532eb0ae6b03058dfb + checksum: 10c0/4e144d7f1c57bc63b4899dbbbdfed0880f2daa75ea9c7251c7997f106e4b390dc362175ab7830f11358cb21f6b972ca10a43a2e56cd789065f7606b082674c0c languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.25.2, @babel/plugin-transform-flow-strip-types@npm:^7.25.9": +"@babel/plugin-transform-flow-strip-types@npm:^7.24.7": + version: 7.25.2 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.25.2" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/plugin-syntax-flow": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/821f5ccdb8104e09764d8a24d4c0dd4fe9e264d95e6477269c911e15240a63343d3fe71b6cf9382273766a0e86a015c2867d26fd75e5827134d990c93fa9e605 + languageName: node + linkType: hard + +"@babel/plugin-transform-flow-strip-types@npm:^7.25.2": version: 7.25.9 resolution: "@babel/plugin-transform-flow-strip-types@npm:7.25.9" dependencies: @@ -778,7 +932,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.24.8, @babel/plugin-transform-modules-commonjs@npm:^7.25.9": +"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.24.8": version: 7.25.9 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.9" dependencies: @@ -791,6 +945,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^7.24.7": + version: 7.24.8 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.8" + dependencies: + "@babel/helper-module-transforms": "npm:^7.24.8" + "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/helper-simple-access": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/f1cf552307ebfced20d3907c1dd8be941b277f0364aa655e2b5fee828c84c54065745183104dae86f1f93ea0406db970a463ef7ceaaed897623748e99640e5a7 + languageName: node + linkType: hard + "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.9" @@ -897,7 +1064,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-display-name@npm:^7.24.7, @babel/plugin-transform-react-display-name@npm:^7.25.9": +"@babel/plugin-transform-react-display-name@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-react-display-name@npm:7.25.9" dependencies: @@ -908,14 +1075,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-development@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-react-jsx-development@npm:7.25.9" +"@babel/plugin-transform-react-jsx-development@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-transform-react-jsx-development@npm:7.24.7" dependencies: - "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c0b92ff9eb029620abf320ff74aae182cea87524723d740fb48a4373d0d16bddf5edbe1116e7ba341332a5337e55c2ceaee8b8cad5549e78af7f4b3cfe77debb + checksum: 10c0/fce647db50f90a5291681f0f97865d9dc76981262dff71d6d0332e724b85343de5860c26f9e9a79e448d61e1d70916b07ce91e8c7f2b80dceb4b16aee41794d8 languageName: node linkType: hard @@ -941,7 +1108,22 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:^7.25.2, @babel/plugin-transform-react-jsx@npm:^7.25.9": +"@babel/plugin-transform-react-jsx@npm:^7.24.7": + version: 7.25.2 + resolution: "@babel/plugin-transform-react-jsx@npm:7.25.2" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.24.7" + "@babel/helper-module-imports": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/plugin-syntax-jsx": "npm:^7.24.7" + "@babel/types": "npm:^7.25.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/8c5b515f38118471197605e02bea54a8a4283010e3c55bad8cfb78de59ad63612b14d40baca63689afdc9d57b147aac4c7794fe5f7736c9e1ed6dd38784be624 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx@npm:^7.25.2": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx@npm:7.25.9" dependencies: @@ -956,15 +1138,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-pure-annotations@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.25.9" +"@babel/plugin-transform-react-pure-annotations@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.24.7" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-annotate-as-pure": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/7c8eac04644ad19dcd71bb8e949b0ae22b9e548fa4a58e545d3d0342f647fb89db7f8789a7c5b8074d478ce6d3d581eaf47dd4b36027e16fd68211c383839abc + checksum: 10c0/fae517d293d9c93b7b920458c3e4b91cb0400513889af41ba184a5f3acc8bfef27242cc262741bb8f87870df376f1733a0d0f52b966d342e2aaaf5607af8f73d languageName: node linkType: hard @@ -1030,7 +1212,22 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.25.2, @babel/plugin-transform-typescript@npm:^7.25.9": +"@babel/plugin-transform-typescript@npm:^7.24.7": + version: 7.25.2 + resolution: "@babel/plugin-transform-typescript@npm:7.25.2" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.24.7" + "@babel/helper-create-class-features-plugin": "npm:^7.25.0" + "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" + "@babel/plugin-syntax-typescript": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/b3c941da39ee7ecf72df1b78a01d4108160438245f2ab61befe182f51d17fd0034733c6d079b7efad81e03a66438aa3881a671cd68c5eb0fc775df86b88df996 + languageName: node + linkType: hard + +"@babel/plugin-transform-typescript@npm:^7.25.2": version: 7.25.9 resolution: "@babel/plugin-transform-typescript@npm:7.25.9" dependencies: @@ -1058,52 +1255,52 @@ __metadata: linkType: hard "@babel/preset-flow@npm:^7.13.13": - version: 7.25.9 - resolution: "@babel/preset-flow@npm:7.25.9" + version: 7.24.7 + resolution: "@babel/preset-flow@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-transform-flow-strip-types": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-validator-option": "npm:^7.24.7" + "@babel/plugin-transform-flow-strip-types": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/dc640a4868c40262b66c8b29a65c04aa7288a5359e6a79518b0394fb422254ef3aec489aeb71334eddf775ce006a8e077eff608580906e37b39c87bb122c7080 + checksum: 10c0/2a99333b9aac17033cefe17fb9d8c41b20c4f2cd3eab34f56c20d7c1c528cc1cca7e6d909de92fc700739a505b43166c9de62423f8a30b484161ebdf9474e217 languageName: node linkType: hard "@babel/preset-react@npm:^7.22.15": - version: 7.25.9 - resolution: "@babel/preset-react@npm:7.25.9" + version: 7.24.7 + resolution: "@babel/preset-react@npm:7.24.7" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-transform-react-display-name": "npm:^7.25.9" - "@babel/plugin-transform-react-jsx": "npm:^7.25.9" - "@babel/plugin-transform-react-jsx-development": "npm:^7.25.9" - "@babel/plugin-transform-react-pure-annotations": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-validator-option": "npm:^7.24.7" + "@babel/plugin-transform-react-display-name": "npm:^7.24.7" + "@babel/plugin-transform-react-jsx": "npm:^7.24.7" + "@babel/plugin-transform-react-jsx-development": "npm:^7.24.7" + "@babel/plugin-transform-react-pure-annotations": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c294b475ee741f01f63ea0d828862811c453fabc6023f01814ce983bc316388e9d73290164d2b1384c2684db9c330803a3d4d2170285b105dcbacd483329eb93 + checksum: 10c0/9658b685b25cedaadd0b65c4e663fbc7f57394b5036ddb4c99b1a75b0711fb83292c1c625d605c05b73413fc7a6dc20e532627f6a39b6dc8d4e00415479b054c languageName: node linkType: hard "@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.23.0": - version: 7.26.0 - resolution: "@babel/preset-typescript@npm:7.26.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-syntax-jsx": "npm:^7.25.9" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" - "@babel/plugin-transform-typescript": "npm:^7.25.9" + version: 7.24.7 + resolution: "@babel/preset-typescript@npm:7.24.7" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-validator-option": "npm:^7.24.7" + "@babel/plugin-syntax-jsx": "npm:^7.24.7" + "@babel/plugin-transform-modules-commonjs": "npm:^7.24.7" + "@babel/plugin-transform-typescript": "npm:^7.24.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/20d86bc45d2bbfde2f84fc7d7b38746fa6481d4bde6643039ad4b1ff0b804c6d210ee43e6830effd8571f2ff43fa7ffd27369f42f2b3a2518bb92dc86c780c61 + checksum: 10c0/986bc0978eedb4da33aba8e1e13a3426dd1829515313b7e8f4ba5d8c18aff1663b468939d471814e7acf4045d326ae6cff37239878d169ac3fe53a8fde71f8ee languageName: node linkType: hard "@babel/register@npm:^7.13.16": - version: 7.25.9 - resolution: "@babel/register@npm:7.25.9" + version: 7.24.6 + resolution: "@babel/register@npm:7.24.6" dependencies: clone-deep: "npm:^4.0.1" find-cache-dir: "npm:^2.0.0" @@ -1112,7 +1309,7 @@ __metadata: source-map-support: "npm:^0.5.16" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/f988437c94e0fe449308eecad00c04108c5f1a2b4c4b428635e3f402d9a38655e1884d594c80160e977a0e91455b9443de59829cc45f4d4f91e16b042e4c96d1 + checksum: 10c0/e0c6d6c8945dd792f83dc7bd6be468246b3aedd62b32620e56a3f3328389b577a6261d4338a9de9519f4eadddfef5aa0fdc1f92082c778dedddcc5854e357f09 languageName: node linkType: hard @@ -1151,6 +1348,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.2": + version: 7.25.3 + resolution: "@babel/traverse@npm:7.25.3" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.25.0" + "@babel/parser": "npm:^7.25.3" + "@babel/template": "npm:^7.25.0" + "@babel/types": "npm:^7.25.2" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/4c8a1966fa90b53a783a4afd2fcdaa6ab1a912e6621dca9fcc6633e80ccb9491620e88caf73b537da4e16cefd537b548c87d7087868d5b0066414dea375c0e9b + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.3.3": version: 7.26.0 resolution: "@babel/types@npm:7.26.0" @@ -1161,6 +1373,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8": + version: 7.25.2 + resolution: "@babel/types@npm:7.25.2" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10c0/e489435856be239f8cc1120c90a197e4c2865385121908e5edb7223cfdff3768cba18f489adfe0c26955d9e7bbb1fb10625bc2517505908ceb0af848989bd864 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -1169,20 +1392,20 @@ __metadata: linkType: hard "@eslint-community/eslint-utils@npm:^4.2.0": - version: 4.4.1 - resolution: "@eslint-community/eslint-utils@npm:4.4.1" + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: - eslint-visitor-keys: "npm:^3.4.3" + eslint-visitor-keys: "npm:^3.3.0" peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/2aa0ac2fc50ff3f234408b10900ed4f1a0b19352f21346ad4cc3d83a1271481bdda11097baa45d484dd564c895e0762a27a8240be7a256b3ad47129e96528252 + checksum: 10c0/7e559c4ce59cd3a06b1b5a517b593912e680a7f981ae7affab0d01d709e99cd5647019be8fafa38c350305bc32f1f7d42c7073edde2ab536c745e365f37b607e languageName: node linkType: hard "@eslint-community/regexpp@npm:^4.6.1": - version: 4.12.1 - resolution: "@eslint-community/regexpp@npm:4.12.1" - checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 + version: 4.11.0 + resolution: "@eslint-community/regexpp@npm:4.11.0" + checksum: 10c0/0f6328869b2741e2794da4ad80beac55cba7de2d3b44f796a60955b0586212ec75e6b0253291fd4aad2100ad471d1480d8895f2b54f1605439ba4c875e05e523 languageName: node linkType: hard @@ -1203,10 +1426,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.57.1": - version: 8.57.1 - resolution: "@eslint/js@npm:8.57.1" - checksum: 10c0/b489c474a3b5b54381c62e82b3f7f65f4b8a5eaaed126546520bf2fede5532a8ed53212919fed1e9048dcf7f37167c8561d58d0ba4492a4244004e7793805223 +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 10c0/9a518bb8625ba3350613903a6d8c622352ab0c6557a59fe6ff6178bf882bf57123f9d92aa826ee8ac3ee74b9c6203fe630e9ee00efb03d753962dcf65ee4bd94 languageName: node linkType: hard @@ -1431,6 +1654,17 @@ __metadata: languageName: node linkType: hard +"@expo/json-file@npm:^8.3.0": + version: 8.3.3 + resolution: "@expo/json-file@npm:8.3.3" + dependencies: + "@babel/code-frame": "npm:~7.10.4" + json5: "npm:^2.2.2" + write-file-atomic: "npm:^2.3.0" + checksum: 10c0/3b1b593a2fe6cb297713fbe2d1002bbc8d469fc55219343bffcce1b1abe941aace1b239d0afc1a3cf15b7ceed91e8da4ca36cb83b586f3bf9f05856e1ad560d3 + languageName: node + linkType: hard + "@expo/json-file@npm:^9.0.0, @expo/json-file@npm:~9.0.0": version: 9.0.0 resolution: "@expo/json-file@npm:9.0.0" @@ -1469,32 +1703,32 @@ __metadata: linkType: hard "@expo/osascript@npm:^2.0.31": - version: 2.1.4 - resolution: "@expo/osascript@npm:2.1.4" + version: 2.1.3 + resolution: "@expo/osascript@npm:2.1.3" dependencies: "@expo/spawn-async": "npm:^1.7.2" exec-async: "npm:^2.2.0" - checksum: 10c0/a33e8e77d4f1087af06e1b825cfcd197df2402ef988c5ba32719e9a04f77f3825eaf0bd692e78fe95494eadba4bc8d2ad8dafada010f1b94eb91114e6d243203 + checksum: 10c0/c62a51f4c25e7e5a9a3b79c7edb3a1f0f22646a1ddcdfca28476e23d6d8c5895aa8286b06e7de8d53504202d86995b5646343b40f3607fcd11061bcce29eb129 languageName: node linkType: hard "@expo/package-manager@npm:^1.5.0": - version: 1.6.1 - resolution: "@expo/package-manager@npm:1.6.1" + version: 1.5.2 + resolution: "@expo/package-manager@npm:1.5.2" dependencies: - "@expo/json-file": "npm:^9.0.0" + "@expo/json-file": "npm:^8.3.0" "@expo/spawn-async": "npm:^1.7.2" ansi-regex: "npm:^5.0.0" chalk: "npm:^4.0.0" find-up: "npm:^5.0.0" + find-yarn-workspace-root: "npm:~2.0.0" js-yaml: "npm:^3.13.1" - micromatch: "npm:^4.0.8" - npm-package-arg: "npm:^11.0.0" + micromatch: "npm:^4.0.2" + npm-package-arg: "npm:^7.0.0" ora: "npm:^3.4.0" - resolve-workspace-root: "npm:^2.0.0" split: "npm:^1.0.1" sudo-prompt: "npm:9.1.1" - checksum: 10c0/64fde2e2eda1ed2b14723cfb60452e897812120d6a9c4f358944811c7109398f20b04d12e26ea06cc32de996c866aa2be29921826423aef8992b0ca7ece441c4 + checksum: 10c0/4ec8e550c0a6cbf9b28e9c2b2d884552e0e8f4cee3e553419f829cc9b979c256cb5554a733e3f0575ad61413d4a6614abbd167da36e79601d2963a7b7d467354 languageName: node linkType: hard @@ -1560,11 +1794,11 @@ __metadata: linkType: hard "@expo/vector-icons@npm:^14.0.0": - version: 14.0.4 - resolution: "@expo/vector-icons@npm:14.0.4" + version: 14.0.2 + resolution: "@expo/vector-icons@npm:14.0.2" dependencies: prop-types: "npm:^15.8.1" - checksum: 10c0/230543be93212f538200b5a6d708a22697c29c00faf054b5c224e5a1fde1feacf96d04ab870d780e1351975503035084fd2187acca2cc2bbd09d8935b2efbfa0 + checksum: 10c0/6784cc75b1dbaa7c589d41e8229469bc9aa1abe36efc2290e8b38ce39c2ec3e889a520ebd818ce0d084128fa19df9f69d77962e4bd70a21cc038a46ef6753f22 languageName: node linkType: hard @@ -1582,14 +1816,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.13.0": - version: 0.13.0 - resolution: "@humanwhocodes/config-array@npm:0.13.0" +"@humanwhocodes/config-array@npm:^0.11.14": + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.3" + "@humanwhocodes/object-schema": "npm:^2.0.2" debug: "npm:^4.3.1" minimatch: "npm:^3.0.5" - checksum: 10c0/205c99e756b759f92e1f44a3dc6292b37db199beacba8f26c2165d4051fe73a4ae52fdcfd08ffa93e7e5cb63da7c88648f0e84e197d154bbbbe137b2e0dd332e + checksum: 10c0/66f725b4ee5fdd8322c737cb5013e19fac72d4d69c8bf4b7feb192fcb83442b035b92186f8e9497c220e58b2d51a080f28a73f7899bc1ab288c3be172c467541 languageName: node linkType: hard @@ -1600,7 +1834,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.3": +"@humanwhocodes/object-schema@npm:^2.0.2": version: 2.0.3 resolution: "@humanwhocodes/object-schema@npm:2.0.3" checksum: 10c0/80520eabbfc2d32fe195a93557cef50dfe8c8905de447f022675aaf66abc33ae54098f5ea78548d925aa671cd4ab7c7daa5ad704fe42358c9b5e7db60f80696c @@ -2228,22 +2462,22 @@ __metadata: languageName: node linkType: hard -"@testing-library/react-native@npm:^12.8.1": - version: 12.8.1 - resolution: "@testing-library/react-native@npm:12.8.1" +"@testing-library/react-native@npm:^13.0.0-beta.0": + version: 13.0.0-beta.0 + resolution: "@testing-library/react-native@npm:13.0.0-beta.0" dependencies: jest-matcher-utils: "npm:^29.7.0" pretty-format: "npm:^29.7.0" redent: "npm:^3.0.0" peerDependencies: - jest: ">=28.0.0" - react: ">=16.8.0" - react-native: ">=0.59" - react-test-renderer: ">=16.8.0" + jest: ">=29.0.0" + react: ">=18.2.0" + react-native: ">=0.71" + react-test-renderer: ">=18.2.0" peerDependenciesMeta: jest: optional: true - checksum: 10c0/8fc3ba4b1e5767fc1d24133a907515aa155b3b400fd8a681bf5957a9bb56e0885569234ab4f7fe66441e91ca9de5f761b1db1fdfc049735bc0c4ecc2b6d92bc5 + checksum: 10c0/98ceabedd4f7fec5a78b3a504f1ecad6cef79c58df7f195c04264c0d09f107385ec1fe60764169324dc74a34374061260f6f12c061b4d0c839d63a16b7fc623c languageName: node linkType: hard @@ -2289,19 +2523,19 @@ __metadata: linkType: hard "@types/eslint@npm:^8.56.10": - version: 8.56.12 - resolution: "@types/eslint@npm:8.56.12" + version: 8.56.11 + resolution: "@types/eslint@npm:8.56.11" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10c0/e4ca426abe9d55f82b69a3250bec78b6d340ad1e567f91c97ecc59d3b2d6a1d8494955ac62ad0ea14b97519db580611c02be8277cbea370bdfb0f96aa2910504 + checksum: 10c0/e47d2b8e0ce1aa7e1f2564555576fa55343e942ae8cba5940b4e2566f842810c007beff80a01d74d48c60a45ecf28150cbc5cbd53324b1e55cf672b24ccf4667 languageName: node linkType: hard "@types/estree@npm:*": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: 10c0/b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d languageName: node linkType: hard @@ -2340,12 +2574,12 @@ __metadata: linkType: hard "@types/jest@npm:^29.5.12": - version: 29.5.14 - resolution: "@types/jest@npm:29.5.14" + version: 29.5.12 + resolution: "@types/jest@npm:29.5.12" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: 10c0/18e0712d818890db8a8dab3d91e9ea9f7f19e3f83c2e50b312f557017dc81466207a71f3ed79cf4428e813ba939954fa26ffa0a9a7f153181ba174581b1c2aed + checksum: 10c0/25fc8e4c611fa6c4421e631432e9f0a6865a8cb07c9815ec9ac90d630271cad773b2ee5fe08066f7b95bebd18bb967f8ce05d018ee9ab0430f9dfd1d84665b6f languageName: node linkType: hard @@ -2366,18 +2600,18 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 22.10.0 - resolution: "@types/node@npm:22.10.0" + version: 22.2.0 + resolution: "@types/node@npm:22.2.0" dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/efb3783b6fe74b4300c5bdd4f245f1025887d9b1d0950edae584af58a30d95cc058c10b4b3428f8300e4318468b605240c2ede8fcfb6ead2e0f05bca31e54c1b + undici-types: "npm:~6.13.0" + checksum: 10c0/c17900b34faecfec204f72970bd658d0c217aaf739c1bf7690c969465b6b26b77a8be1cd9ba735aadbd1dd20b5c3e4f406ec33528bf7c6eec90744886c5d5608 languageName: node linkType: hard "@types/prop-types@npm:*": - version: 15.7.13 - resolution: "@types/prop-types@npm:15.7.13" - checksum: 10c0/1b20fc67281902c6743379960247bc161f3f0406ffc0df8e7058745a85ea1538612109db0406290512947f9632fe9e10e7337bf0ce6338a91d6c948df16a7c61 + version: 15.7.12 + resolution: "@types/prop-types@npm:15.7.12" + checksum: 10c0/1babcc7db6a1177779f8fde0ccc78d64d459906e6ef69a4ed4dd6339c920c2e05b074ee5a92120fe4e9d9f1a01c952f843ebd550bee2332fc2ef81d1706878f8 languageName: node linkType: hard @@ -2493,11 +2727,11 @@ __metadata: linkType: hard "acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" + version: 8.12.1 + resolution: "acorn@npm:8.12.1" bin: acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 + checksum: 10c0/51fb26cd678f914e13287e886da2d7021f8c2bc0ccc95e03d3e0447ee278dd3b40b9c57dc222acd5881adcf26f3edc40901a4953403232129e3876793cd17386 languageName: node linkType: hard @@ -2563,9 +2797,9 @@ __metadata: linkType: hard "ansi-regex@npm:^6.0.1": - version: 6.1.0 - resolution: "ansi-regex@npm:6.1.0" - checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10c0/cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08 languageName: node linkType: hard @@ -2744,15 +2978,15 @@ __metadata: linkType: hard "babel-plugin-polyfill-corejs2@npm:^0.4.10": - version: 0.4.12 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.12" + version: 0.4.11 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" dependencies: "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.6.3" + "@babel/helper-define-polyfill-provider": "npm:^0.6.2" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/49150c310de2d472ecb95bd892bca1aa833cf5e84bbb76e3e95cf9ff2c6c8c3b3783dd19d70ba50ff6235eb8ce1fa1c0affe491273c95a1ef6a2923f4d5a3819 + checksum: 10c0/b2217bc8d5976cf8142453ed44daabf0b2e0e75518f24eac83b54a8892e87a88f1bd9089daa92fd25df979ecd0acfd29b6bc28c4182c1c46344cee15ef9bce84 languageName: node linkType: hard @@ -2769,13 +3003,13 @@ __metadata: linkType: hard "babel-plugin-polyfill-regenerator@npm:^0.6.1": - version: 0.6.3 - resolution: "babel-plugin-polyfill-regenerator@npm:0.6.3" + version: 0.6.2 + resolution: "babel-plugin-polyfill-regenerator@npm:0.6.2" dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.6.3" + "@babel/helper-define-polyfill-provider": "npm:^0.6.2" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/40164432e058e4b5c6d56feecacdad22692ae0534bd80c92d5399ed9e1a6a2b6797c8fda837995daddd4ca391f9aa2d58c74ad465164922e0f73631eaf9c4f76 + checksum: 10c0/bc541037cf7620bc84ddb75a1c0ce3288f90e7d2799c070a53f8a495c8c8ae0316447becb06f958dd25dcce2a2fce855d318ecfa48036a1ddb218d55aa38a744 languageName: node linkType: hard @@ -2814,27 +3048,24 @@ __metadata: linkType: hard "babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.1.0 - resolution: "babel-preset-current-node-syntax@npm:1.1.0" + version: 1.0.1 + resolution: "babel-preset-current-node-syntax@npm:1.0.1" dependencies: "@babel/plugin-syntax-async-generators": "npm:^7.8.4" "@babel/plugin-syntax-bigint": "npm:^7.8.3" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-import-attributes": "npm:^7.24.7" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" + "@babel/plugin-syntax-class-properties": "npm:^7.8.3" + "@babel/plugin-syntax-import-meta": "npm:^7.8.3" "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" + "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" + "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10c0/0b838d4412e3322cb4436f246e24e9c00bebcedfd8f00a2f51489db683bd35406bbd55a700759c28d26959c6e03f84dd6a1426f576f440267c1d7a73c5717281 + checksum: 10c0/5ba39a3a0e6c37d25e56a4fb843be632dac98d54706d8a0933f9bcb1a07987a96d55c2b5a6c11788a74063fb2534fe68c1f1dbb6c93626850c785e0938495627 languageName: node linkType: hard @@ -2960,7 +3191,21 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.24.0, browserslist@npm:^4.24.2": +"browserslist@npm:^4.23.3": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" + dependencies: + caniuse-lite: "npm:^1.0.30001646" + electron-to-chromium: "npm:^1.5.4" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 + languageName: node + linkType: hard + +"browserslist@npm:^4.24.0": version: 4.24.2 resolution: "browserslist@npm:4.24.2" dependencies: @@ -3024,6 +3269,13 @@ __metadata: languageName: node linkType: hard +"builtins@npm:^1.0.3": + version: 1.0.3 + resolution: "builtins@npm:1.0.3" + checksum: 10c0/493afcc1db0a56d174cc85bebe5ca69144f6fdd0007d6cbe6b2434185314c79d83cb867e492b56aa5cf421b4b8a8135bf96ba4c3ce71994cf3da154d1ea59747 + languageName: node + linkType: hard + "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -3097,6 +3349,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001651 + resolution: "caniuse-lite@npm:1.0.30001651" + checksum: 10c0/7821278952a6dbd17358e5d08083d258f092e2a530f5bc1840657cb140fbbc5ec44293bc888258c44a18a9570cde149ed05819ac8320b9710cf22f699891e6ad + languageName: node + linkType: hard + "caniuse-lite@npm:^1.0.30001669": version: 1.0.30001684 resolution: "caniuse-lite@npm:1.0.30001684" @@ -3189,9 +3448,9 @@ __metadata: linkType: hard "cjs-module-lexer@npm:^1.0.0": - version: 1.4.1 - resolution: "cjs-module-lexer@npm:1.4.1" - checksum: 10c0/5a7d8279629c9ba8ccf38078c2fed75b7737973ced22b9b5a54180efa57fb2fe2bb7bec6aec55e3b8f3f5044f5d7b240347ad9bd285e7c3d0ee5b0a1d0504dfc + version: 1.3.1 + resolution: "cjs-module-lexer@npm:1.3.1" + checksum: 10c0/cd98fbf3c7f4272fb0ebf71d08d0c54bc75ce0e30b9d186114e15b4ba791f3d310af65a339eea2a0318599af2818cdd8886d353b43dfab94468f72987397ad16 languageName: node linkType: hard @@ -3402,11 +3661,11 @@ __metadata: linkType: hard "core-js-compat@npm:^3.38.0": - version: 3.39.0 - resolution: "core-js-compat@npm:3.39.0" + version: 3.38.0 + resolution: "core-js-compat@npm:3.38.0" dependencies: - browserslist: "npm:^4.24.2" - checksum: 10c0/880579a3dab235e3b6350f1e324269c600753b48e891ea859331618d5051e68b7a95db6a03ad2f3cc7df4397318c25a5bc7740562ad39e94f56568638d09d414 + browserslist: "npm:^4.23.3" + checksum: 10c0/9d653a448b8a491034358d2f052e63dda86f75fb65646e2d313a938212470ba1c2f5a83bf31cc583d6c87a9e8d7b0d49458447cab2ff36c4caa097ae381de336 languageName: node linkType: hard @@ -3456,26 +3715,26 @@ __metadata: linkType: hard "cross-spawn@npm:^6.0.0": - version: 6.0.6 - resolution: "cross-spawn@npm:6.0.6" + version: 6.0.5 + resolution: "cross-spawn@npm:6.0.5" dependencies: nice-try: "npm:^1.0.4" path-key: "npm:^2.0.1" semver: "npm:^5.5.0" shebang-command: "npm:^1.2.0" which: "npm:^1.2.9" - checksum: 10c0/bf61fb890e8635102ea9bce050515cf915ff6a50ccaa0b37a17dc82fded0fb3ed7af5478b9367b86baee19127ad86af4be51d209f64fd6638c0862dca185fe1d + checksum: 10c0/e05544722e9d7189b4292c66e42b7abeb21db0d07c91b785f4ae5fefceb1f89e626da2703744657b287e86dcd4af57b54567cef75159957ff7a8a761d9055012 languageName: node linkType: hard "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" dependencies: path-key: "npm:^3.1.0" shebang-command: "npm:^2.0.0" which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 + checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 languageName: node linkType: hard @@ -3684,15 +3943,15 @@ __metadata: linkType: hard "dotenv-expand@npm:~11.0.6": - version: 11.0.7 - resolution: "dotenv-expand@npm:11.0.7" + version: 11.0.6 + resolution: "dotenv-expand@npm:11.0.6" dependencies: - dotenv: "npm:^16.4.5" - checksum: 10c0/d80b8a7be085edf351270b96ac0e794bc3ddd7f36157912939577cb4d33ba6492ebee349d59798b71b90e36f498d24a2a564fb4aa00073b2ef4c2a3a49c467b1 + dotenv: "npm:^16.4.4" + checksum: 10c0/e22891ec72cb926d46d9a26290ef77f9cc9ddcba92d2f83d5e6f3a803d1590887be68e25b559415d080053000441b6f63f5b36093a565bb8c5c994b992ae49f2 languageName: node linkType: hard -"dotenv@npm:^16.4.5, dotenv@npm:~16.4.5": +"dotenv@npm:^16.4.4, dotenv@npm:~16.4.5": version: 16.4.5 resolution: "dotenv@npm:16.4.5" checksum: 10c0/48d92870076832af0418b13acd6e5a5a3e83bb00df690d9812e94b24aff62b88ade955ac99a05501305b8dc8f1b0ee7638b18493deb6fe93d680e5220936292f @@ -3713,6 +3972,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.4": + version: 1.5.6 + resolution: "electron-to-chromium@npm:1.5.6" + checksum: 10c0/1dfef4feaa9f4e5231b8b0697f1f55623eb2ffd263b50e6d4ff995a0927653997ba116640ae06786661f8d24c7b99fa6727c0796e9c60d748f473674d78ab31e + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.5.41": version: 1.5.65 resolution: "electron-to-chromium@npm:1.5.65" @@ -3826,6 +4092,13 @@ __metadata: languageName: node linkType: hard +"escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 + languageName: node + linkType: hard + "escape-html@npm:~1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" @@ -3864,7 +4137,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 @@ -3872,14 +4145,14 @@ __metadata: linkType: hard "eslint@npm:^8.57.0": - version: 8.57.1 - resolution: "eslint@npm:8.57.1" + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.1" - "@humanwhocodes/config-array": "npm:^0.13.0" + "@eslint/js": "npm:8.57.0" + "@humanwhocodes/config-array": "npm:^0.11.14" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" "@ungap/structured-clone": "npm:^1.2.0" @@ -3915,7 +4188,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10c0/1fd31533086c1b72f86770a4d9d7058ee8b4643fd1cfd10c7aac1ecb8725698e88352a87805cf4b2ce890aa35947df4b4da9655fb7fdfa60dbb448a43f6ebcf1 + checksum: 10c0/00bb96fd2471039a312435a6776fe1fd557c056755eaa2b96093ef3a8508c92c8775d5f754768be6b1dddd09fdd3379ddb231eeb9b6c579ee17ea7d68000a529 languageName: node linkType: hard @@ -4363,6 +4636,15 @@ __metadata: languageName: node linkType: hard +"find-yarn-workspace-root@npm:~2.0.0": + version: 2.0.0 + resolution: "find-yarn-workspace-root@npm:2.0.0" + dependencies: + micromatch: "npm:^4.0.2" + checksum: 10c0/b0d3843013fbdaf4e57140e0165889d09fa61745c9e85da2af86e54974f4cc9f1967e40f0d8fc36a79d53091f0829c651d06607d552582e53976f3cd8f4e5689 + languageName: node + linkType: hard + "flat-cache@npm:^3.0.4": version: 3.2.0 resolution: "flat-cache@npm:3.2.0" @@ -4375,9 +4657,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.9": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 + version: 3.3.1 + resolution: "flatted@npm:3.3.1" + checksum: 10c0/324166b125ee07d4ca9bcf3a5f98d915d5db4f39d711fba640a3178b959919aae1f7cfd8aabcfef5826ed8aa8a2aa14cc85b2d7d18ff638ddf4ae3df39573eaf languageName: node linkType: hard @@ -4389,9 +4671,9 @@ __metadata: linkType: hard "flow-parser@npm:0.*": - version: 0.255.0 - resolution: "flow-parser@npm:0.255.0" - checksum: 10c0/3468b98344c1dd20a1f02f6d16fc8545e8a44f1d41848655ed1caea2c0037e1b0535edff5e23c5ae4f8d0359c32a130da74fbbb0479a5f5050ae56784b6b3596 + version: 0.243.0 + resolution: "flow-parser@npm:0.243.0" + checksum: 10c0/13c0969d0ca36d1065f9cccb27b496213264724b18bbc4ac2dee6c38f22b16b1b645bc04177b5b170d7f1362c9eee6e7915e933a169c71a12c8226845c7ab46c languageName: node linkType: hard @@ -4413,13 +4695,13 @@ __metadata: linkType: hard "form-data@npm:^3.0.1": - version: 3.0.2 - resolution: "form-data@npm:3.0.2" + version: 3.0.1 + resolution: "form-data@npm:3.0.1" dependencies: asynckit: "npm:^0.4.0" combined-stream: "npm:^1.0.8" mime-types: "npm:^2.1.12" - checksum: 10c0/1157ba53ce3a381ea3321b5506ae843ead4027e1b4567b74afa7d84df7043b33c5e518bb267dac56036c3dd8f4d8268be3e7181691488fff766bfccdc98d3bf7 + checksum: 10c0/1ccc3ae064a080a799923f754d49fcebdd90515a8924f0f54de557540b50e7f1fe48ba5f2bd0435a5664aa2d49729107e6aaf2155a9abf52339474c5638b4485 languageName: node linkType: hard @@ -4737,6 +5019,15 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^3.0.2": + version: 3.0.8 + resolution: "hosted-git-info@npm:3.0.8" + dependencies: + lru-cache: "npm:^6.0.0" + checksum: 10c0/af1392086ab3ab5576aa81af07be2f93ee1588407af18fd9752eb67502558e6ea0ffdd4be35ac6c8bef12fb9017f6e7705757e21b10b5ce7798da9106c9c0d9d + languageName: node + linkType: hard + "hosted-git-info@npm:^7.0.0": version: 7.0.2 resolution: "hosted-git-info@npm:7.0.2" @@ -4979,11 +5270,11 @@ __metadata: linkType: hard "is-core-module@npm:^2.13.0": - version: 2.15.1 - resolution: "is-core-module@npm:2.15.1" + version: 2.15.0 + resolution: "is-core-module@npm:2.15.0" dependencies: hasown: "npm:^2.0.2" - checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 + checksum: 10c0/da161f3d9906f459486da65609b2f1a2dfdc60887c689c234d04e88a062cb7920fa5be5fb7ab08dc43b732929653c4135ef05bf77888ae2a9040ce76815eb7b1 languageName: node linkType: hard @@ -5778,7 +6069,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.2.3": +"json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -6071,6 +6362,15 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10c0/cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 + languageName: node + linkType: hard + "make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": version: 2.1.0 resolution: "make-dir@npm:2.1.0" @@ -6409,7 +6709,17 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4, micromatch@npm:^4.0.8": +"micromatch@npm:^4.0.2": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10c0/58fa99bc5265edec206e9163a1d2cec5fabc46a5b473c45f4a700adce88c2520456ae35f2b301e4410fb3afb27e9521fb2813f6fc96be0a48a89430e0916a772 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.4": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -6627,11 +6937,11 @@ __metadata: linkType: hard "nanoid@npm:^3.3.7": - version: 3.3.8 - resolution: "nanoid@npm:3.3.8" + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 10c0/4b1bb29f6cfebf3be3bc4ad1f1296fb0a10a3043a79f34fbffe75d1621b4318319211cd420549459018ea3592f0d2f159247a6f874911d6d26eaaadda2478120 + checksum: 10c0/e3fb661aa083454f40500473bb69eedb85dc160e763150b9a2c567c7e9ff560ce028a9f833123b618a6ea742e311138b591910e795614a629029e86e180660f3 languageName: node linkType: hard @@ -6778,6 +7088,18 @@ __metadata: languageName: node linkType: hard +"npm-package-arg@npm:^7.0.0": + version: 7.0.0 + resolution: "npm-package-arg@npm:7.0.0" + dependencies: + hosted-git-info: "npm:^3.0.2" + osenv: "npm:^0.1.5" + semver: "npm:^5.6.0" + validate-npm-package-name: "npm:^3.0.0" + checksum: 10c0/2117c3ee2a9449db98c7d2efe92590867fcf68ab143b94a6ff53dee5a0c3343eab8f08a9f73bd6c15acca32f7635ea8b9a97b770ae1631c896a35ca9372a98c8 + languageName: node + linkType: hard + "npm-run-path@npm:^2.0.0": version: 2.0.2 resolution: "npm-run-path@npm:2.0.2" @@ -6920,13 +7242,30 @@ __metadata: languageName: node linkType: hard -"os-tmpdir@npm:~1.0.2": +"os-homedir@npm:^1.0.0": + version: 1.0.2 + resolution: "os-homedir@npm:1.0.2" + checksum: 10c0/6be4aa67317ee247b8d46142e243fb4ef1d2d65d3067f54bfc5079257a2f4d4d76b2da78cba7af3cb3f56dbb2e4202e0c47f26171d11ca1ed4008d842c90363f + languageName: node + linkType: hard + +"os-tmpdir@npm:^1.0.0, os-tmpdir@npm:~1.0.2": version: 1.0.2 resolution: "os-tmpdir@npm:1.0.2" checksum: 10c0/f438450224f8e2687605a8dd318f0db694b6293c5d835ae509a69e97c8de38b6994645337e5577f5001115470414638978cc49da1cdcc25106dad8738dc69990 languageName: node linkType: hard +"osenv@npm:^0.1.5": + version: 0.1.5 + resolution: "osenv@npm:0.1.5" + dependencies: + os-homedir: "npm:^1.0.0" + os-tmpdir: "npm:^1.0.0" + checksum: 10c0/b33ed4b77e662f3ee2a04bf4b56cad2107ab069dee982feb9e39ad44feb9aa0cf1016b9ac6e05d0d84c91fa496798fe48dd05a33175d624e51668068b9805302 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -6996,9 +7335,9 @@ __metadata: linkType: hard "package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10c0/e3ffaf6ac1040ab6082a658230c041ad14e72fabe99076a2081bb1d5d41210f11872403fc09082daf4387fc0baa6577f96c9c0e94c90c394fd57794b66aa4033 languageName: node linkType: hard @@ -7118,13 +7457,20 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0, picocolors@npm:^1.1.1": +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0": version: 1.1.1 resolution: "picocolors@npm:1.1.1" checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 languageName: node linkType: hard +"picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -7197,13 +7543,13 @@ __metadata: linkType: hard "postcss@npm:~8.4.32": - version: 8.4.49 - resolution: "postcss@npm:8.4.49" + version: 8.4.41 + resolution: "postcss@npm:8.4.41" dependencies: nanoid: "npm:^3.3.7" - picocolors: "npm:^1.1.1" - source-map-js: "npm:^1.2.1" - checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 + picocolors: "npm:^1.0.1" + source-map-js: "npm:^1.2.0" + checksum: 10c0/c1828fc59e7ec1a3bf52b3a42f615dba53c67960ed82a81df6441b485fe43c20aba7f4e7c55425762fd99c594ecabbaaba8cf5b30fd79dfec5b52a9f63a2d690 languageName: node linkType: hard @@ -7303,12 +7649,12 @@ __metadata: linkType: hard "pump@npm:^3.0.0": - version: 3.0.2 - resolution: "pump@npm:3.0.2" + version: 3.0.0 + resolution: "pump@npm:3.0.0" dependencies: end-of-stream: "npm:^1.1.0" once: "npm:^1.3.1" - checksum: 10c0/5ad655cb2a7738b4bcf6406b24ad0970d680649d996b55ad20d1be8e0c02394034e4c45ff7cd105d87f1e9b96a0e3d06fd28e11fae8875da26e7f7a8e2c9726f + checksum: 10c0/bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478 languageName: node linkType: hard @@ -7808,7 +8154,7 @@ __metadata: resolution: "root-workspace-0b6124@workspace:." dependencies: "@babel/core": "npm:^7.24.0" - "@testing-library/react-native": "npm:^12.8.1" + "@testing-library/react-native": "npm:^13.0.0-beta.0" "@types/eslint": "npm:^8.56.10" "@types/jest": "npm:^29.5.12" "@types/react": "npm:~18.3.12" @@ -7917,9 +8263,9 @@ __metadata: languageName: node linkType: hard -"send@npm:0.19.0": - version: 0.19.0 - resolution: "send@npm:0.19.0" +"send@npm:0.18.0": + version: 0.18.0 + resolution: "send@npm:0.18.0" dependencies: debug: "npm:2.6.9" depd: "npm:2.0.0" @@ -7934,7 +8280,7 @@ __metadata: on-finished: "npm:2.4.1" range-parser: "npm:~1.2.1" statuses: "npm:2.0.1" - checksum: 10c0/ea3f8a67a8f0be3d6bf9080f0baed6d2c51d11d4f7b4470de96a5029c598a7011c497511ccc28968b70ef05508675cebff27da9151dd2ceadd60be4e6cf845e3 + checksum: 10c0/0eb134d6a51fc13bbcb976a1f4214ea1e33f242fae046efc311e80aff66c7a43603e26a79d9d06670283a13000e51be6e0a2cb80ff0942eaf9f1cd30b7ae736a languageName: node linkType: hard @@ -7967,14 +8313,14 @@ __metadata: linkType: hard "serve-static@npm:^1.13.1": - version: 1.16.2 - resolution: "serve-static@npm:1.16.2" + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" dependencies: - encodeurl: "npm:~2.0.0" + encodeurl: "npm:~1.0.2" escape-html: "npm:~1.0.3" parseurl: "npm:~1.3.3" - send: "npm:0.19.0" - checksum: 10c0/528fff6f5e12d0c5a391229ad893910709bc51b5705962b09404a1d813857578149b8815f35d3ee5752f44cd378d0f31669d4b1d7e2d11f41e08283d5134bd1f + send: "npm:0.18.0" + checksum: 10c0/fa9f0e21a540a28f301258dfe1e57bb4f81cd460d28f0e973860477dd4acef946a1f41748b5bd41c73b621bea2029569c935faa38578fd34cd42a9b4947088ba languageName: node linkType: hard @@ -8114,10 +8460,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.2.1": - version: 1.2.1 - resolution: "source-map-js@npm:1.2.1" - checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf +"source-map-js@npm:^1.2.0": + version: 1.2.0 + resolution: "source-map-js@npm:1.2.0" + checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 languageName: node linkType: hard @@ -8489,8 +8835,8 @@ __metadata: linkType: hard "terser@npm:^5.15.0": - version: 5.36.0 - resolution: "terser@npm:5.36.0" + version: 5.31.5 + resolution: "terser@npm:5.31.5" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -8498,7 +8844,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10c0/f4ed2bead19f64789ddcfb85b7cef78f3942f967b8890c54f57d1e35bc7d547d551c6a4c32210bce6ba45b1c738314bbfac6acbc6c762a45cd171777d0c120d9 + checksum: 10c0/6e7c66c1f4062ee098bff3dc3c396819ebf5f1740f0615be9de39b675a78c732d199f4dcfdcd15bd65f354e37c45bb944360f532a36fe7f7d22f800ca53c2d02 languageName: node linkType: hard @@ -8578,6 +8924,13 @@ __metadata: languageName: node linkType: hard +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -8660,38 +9013,36 @@ __metadata: linkType: hard "typescript@npm:^5.3.0": - version: 5.7.2 - resolution: "typescript@npm:5.7.2" + version: 5.5.4 + resolution: "typescript@npm:5.5.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622 + checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c languageName: node linkType: hard "typescript@patch:typescript@npm%3A^5.3.0#optional!builtin": - version: 5.7.2 - resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=379a07" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/f3b8082c9d1d1629a215245c9087df56cb784f9fb6f27b5d55577a20e68afe2a889c040aacff6d27e35be165ecf9dca66e694c42eb9a50b3b2c451b36b5675cb + checksum: 10c0/73409d7b9196a5a1217b3aaad929bf76294d3ce7d6e9766dd880ece296ee91cf7d7db6b16c6c6c630ee5096eccde726c0ef17c7dfa52b01a243e57ae1f09ef07 languageName: node linkType: hard "ua-parser-js@npm:^1.0.35": - version: 1.0.39 - resolution: "ua-parser-js@npm:1.0.39" - bin: - ua-parser-js: script/cli.js - checksum: 10c0/c6452b0c683000f10975cb0a7e74cb1119ea95d4522ae85f396fa53b0b17884358a24ffdd86a66030c6b2981bdc502109a618c79fdaa217ee9032c9e46fcc78a + version: 1.0.38 + resolution: "ua-parser-js@npm:1.0.38" + checksum: 10c0/b1dd11b87e1784c79f7129e9aec679753fccf8a9b22f5202b79b19492635b5b46b779607a3cfae0270999a0d48da223bf94015642d2abee69d83c9069ab37bd0 languageName: node linkType: hard -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf +"undici-types@npm:~6.13.0": + version: 6.13.0 + resolution: "undici-types@npm:6.13.0" + checksum: 10c0/2de55181f569c77a4f08063f8bf2722fcbb6ea312a26a9e927bd1f5ea5cf3a281c5ddf23155061db083e0a25838f54813543ff13b0ac34d230d5c1205ead66c1 languageName: node linkType: hard @@ -8703,9 +9054,9 @@ __metadata: linkType: hard "unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.1 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.1" - checksum: 10c0/f83bc492fdbe662860795ef37a85910944df7310cac91bd778f1c19ebc911e8b9cde84e703de631e5a2fcca3905e39896f8fc5fc6a44ddaf7f4aff1cda24f381 + version: 2.0.0 + resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" + checksum: 10c0/0fe812641bcfa3ae433025178a64afb5d9afebc21a922dafa7cba971deebb5e4a37350423890750132a85c936c290fb988146d0b1bd86838ad4897f4fc5bd0de languageName: node linkType: hard @@ -8720,9 +9071,9 @@ __metadata: linkType: hard "unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.2.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.2.0" - checksum: 10c0/1d0a2deefd97974ddff5b7cb84f9884177f4489928dfcebb4b2b091d6124f2739df51fc6ea15958e1b5637ac2a24cff9bf21ea81e45335086ac52c0b4c717d6d + version: 2.1.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" + checksum: 10c0/f5b9499b9e0ffdc6027b744d528f17ec27dd7c15da03254ed06851feec47e0531f20d410910c8a49af4a6a190f4978413794c8d75ce112950b56d583b5d5c7f2 languageName: node linkType: hard @@ -8788,6 +9139,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10c0/a7452de47785842736fb71547651c5bbe5b4dc1e3722ccf48a704b7b34e4dcf633991eaa8e4a6a517ffb738b3252eede3773bef673ef9021baa26b056d63a5b9 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.1.1": version: 1.1.1 resolution: "update-browserslist-db@npm:1.1.1" @@ -8854,6 +9219,15 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-name@npm:^3.0.0": + version: 3.0.0 + resolution: "validate-npm-package-name@npm:3.0.0" + dependencies: + builtins: "npm:^1.0.3" + checksum: 10c0/064f21f59aefae6cc286dd4a50b15d14adb0227e0facab4316197dfb8d06801669e997af5081966c15f7828a5e6ff1957bd20886aeb6b9d0fa430e4cb5db9c4a + languageName: node + linkType: hard + "validate-npm-package-name@npm:^5.0.0": version: 5.0.1 resolution: "validate-npm-package-name@npm:5.0.1" diff --git a/examples/cookbook/jest-setup.ts b/examples/cookbook/jest-setup.ts index 3af0f039d..a57a6eabc 100644 --- a/examples/cookbook/jest-setup.ts +++ b/examples/cookbook/jest-setup.ts @@ -1,7 +1,5 @@ import { configure } from '@testing-library/react-native'; -// Import built-in Jest matchers -import '@testing-library/react-native/extend-expect'; import { server } from './app/network-requests/__tests__/test-utils'; // Enable API mocking via Mock Service Worker (MSW) @@ -12,5 +10,3 @@ afterEach(() => server.resetHandlers()); // Disable API mocking after the tests are done afterAll(() => server.close()); - -configure({ concurrentRoot: true }); diff --git a/examples/cookbook/jest.config.js b/examples/cookbook/jest.config.js index 839f9c880..ce238f6cd 100644 --- a/examples/cookbook/jest.config.js +++ b/examples/cookbook/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - preset: '@testing-library/react-native', + preset: 'react-native', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], setupFilesAfterEnv: ['./jest-setup.ts'], testMatch: ['**/*.test.{ts,tsx}'], diff --git a/examples/cookbook/package.json b/examples/cookbook/package.json index 0bcaa6874..ee085b710 100644 --- a/examples/cookbook/package.json +++ b/examples/cookbook/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@babel/core": "^7.20.0", "@expo/metro-runtime": "~4.0.0", - "@testing-library/react-native": "^12.8.1", + "@testing-library/react-native": "^13.0.0-beta.0", "@types/eslint": "^8.56.10", "@types/jest": "^29.5.12", "@types/react": "~18.3.12", diff --git a/examples/cookbook/yarn.lock b/examples/cookbook/yarn.lock index bff1ed6a0..122914525 100644 --- a/examples/cookbook/yarn.lock +++ b/examples/cookbook/yarn.lock @@ -3024,22 +3024,22 @@ __metadata: languageName: node linkType: hard -"@testing-library/react-native@npm:^12.8.1": - version: 12.8.1 - resolution: "@testing-library/react-native@npm:12.8.1" +"@testing-library/react-native@npm:^13.0.0-beta.0": + version: 13.0.0-beta.0 + resolution: "@testing-library/react-native@npm:13.0.0-beta.0" dependencies: jest-matcher-utils: "npm:^29.7.0" pretty-format: "npm:^29.7.0" redent: "npm:^3.0.0" peerDependencies: - jest: ">=28.0.0" - react: ">=16.8.0" - react-native: ">=0.59" - react-test-renderer: ">=16.8.0" + jest: ">=29.0.0" + react: ">=18.2.0" + react-native: ">=0.71" + react-test-renderer: ">=18.2.0" peerDependenciesMeta: jest: optional: true - checksum: 10c0/8fc3ba4b1e5767fc1d24133a907515aa155b3b400fd8a681bf5957a9bb56e0885569234ab4f7fe66441e91ca9de5f761b1db1fdfc049735bc0c4ecc2b6d92bc5 + checksum: 10c0/98ceabedd4f7fec5a78b3a504f1ecad6cef79c58df7f195c04264c0d09f107385ec1fe60764169324dc74a34374061260f6f12c061b4d0c839d63a16b7fc623c languageName: node linkType: hard @@ -9395,7 +9395,7 @@ __metadata: dependencies: "@babel/core": "npm:^7.20.0" "@expo/metro-runtime": "npm:~4.0.0" - "@testing-library/react-native": "npm:^12.8.1" + "@testing-library/react-native": "npm:^13.0.0-beta.0" "@types/eslint": "npm:^8.56.10" "@types/jest": "npm:^29.5.12" "@types/react": "npm:~18.3.12" diff --git a/extend-expect.d.ts b/extend-expect.d.ts deleted file mode 100644 index 14b2aff7c..000000000 --- a/extend-expect.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './build/matchers/extend-expect'; diff --git a/extend-expect.js b/extend-expect.js deleted file mode 100644 index 796915b5f..000000000 --- a/extend-expect.js +++ /dev/null @@ -1 +0,0 @@ -require('./build/matchers/extend-expect'); diff --git a/jest-preset/index.js b/jest-preset/index.js deleted file mode 100644 index 40fe80597..000000000 --- a/jest-preset/index.js +++ /dev/null @@ -1,10 +0,0 @@ -const reactNativePreset = require('react-native/jest-preset'); - -module.exports = { - ...reactNativePreset, - // this is needed to make modern fake timers work - // because the react-native preset overrides global.Promise - setupFiles: [require.resolve('./save-promise.js')] - .concat(reactNativePreset.setupFiles) - .concat([require.resolve('./restore-promise.js')]), -}; diff --git a/jest-preset/restore-promise.js b/jest-preset/restore-promise.js deleted file mode 100644 index 196b35417..000000000 --- a/jest-preset/restore-promise.js +++ /dev/null @@ -1 +0,0 @@ -global.Promise = global.RNTL_ORIGINAL_PROMISE; diff --git a/jest-preset/save-promise.js b/jest-preset/save-promise.js deleted file mode 100644 index 30a5be234..000000000 --- a/jest-preset/save-promise.js +++ /dev/null @@ -1 +0,0 @@ -global.RNTL_ORIGINAL_PROMISE = Promise; diff --git a/jest-setup.ts b/jest-setup.ts index 9ed60181d..868f7ba89 100644 --- a/jest-setup.ts +++ b/jest-setup.ts @@ -3,7 +3,7 @@ import './src/matchers/extend-expect'; beforeEach(() => { resetToDefaults(); - if (process.env.CONCURRENT_MODE === '1') { - configure({ concurrentRoot: true }); + if (process.env.CONCURRENT_MODE === '0') { + configure({ concurrentRoot: false }); } }); diff --git a/jest.config.js b/jest.config.js index 5018adce5..459ad61aa 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - preset: './jest-preset', + preset: 'react-native', setupFilesAfterEnv: ['./jest-setup.ts'], testPathIgnorePatterns: ['build/', 'examples/', 'experiments-app/', 'timer-utils'], testTimeout: 60000, diff --git a/matchers.d.ts b/matchers.d.ts new file mode 100644 index 000000000..6abd59c4e --- /dev/null +++ b/matchers.d.ts @@ -0,0 +1 @@ +export * from './build/matchers'; diff --git a/matchers.js b/matchers.js new file mode 100644 index 000000000..dafd7cfb2 --- /dev/null +++ b/matchers.js @@ -0,0 +1,2 @@ +// makes it so people can import from '@testing-library/react-native/pure' +module.exports = require('./build/matchers'); diff --git a/package.json b/package.json index 5b5a766cc..f70d20d12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@testing-library/react-native", - "version": "12.9.0", + "version": "13.0.0-beta.0", "description": "Simple and complete React Native testing utilities that encourage good testing practices.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,13 +34,13 @@ "build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"", "build:ts": "tsc --build tsconfig.release.json", "build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes", - "release": "release-it" + "release": "release-it", + "release:rc": "release-it --preRelease=rc" }, "files": [ "build/", - "jest-preset/", - "extend-expect.js", - "extend-expect.d.ts", + "matchers.js", + "matchers.d.ts", "pure.js", "pure.d.ts", "dont-cleanup-after-each.js", @@ -52,10 +52,10 @@ "redent": "^3.0.0" }, "peerDependencies": { - "jest": ">=28.0.0", - "react": ">=16.8.0", - "react-native": ">=0.59", - "react-test-renderer": ">=16.8.0" + "jest": ">=29.0.0", + "react": ">=18.2.0", + "react-native": ">=0.71", + "react-test-renderer": ">=18.2.0" }, "peerDependenciesMeta": { "jest": { @@ -65,7 +65,7 @@ "devDependencies": { "@babel/cli": "^7.25.9", "@babel/core": "^7.26.0", - "@babel/plugin-transform-flow-strip-types": "^7.25.9", + "@babel/plugin-transform-strict-mode": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/preset-flow": "^7.25.9", "@babel/preset-react": "^7.25.9", @@ -78,9 +78,9 @@ "@types/react": "^18.3.12", "@types/react-test-renderer": "^18.3.0", "babel-jest": "^29.7.0", + "babel-plugin-module-resolver": "^5.0.2", "del-cli": "^6.0.0", "eslint": "^8.57.1", - "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-prettier": "^4.2.1", "flow-bin": "~0.170.0", "jest": "^29.7.0", @@ -95,5 +95,8 @@ "publishConfig": { "registry": "https://registry.npmjs.org" }, - "packageManager": "yarn@4.5.3" + "packageManager": "yarn@4.5.3", + "engines": { + "node": ">=18" + } } diff --git a/src/__tests__/__snapshots__/render-debug.test.tsx.snap b/src/__tests__/__snapshots__/render-debug.test.tsx.snap index 561b363ae..8e3c10779 100644 --- a/src/__tests__/__snapshots__/render-debug.test.tsx.snap +++ b/src/__tests__/__snapshots__/render-debug.test.tsx.snap @@ -367,106 +367,6 @@ exports[`debug: another custom message 1`] = ` " `; -exports[`debug: shallow 1`] = ` -" - - Is the banana fresh? - - - not fresh - - - - - - - Change freshness! - - - First Text - - - Second Text - - - 0 - -" -`; - -exports[`debug: shallow with message 1`] = ` -"my other custom message - - - - Is the banana fresh? - - - not fresh - - - - - - - Change freshness! - - - First Text - - - Second Text - - - 0 - -" -`; - exports[`debug: with message 1`] = ` "my custom message diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts index b3d2a7ed1..803cfd621 100644 --- a/src/__tests__/config.test.ts +++ b/src/__tests__/config.test.ts @@ -1,4 +1,4 @@ -import { getConfig, configure, resetToDefaults, configureInternal } from '../config'; +import { getConfig, configure, resetToDefaults } from '../config'; beforeEach(() => { resetToDefaults(); @@ -16,7 +16,7 @@ test('configure() overrides existing config values', () => { asyncUtilTimeout: 5000, defaultDebugOptions: { message: 'debug message' }, defaultIncludeHiddenElements: false, - concurrentRoot: false, + concurrentRoot: true, }); }); @@ -34,27 +34,11 @@ test('resetToDefaults() resets config to defaults', () => { }); test('resetToDefaults() resets internal config to defaults', () => { - configureInternal({ - hostComponentNames: { - text: 'A', - textInput: 'A', - image: 'A', - switch: 'A', - scrollView: 'A', - modal: 'A', - }, - }); - expect(getConfig().hostComponentNames).toEqual({ - text: 'A', - textInput: 'A', - image: 'A', - switch: 'A', - scrollView: 'A', - modal: 'A', - }); + configure({ asyncUtilTimeout: 2000 }); + expect(getConfig().asyncUtilTimeout).toBe(2000); resetToDefaults(); - expect(getConfig().hostComponentNames).toBe(undefined); + expect(getConfig().asyncUtilTimeout).toBe(1000); }); test('configure handles alias option defaultHidden', () => { diff --git a/src/__tests__/host-component-names.test.tsx b/src/__tests__/host-component-names.test.tsx index 0e55f1a82..d3050c8ec 100644 --- a/src/__tests__/host-component-names.test.tsx +++ b/src/__tests__/host-component-names.test.tsx @@ -1,123 +1,48 @@ import * as React from 'react'; -import { View } from 'react-native'; -import TestRenderer from 'react-test-renderer'; -import { configureInternal, getConfig } from '../config'; +import { Image, Modal, ScrollView, Switch, Text, TextInput } from 'react-native'; import { - getHostComponentNames, - configureHostComponentNamesIfNeeded, + isHostImage, + isHostModal, + isHostScrollView, + isHostSwitch, + isHostText, + isHostTextInput, } from '../helpers/host-component-names'; -import { act, render } from '..'; +import { render, screen } from '..'; -describe('getHostComponentNames', () => { - test('returns host component names from internal config', () => { - configureInternal({ - hostComponentNames: { - text: 'banana', - textInput: 'banana', - image: 'banana', - switch: 'banana', - scrollView: 'banana', - modal: 'banana', - }, - }); - - expect(getHostComponentNames()).toEqual({ - text: 'banana', - textInput: 'banana', - image: 'banana', - switch: 'banana', - scrollView: 'banana', - modal: 'banana', - }); - }); - - test('detects host component names if not present in internal config', () => { - expect(getConfig().hostComponentNames).toBeUndefined(); - - const hostComponentNames = getHostComponentNames(); - - expect(hostComponentNames).toEqual({ - text: 'Text', - textInput: 'TextInput', - image: 'Image', - switch: 'RCTSwitch', - scrollView: 'RCTScrollView', - modal: 'Modal', - }); - expect(getConfig().hostComponentNames).toBe(hostComponentNames); - }); - - // Repro test for case when user indirectly triggers `getHostComponentNames` calls from - // explicit `act` wrapper. - // See: https://github.com/callstack/react-native-testing-library/issues/1302 - // and https://github.com/callstack/react-native-testing-library/issues/1305 - test('does not throw when wrapped in act after render has been called', () => { - render(); - expect(() => - act(() => { - getHostComponentNames(); - }), - ).not.toThrow(); - }); +test('detects host Text component', () => { + render(Hello); + expect(isHostText(screen.root)).toBe(true); }); -describe('configureHostComponentNamesIfNeeded', () => { - test('updates internal config with host component names when they are not defined', () => { - expect(getConfig().hostComponentNames).toBeUndefined(); - - configureHostComponentNamesIfNeeded(); - - expect(getConfig().hostComponentNames).toEqual({ - text: 'Text', - textInput: 'TextInput', - image: 'Image', - switch: 'RCTSwitch', - scrollView: 'RCTScrollView', - modal: 'Modal', - }); - }); - - test('does not update internal config when host component names are already configured', () => { - configureInternal({ - hostComponentNames: { - text: 'banana', - textInput: 'banana', - image: 'banana', - switch: 'banana', - scrollView: 'banana', - modal: 'banana', - }, - }); - - configureHostComponentNamesIfNeeded(); - - expect(getConfig().hostComponentNames).toEqual({ - text: 'banana', - textInput: 'banana', - image: 'banana', - switch: 'banana', - scrollView: 'banana', - modal: 'banana', - }); - }); - - test('throw an error when auto-detection fails', () => { - const mockCreate = jest.spyOn(TestRenderer, 'create') as jest.Mock; - const renderer = TestRenderer.create(); +// Some users might use the raw RCTText component directly for performance reasons. +// See: https://blog.theodo.com/2023/10/native-views-rn-performance/ +test('detects raw RCTText component', () => { + render(React.createElement('RCTText', { testID: 'text' }, 'Hello')); + expect(isHostText(screen.root)).toBe(true); +}); - mockCreate.mockReturnValue({ - root: renderer.root, - }); +test('detects host TextInput component', () => { + render(); + expect(isHostTextInput(screen.root)).toBe(true); +}); - expect(() => configureHostComponentNamesIfNeeded()).toThrowErrorMatchingInlineSnapshot(` - "Trying to detect host component names triggered the following error: +test('detects host Image component', () => { + render(); + expect(isHostImage(screen.root)).toBe(true); +}); - Unable to find an element with testID: text +test('detects host Switch component', () => { + render(); + expect(isHostSwitch(screen.root)).toBe(true); +}); - There seems to be an issue with your configuration that prevents React Native Testing Library from working correctly. - Please check if you are using compatible versions of React Native and React Native Testing Library." - `); +test('detects host ScrollView component', () => { + render(); + expect(isHostScrollView(screen.root)).toBe(true); +}); - mockCreate.mockReset(); - }); +test('detects host Modal component', () => { + render(); + expect(isHostModal(screen.root)).toBe(true); }); diff --git a/src/__tests__/render-debug.test.tsx b/src/__tests__/render-debug.test.tsx index 9a57c8144..0b5bd462b 100644 --- a/src/__tests__/render-debug.test.tsx +++ b/src/__tests__/render-debug.test.tsx @@ -97,21 +97,19 @@ test('debug', () => { screen.debug(); screen.debug('my custom message'); - screen.debug.shallow(); - screen.debug.shallow('my other custom message'); screen.debug({ message: 'another custom message' }); const mockCalls = jest.mocked(console.log).mock.calls; expect(stripAnsi(mockCalls[0][0])).toMatchSnapshot(); expect(stripAnsi(mockCalls[1][0] + mockCalls[1][1])).toMatchSnapshot('with message'); - expect(stripAnsi(mockCalls[2][0])).toMatchSnapshot('shallow'); - expect(stripAnsi(mockCalls[3][0] + mockCalls[3][1])).toMatchSnapshot('shallow with message'); - expect(stripAnsi(mockCalls[4][0] + mockCalls[4][1])).toMatchSnapshot('another custom message'); + expect(stripAnsi(mockCalls[2][0] + mockCalls[2][1])).toMatchSnapshot('another custom message'); const mockWarnCalls = jest.mocked(console.warn).mock.calls; - expect(mockWarnCalls[0]).toEqual([ - 'Using debug("message") is deprecated and will be removed in future release, please use debug({ message; "message" }) instead.', - ]); + expect(mockWarnCalls[0]).toMatchInlineSnapshot(` + [ + "Using debug("message") is deprecated and will be removed in future release, please use debug({ message: "message" }) instead.", + ] + `); }); test('debug changing component', () => { diff --git a/src/__tests__/render.test.tsx b/src/__tests__/render.test.tsx index fae79012b..58acb4535 100644 --- a/src/__tests__/render.test.tsx +++ b/src/__tests__/render.test.tsx @@ -1,7 +1,6 @@ /* eslint-disable no-console */ import * as React from 'react'; import { Pressable, Text, TextInput, View } from 'react-native'; -import { getConfig, resetToDefaults } from '../config'; import { fireEvent, render, RenderAPI, screen } from '..'; const PLACEHOLDER_FRESHNESS = 'Add custom freshness'; @@ -234,17 +233,9 @@ test('returned output can be spread using rest operator', () => { expect(rest).toBeTruthy(); }); -test('render calls detects host component names', () => { - resetToDefaults(); - expect(getConfig().hostComponentNames).toBeUndefined(); - - render(); - expect(getConfig().hostComponentNames).not.toBeUndefined(); -}); - test('supports legacy rendering', () => { render(, { concurrentRoot: false }); - expect(screen.root).toBeDefined(); + expect(screen.root).toBeOnTheScreen(); }); test('supports concurrent rendering', () => { diff --git a/src/__tests__/screen.test.tsx b/src/__tests__/screen.test.tsx index b22e92522..d5e5183ca 100644 --- a/src/__tests__/screen.test.tsx +++ b/src/__tests__/screen.test.tsx @@ -55,6 +55,5 @@ test('screen throws without render', () => { expect(() => screen.root).toThrow('`render` method has not been called'); expect(() => screen.UNSAFE_root).toThrow('`render` method has not been called'); expect(() => screen.debug()).toThrow('`render` method has not been called'); - expect(() => screen.debug.shallow()).toThrow('`render` method has not been called'); expect(() => screen.getByText('Mt. Everest')).toThrow('`render` method has not been called'); }); diff --git a/src/act.ts b/src/act.ts index 5c44ca358..940df677f 100644 --- a/src/act.ts +++ b/src/act.ts @@ -1,9 +1,10 @@ // This file and the act() implementation is sourced from react-testing-library -// https://github.com/testing-library/react-testing-library/blob/c80809a956b0b9f3289c4a6fa8b5e8cc72d6ef6d/src/act-compat.js +// https://github.com/testing-library/react-testing-library/blob/3dcd8a9649e25054c0e650d95fca2317b7008576/types/index.d.ts +import * as React from 'react'; import { act as reactTestRendererAct } from 'react-test-renderer'; -import { checkReactVersionAtLeast } from './react-versions'; -type ReactAct = typeof reactTestRendererAct; +const reactAct = typeof React.act === 'function' ? React.act : reactTestRendererAct; +type ReactAct = 0 extends 1 & typeof React.act ? typeof reactTestRendererAct : typeof React.act; // See https://github.com/reactwg/react-18/discussions/102 for more context on global.IS_REACT_ACT_ENVIRONMENT declare global { @@ -23,19 +24,13 @@ function withGlobalActEnvironment(actImplementation: ReactAct) { const previousActEnvironment = getIsReactActEnvironment(); setIsReactActEnvironment(true); - // this code is riddled with eslint disabling comments because this doesn't use real promises but eslint thinks we do try { // The return value of `act` is always a thenable. let callbackNeedsToBeAwaited = false; const actResult = actImplementation(() => { const result = callback(); - if ( - result !== null && - typeof result === 'object' && - // @ts-expect-error this should be a promise or thenable - // eslint-disable-next-line promise/prefer-await-to-then - typeof result.then === 'function' - ) { + // @ts-expect-error TS is too strict here + if (result !== null && typeof result === 'object' && typeof result.then === 'function') { callbackNeedsToBeAwaited = true; } return result; @@ -45,15 +40,17 @@ function withGlobalActEnvironment(actImplementation: ReactAct) { const thenable = actResult; return { then: (resolve: (value: never) => never, reject: (value: never) => never) => { - // eslint-disable-next-line + // eslint-disable-next-line promise/catch-or-return, promise/prefer-await-to-then thenable.then( // eslint-disable-next-line promise/always-return (returnValue) => { setIsReactActEnvironment(previousActEnvironment); + // @ts-expect-error resolve(returnValue); }, (error) => { setIsReactActEnvironment(previousActEnvironment); + // @ts-expect-error reject(error); }, ); @@ -72,9 +69,8 @@ function withGlobalActEnvironment(actImplementation: ReactAct) { }; } -const act: ReactAct = checkReactVersionAtLeast(18, 0) - ? (withGlobalActEnvironment(reactTestRendererAct) as ReactAct) - : reactTestRendererAct; +// @ts-expect-error +const act = withGlobalActEnvironment(reactAct) as ReactAct; export default act; export { setIsReactActEnvironment as setReactActEnvironment, getIsReactActEnvironment }; diff --git a/src/config.ts b/src/config.ts index 388933cdd..7d5d74617 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -import { DebugOptions } from './helpers/debug-deep'; +import { DebugOptions } from './helpers/debug'; /** * Global configuration options for React Native Testing Library. @@ -15,8 +15,8 @@ export type Config = { defaultDebugOptions?: Partial; /** - * Set to `true` to enable concurrent rendering. - * Otherwise `render` will default to legacy synchronous rendering. + * Set to `false` to disable concurrent rendering. + * Otherwise `render` will default to concurrent rendering. */ concurrentRoot: boolean; }; @@ -26,24 +26,10 @@ export type ConfigAliasOptions = { defaultHidden: boolean; }; -export type HostComponentNames = { - text: string; - textInput: string; - image: string; - switch: string; - scrollView: string; - modal: string; -}; - -export type InternalConfig = Config & { - /** Names for key React Native host components. */ - hostComponentNames?: HostComponentNames; -}; - -const defaultConfig: InternalConfig = { +const defaultConfig: Config = { asyncUtilTimeout: 1000, defaultIncludeHiddenElements: false, - concurrentRoot: false, + concurrentRoot: true, }; let config = { ...defaultConfig }; @@ -66,13 +52,6 @@ export function configure(options: Partial) { }; } -export function configureInternal(option: Partial) { - config = { - ...config, - ...option, - }; -} - export function resetToDefaults() { config = { ...defaultConfig }; } diff --git a/src/fire-event.ts b/src/fire-event.ts index 0f0287f5e..7946baaba 100644 --- a/src/fire-event.ts +++ b/src/fire-event.ts @@ -10,7 +10,7 @@ import act from './act'; import { isElementMounted, isHostElement } from './helpers/component-tree'; import { isHostScrollView, isHostTextInput } from './helpers/host-component-names'; import { isPointerEventEnabled } from './helpers/pointer-events'; -import { isTextInputEditable } from './helpers/text-input'; +import { isEditableTextInput } from './helpers/text-input'; import { Point, StringWithAutocomplete } from './types'; import { nativeState } from './native-state'; @@ -52,9 +52,9 @@ export function isEventEnabled( eventName: string, nearestTouchResponder?: ReactTestInstance, ) { - if (isHostTextInput(nearestTouchResponder)) { + if (nearestTouchResponder != null && isHostTextInput(nearestTouchResponder)) { return ( - isTextInputEditable(nearestTouchResponder) || + isEditableTextInput(nearestTouchResponder) || textInputEventsIgnoringEditableProp.has(eventName) ); } @@ -160,12 +160,7 @@ const scrollEventNames = new Set([ ]); function setNativeStateIfNeeded(element: ReactTestInstance, eventName: string, value: unknown) { - if ( - eventName === 'changeText' && - typeof value === 'string' && - isHostTextInput(element) && - isTextInputEditable(element) - ) { + if (eventName === 'changeText' && typeof value === 'string' && isEditableTextInput(element)) { nativeState.valueForElement.set(element, value); } diff --git a/src/flush-micro-tasks.ts b/src/flush-micro-tasks.ts index 08295740b..4e5fac764 100644 --- a/src/flush-micro-tasks.ts +++ b/src/flush-micro-tasks.ts @@ -3,28 +3,3 @@ import { setImmediate } from './helpers/timers'; export function flushMicroTasks() { return new Promise((resolve) => setImmediate(resolve)); } - -/** - * @deprecated To be removed in the next major release. - */ -type Thenable = { then: (callback: () => T) => unknown }; - -/** - * This legacy implementation of `flushMicroTasks` is used for compatibility with - * older versions of React Native (pre 0.71) which uses Promise polyfil. - * - * For users with older version of React Native there is a workaround of using our own - * Jest preset instead the `react-native` one, but requiring such change would be a - * breaking change for existing users. - * - * @deprecated To be removed in the next major release. - */ -export function flushMicroTasksLegacy(): Thenable { - return { - // using "thenable" instead of a Promise, because otherwise it breaks when - // using "modern" fake timers - then(resolve) { - setImmediate(resolve); - }, - }; -} diff --git a/src/helpers/__tests__/accessiblity.test.tsx b/src/helpers/__tests__/accessiblity.test.tsx index cbfd021c4..b206ccdc7 100644 --- a/src/helpers/__tests__/accessiblity.test.tsx +++ b/src/helpers/__tests__/accessiblity.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { View, Text, TextInput, Pressable, Switch, TouchableOpacity } from 'react-native'; import { render, isHiddenFromAccessibility, isInaccessible, screen } from '../..'; -import { isAccessibilityElement } from '../accessibility'; +import { computeAriaLabel, isAccessibilityElement } from '../accessibility'; describe('isHiddenFromAccessibility', () => { test('returns false for accessible elements', () => { @@ -371,3 +371,39 @@ describe('isAccessibilityElement', () => { expect(isAccessibilityElement(null)).toEqual(false); }); }); + +describe('computeAriaLabel', () => { + test('supports basic usage', () => { + render( + + + + + External Text + + + + Text Content + + , + ); + + expect(computeAriaLabel(screen.getByTestId('label'))).toEqual('Internal Label'); + expect(computeAriaLabel(screen.getByTestId('label-by-id'))).toEqual('External Text'); + expect(computeAriaLabel(screen.getByTestId('no-label'))).toBeUndefined(); + expect(computeAriaLabel(screen.getByTestId('text-content'))).toBeUndefined(); + }); + + test('label priority', () => { + render( + + + + External Label + + , + ); + + expect(computeAriaLabel(screen.getByTestId('subject'))).toEqual('External Label'); + }); +}); diff --git a/src/helpers/__tests__/component-tree.test.tsx b/src/helpers/__tests__/component-tree.test.tsx index 0746d58ff..fe7e3838f 100644 --- a/src/helpers/__tests__/component-tree.test.tsx +++ b/src/helpers/__tests__/component-tree.test.tsx @@ -228,8 +228,4 @@ describe('getUnsafeRootElement()', () => { const view = screen.getByTestId('view'); expect(getUnsafeRootElement(view)).toEqual(screen.UNSAFE_root); }); - - it('returns null for null', () => { - expect(getUnsafeRootElement(null)).toEqual(null); - }); }); diff --git a/src/helpers/__tests__/query-name.test.ts b/src/helpers/__tests__/query-name.test.ts deleted file mode 100644 index 3ef7b9529..000000000 --- a/src/helpers/__tests__/query-name.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { getQueryPrefix } from '../query-name'; - -test('getQueryPrefix should return correct prefix', () => { - expect(getQueryPrefix('getByRole')).toBe('get'); - expect(getQueryPrefix('getAllByText')).toEqual('getAll'); - expect(getQueryPrefix('queryByTestId')).toEqual('query'); - expect(getQueryPrefix('queryAllByPlaceholderText')).toEqual('queryAll'); - expect(getQueryPrefix('findByHintText')).toEqual('find'); - expect(getQueryPrefix('findAllByDisplayValue')).toEqual('findAll'); -}); diff --git a/src/helpers/__tests__/text-input.test.tsx b/src/helpers/__tests__/text-input.test.tsx index 77cc20191..2a3ad3f1f 100644 --- a/src/helpers/__tests__/text-input.test.tsx +++ b/src/helpers/__tests__/text-input.test.tsx @@ -1,10 +1,19 @@ import * as React from 'react'; -import { View } from 'react-native'; +import { TextInput, View } from 'react-native'; import { render, screen } from '../..'; -import { getTextInputValue, isTextInputEditable } from '../text-input'; +import { getTextInputValue, isEditableTextInput } from '../text-input'; -test('getTextInputValue() throws error when invoked on non-text input', () => { - render(); +test('getTextInputValue basic test', () => { + render( + + + + + , + ); + + expect(getTextInputValue(screen.getByTestId('value'))).toBe('text-a'); + expect(getTextInputValue(screen.getByTestId('default-value'))).toBe('text-b'); const view = screen.getByTestId('view'); expect(() => getTextInputValue(view)).toThrowErrorMatchingInlineSnapshot( @@ -12,11 +21,18 @@ test('getTextInputValue() throws error when invoked on non-text input', () => { ); }); -test('isTextInputEditable() throws error when invoked on non-text input', () => { - render(); - - const view = screen.getByTestId('view'); - expect(() => isTextInputEditable(view)).toThrowErrorMatchingInlineSnapshot( - `"Element is not a "TextInput", but it has type "View"."`, +test('isEditableTextInput basic test', () => { + render( + + + + + + , ); + + expect(isEditableTextInput(screen.getByTestId('default'))).toBe(true); + expect(isEditableTextInput(screen.getByTestId('editable'))).toBe(true); + expect(isEditableTextInput(screen.getByTestId('non-editable'))).toBe(false); + expect(isEditableTextInput(screen.getByTestId('view'))).toBe(false); }); diff --git a/src/helpers/accessibility.ts b/src/helpers/accessibility.ts index 5eee9401a..e1f193368 100644 --- a/src/helpers/accessibility.ts +++ b/src/helpers/accessibility.ts @@ -5,17 +5,12 @@ import { Role, StyleSheet, } from 'react-native'; -import { ReactTestInstance } from 'react-test-renderer'; -import { getHostSiblings, getUnsafeRootElement } from './component-tree'; -import { - getHostComponentNames, - isHostImage, - isHostSwitch, - isHostText, - isHostTextInput, -} from './host-component-names'; +import type { ReactTestInstance } from 'react-test-renderer'; +import { getHostSiblings, getUnsafeRootElement, isHostElement } from './component-tree'; +import { findAll } from './find-all'; +import { isHostImage, isHostSwitch, isHostText, isHostTextInput } from './host-component-names'; import { getTextContent } from './text-content'; -import { isTextInputEditable } from './text-input'; +import { isEditableTextInput } from './text-input'; type IsInaccessibleOptions = { cache?: WeakMap; @@ -112,12 +107,7 @@ export function isAccessibilityElement(element: ReactTestInstance | null): boole return element.props.accessible; } - const hostComponentNames = getHostComponentNames(); - return ( - element?.type === hostComponentNames?.text || - element?.type === hostComponentNames?.textInput || - element?.type === hostComponentNames?.switch - ); + return isHostText(element) || isHostTextInput(element) || isHostSwitch(element); } /** @@ -169,6 +159,19 @@ export function computeAriaModal(element: ReactTestInstance): boolean | undefine } export function computeAriaLabel(element: ReactTestInstance): string | undefined { + const labelElementId = element.props['aria-labelledby'] ?? element.props.accessibilityLabelledBy; + if (labelElementId) { + const rootElement = getUnsafeRootElement(element); + const labelElement = findAll( + rootElement, + (node) => isHostElement(node) && node.props.nativeID === labelElementId, + { includeHiddenElements: true }, + ); + if (labelElement.length > 0) { + return getTextContent(labelElement[0]); + } + } + const explicitLabel = element.props['aria-label'] ?? element.props.accessibilityLabel; if (explicitLabel) { return explicitLabel; @@ -182,10 +185,6 @@ export function computeAriaLabel(element: ReactTestInstance): string | undefined return undefined; } -export function computeAriaLabelledBy(element: ReactTestInstance): string | undefined { - return element.props['aria-labelledby'] ?? element.props.accessibilityLabelledBy; -} - // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#busy-state export function computeAriaBusy({ props }: ReactTestInstance): boolean { return props['aria-busy'] ?? props.accessibilityState?.busy ?? false; @@ -209,7 +208,7 @@ export function computeAriaChecked(element: ReactTestInstance): AccessibilitySta // See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#disabled-state export function computeAriaDisabled(element: ReactTestInstance): boolean { - if (isHostTextInput(element) && !isTextInputEditable(element)) { + if (isHostTextInput(element) && !isEditableTextInput(element)) { return true; } @@ -245,21 +244,7 @@ export function computeAriaValue(element: ReactTestInstance): AccessibilityValue } export function computeAccessibleName(element: ReactTestInstance): string | undefined { - const label = computeAriaLabel(element); - if (label) { - return label; - } - - const labelElementId = computeAriaLabelledBy(element); - if (labelElementId) { - const rootElement = getUnsafeRootElement(element); - const labelElement = rootElement?.findByProps({ nativeID: labelElementId }); - if (labelElement) { - return getTextContent(labelElement); - } - } - - return getTextContent(element); + return computeAriaLabel(element) ?? getTextContent(element); } type RoleSupportMap = Partial>; diff --git a/src/helpers/component-tree.ts b/src/helpers/component-tree.ts index 4a4a00897..bcb2a9f08 100644 --- a/src/helpers/component-tree.ts +++ b/src/helpers/component-tree.ts @@ -13,7 +13,7 @@ export function isHostElement(element?: ReactTestInstance | null): element is Ho return typeof element?.type === 'string'; } -export function isElementMounted(element: ReactTestInstance | null) { +export function isElementMounted(element: ReactTestInstance) { return getUnsafeRootElement(element) === screen.UNSAFE_root; } @@ -91,11 +91,7 @@ export function getHostSiblings(element: ReactTestInstance | null): HostTestInst * @param element The element start traversing from. * @returns The root element of the tree (host or composite). */ -export function getUnsafeRootElement(element: ReactTestInstance | null) { - if (element == null) { - return null; - } - +export function getUnsafeRootElement(element: ReactTestInstance) { let current = element; while (current.parent) { current = current.parent; diff --git a/src/helpers/debug-shallow.ts b/src/helpers/debug-shallow.ts deleted file mode 100644 index 510a1f402..000000000 --- a/src/helpers/debug-shallow.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from 'react'; -import type { ReactTestInstance } from 'react-test-renderer'; -import { shallowInternal } from '../shallow'; -import format from './format'; - -/** - * Log pretty-printed shallow test component instance - */ -export default function debugShallow( - instance: ReactTestInstance | React.ReactElement, - message?: string, -) { - const { output } = shallowInternal(instance); - - if (message) { - // eslint-disable-next-line no-console - console.log(`${message}\n\n`, format(output)); - } else { - // eslint-disable-next-line no-console - console.log(format(output)); - } -} diff --git a/src/helpers/debug-deep.ts b/src/helpers/debug.ts similarity index 95% rename from src/helpers/debug-deep.ts rename to src/helpers/debug.ts index 0450330e9..14ced11af 100644 --- a/src/helpers/debug-deep.ts +++ b/src/helpers/debug.ts @@ -8,7 +8,7 @@ export type DebugOptions = { /** * Log pretty-printed deep test component instance */ -export default function debugDeep( +export function debug( instance: ReactTestRendererJSON | ReactTestRendererJSON[], options?: DebugOptions | string, ) { diff --git a/src/helpers/deprecation.ts b/src/helpers/deprecation.ts deleted file mode 100644 index e6fb723ad..000000000 --- a/src/helpers/deprecation.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { getQueryPrefix } from './query-name'; - -export function deprecateQueries>( - queriesObject: Queries, - recommendation: string, -): Queries { - const result = {} as Queries; - Object.keys(queriesObject).forEach((queryName) => { - const queryFn = queriesObject[queryName]; - // @ts-expect-error: generic typing is hard - result[queryName] = deprecateQuery(queryFn, queryName, recommendation); - }); - - return result; -} - -function deprecateQuery any>( - queryFn: QueryFn, - queryName: string, - recommendation: string, -): QueryFn { - const formattedRecommendation = recommendation.replace( - /{queryPrefix}/g, - getQueryPrefix(queryName), - ); - - // @ts-expect-error: generic typing is hard - const wrapper: QueryFn = (...args: any) => { - const errorMessage = `${queryName}(...) is deprecated and will be removed in the future.\n\n${formattedRecommendation}`; - // eslint-disable-next-line no-console - console.warn(errorMessage); - return queryFn(...args); - }; - - return wrapper; -} - -const warned: { [functionName: string]: boolean } = {}; - -/* istanbul ignore next: occasionally used */ -export function printDeprecationWarning(functionName: string) { - if (warned[functionName]) { - return; - } - - // eslint-disable-next-line no-console - console.warn(` - Deprecation Warning: - Use of ${functionName} is not recommended and will be deleted in future versions of @testing-library/react-native. - `); - - warned[functionName] = true; -} diff --git a/src/helpers/host-component-names.ts b/src/helpers/host-component-names.ts new file mode 100644 index 000000000..c960bf264 --- /dev/null +++ b/src/helpers/host-component-names.ts @@ -0,0 +1,57 @@ +import { ReactTestInstance } from 'react-test-renderer'; +import { HostTestInstance } from './component-tree'; + +const HOST_TEXT_NAMES = ['Text', 'RCTText']; +const HOST_TEXT_INPUT_NAMES = ['TextInput']; +const HOST_IMAGE_NAMES = ['Image']; +const HOST_SWITCH_NAMES = ['RCTSwitch']; +const HOST_SCROLL_VIEW_NAMES = ['RCTScrollView']; +const HOST_MODAL_NAMES = ['Modal']; + +/** + * Checks if the given element is a host Text element. + * @param element The element to check. + */ +export function isHostText(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_TEXT_NAMES.includes(element.type); +} + +/** + * Checks if the given element is a host TextInput element. + * @param element The element to check. + */ +export function isHostTextInput(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_TEXT_INPUT_NAMES.includes(element.type); +} + +/** + * Checks if the given element is a host Image element. + * @param element The element to check. + */ +export function isHostImage(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_IMAGE_NAMES.includes(element.type); +} + +/** + * Checks if the given element is a host Switch element. + * @param element The element to check. + */ +export function isHostSwitch(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_SWITCH_NAMES.includes(element.type); +} + +/** + * Checks if the given element is a host ScrollView element. + * @param element The element to check. + */ +export function isHostScrollView(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_SCROLL_VIEW_NAMES.includes(element.type); +} + +/** + * Checks if the given element is a host Modal element. + * @param element The element to check. + */ +export function isHostModal(element: ReactTestInstance): element is HostTestInstance { + return typeof element?.type === 'string' && HOST_MODAL_NAMES.includes(element.type); +} diff --git a/src/helpers/host-component-names.tsx b/src/helpers/host-component-names.tsx deleted file mode 100644 index b450c930b..000000000 --- a/src/helpers/host-component-names.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import * as React from 'react'; -import { ReactTestInstance } from 'react-test-renderer'; -import { Image, Modal, ScrollView, Switch, Text, TextInput, View } from 'react-native'; -import { configureInternal, getConfig, HostComponentNames } from '../config'; -import { renderWithAct } from '../render-act'; -import { HostTestInstance } from './component-tree'; - -const userConfigErrorMessage = `There seems to be an issue with your configuration that prevents React Native Testing Library from working correctly. -Please check if you are using compatible versions of React Native and React Native Testing Library.`; - -export function getHostComponentNames(): HostComponentNames { - let hostComponentNames = getConfig().hostComponentNames; - if (!hostComponentNames) { - hostComponentNames = detectHostComponentNames(); - configureInternal({ hostComponentNames }); - } - - return hostComponentNames; -} - -export function configureHostComponentNamesIfNeeded() { - const configHostComponentNames = getConfig().hostComponentNames; - if (configHostComponentNames) { - return; - } - - const hostComponentNames = detectHostComponentNames(); - configureInternal({ hostComponentNames }); -} - -function detectHostComponentNames(): HostComponentNames { - try { - const renderer = renderWithAct( - - Hello - - - - - - , - ); - - return { - text: getByTestId(renderer.root, 'text').type as string, - textInput: getByTestId(renderer.root, 'textInput').type as string, - image: getByTestId(renderer.root, 'image').type as string, - switch: getByTestId(renderer.root, 'switch').type as string, - scrollView: getByTestId(renderer.root, 'scrollView').type as string, - modal: getByTestId(renderer.root, 'modal').type as string, - }; - } catch (error) { - const errorMessage = - error && typeof error === 'object' && 'message' in error ? error.message : null; - - throw new Error( - `Trying to detect host component names triggered the following error:\n\n${errorMessage}\n\n${userConfigErrorMessage}`, - ); - } -} - -function getByTestId(instance: ReactTestInstance, testID: string) { - const nodes = instance.findAll( - (node) => typeof node.type === 'string' && node.props.testID === testID, - ); - - if (nodes.length === 0) { - throw new Error(`Unable to find an element with testID: ${testID}`); - } - - return nodes[0]; -} - -/** - * Checks if the given element is a host Text element. - * @param element The element to check. - */ -export function isHostText(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().text; -} - -/** - * Checks if the given element is a host TextInput element. - * @param element The element to check. - */ -export function isHostTextInput(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().textInput; -} - -/** - * Checks if the given element is a host Image element. - * @param element The element to check. - */ -export function isHostImage(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().image; -} - -/** - * Checks if the given element is a host Switch element. - * @param element The element to check. - */ -export function isHostSwitch(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().switch; -} - -/** - * Checks if the given element is a host ScrollView element. - * @param element The element to check. - */ -export function isHostScrollView(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().scrollView; -} - -/** - * Checks if the given element is a host Modal element. - * @param element The element to check. - */ -export function isHostModal(element?: ReactTestInstance | null): element is HostTestInstance { - return element?.type === getHostComponentNames().modal; -} diff --git a/src/helpers/matchers/match-label-text.ts b/src/helpers/matchers/match-label-text.ts index 1da29d867..f1ceaaac9 100644 --- a/src/helpers/matchers/match-label-text.ts +++ b/src/helpers/matchers/match-label-text.ts @@ -1,43 +1,11 @@ import { ReactTestInstance } from 'react-test-renderer'; import { matches, TextMatch, TextMatchOptions } from '../../matches'; -import { computeAriaLabel, computeAriaLabelledBy } from '../accessibility'; -import { findAll } from '../find-all'; -import { matchTextContent } from './match-text-content'; +import { computeAriaLabel } from '../accessibility'; -export function matchLabelText( - root: ReactTestInstance, - element: ReactTestInstance, - expectedText: TextMatch, - options: TextMatchOptions = {}, -) { - return ( - matchAccessibilityLabel(element, expectedText, options) || - matchAccessibilityLabelledBy(root, computeAriaLabelledBy(element), expectedText, options) - ); -} - -function matchAccessibilityLabel( +export function matchAccessibilityLabel( element: ReactTestInstance, expectedLabel: TextMatch, - options: TextMatchOptions, + options?: TextMatchOptions, ) { - return matches(expectedLabel, computeAriaLabel(element), options.normalizer, options.exact); -} - -function matchAccessibilityLabelledBy( - root: ReactTestInstance, - nativeId: string | undefined, - text: TextMatch, - options: TextMatchOptions, -) { - if (!nativeId) { - return false; - } - - return ( - findAll( - root, - (node) => node.props.nativeID === nativeId && matchTextContent(node, text, options), - ).length > 0 - ); + return matches(expectedLabel, computeAriaLabel(element), options?.normalizer, options?.exact); } diff --git a/src/helpers/query-name.ts b/src/helpers/query-name.ts deleted file mode 100644 index 1a6a034c8..000000000 --- a/src/helpers/query-name.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function getQueryPrefix(queryName: string) { - const parts = queryName.split('By'); - return parts[0]; -} diff --git a/src/helpers/text-input.ts b/src/helpers/text-input.ts index bf76389fe..d21360a5f 100644 --- a/src/helpers/text-input.ts +++ b/src/helpers/text-input.ts @@ -2,12 +2,8 @@ import { ReactTestInstance } from 'react-test-renderer'; import { nativeState } from '../native-state'; import { isHostTextInput } from './host-component-names'; -export function isTextInputEditable(element: ReactTestInstance) { - if (!isHostTextInput(element)) { - throw new Error(`Element is not a "TextInput", but it has type "${element.type}".`); - } - - return element.props.editable !== false; +export function isEditableTextInput(element: ReactTestInstance) { + return isHostTextInput(element) && element.props.editable !== false; } export function getTextInputValue(element: ReactTestInstance) { diff --git a/src/helpers/wrap-async.ts b/src/helpers/wrap-async.ts index c22a1df5e..a80d86156 100644 --- a/src/helpers/wrap-async.ts +++ b/src/helpers/wrap-async.ts @@ -1,8 +1,7 @@ /* istanbul ignore file */ -import act, { getIsReactActEnvironment, setReactActEnvironment } from '../act'; -import { flushMicroTasksLegacy } from '../flush-micro-tasks'; -import { checkReactVersionAtLeast } from '../react-versions'; +import { getIsReactActEnvironment, setReactActEnvironment } from '../act'; +import { flushMicroTasks } from '../flush-micro-tasks'; /** * Run given async callback with temporarily disabled `act` environment and flushes microtasks queue. @@ -11,30 +10,15 @@ import { checkReactVersionAtLeast } from '../react-versions'; * @returns Result of the callback */ export async function wrapAsync(callback: () => Promise): Promise { - if (checkReactVersionAtLeast(18, 0)) { - const previousActEnvironment = getIsReactActEnvironment(); - setReactActEnvironment(false); + const previousActEnvironment = getIsReactActEnvironment(); + setReactActEnvironment(false); - try { - const result = await callback(); - // Flush the microtask queue before restoring the `act` environment - await flushMicroTasksLegacy(); - return result; - } finally { - setReactActEnvironment(previousActEnvironment); - } + try { + const result = await callback(); + // Flush the microtask queue before restoring the `act` environment + await flushMicroTasks(); + return result; + } finally { + setReactActEnvironment(previousActEnvironment); } - - if (!checkReactVersionAtLeast(16, 9)) { - return callback(); - } - - // Wrapping with act for react version 16.9 to 17.x - let result: Result; - await act(async () => { - result = await callback(); - }); - - // Either we have result or `callback` threw error - return result!; } diff --git a/src/index.ts b/src/index.ts index 5c867106f..8b2ab83d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { cleanup } from './pure'; -import { flushMicroTasksLegacy } from './flush-micro-tasks'; +import { flushMicroTasks } from './flush-micro-tasks'; import { getIsReactActEnvironment, setReactActEnvironment } from './act'; +import './matchers/extend-expect'; if (!process?.env?.RNTL_SKIP_AUTO_CLEANUP) { // If we're running in a test runner that supports afterEach @@ -11,7 +12,7 @@ if (!process?.env?.RNTL_SKIP_AUTO_CLEANUP) { if (typeof afterEach === 'function') { // eslint-disable-next-line no-undef afterEach(async () => { - await flushMicroTasksLegacy(); + await flushMicroTasks(); cleanup(); }); } diff --git a/src/matchers/__tests__/to-be-checked.test.tsx b/src/matchers/__tests__/to-be-checked.test.tsx index 6cf432b85..2b674c627 100644 --- a/src/matchers/__tests__/to-be-checked.test.tsx +++ b/src/matchers/__tests__/to-be-checked.test.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { type AccessibilityRole, Switch, View } from 'react-native'; -import render from '../../render'; -import { screen } from '../../screen'; +import { render, screen } from '../..'; function renderViewsWithRole(role: AccessibilityRole) { render( diff --git a/src/matchers/__tests__/to-be-partially-checked.test.tsx b/src/matchers/__tests__/to-be-partially-checked.test.tsx index 03ab58290..dd84e0cb7 100644 --- a/src/matchers/__tests__/to-be-partially-checked.test.tsx +++ b/src/matchers/__tests__/to-be-partially-checked.test.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { type AccessibilityRole, View } from 'react-native'; -import render from '../../render'; -import { screen } from '../../screen'; +import { render, screen } from '../..'; function renderViewsWithRole(role: AccessibilityRole) { return render( diff --git a/src/matchers/to-be-busy.tsx b/src/matchers/to-be-busy.ts similarity index 100% rename from src/matchers/to-be-busy.tsx rename to src/matchers/to-be-busy.ts diff --git a/src/matchers/to-be-checked.tsx b/src/matchers/to-be-checked.ts similarity index 100% rename from src/matchers/to-be-checked.tsx rename to src/matchers/to-be-checked.ts diff --git a/src/matchers/to-be-disabled.tsx b/src/matchers/to-be-disabled.ts similarity index 100% rename from src/matchers/to-be-disabled.tsx rename to src/matchers/to-be-disabled.ts diff --git a/src/matchers/to-be-empty-element.tsx b/src/matchers/to-be-empty-element.ts similarity index 100% rename from src/matchers/to-be-empty-element.tsx rename to src/matchers/to-be-empty-element.ts diff --git a/src/matchers/to-be-expanded.tsx b/src/matchers/to-be-expanded.ts similarity index 100% rename from src/matchers/to-be-expanded.tsx rename to src/matchers/to-be-expanded.ts diff --git a/src/matchers/to-be-on-the-screen.tsx b/src/matchers/to-be-on-the-screen.ts similarity index 100% rename from src/matchers/to-be-on-the-screen.tsx rename to src/matchers/to-be-on-the-screen.ts diff --git a/src/matchers/to-be-partially-checked.tsx b/src/matchers/to-be-partially-checked.ts similarity index 100% rename from src/matchers/to-be-partially-checked.tsx rename to src/matchers/to-be-partially-checked.ts diff --git a/src/matchers/to-be-visible.tsx b/src/matchers/to-be-visible.ts similarity index 100% rename from src/matchers/to-be-visible.tsx rename to src/matchers/to-be-visible.ts diff --git a/src/matchers/to-contain-element.tsx b/src/matchers/to-contain-element.ts similarity index 100% rename from src/matchers/to-contain-element.tsx rename to src/matchers/to-contain-element.ts diff --git a/src/matchers/to-have-accessibility-value.tsx b/src/matchers/to-have-accessibility-value.ts similarity index 100% rename from src/matchers/to-have-accessibility-value.tsx rename to src/matchers/to-have-accessibility-value.ts diff --git a/src/matchers/to-have-accessible-name.tsx b/src/matchers/to-have-accessible-name.ts similarity index 100% rename from src/matchers/to-have-accessible-name.tsx rename to src/matchers/to-have-accessible-name.ts diff --git a/src/matchers/to-have-display-value.tsx b/src/matchers/to-have-display-value.ts similarity index 100% rename from src/matchers/to-have-display-value.tsx rename to src/matchers/to-have-display-value.ts diff --git a/src/matchers/to-have-style.tsx b/src/matchers/to-have-style.ts similarity index 100% rename from src/matchers/to-have-style.tsx rename to src/matchers/to-have-style.ts diff --git a/src/matchers/to-have-text-content.tsx b/src/matchers/to-have-text-content.ts similarity index 100% rename from src/matchers/to-have-text-content.tsx rename to src/matchers/to-have-text-content.ts diff --git a/src/matchers/utils.tsx b/src/matchers/utils.ts similarity index 100% rename from src/matchers/utils.tsx rename to src/matchers/utils.ts diff --git a/src/queries/__tests__/accessibility-state.test.tsx b/src/queries/__tests__/accessibility-state.test.tsx deleted file mode 100644 index 26a2b61de..000000000 --- a/src/queries/__tests__/accessibility-state.test.tsx +++ /dev/null @@ -1,535 +0,0 @@ -/* eslint-disable no-console */ -import * as React from 'react'; -import { View, Text, Pressable, TouchableOpacity } from 'react-native'; -import { render, screen } from '../..'; - -type ConsoleLogMock = jest.Mock; - -beforeEach(() => { - jest.spyOn(console, 'warn').mockImplementation(() => {}); -}); - -const TEXT_LABEL = 'cool text'; - -const Typography = ({ children, ...rest }: any) => { - return {children}; -}; - -const Button = ({ children }: { children: React.ReactNode }) => ( - - {children} - -); - -const Section = () => ( - <> - Title - - -); - -test('getByA11yState, queryByA11yState, findByA11yState', async () => { - render(
); - - expect(screen.getByA11yState({ selected: true }).props.accessibilityState).toEqual({ - selected: true, - expanded: false, - }); - expect(screen.queryByA11yState({ selected: true })?.props.accessibilityState).toEqual({ - selected: true, - expanded: false, - }); - - expect(() => screen.getByA11yState({ disabled: true })).toThrow( - 'Unable to find an element with disabled state: true', - ); - expect(screen.queryByA11yState({ disabled: true })).toEqual(null); - - expect(() => screen.getByA11yState({ expanded: false })).toThrow( - 'Found multiple elements with expanded state: false', - ); - expect(() => screen.queryByA11yState({ expanded: false })).toThrow( - 'Found multiple elements with expanded state: false', - ); - - const asyncButton = await screen.findByA11yState({ selected: true }); - expect(asyncButton.props.accessibilityState).toEqual({ - selected: true, - expanded: false, - }); - await expect(screen.findByA11yState({ disabled: true })).rejects.toThrow( - 'Unable to find an element with disabled state: true', - ); - await expect(screen.findByA11yState({ expanded: false })).rejects.toThrow( - 'Found multiple elements with expanded state: false', - ); -}); - -test('getAllByA11yState, queryAllByA11yState, findAllByA11yState', async () => { - render(
); - - expect(screen.getAllByA11yState({ selected: true })).toHaveLength(1); - expect(screen.queryAllByA11yState({ selected: true })).toHaveLength(1); - - expect(() => screen.getAllByA11yState({ disabled: true })).toThrow( - 'Unable to find an element with disabled state: true', - ); - expect(screen.queryAllByA11yState({ disabled: true })).toEqual([]); - - expect(screen.getAllByA11yState({ expanded: false })).toHaveLength(2); - expect(screen.queryAllByA11yState({ expanded: false })).toHaveLength(2); - - await expect(screen.findAllByA11yState({ selected: true })).resolves.toHaveLength(1); - await expect(screen.findAllByA11yState({ disabled: true })).rejects.toThrow( - 'Unable to find an element with disabled state: true', - ); - await expect(screen.findAllByA11yState({ expanded: false })).resolves.toHaveLength(2); -}); - -describe('checked state matching', () => { - it('handles true', () => { - render(); - - expect(screen.getByA11yState({ checked: true })).toBeTruthy(); - expect(screen.queryByA11yState({ checked: 'mixed' })).toBeFalsy(); - expect(screen.queryByA11yState({ checked: false })).toBeFalsy(); - }); - - it('handles mixed', () => { - render(); - - expect(screen.getByA11yState({ checked: 'mixed' })).toBeTruthy(); - expect(screen.queryByA11yState({ checked: true })).toBeFalsy(); - expect(screen.queryByA11yState({ checked: false })).toBeFalsy(); - }); - - it('handles false', () => { - render(); - - expect(screen.getByA11yState({ checked: false })).toBeTruthy(); - expect(screen.queryByA11yState({ checked: true })).toBeFalsy(); - expect(screen.queryByA11yState({ checked: 'mixed' })).toBeFalsy(); - }); - - it('handles default', () => { - render(); - - expect(screen.queryByA11yState({ checked: false })).toBeFalsy(); - expect(screen.queryByA11yState({ checked: true })).toBeFalsy(); - expect(screen.queryByA11yState({ checked: 'mixed' })).toBeFalsy(); - }); -}); - -describe('expanded state matching', () => { - it('handles true', () => { - render(); - - expect(screen.getByA11yState({ expanded: true })).toBeTruthy(); - expect(screen.queryByA11yState({ expanded: false })).toBeFalsy(); - }); - - it('handles false', () => { - render(); - - expect(screen.getByA11yState({ expanded: false })).toBeTruthy(); - expect(screen.queryByA11yState({ expanded: true })).toBeFalsy(); - }); - - it('handles default', () => { - render(); - - expect(screen.queryByA11yState({ expanded: false })).toBeFalsy(); - expect(screen.queryByA11yState({ expanded: true })).toBeFalsy(); - }); -}); - -describe('disabled state matching', () => { - it('handles true', () => { - render(); - - expect(screen.getByA11yState({ disabled: true })).toBeTruthy(); - expect(screen.queryByA11yState({ disabled: false })).toBeFalsy(); - }); - - it('handles false', () => { - render(); - - expect(screen.getByA11yState({ disabled: false })).toBeTruthy(); - expect(screen.queryByA11yState({ disabled: true })).toBeFalsy(); - }); - - it('handles default', () => { - render(); - - expect(screen.getByA11yState({ disabled: false })).toBeTruthy(); - expect(screen.queryByA11yState({ disabled: true })).toBeFalsy(); - }); -}); - -describe('busy state matching', () => { - it('handles true', () => { - render(); - - expect(screen.getByA11yState({ busy: true })).toBeTruthy(); - expect(screen.queryByA11yState({ busy: false })).toBeFalsy(); - }); - - it('handles false', () => { - render(); - - expect(screen.getByA11yState({ busy: false })).toBeTruthy(); - expect(screen.queryByA11yState({ busy: true })).toBeFalsy(); - }); - - it('handles default', () => { - render(); - - expect(screen.getByA11yState({ busy: false })).toBeTruthy(); - expect(screen.queryByA11yState({ busy: true })).toBeFalsy(); - }); -}); - -describe('selected state matching', () => { - it('handles true', () => { - render(); - - expect(screen.getByA11yState({ selected: true })).toBeTruthy(); - expect(screen.queryByA11yState({ selected: false })).toBeFalsy(); - }); - - it('handles false', () => { - render(); - - expect(screen.getByA11yState({ selected: false })).toBeTruthy(); - expect(screen.queryByA11yState({ selected: true })).toBeFalsy(); - }); - - it('handles default', () => { - render(); - - expect(screen.getByA11yState({ selected: false })).toBeTruthy(); - expect(screen.queryByA11yState({ selected: true })).toBeFalsy(); - }); -}); - -test('*ByA11yState on Pressable with "disabled" prop', () => { - render(); - expect(screen.getByA11yState({ disabled: true })).toBeTruthy(); - expect(screen.queryByA11yState({ disabled: false })).toBeFalsy(); -}); - -test('*ByA11yState on TouchableOpacity with "disabled" prop', () => { - render(); - expect(screen.getByA11yState({ disabled: true })).toBeTruthy(); - expect(screen.queryByA11yState({ disabled: false })).toBeFalsy(); -}); - -test('byA11yState queries support hidden option', () => { - render( - - Hidden from accessibility - , - ); - - expect(screen.getByA11yState({ expanded: false }, { includeHiddenElements: true })).toBeTruthy(); - - expect(screen.queryByA11yState({ expanded: false })).toBeFalsy(); - expect( - screen.queryByA11yState({ expanded: false }, { includeHiddenElements: false }), - ).toBeFalsy(); - expect(() => screen.getByA11yState({ expanded: false }, { includeHiddenElements: false })) - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with expanded state: false - - - - Hidden from accessibility - - " - `); -}); - -test('*ByA11yState deprecation warnings', async () => { - const mockCalls = (console.warn as ConsoleLogMock).mock.calls; - render(); - - screen.getByA11yState({ disabled: true }); - expect(mockCalls[0][0]).toMatchInlineSnapshot(` - "getByA11yState(...) is deprecated and will be removed in the future. - - Use getByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.getAllByA11yState({ disabled: true }); - expect(mockCalls[1][0]).toMatchInlineSnapshot(` - "getAllByA11yState(...) is deprecated and will be removed in the future. - - Use getAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.queryByA11yState({ disabled: true }); - expect(mockCalls[2][0]).toMatchInlineSnapshot(` - "queryByA11yState(...) is deprecated and will be removed in the future. - - Use queryByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.queryAllByA11yState({ disabled: true }); - expect(mockCalls[3][0]).toMatchInlineSnapshot(` - "queryAllByA11yState(...) is deprecated and will be removed in the future. - - Use queryAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - await screen.findByA11yState({ disabled: true }); - expect(mockCalls[4][0]).toMatchInlineSnapshot(` - "findByA11yState(...) is deprecated and will be removed in the future. - - Use findByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - await screen.findAllByA11yState({ disabled: true }); - expect(mockCalls[5][0]).toMatchInlineSnapshot(` - "findAllByA11yState(...) is deprecated and will be removed in the future. - - Use findAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); -}); - -test('*ByAccessibilityState deprecation warnings', async () => { - const mockCalls = (console.warn as ConsoleLogMock).mock.calls; - render(); - - screen.getByAccessibilityState({ disabled: true }); - expect(mockCalls[0][0]).toMatchInlineSnapshot(` - "getByAccessibilityState(...) is deprecated and will be removed in the future. - - Use getByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.getAllByAccessibilityState({ disabled: true }); - expect(mockCalls[1][0]).toMatchInlineSnapshot(` - "getAllByAccessibilityState(...) is deprecated and will be removed in the future. - - Use getAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.queryByAccessibilityState({ disabled: true }); - expect(mockCalls[2][0]).toMatchInlineSnapshot(` - "queryByAccessibilityState(...) is deprecated and will be removed in the future. - - Use queryByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - screen.queryAllByAccessibilityState({ disabled: true }); - expect(mockCalls[3][0]).toMatchInlineSnapshot(` - "queryAllByAccessibilityState(...) is deprecated and will be removed in the future. - - Use queryAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - await screen.findByAccessibilityState({ disabled: true }); - expect(mockCalls[4][0]).toMatchInlineSnapshot(` - "findByAccessibilityState(...) is deprecated and will be removed in the future. - - Use findByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); - - await screen.findAllByAccessibilityState({ disabled: true }); - expect(mockCalls[5][0]).toMatchInlineSnapshot(` - "findAllByAccessibilityState(...) is deprecated and will be removed in the future. - - Use findAllByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead." - `); -}); - -test('error message renders the element tree, preserving only helpful props', async () => { - render( - null}> - Some text - , - ); - - expect(() => screen.getByA11yState({ checked: true })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with checked state: true - - - Some text - " - `); - - expect(() => screen.getAllByA11yState({ checked: true })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with checked state: true - - - Some text - " - `); - - await expect(screen.findByA11yState({ checked: true })).rejects - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with checked state: true - - - Some text - " - `); - - await expect(screen.findAllByA11yState({ checked: true })).rejects - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with checked state: true - - - Some text - " - `); -}); - -describe('aria-disabled prop', () => { - test('supports aria-disabled={true} prop', () => { - render(); - expect(screen.getByAccessibilityState({ disabled: true })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ disabled: false })).toBeNull(); - }); - - test('supports aria-disabled={false} prop', () => { - render(); - expect(screen.getByAccessibilityState({ disabled: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ disabled: true })).toBeNull(); - }); - - test('supports default aria-disabled prop', () => { - render(); - expect(screen.getByAccessibilityState({ disabled: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ disabled: true })).toBeNull(); - }); -}); - -describe('aria-selected prop', () => { - test('supports aria-selected={true} prop', () => { - render(); - expect(screen.getByAccessibilityState({ selected: true })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ selected: false })).toBeNull(); - }); - - test('supports aria-selected={false} prop', () => { - render(); - expect(screen.getByAccessibilityState({ selected: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ selected: true })).toBeNull(); - }); - - test('supports default aria-selected prop', () => { - render(); - expect(screen.getByAccessibilityState({ selected: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ selected: true })).toBeNull(); - }); -}); - -describe('aria-checked prop', () => { - test('supports aria-checked={true} prop', () => { - render(); - expect(screen.getByAccessibilityState({ checked: true })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ checked: false })).toBeNull(); - expect(screen.queryByAccessibilityState({ checked: 'mixed' })).toBeNull(); - }); - - test('supports aria-checked={false} prop', () => { - render(); - expect(screen.getByAccessibilityState({ checked: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ checked: true })).toBeNull(); - expect(screen.queryByAccessibilityState({ checked: 'mixed' })).toBeNull(); - }); - - test('supports aria-checked="mixed" prop', () => { - render(); - expect(screen.getByAccessibilityState({ checked: 'mixed' })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ checked: true })).toBeNull(); - expect(screen.queryByAccessibilityState({ checked: false })).toBeNull(); - }); - - test('supports default aria-checked prop', () => { - render(); - expect(screen.getByAccessibilityState({})).toBeTruthy(); - expect(screen.queryByAccessibilityState({ checked: true })).toBeNull(); - expect(screen.queryByAccessibilityState({ checked: false })).toBeNull(); - expect(screen.queryByAccessibilityState({ checked: 'mixed' })).toBeNull(); - }); -}); - -describe('aria-busy prop', () => { - test('supports aria-busy={true} prop', () => { - render(); - expect(screen.getByAccessibilityState({ busy: true })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ busy: false })).toBeNull(); - }); - - test('supports aria-busy={false} prop', () => { - render(); - expect(screen.getByAccessibilityState({ busy: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ busy: true })).toBeNull(); - }); - - test('supports default aria-busy prop', () => { - render(); - expect(screen.getByAccessibilityState({ busy: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ busy: true })).toBeNull(); - }); -}); - -describe('aria-expanded prop', () => { - test('supports aria-expanded={true} prop', () => { - render(); - expect(screen.getByAccessibilityState({ expanded: true })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ expanded: false })).toBeNull(); - }); - - test('supports aria-expanded={false} prop', () => { - render(); - expect(screen.getByAccessibilityState({ expanded: false })).toBeTruthy(); - expect(screen.queryByAccessibilityState({ expanded: true })).toBeNull(); - }); - - test('supports default aria-expanded prop', () => { - render(); - render(); - expect(screen.getByAccessibilityState({})).toBeTruthy(); - expect(screen.queryByAccessibilityState({ expanded: true })).toBeNull(); - expect(screen.queryByAccessibilityState({ expanded: false })).toBeNull(); - }); -}); diff --git a/src/queries/__tests__/accessibility-value.test.tsx b/src/queries/__tests__/accessibility-value.test.tsx deleted file mode 100644 index 9e07ab41c..000000000 --- a/src/queries/__tests__/accessibility-value.test.tsx +++ /dev/null @@ -1,319 +0,0 @@ -/* eslint-disable no-console */ -import * as React from 'react'; -import { Text, TouchableOpacity, View } from 'react-native'; -import { render, screen } from '../..'; - -type ConsoleLogMock = jest.Mock; - -beforeEach(() => { - jest.spyOn(console, 'warn').mockImplementation(() => {}); -}); - -const TEXT_LABEL = 'cool text'; - -const Typography = ({ children, ...rest }: any) => { - return {children}; -}; - -const Button = ({ children }: { children: React.ReactNode }) => ( - - {children} - -); - -const Section = () => ( - <> - Title - - -); - -test('getByA11yValue, queryByA11yValue, findByA11yValue', async () => { - render(
); - - expect(screen.getByA11yValue({ min: 40 }).props.accessibilityValue).toEqual({ - min: 40, - max: 60, - }); - expect(screen.queryByA11yValue({ min: 40 })?.props.accessibilityValue).toEqual({ - min: 40, - max: 60, - }); - - expect(() => screen.getByA11yValue({ min: 50 })).toThrow( - 'Unable to find an element with min value: 50', - ); - expect(screen.queryByA11yValue({ min: 50 })).toEqual(null); - - expect(() => screen.getByA11yValue({ max: 60 })).toThrow( - 'Found multiple elements with max value: 60', - ); - expect(() => screen.queryByA11yValue({ max: 60 })).toThrow( - 'Found multiple elements with max value: 60', - ); - - const asyncElement = await screen.findByA11yValue({ min: 40 }); - expect(asyncElement.props.accessibilityValue).toEqual({ - min: 40, - max: 60, - }); - await expect(screen.findByA11yValue({ min: 50 })).rejects.toThrow( - 'Unable to find an element with min value: 50', - ); - await expect(screen.findByA11yValue({ max: 60 })).rejects.toThrow( - 'Found multiple elements with max value: 60', - ); -}); - -test('getAllByA11yValue, queryAllByA11yValue, findAllByA11yValue', async () => { - render(
); - - expect(screen.getAllByA11yValue({ min: 40 })).toHaveLength(1); - expect(screen.queryAllByA11yValue({ min: 40 })).toHaveLength(1); - - expect(() => screen.getAllByA11yValue({ min: 50 })).toThrow( - 'Unable to find an element with min value: 50', - ); - expect(screen.queryAllByA11yValue({ min: 50 })).toEqual([]); - - expect(screen.queryAllByA11yValue({ max: 60 })).toHaveLength(2); - expect(screen.getAllByA11yValue({ max: 60 })).toHaveLength(2); - - await expect(screen.findAllByA11yValue({ min: 40 })).resolves.toHaveLength(1); - await expect(screen.findAllByA11yValue({ min: 50 })).rejects.toThrow( - 'Unable to find an element with min value: 50', - ); - await expect(screen.findAllByA11yValue({ max: 60 })).resolves.toHaveLength(2); -}); - -test('byA11yValue queries support hidden option', () => { - render( - - Hidden from accessibility - , - ); - - expect(screen.getByA11yValue({ max: 10 }, { includeHiddenElements: true })).toBeTruthy(); - - expect(screen.queryByA11yValue({ max: 10 })).toBeFalsy(); - expect(screen.queryByA11yValue({ max: 10 }, { includeHiddenElements: false })).toBeFalsy(); - expect(() => screen.getByA11yValue({ max: 10 }, { includeHiddenElements: false })) - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with max value: 10 - - - Hidden from accessibility - " - `); -}); - -test('byA11yValue error messages', () => { - render(); - expect(() => screen.getByA11yValue({ min: 10, max: 10 })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 10, max value: 10 - - " - `); - expect(() => screen.getByA11yValue({ max: 20, now: 5 })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with max value: 20, now value: 5 - - " - `); - expect(() => screen.getByA11yValue({ min: 1, max: 2, now: 3 })) - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1, max value: 2, now value: 3 - - " - `); - expect(() => screen.getByA11yValue({ min: 1, max: 2, now: 3, text: /foo/i })) - .toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1, max value: 2, now value: 3, text value: /foo/i - - " - `); -}); - -test('*ByA11yValue deprecation warnings', async () => { - const mockCalls = (console.warn as ConsoleLogMock).mock.calls; - render(); - - screen.getByA11yValue({ min: 10 }); - expect(mockCalls[0][0]).toMatchInlineSnapshot(` - "getByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or getByRole(role, { value: ... }) query instead." - `); - - screen.getAllByA11yValue({ min: 10 }); - expect(mockCalls[1][0]).toMatchInlineSnapshot(` - "getAllByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or getAllByRole(role, { value: ... }) query instead." - `); - - screen.queryByA11yValue({ min: 10 }); - expect(mockCalls[2][0]).toMatchInlineSnapshot(` - "queryByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or queryByRole(role, { value: ... }) query instead." - `); - - screen.queryAllByA11yValue({ min: 10 }); - expect(mockCalls[3][0]).toMatchInlineSnapshot(` - "queryAllByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or queryAllByRole(role, { value: ... }) query instead." - `); - - await screen.findByA11yValue({ min: 10 }); - expect(mockCalls[4][0]).toMatchInlineSnapshot(` - "findByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or findByRole(role, { value: ... }) query instead." - `); - - await screen.findAllByA11yValue({ min: 10 }); - expect(mockCalls[5][0]).toMatchInlineSnapshot(` - "findAllByA11yValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or findAllByRole(role, { value: ... }) query instead." - `); -}); - -test('*ByAccessibilityValue deprecation warnings', async () => { - const mockCalls = (console.warn as ConsoleLogMock).mock.calls; - render(); - - screen.getByAccessibilityValue({ min: 10 }); - expect(mockCalls[0][0]).toMatchInlineSnapshot(` - "getByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or getByRole(role, { value: ... }) query instead." - `); - - screen.getAllByAccessibilityValue({ min: 10 }); - expect(mockCalls[1][0]).toMatchInlineSnapshot(` - "getAllByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or getAllByRole(role, { value: ... }) query instead." - `); - - screen.queryByAccessibilityValue({ min: 10 }); - expect(mockCalls[2][0]).toMatchInlineSnapshot(` - "queryByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or queryByRole(role, { value: ... }) query instead." - `); - - screen.queryAllByAccessibilityValue({ min: 10 }); - expect(mockCalls[3][0]).toMatchInlineSnapshot(` - "queryAllByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or queryAllByRole(role, { value: ... }) query instead." - `); - - await screen.findByAccessibilityValue({ min: 10 }); - expect(mockCalls[4][0]).toMatchInlineSnapshot(` - "findByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or findByRole(role, { value: ... }) query instead." - `); - - await screen.findAllByAccessibilityValue({ min: 10 }); - expect(mockCalls[5][0]).toMatchInlineSnapshot(` - "findAllByAccessibilityValue(...) is deprecated and will be removed in the future. - - Use toHaveAccessibilityValue(...) built-in Jest matcher or findAllByRole(role, { value: ... }) query instead." - `); -}); - -test('error message renders the element tree, preserving only helpful props', async () => { - render(); - - expect(() => screen.getByA11yValue({ min: 1 })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1 - - " - `); - - expect(() => screen.getAllByA11yValue({ min: 1 })).toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1 - - " - `); - - await expect(screen.findByA11yValue({ min: 1 })).rejects.toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1 - - " - `); - - await expect(screen.findAllByA11yValue({ min: 1 })).rejects.toThrowErrorMatchingInlineSnapshot(` - "Unable to find an element with min value: 1 - - " - `); -}); - -describe('getByAccessibilityValue supports "aria-*" props', () => { - test('supports "aria-valuemax"', () => { - render(); - expect(screen.getByAccessibilityValue({ max: 10 })).toBeTruthy(); - }); - - test('supports "aria-valuemin"', () => { - render(); - expect(screen.getByAccessibilityValue({ min: 20 })).toBeTruthy(); - }); - - test('supports "aria-valuenow"', () => { - render(); - expect(screen.getByAccessibilityValue({ now: 30 })).toBeTruthy(); - }); - - test('supports "aria-valuetext"', () => { - render(); - expect(screen.getByAccessibilityValue({ text: 'Hello World' })).toBeTruthy(); - expect(screen.getByAccessibilityValue({ text: /hello/i })).toBeTruthy(); - }); - - test('supports multiple "aria-value*" props', () => { - render(); - expect(screen.getByAccessibilityValue({ now: 50, min: 0, max: 100 })).toBeTruthy(); - }); -}); diff --git a/src/queries/accessibility-state.ts b/src/queries/accessibility-state.ts deleted file mode 100644 index b38df4a7a..000000000 --- a/src/queries/accessibility-state.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { ReactTestInstance } from 'react-test-renderer'; -import { accessibilityStateKeys } from '../helpers/accessibility'; -import { deprecateQueries } from '../helpers/deprecation'; -import { findAll } from '../helpers/find-all'; -import { - AccessibilityStateMatcher, - matchAccessibilityState, -} from '../helpers/matchers/match-accessibility-state'; -import { makeQueries } from './make-queries'; -import type { - FindAllByQuery, - FindByQuery, - GetAllByQuery, - GetByQuery, - QueryAllByQuery, - QueryByQuery, -} from './make-queries'; -import { CommonQueryOptions } from './options'; - -const queryAllByA11yState = ( - instance: ReactTestInstance, -): QueryAllByQuery => - function queryAllByA11yStateFn(matcher, queryOptions) { - return findAll(instance, (node) => matchAccessibilityState(node, matcher), queryOptions); - }; - -const buildErrorMessage = (state: AccessibilityStateMatcher = {}) => { - const errors: string[] = []; - - accessibilityStateKeys.forEach((stateKey) => { - if (state[stateKey] !== undefined) { - errors.push(`${stateKey} state: ${state[stateKey]}`); - } - }); - - return errors.join(', '); -}; - -const getMultipleError = (state: AccessibilityStateMatcher) => - `Found multiple elements with ${buildErrorMessage(state)}`; - -const getMissingError = (state: AccessibilityStateMatcher) => - `Unable to find an element with ${buildErrorMessage(state)}`; - -const { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries( - queryAllByA11yState, - getMissingError, - getMultipleError, -); - -export type ByA11yStateQueries = { - getByA11yState: GetByQuery; - getAllByA11yState: GetAllByQuery; - queryByA11yState: QueryByQuery; - queryAllByA11yState: QueryAllByQuery; - findByA11yState: FindByQuery; - findAllByA11yState: FindAllByQuery; - - getByAccessibilityState: GetByQuery; - getAllByAccessibilityState: GetAllByQuery; - queryByAccessibilityState: QueryByQuery; - queryAllByAccessibilityState: QueryAllByQuery; - findByAccessibilityState: FindByQuery; - findAllByAccessibilityState: FindAllByQuery; -}; - -export const bindByA11yStateQueries = (instance: ReactTestInstance): ByA11yStateQueries => { - const getByA11yState = getBy(instance); - const getAllByA11yState = getAllBy(instance); - const queryByA11yState = queryBy(instance); - const queryAllByA11yState = queryAllBy(instance); - const findByA11yState = findBy(instance); - const findAllByA11yState = findAllBy(instance); - - return { - ...deprecateQueries( - { - getByA11yState, - getAllByA11yState, - queryByA11yState, - queryAllByA11yState, - findByA11yState, - findAllByA11yState, - getByAccessibilityState: getByA11yState, - getAllByAccessibilityState: getAllByA11yState, - queryByAccessibilityState: queryByA11yState, - queryAllByAccessibilityState: queryAllByA11yState, - findByAccessibilityState: findByA11yState, - findAllByAccessibilityState: findAllByA11yState, - }, - 'Use {queryPrefix}ByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead.', - ), - }; -}; diff --git a/src/queries/accessibility-value.ts b/src/queries/accessibility-value.ts deleted file mode 100644 index 25d4d5361..000000000 --- a/src/queries/accessibility-value.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { ReactTestInstance } from 'react-test-renderer'; -import { accessibilityValueKeys } from '../helpers/accessibility'; -import { deprecateQueries } from '../helpers/deprecation'; -import { findAll } from '../helpers/find-all'; -import { - AccessibilityValueMatcher, - matchAccessibilityValue, -} from '../helpers/matchers/match-accessibility-value'; -import { makeQueries } from './make-queries'; -import type { - FindAllByQuery, - FindByQuery, - GetAllByQuery, - GetByQuery, - QueryAllByQuery, - QueryByQuery, -} from './make-queries'; -import { CommonQueryOptions } from './options'; - -const queryAllByA11yValue = ( - instance: ReactTestInstance, -): QueryAllByQuery => - function queryAllByA11yValueFn(value, queryOptions) { - return findAll(instance, (node) => matchAccessibilityValue(node, value), queryOptions); - }; - -const formatQueryParams = (matcher: AccessibilityValueMatcher) => { - const params: string[] = []; - - accessibilityValueKeys.forEach((valueKey) => { - if (matcher[valueKey] !== undefined) { - params.push(`${valueKey} value: ${matcher[valueKey]}`); - } - }); - - return params.join(', '); -}; - -const getMultipleError = (matcher: AccessibilityValueMatcher) => - `Found multiple elements with ${formatQueryParams(matcher)}`; - -const getMissingError = (matcher: AccessibilityValueMatcher) => - `Unable to find an element with ${formatQueryParams(matcher)}`; - -const { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries( - queryAllByA11yValue, - getMissingError, - getMultipleError, -); - -export type ByA11yValueQueries = { - getByA11yValue: GetByQuery; - getAllByA11yValue: GetAllByQuery; - queryByA11yValue: QueryByQuery; - queryAllByA11yValue: QueryAllByQuery; - findByA11yValue: FindByQuery; - findAllByA11yValue: FindAllByQuery; - - getByAccessibilityValue: GetByQuery; - getAllByAccessibilityValue: GetAllByQuery; - queryByAccessibilityValue: QueryByQuery; - queryAllByAccessibilityValue: QueryAllByQuery; - findByAccessibilityValue: FindByQuery; - findAllByAccessibilityValue: FindAllByQuery; -}; - -export const bindByA11yValueQueries = (instance: ReactTestInstance): ByA11yValueQueries => { - const getByA11yValue = getBy(instance); - const getAllByA11yValue = getAllBy(instance); - const queryByA11yValue = queryBy(instance); - const queryAllByA11yValue = queryAllBy(instance); - const findByA11yValue = findBy(instance); - const findAllByA11yValue = findAllBy(instance); - - return { - ...deprecateQueries( - { - getByA11yValue, - getAllByA11yValue, - queryByA11yValue, - queryAllByA11yValue, - findByA11yValue, - findAllByA11yValue, - getByAccessibilityValue: getByA11yValue, - getAllByAccessibilityValue: getAllByA11yValue, - queryByAccessibilityValue: queryByA11yValue, - queryAllByAccessibilityValue: queryAllByA11yValue, - findByAccessibilityValue: findByA11yValue, - findAllByAccessibilityValue: findAllByA11yValue, - }, - 'Use toHaveAccessibilityValue(...) built-in Jest matcher or {queryPrefix}ByRole(role, { value: ... }) query instead.', - ), - }; -}; diff --git a/src/queries/label-text.ts b/src/queries/label-text.ts index c9dd6dc06..2e018a6a0 100644 --- a/src/queries/label-text.ts +++ b/src/queries/label-text.ts @@ -1,7 +1,7 @@ import type { ReactTestInstance } from 'react-test-renderer'; import { findAll } from '../helpers/find-all'; import { TextMatch, TextMatchOptions } from '../matches'; -import { matchLabelText } from '../helpers/matchers/match-label-text'; +import { matchAccessibilityLabel } from '../helpers/matchers/match-label-text'; import { makeQueries } from './make-queries'; import type { FindAllByQuery, @@ -19,7 +19,7 @@ function queryAllByLabelText(instance: ReactTestInstance) { return (text: TextMatch, queryOptions?: ByLabelTextOptions) => { return findAll( instance, - (node) => matchLabelText(instance, node, text, queryOptions), + (node) => matchAccessibilityLabel(node, text, queryOptions), queryOptions, ); }; diff --git a/src/render-hook.tsx b/src/render-hook.tsx index f6e7cf08b..ba30077b0 100644 --- a/src/render-hook.tsx +++ b/src/render-hook.tsx @@ -37,7 +37,6 @@ export function renderHook( , { wrapper, - detectHostComponentNames: false, }, ); diff --git a/src/render.tsx b/src/render.tsx index e4a6e22e4..dfbec3155 100644 --- a/src/render.tsx +++ b/src/render.tsx @@ -8,10 +8,8 @@ import { Profiler } from 'react'; import act from './act'; import { addToCleanupQueue } from './cleanup'; import { getConfig } from './config'; -import { getHostChildren } from './helpers/component-tree'; -import debugDeep, { DebugOptions } from './helpers/debug-deep'; -import debugShallow from './helpers/debug-shallow'; -import { configureHostComponentNamesIfNeeded } from './helpers/host-component-names'; +import { getHostSelves } from './helpers/component-tree'; +import { debug, DebugOptions } from './helpers/debug'; import { validateStringsRenderedWithinText } from './helpers/string-validation'; import { renderWithAct } from './render-act'; import { setRenderResult } from './screen'; @@ -25,10 +23,10 @@ export interface RenderOptions { wrapper?: React.ComponentType; /** - * Set to `true` to enable concurrent rendering. - * Otherwise `render` will default to legacy synchronous rendering. + * Set to `false` to disable concurrent rendering. + * Otherwise `render` will default to concurrent rendering. */ - concurrentRoot?: boolean | undefined; + concurrentRoot?: boolean; createNodeMock?: (element: React.ReactElement) => unknown; unstable_validateStringsRenderedWithinText?: boolean; @@ -44,18 +42,10 @@ export default function render(component: React.ReactElement, options: Ren return renderInternal(component, options); } -export interface RenderInternalOptions extends RenderOptions { - detectHostComponentNames?: boolean; -} - -export function renderInternal( - component: React.ReactElement, - options?: RenderInternalOptions, -) { +export function renderInternal(component: React.ReactElement, options?: RenderOptions) { const { wrapper: Wrapper, concurrentRoot, - detectHostComponentNames = true, unstable_validateStringsRenderedWithinText, ...rest } = options || {}; @@ -66,10 +56,6 @@ export function renderInternal( unstable_isConcurrent: concurrentRoot ?? getConfig().concurrentRoot, }; - if (detectHostComponentNames) { - configureHostComponentNamesIfNeeded(); - } - if (unstable_validateStringsRenderedWithinText) { return renderWithStringValidation(component, { wrapper: Wrapper, @@ -129,9 +115,9 @@ function buildRenderResult( unmount, rerender: update, // alias for `update` toJSON: renderer.toJSON, - debug: debug(instance, renderer), + debug: makeDebug(instance, renderer), get root(): ReactTestInstance { - return getHostChildren(instance)[0]; + return getHostSelves(instance)[0]; }, UNSAFE_root: instance, }; @@ -164,12 +150,9 @@ function updateWithAct( }; } -export interface DebugFunction { - (options?: DebugOptions | string): void; - shallow: (message?: string) => void; -} +export type DebugFunction = (options?: DebugOptions | string) => void; -function debug(instance: ReactTestInstance, renderer: ReactTestRenderer): DebugFunction { +function makeDebug(instance: ReactTestInstance, renderer: ReactTestRenderer): DebugFunction { function debugImpl(options?: DebugOptions | string) { const { defaultDebugOptions } = getConfig(); const debugOptions = @@ -180,15 +163,14 @@ function debug(instance: ReactTestInstance, renderer: ReactTestRenderer): DebugF if (typeof options === 'string') { // eslint-disable-next-line no-console console.warn( - 'Using debug("message") is deprecated and will be removed in future release, please use debug({ message; "message" }) instead.', + 'Using debug("message") is deprecated and will be removed in future release, please use debug({ message: "message" }) instead.', ); } const json = renderer.toJSON(); if (json) { - return debugDeep(json, debugOptions); + return debug(json, debugOptions); } } - debugImpl.shallow = (message?: string) => debugShallow(instance, message); return debugImpl; } diff --git a/src/screen.ts b/src/screen.ts index 1fcbd3e2a..2d85d7c35 100644 --- a/src/screen.ts +++ b/src/screen.ts @@ -10,7 +10,6 @@ const notImplemented = () => { const notImplementedDebug = () => { throw new Error(SCREEN_ERROR); }; -notImplementedDebug.shallow = notImplemented; interface Screen extends RenderResult { isDetached?: boolean; @@ -59,30 +58,6 @@ const defaultScreen: Screen = { queryAllByRole: notImplemented, findByRole: notImplemented, findAllByRole: notImplemented, - getByA11yState: notImplemented, - getAllByA11yState: notImplemented, - queryByA11yState: notImplemented, - queryAllByA11yState: notImplemented, - findByA11yState: notImplemented, - findAllByA11yState: notImplemented, - getByAccessibilityState: notImplemented, - getAllByAccessibilityState: notImplemented, - queryByAccessibilityState: notImplemented, - queryAllByAccessibilityState: notImplemented, - findByAccessibilityState: notImplemented, - findAllByAccessibilityState: notImplemented, - getByA11yValue: notImplemented, - getAllByA11yValue: notImplemented, - queryByA11yValue: notImplemented, - queryAllByA11yValue: notImplemented, - findByA11yValue: notImplemented, - findAllByA11yValue: notImplemented, - getByAccessibilityValue: notImplemented, - getAllByAccessibilityValue: notImplemented, - queryByAccessibilityValue: notImplemented, - queryAllByAccessibilityValue: notImplemented, - findByAccessibilityValue: notImplemented, - findAllByAccessibilityValue: notImplemented, UNSAFE_getByProps: notImplemented, UNSAFE_getAllByProps: notImplemented, UNSAFE_queryByProps: notImplemented, diff --git a/src/shallow.ts b/src/shallow.ts deleted file mode 100644 index 90e030ffe..000000000 --- a/src/shallow.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from 'react'; -import { ReactTestInstance } from 'react-test-renderer'; -import ShallowRenderer from 'react-test-renderer/shallow'; // eslint-disable-line import/no-extraneous-dependencies - -/** - * Renders test component shallowly using react-test-renderer/shallow - */ -export function shallowInternal(instance: ReactTestInstance | React.ReactElement): { - output: any; -} { - const renderer = new (ShallowRenderer as any)(); - - renderer.render(React.createElement(instance.type, instance.props)); - - return { - output: renderer.getRenderOutput(), - }; -} diff --git a/src/user-event/clear.ts b/src/user-event/clear.ts index 9b4ce555f..589d0be31 100644 --- a/src/user-event/clear.ts +++ b/src/user-event/clear.ts @@ -1,7 +1,7 @@ import { ReactTestInstance } from 'react-test-renderer'; import { ErrorWithStack } from '../helpers/errors'; import { isHostTextInput } from '../helpers/host-component-names'; -import { getTextInputValue, isTextInputEditable } from '../helpers/text-input'; +import { getTextInputValue, isEditableTextInput } from '../helpers/text-input'; import { isPointerEventEnabled } from '../helpers/pointer-events'; import { EventBuilder } from './event-builder'; import { UserEventInstance } from './setup'; @@ -16,7 +16,7 @@ export async function clear(this: UserEventInstance, element: ReactTestInstance) ); } - if (!isTextInputEditable(element) || !isPointerEventEnabled(element)) { + if (!isEditableTextInput(element) || !isPointerEventEnabled(element)) { return; } diff --git a/src/user-event/paste.ts b/src/user-event/paste.ts index 7ead1d1f3..fc0622b2d 100644 --- a/src/user-event/paste.ts +++ b/src/user-event/paste.ts @@ -2,7 +2,7 @@ import { ReactTestInstance } from 'react-test-renderer'; import { ErrorWithStack } from '../helpers/errors'; import { isHostTextInput } from '../helpers/host-component-names'; import { isPointerEventEnabled } from '../helpers/pointer-events'; -import { getTextInputValue, isTextInputEditable } from '../helpers/text-input'; +import { getTextInputValue, isEditableTextInput } from '../helpers/text-input'; import { nativeState } from '../native-state'; import { EventBuilder } from './event-builder'; import { UserEventInstance } from './setup'; @@ -20,7 +20,7 @@ export async function paste( ); } - if (!isTextInputEditable(element) || !isPointerEventEnabled(element)) { + if (!isEditableTextInput(element) || !isPointerEventEnabled(element)) { return; } diff --git a/src/user-event/press/press.ts b/src/user-event/press/press.ts index 7302c704a..f5859fc4a 100644 --- a/src/user-event/press/press.ts +++ b/src/user-event/press/press.ts @@ -1,9 +1,9 @@ import { ReactTestInstance } from 'react-test-renderer'; import act from '../../act'; import { getHostParent } from '../../helpers/component-tree'; -import { isTextInputEditable } from '../../helpers/text-input'; +import { isEditableTextInput } from '../../helpers/text-input'; import { isPointerEventEnabled } from '../../helpers/pointer-events'; -import { isHostText, isHostTextInput } from '../../helpers/host-component-names'; +import { isHostText } from '../../helpers/host-component-names'; import { EventBuilder } from '../event-builder'; import { UserEventConfig, UserEventInstance } from '../setup'; import { dispatchEvent, wait } from '../utils'; @@ -49,7 +49,7 @@ const basePress = async ( return; } - if (isHostTextInput(element) && isTextInputEditable(element) && isPointerEventEnabled(element)) { + if (isEditableTextInput(element) && isPointerEventEnabled(element)) { await emitTextInputPressEvents(config, element, options); return; } diff --git a/src/user-event/type/type.ts b/src/user-event/type/type.ts index e9fcdf134..255679c65 100644 --- a/src/user-event/type/type.ts +++ b/src/user-event/type/type.ts @@ -3,7 +3,7 @@ import { isHostTextInput } from '../../helpers/host-component-names'; import { nativeState } from '../../native-state'; import { EventBuilder } from '../event-builder'; import { ErrorWithStack } from '../../helpers/errors'; -import { getTextInputValue, isTextInputEditable } from '../../helpers/text-input'; +import { getTextInputValue, isEditableTextInput } from '../../helpers/text-input'; import { isPointerEventEnabled } from '../../helpers/pointer-events'; import { UserEventConfig, UserEventInstance } from '../setup'; import { dispatchEvent, wait, getTextContentSize } from '../utils'; @@ -29,7 +29,7 @@ export async function type( } // Skip events if the element is disabled - if (!isTextInputEditable(element) || !isPointerEventEnabled(element)) { + if (!isEditableTextInput(element) || !isPointerEventEnabled(element)) { return; } diff --git a/src/within.ts b/src/within.ts index 59db8bf1a..0e5873007 100644 --- a/src/within.ts +++ b/src/within.ts @@ -6,8 +6,6 @@ import { bindByPlaceholderTextQueries } from './queries/placeholder-text'; import { bindByLabelTextQueries } from './queries/label-text'; import { bindByHintTextQueries } from './queries/hint-text'; import { bindByRoleQueries } from './queries/role'; -import { bindByA11yStateQueries } from './queries/accessibility-state'; -import { bindByA11yValueQueries } from './queries/accessibility-value'; import { bindUnsafeByTypeQueries } from './queries/unsafe-type'; import { bindUnsafeByPropsQueries } from './queries/unsafe-props'; @@ -20,8 +18,6 @@ export function within(instance: ReactTestInstance) { ...bindByLabelTextQueries(instance), ...bindByHintTextQueries(instance), ...bindByRoleQueries(instance), - ...bindByA11yStateQueries(instance), - ...bindByA11yValueQueries(instance), ...bindUnsafeByTypeQueries(instance), ...bindUnsafeByPropsQueries(instance), }; diff --git a/typings/index.flow.js b/typings/index.flow.js index eb05d9f24..df25313d7 100644 --- a/typings/index.flow.js +++ b/typings/index.flow.js @@ -55,10 +55,10 @@ declare type A11yRole = declare type A11yState = {| disabled?: boolean, - selected?: boolean, - checked?: boolean | 'mixed', - busy?: boolean, - expanded?: boolean, + selected ?: boolean, + checked ?: boolean | 'mixed', + busy ?: boolean, + expanded ?: boolean, |}; declare type A11yValue = { @@ -258,38 +258,6 @@ interface A11yAPI { queryOptions?: ByRoleOptions, waitForOptions?: WaitForOptions ) => FindAllReturn; - - // State - getByA11yState: (matcher: A11yState, options?: CommonQueryOptions) => GetReturn; - getAllByA11yState: (matcher: A11yState, options?: CommonQueryOptions) => GetAllReturn; - queryByA11yState: (matcher: A11yState, options?: CommonQueryOptions) => QueryReturn; - queryAllByA11yState: (matcher: A11yState, options?: CommonQueryOptions) => QueryAllReturn; - findByA11yState: ( - matcher: A11yState, - queryOptions?: CommonQueryOptions, - waitForOptions?: WaitForOptions - ) => FindReturn; - findAllByA11yState: ( - matcher: A11yState, - queryOptions?: CommonQueryOptions, - waitForOptions?: WaitForOptions - ) => FindAllReturn; - - // Value - getByA11yValue: (matcher: A11yValue, options?: CommonQueryOptions) => GetReturn; - getAllByA11yValue: (matcher: A11yValue, options?: CommonQueryOptions) => GetAllReturn; - queryByA11yValue: (matcher: A11yValue, options?: CommonQueryOptions) => QueryReturn; - queryAllByA11yValue: (matcher: A11yValue, options?: CommonQueryOptions) => QueryAllReturn; - findByA11yValue: ( - matcher: A11yValue, - queryOptions?: CommonQueryOptions, - waitForOptions?: WaitForOptions - ) => FindReturn; - findAllByA11yValue: ( - matcher: A11yValue, - queryOptions?: CommonQueryOptions, - waitForOptions?: WaitForOptions - ) => FindAllReturn; } interface Thenable { @@ -308,7 +276,6 @@ type DebugOptions = { type Debug = { (options?: DebugOptions | string): void, - shallow: (message?: string) => void, }; type Queries = ByTextQueries & diff --git a/website/docs/12.x/docs/api/queries.mdx b/website/docs/12.x/docs/api/queries.mdx index 85df7e0ac..232ffab5f 100644 --- a/website/docs/12.x/docs/api/queries.mdx +++ b/website/docs/12.x/docs/api/queries.mdx @@ -383,115 +383,6 @@ const element = screen.getByTestId('unique-id'); In the spirit of [the guiding principles](https://testing-library.com/docs/guiding-principles), it is recommended to use this only after the other queries don't work for your use case. Using `testID` attributes do not resemble how your software is used and should be avoided if possible. However, they are particularly useful for end-to-end testing on real devices, e.g. using Detox and it's an encouraged technique to use there. Learn more from the blog post ["Making your UI tests resilient to change"](https://kentcdodds.com/blog/making-your-ui-tests-resilient-to-change). ::: -### `*ByA11yState`, `ByAccessibilityState` (deprecated) {#by-accessibility-state} - -:::caution -This query has been marked deprecated, as is typically too general to give meaningful results. Therefore, it's better to use one of following options: - -- [`*ByRole`](#by-role) query with relevant state options: `disabled`, `selected`, `checked`, `expanded` and `busy` -- use built-in Jest matchers to check the state of element found using some other query: - - enabled state: [`toBeEnabled()` / `toBeDisabled()`](docs/api/jest-matchers#tobeenabled) - - checked state: [`toBeChecked()` / `toBePartiallyChecked()`](docs/api/jest-matchers#tobechecked) - - selected state: [`toBeSelected()`](docs/api/jest-matchers#tobeselected) - - expanded state: [`toBeExpanded()` / `toBeCollapsed()`](docs/api/jest-matchers#tobeexpanded) - - busy state: [`toBeBusy()`](docs/api/jest-matchers#tobebusy) - -::: - -> getByA11yState, getAllByA11yState, queryByA11yState, queryAllByA11yState, findByA11yState, findAllByA11yState -> getByAccessibilityState, getAllByAccessibilityState, queryByAccessibilityState, queryAllByAccessibilityState, findByAccessibilityState, findAllByAccessibilityState - -```ts -getByA11yState( - state: { - disabled?: boolean, - selected?: boolean, - checked?: boolean | 'mixed', - busy?: boolean, - expanded?: boolean, - }, - options?: { - includeHiddenElements?: boolean; - }, -): ReactTestInstance; -``` - -Returns a `ReactTestInstance` with matching `accessibilityState` prop or ARIA state props: `aria-disabled`, `aria-selected`, `aria-checked`, `aria-busy`, and `aria-expanded`. - -```jsx -import { render, screen } from '@testing-library/react-native'; - -render(); -const element = screen.getByA11yState({ disabled: true }); -``` - -:::note - -#### Default state for: `disabled`, `selected`, and `busy` keys - -Passing `false` matcher value will match both elements with explicit `false` state value and without explicit state value. - -For instance, `getByA11yState({ disabled: false })` will match elements with following props: - -- `accessibilityState={{ disabled: false, ... }}` -- no `disabled` key under `accessibilityState` prop, e.g. `accessibilityState={{}}` -- no `accessibilityState` prop at all - -#### Default state for: `checked` and `expanded` keys - -Passing `false` matcher value will only match elements with explicit `false` state value. - -For instance, `getByA11yState({ checked: false })` will only match elements with: - -- `accessibilityState={{ checked: false, ... }}` - -but will not match elements with following props: - -- no `checked` key under `accessibilityState` prop, e.g. `accessibilityState={{}}` -- no `accessibilityState` prop at all - -The difference in handling default values is made to reflect observed accessibility behaviour on iOS and Android platforms. -::: - -### `*ByA11yValue`, `*ByAccessibilityValue` (deprecated) {#by-accessibility-value} - -:::caution -This query has been marked deprecated, as is typically too general to give meaningful results. Therefore, it's better to use one of following options: - -- [`toHaveAccessibilityValue()`](docs/api/jest-matchers#tohaveaccessibilityvalue) Jest matcher to check the state of element found using some other query -- [`*ByRole`](#by-role) query with `value` option - -::: - -> getByA11yValue, getAllByA11yValue, queryByA11yValue, queryAllByA11yValue, findByA11yValue, findAllByA11yValue -> getByAccessibilityValue, getAllByAccessibilityValue, queryByAccessibilityValue, queryAllByAccessibilityValue, findByAccessibilityValue, findAllByAccessibilityValue - -```ts -getByA11yValue( - value: { - min?: number; - max?: number; - now?: number; - text?: TextMatch; - }, - options?: { - includeHiddenElements?: boolean; - }, -): ReactTestInstance; -``` - -Returns a host element with matching accessibility value based on `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-valuetext` & `accessibilityValue` props. Only value entires provided to the query will be used to match elements. Element might have additional accessibility value entries and still be matched. - -When querying by `text` entry a string or regex might be used. - -```jsx -import { render, screen } from '@testing-library/react-native'; - -render(); -const element = screen.getByA11yValue({ now: 25 }); -const element2 = screen.getByA11yValue({ text: /25/ }); -``` - ### Common options Usually query first argument can be a **string** or a **regex**. All queries take at least the [`hidden`](#hidden-option) option as an optionnal second argument and some queries accept more options which change string matching behaviour. See [TextMatch](#textmatch) for more info. diff --git a/website/docs/12.x/docs/migration/v13.mdx b/website/docs/12.x/docs/migration/v13.mdx new file mode 100644 index 000000000..bcf81c721 --- /dev/null +++ b/website/docs/12.x/docs/migration/v13.mdx @@ -0,0 +1,68 @@ +# Migration to 13.0 + +Migration to React Native Testing Library version 13 from version 12.x. + +# Breaking changes + +## Supported React and React Native versions + +This version supports only React 19 and corresponding React Native versions. If you use React 18 or 19, please use latest of v12 versions. + +[Note: at the moment there is no React Native for React 19, and React 19 is still in beta, so we use React 18.3 for the time being]. + +## Removed deprecated \*ByAccessibilityState queries + +This deprecated query has been removed as is typically too general to give meaningful results. Use one of the following options: + +- [`*ByRole`](#by-role) query with relevant state options: `disabled`, `selected`, `checked`, `expanded` and `busy` +- use built-in Jest matchers to check the state of element found using some other query: + - enabled state: [`toBeEnabled()` / `toBeDisabled()`](docs/api/jest-matchers#tobeenabled) + - checked state: [`toBeChecked()` / `toBePartiallyChecked()`](docs/api/jest-matchers#tobechecked) + - selected state: [`toBeSelected()`](docs/api/jest-matchers#tobeselected) + - expanded state: [`toBeExpanded()` / `toBeCollapsed()`](docs/api/jest-matchers#tobeexpanded) + - busy state: [`toBeBusy()`](docs/api/jest-matchers#tobebusy) + +```ts +// Replace this +const view = screen.getByAccessibilityState({ disabled: true }); + +// with this (getByRole query) +const view = screen.getByRole('', { disabled: true }); + +// or this (Jest matcher) +const view = screen.getBy*(...); // Find the element using any query: *ByRole, *ByText, *ByTestId +expect(view).toBeDisabled(); // Assert its accessibility state +``` + +## Removed deprecated \*ByAccessibilityValue queries + +This deprecated query has been removed as is typically too general to give meaningful results. Use one of the following options: + +- [`toHaveAccessibilityValue()`](docs/api/jest-matchers#tohaveaccessibilityvalue) Jest matcher to check the state of element found using some other query +- [`*ByRole`](#by-role) query with `value` option + +```ts +// Replace this +const view = screen.getByAccessibilityValue({ now: 50, min: 0, max: 50 }); + +// with this (getByRole query) +const view = screen.getByRole('', { value: { now: 50, min: 0, max: 50 } }); + +// or this (Jest matcher) +const view = screen.getBy*(...); // Find the element using any query: *ByRole, *ByText, *ByTestId +expect(view).toHaveAccessibilityValue({ now: 50, min: 0, max: 50 }); // Assert its accessibility value +``` + +## Removed `debug.shallow` + +For a time being we didn't support shallow rendering. Now we are removing the last remains of it: `debug.shallow()`. If you are interested in shallow rendering see [here](docs/migration/previous/v2#removed-global-shallow-function). + +# Other changes + +## Updated `flushMicroTasks` internal method + +This should not break any tests. + +## Full Changelog + +https://github.com/callstack/react-native-testing-library/compare/v12.5.2...v13.0.0 diff --git a/yarn.lock b/yarn.lock index fe23f3436..e8e40187d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -97,7 +97,31 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.7.2": + version: 7.25.9 + resolution: "@babel/generator@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10c0/fca49a1440ac550bb835a73c0e8314849cd493a468a5431ca7f9dbb3d3443e3a1a6dcba2426752e8a97cc2feed4a3b7a0c639e1c45871c4a9dd0c994f08dd25a + languageName: node + linkType: hard + +"@babel/generator@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/generator@npm:7.25.6" + dependencies: + "@babel/types": "npm:^7.25.6" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10c0/f89282cce4ddc63654470b98086994d219407d025497f483eb03ba102086e11e2b685b27122f6ff2e1d93b5b5fa0c3a6b7e974fbf2e4a75b685041a746a4291e + languageName: node + linkType: hard + +"@babel/generator@npm:^7.26.0": version: 7.26.2 resolution: "@babel/generator@npm:7.26.2" dependencies: @@ -282,6 +306,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 10c0/6361f72076c17fabf305e252bf6d580106429014b3ab3c1f5c4eb3e6d465536ea6b670cc0e9a637a77a9ad40454d3e41361a2909e70e305116a23d68ce094c08 + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-string-parser@npm:7.25.9" @@ -289,6 +320,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-validator-identifier@npm:7.25.9" @@ -335,6 +373,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": "npm:^7.25.6" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/f88a0e895dbb096fd37c4527ea97d12b5fc013720602580a941ac3a339698872f0c911e318c292b184c36b5fbe23b612f05aff9d24071bc847c7b1c21552c41d + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" @@ -1276,6 +1325,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-strict-mode@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-strict-mode@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/b12bd8f910132be8cff2114ca3ef3896c6d4d7c6455a0a0c8527d778dc03e5f4ee383fd02f7f81f9b9e80d4da835c6b24b26ef01ba099297c2617170dcb53bc4 + languageName: node + linkType: hard + "@babel/plugin-transform-template-literals@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-template-literals@npm:7.25.9" @@ -1531,7 +1591,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3, @babel/traverse@npm:^7.25.3, @babel/traverse@npm:^7.25.9": +"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3, @babel/traverse@npm:^7.25.9": version: 7.25.9 resolution: "@babel/traverse@npm:7.25.9" dependencies: @@ -1546,7 +1606,43 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": +"@babel/traverse@npm:^7.25.3": + version: 7.25.6 + resolution: "@babel/traverse@npm:7.25.6" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.25.6" + "@babel/parser": "npm:^7.25.6" + "@babel/template": "npm:^7.25.0" + "@babel/types": "npm:^7.25.6" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/964304c6fa46bd705428ba380bf73177eeb481c3f26d82ea3d0661242b59e0dd4329d23886035e9ca9a4ceb565c03a76fd615109830687a27bcd350059d6377e + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": + version: 7.25.9 + resolution: "@babel/types@npm:7.25.9" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/33890d08bcb06b26a3a60e4c6c996cbdf2b8d8a3c212664de659c2775f80b002c5f2bceedaa309c384ff5e99bd579794fe6a7e41de07df70246f43c55016d349 + languageName: node + linkType: hard + +"@babel/types@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10c0/89d45fbee24e27a05dca2d08300a26b905bd384a480448823f6723c72d3a30327c517476389b7280ce8cb9a2c48ef8f47da7f9f6d326faf6f53fd6b68237bdc4 + languageName: node + linkType: hard + +"@babel/types@npm:^7.26.0": version: 7.26.0 resolution: "@babel/types@npm:7.26.0" dependencies: @@ -2540,7 +2636,7 @@ __metadata: dependencies: "@babel/cli": "npm:^7.25.9" "@babel/core": "npm:^7.26.0" - "@babel/plugin-transform-flow-strip-types": "npm:^7.25.9" + "@babel/plugin-transform-strict-mode": "npm:^7.25.9" "@babel/preset-env": "npm:^7.26.0" "@babel/preset-flow": "npm:^7.25.9" "@babel/preset-react": "npm:^7.25.9" @@ -2553,9 +2649,9 @@ __metadata: "@types/react": "npm:^18.3.12" "@types/react-test-renderer": "npm:^18.3.0" babel-jest: "npm:^29.7.0" + babel-plugin-module-resolver: "npm:^5.0.2" del-cli: "npm:^6.0.0" eslint: "npm:^8.57.1" - eslint-plugin-flowtype: "npm:^8.0.3" eslint-plugin-prettier: "npm:^4.2.1" flow-bin: "npm:~0.170.0" jest: "npm:^29.7.0" @@ -2570,10 +2666,10 @@ __metadata: strip-ansi: "npm:^6.0.1" typescript: "npm:^5.6.3" peerDependencies: - jest: ">=28.0.0" - react: ">=16.8.0" - react-native: ">=0.59" - react-test-renderer: ">=16.8.0" + jest: ">=29.0.0" + react: ">=18.2.0" + react-native: ">=0.71" + react-test-renderer: ">=18.2.0" peerDependenciesMeta: jest: optional: true @@ -2811,6 +2907,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/scope-manager@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + checksum: 10c0/95188c663df7db106529c6b93c4c7c61647ed34ab6dd48114e41ddf49140ff606c5501ce2ae451a988ec49b5d3874ea96ff212fc102802327b10affd2ff80a37 + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/type-utils@npm:8.12.2" @@ -2833,6 +2939,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/types@npm:8.4.0" + checksum: 10c0/15e09ced84827c349553530a31822f06ae5bad456c03d561b7d0c64b6ad9b5d7ca795e030bd93e65d5a2cd41bfde36ed08dcd2ff9feaa8b60a67080827f47ecb + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/typescript-estree@npm:8.12.2" @@ -2852,7 +2965,26 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.12.2, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": +"@typescript-eslint/typescript-estree@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/170702b024121cff9268f53de8054796b0ce025f9a78d6f2bc850a360e5f3f7032ba3ee9d4b7392726308273a5f3ade5ab31b1788b504b514bc15afc07302b37 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/utils@npm:8.12.2" dependencies: @@ -2866,6 +2998,20 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": + version: 8.4.0 + resolution: "@typescript-eslint/utils@npm:8.4.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@typescript-eslint/scope-manager": "npm:8.4.0" + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/typescript-estree": "npm:8.4.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + checksum: 10c0/8c9c36b3aa23f9bcc28cc4b10f0fa2996f1bc6cdd75135f08c2ef734baa30dbd2a8b92f344b90518e1fd07a486936734789fc7e90b780221a7707dad8e9c9364 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/visitor-keys@npm:8.12.2" @@ -2876,6 +3022,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10c0/339199b7fbb9ac83b530d03ab25f6bc5ceb688c9cd0ae460112cd14ee78ca7284a845aef5620cdf70170980123475ec875e85ebf595c60255ba3c0d6fe48c714 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -3274,6 +3430,19 @@ __metadata: languageName: node linkType: hard +"babel-plugin-module-resolver@npm:^5.0.2": + version: 5.0.2 + resolution: "babel-plugin-module-resolver@npm:5.0.2" + dependencies: + find-babel-config: "npm:^2.1.1" + glob: "npm:^9.3.3" + pkg-up: "npm:^3.1.0" + reselect: "npm:^4.1.7" + resolve: "npm:^1.22.8" + checksum: 10c0/ccbb9e673c4219f68937349267521becb72be292cf30bf70b861c3e709d24fbfa589da0bf6c100a0def799d38199299171cb6eac3fb00b1ea740373e2c1fe54c + languageName: node + linkType: hard + "babel-plugin-polyfill-corejs2@npm:^0.4.10": version: 0.4.11 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" @@ -5251,6 +5420,15 @@ __metadata: languageName: node linkType: hard +"find-babel-config@npm:^2.1.1": + version: 2.1.2 + resolution: "find-babel-config@npm:2.1.2" + dependencies: + json5: "npm:^2.2.3" + checksum: 10c0/c9151b23d636378eae11aa761b0af41d5f67d5479e3ebfca7b0ec7feef91723f14242d243342783b89e6c51fc5b4120086eacf5d8a1a335cf7bae4b0ac89f493 + languageName: node + linkType: hard + "find-cache-dir@npm:^2.0.0": version: 2.1.0 resolution: "find-cache-dir@npm:2.1.0" @@ -5622,6 +5800,18 @@ __metadata: languageName: node linkType: hard +"glob@npm:^9.3.3": + version: 9.3.5 + resolution: "glob@npm:9.3.5" + dependencies: + fs.realpath: "npm:^1.0.0" + minimatch: "npm:^8.0.2" + minipass: "npm:^4.2.4" + path-scurry: "npm:^1.6.1" + checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e + languageName: node + linkType: hard + "global-directory@npm:^4.0.1": version: 4.0.1 resolution: "global-directory@npm:4.0.1" @@ -7156,6 +7346,15 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 + languageName: node + linkType: hard + "jsesc@npm:^3.0.2, jsesc@npm:~3.0.2": version: 3.0.2 resolution: "jsesc@npm:3.0.2" @@ -7858,6 +8057,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^8.0.2": + version: 8.0.4 + resolution: "minimatch@npm:8.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca + languageName: node + linkType: hard + "minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -7934,6 +8142,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^4.2.4": + version: 4.2.8 + resolution: "minipass@npm:4.2.8" + checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce + languageName: node + linkType: hard + "minipass@npm:^5.0.0": version: 5.0.0 resolution: "minipass@npm:5.0.0" @@ -8598,7 +8813,7 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.1": +"path-scurry@npm:^1.11.1, path-scurry@npm:^1.6.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" dependencies: @@ -8661,6 +8876,15 @@ __metadata: languageName: node linkType: hard +"pkg-up@npm:^3.1.0": + version: 3.1.0 + resolution: "pkg-up@npm:3.1.0" + dependencies: + find-up: "npm:^3.0.0" + checksum: 10c0/ecb60e1f8e1f611c0bdf1a0b6a474d6dfb51185567dc6f29cdef37c8d480ecba5362e006606bb290519bbb6f49526c403fabea93c3090c20368d98bb90c999ab + languageName: node + linkType: hard + "possible-typed-array-names@npm:^1.0.0": version: 1.0.0 resolution: "possible-typed-array-names@npm:1.0.0" @@ -9237,6 +9461,13 @@ __metadata: languageName: node linkType: hard +"reselect@npm:^4.1.7": + version: 4.1.8 + resolution: "reselect@npm:4.1.8" + checksum: 10c0/06a305a504affcbb67dd0561ddc8306b35796199c7e15b38934c80606938a021eadcf68cfd58e7bb5e17786601c37602a3362a4665c7bf0a96c1041ceee9d0b7 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -9274,7 +9505,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.4": +"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.4, resolve@npm:^1.22.8": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -9300,7 +9531,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -10182,6 +10413,13 @@ __metadata: languageName: node linkType: hard +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1"