diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e64609e..c728332d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,6 +94,9 @@ jobs: - name: Install node_modules (example/) run: yarn install --frozen-lockfile --cwd example + - name: Install node_modules (integration_test/) + run: yarn install --frozen-lockfile --cwd integration_test + - name: Compile TypeScript run: yarn typescript @@ -117,6 +120,9 @@ jobs: - name: Install node_modules (example/) run: yarn install --frozen-lockfile --cwd example + - name: Install node_modules (integration_test/) + run: yarn install --frozen-lockfile --cwd integration_test + - name: Build docs run: yarn docs @@ -146,6 +152,9 @@ jobs: - name: Install node_modules (example/) run: yarn install --frozen-lockfile --cwd example + - name: Install node_modules (integration_test/) + run: yarn install --frozen-lockfile --cwd integration_test + - name: Set up Gradle cache uses: gradle/gradle-build-action@v2 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d767791e..c3913cd7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,12 +145,20 @@ Our pre-commit hooks verify that your commit message matches this format when co The `package.json` file contains various scripts for common tasks: -- `yarn bootstrap`: setup project by installing all dependencies and pods. -- `yarn pods`: install pods only. +- `yarn bootstrap`: setup the whole project by installing all dependencies and pods. +- `yarn bootstrap:example`: setup example project by installing all dependencies and pods. +- `yarn bootstrap:integration-test`: setup integration tests project by installing all dependencies and pods. - `yarn build`: compile TypeScript files into `lib/` with ESBuild. - `yarn typescript`: type-check files with TypeScript. - `yarn lint`: lint files with ESLint. -- `yarn test`: run unit tests with Jest. +- `yarn format`: format files with Prettier. +- `yarn docs`: generate documentation with TypeDoc. +- `yarn brew`: install all dependencies for iOS development with Homebrew. - `yarn example start`: start the Metro server for the example app. - `yarn example android`: run the example app on Android. +- `yarn example pods`: install pods only. +- `yarn integration-test start`: start the Metro server for the integration tests. +- `yarn integration-test test:android`: run the player tests on Android. +- `yarn integration-test test:ios`: run the player tests on iOS. +- `yarn integration-test pods`: install pods only. - `yarn example ios`: run the example app on iOS. diff --git a/example/package.json b/example/package.json index 5ae7cfd6..e3f33ae2 100644 --- a/example/package.json +++ b/example/package.json @@ -6,7 +6,10 @@ "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", - "start": "react-native start" + "start": "react-native start", + "pods": "yarn pods-install || yarn pods-update", + "pods-install": "yarn pod-install", + "pods-update": "pod update --silent" }, "dependencies": { "@react-native-picker/picker": "2.5.1", diff --git a/integration_test/babel.config.js b/integration_test/babel.config.js index f842b77f..2c9e6bab 100644 --- a/integration_test/babel.config.js +++ b/integration_test/babel.config.js @@ -1,3 +1,17 @@ +const path = require('path'); +const pak = require('../package.json'); + module.exports = { presets: ['module:metro-react-native-babel-preset'], + plugins: [ + [ + 'module-resolver', + { + extensions: ['.tsx', '.ts', '.js', '.json'], + alias: { + [pak.name]: path.join(__dirname, '../src/'), + }, + }, + ], + ], }; diff --git a/integration_test/index.test.js b/integration_test/index.test.js new file mode 100644 index 00000000..79e26aa8 --- /dev/null +++ b/integration_test/index.test.js @@ -0,0 +1,5 @@ +import { AppRegistry } from 'react-native'; +import TestableApp from './src/TestableApp'; +import { name as appName } from './app.json'; + +AppRegistry.registerComponent(appName, () => TestableApp); diff --git a/integration_test/package.json b/integration_test/package.json index a70b1cd5..7564a9cd 100644 --- a/integration_test/package.json +++ b/integration_test/package.json @@ -6,11 +6,14 @@ "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", + "playertest:android": "yarn cavy run-android", + "playertest:ios": "yarn cavy run-ios", "pods": "yarn pods-install || yarn pods-update", "pods-install": "yarn pod-install", "pods-update": "pod update --silent" }, "dependencies": { + "cavy": "^4.0.2", "react": "18.2.0", "react-native": "npm:react-native-tvos@0.72.6-1" }, @@ -18,14 +21,17 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "@tsconfig/react-native": "^3.0.0", - "@types/react": "^18.0.24", "@react-native/metro-config": "^0.72.11", + "babel-plugin-module-resolver": "^5.0.0", "metro-react-native-babel-preset": "0.76.8", "pod-install": "^0.1.39", - "typescript": "4.8.4" + "@types/cavy": "^3.2.7", + "cavy-cli": "^3.0.0" }, "engines": { "node": ">=16" + }, + "resolutions": { + "@types/react": "~17.0.21" } } diff --git a/integration_test/src/TestableApp.tsx b/integration_test/src/TestableApp.tsx new file mode 100644 index 00000000..d74ceaca --- /dev/null +++ b/integration_test/src/TestableApp.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { Tester, TestHookStore } from 'cavy'; +import Specs from '../tests'; +import { StyleSheet, Text, View } from 'react-native'; +import { Colors } from 'react-native/Libraries/NewAppScreen'; + +const testHookStore = new TestHookStore(); + +function TestableApp(): JSX.Element { + return ( + + + Tests will come here + + + ); +} + +export default TestableApp; + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + padding: 10, + }, + text: { + fontSize: 24, + color: Colors.darker, + }, +}); diff --git a/integration_test/tests/exampleSpec.ts b/integration_test/tests/exampleSpec.ts new file mode 100644 index 00000000..db4279be --- /dev/null +++ b/integration_test/tests/exampleSpec.ts @@ -0,0 +1,9 @@ +import { TestScope } from 'cavy'; + +export default (spec: TestScope) => { + spec.describe('cavy', () => { + spec.it('works', async () => { + await new Promise((resolve) => setTimeout(resolve, 1000)); + }); + }); +}; diff --git a/integration_test/tests/index.ts b/integration_test/tests/index.ts new file mode 100644 index 00000000..3a963c02 --- /dev/null +++ b/integration_test/tests/index.ts @@ -0,0 +1,3 @@ +import ExampleSpec from './exampleSpec'; + +export default [ExampleSpec]; diff --git a/integration_test/yarn.lock b/integration_test/yarn.lock index 531c8590..474931ff 100644 --- a/integration_test/yarn.lock +++ b/integration_test/yarn.lock @@ -1503,10 +1503,12 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@tsconfig/react-native@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@tsconfig/react-native/-/react-native-3.0.2.tgz#f7db242eee4820f5a3d0edcc86c920bb7d9ec0f2" - integrity sha512-F7IoHEqf741lut4Z2K+IkWQRvXAhBiZMeY5L7BysG7Z2Z3MlIyFR+AagD8jQ/CqC1vowGnRwfLjeuwIpaeoJxA== +"@types/cavy@^3.2.7": + version "3.2.8" + resolved "https://registry.yarnpkg.com/@types/cavy/-/cavy-3.2.8.tgz#8b3beafe0251482acd2335d3cbc0fb91c3b8da21" + integrity sha512-252TeL+OxYRRgIWRppVVrV5dj8sD4JyDyvgfTTdi5duvoWrqX1VpFbUealS2pPSn1ujymM3w2g4fD+u3yMvd9A== + dependencies: + "@types/react" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.6" @@ -1539,10 +1541,10 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.10.tgz#892afc9332c4d62a5ea7e897fe48ed2085bbb08a" integrity sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A== -"@types/react@^18.0.24": - version "18.2.37" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.37.tgz#0f03af69e463c0f19a356c2660dbca5d19c44cae" - integrity sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw== +"@types/react@*", "@types/react@~17.0.21": + version "17.0.71" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.71.tgz#3673d446ad482b1564e44bf853b3ab5bcbc942c4" + integrity sha512-lfqOu9mp16nmaGRrS8deS2Taqhd5Ih0o92Te5Ws6I1py4ytHBcXLqh0YIqVsViqwVI5f+haiFM6hju814BzcmA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1699,6 +1701,17 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== +babel-plugin-module-resolver@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz#2b7fc176bd55da25f516abf96015617b4f70fc73" + integrity sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q== + dependencies: + find-babel-config "^2.0.0" + glob "^8.0.3" + pkg-up "^3.1.0" + reselect "^4.1.7" + resolve "^1.22.1" + babel-plugin-polyfill-corejs2@^0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz#b2df0251d8e99f229a8e60fc4efa9a68b41c8313" @@ -1795,6 +1808,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -1871,7 +1891,25 @@ caniuse-lite@^1.0.30001541: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz#9d16c5fd7e9c592c4cd5e304bc0f75b0008b2759" integrity sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng== -chalk@^2.4.2: +cavy-cli@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cavy-cli/-/cavy-cli-3.0.0.tgz#b0a7b49c35b408be456fa64eef2759abea7f1ab0" + integrity sha512-gQETN+fKNsXexvnSblxZY2rKT4kMfkWVg+FR7GehJ5mLkzDEH81snnROKI6PCgh17yg5+LmU2OKRyRgtWUB4+Q== + dependencies: + chalk "^2.3.0" + commander "^2.12.2" + ws "^7.3.0" + xml2js "^0.4.23" + +cavy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cavy/-/cavy-4.0.2.tgz#1f23d1b343e6b8d50a84be946e85767abb703c1a" + integrity sha512-EFyDqegu5HW4Qs48VD8w3pRSMYtqEa2qht7xlYClb/jZm+ODuc3W1x8xWYCBL+JUAKmIihQymTFM4M2lw/j3YQ== + dependencies: + hoist-non-react-statics "^3.3.0" + prop-types "^15.5.10" + +chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1976,7 +2014,7 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.20.0: +commander@^2.12.2, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2268,6 +2306,14 @@ finalhandler@1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-babel-config@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-2.0.0.tgz#a8216f825415a839d0f23f4d18338a1cc966f701" + integrity sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw== + dependencies: + json5 "^2.1.1" + path-exists "^4.0.0" + find-cache-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -2371,6 +2417,17 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -2417,6 +2474,13 @@ hermes-profile-transformer@^0.0.6: dependencies: source-map "^0.7.3" +hoist-non-react-statics@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -2722,7 +2786,7 @@ json-parse-better-errors@^1.0.1: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -json5@^2.2.3: +json5@^2.1.1, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -3152,6 +3216,13 @@ minimatch@^3.0.2, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -3415,6 +3486,13 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pkg-up@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== + dependencies: + find-up "^3.0.0" + pod-install@^0.1.39: version "0.1.39" resolved "https://registry.yarnpkg.com/pod-install/-/pod-install-0.1.39.tgz#853a0585bafbd332c2ca6543854fd4919958cfb3" @@ -3459,7 +3537,7 @@ prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.8.1: +prop-types@^15.5.10, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -3493,7 +3571,7 @@ react-devtools-core@^4.27.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-is@^16.13.1: +react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -3660,12 +3738,17 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +reselect@^4.1.7: + version "4.1.8" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" + integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== -resolve@^1.14.2: +resolve@^1.14.2, resolve@^1.22.1: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -3706,6 +3789,11 @@ safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +sax@>=0.6.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" + integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== + scheduler@0.24.0-canary-efb381bbf-20230505: version "0.24.0-canary-efb381bbf-20230505" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz#5dddc60e29f91cd7f8b983d7ce4a99c2202d178f" @@ -4029,11 +4117,6 @@ type-fest@^0.7.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -typescript@4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== - uglify-es@^3.1.9: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" @@ -4196,11 +4279,24 @@ ws@^6.2.2: dependencies: async-limiter "~1.0.0" -ws@^7, ws@^7.5.1: +ws@^7, ws@^7.3.0, ws@^7.5.1: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +xml2js@^0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" diff --git a/package.json b/package.json index 9fe09728..af59266a 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,11 @@ "format": "prettier --write .", "build": "tsup ./src/index.ts --dts --target es2020 --format cjs,esm -d lib", "example": "yarn --cwd example", - "pods": "yarn pods-install || yarn pods-update", - "pods-install": "yarn example pod-install", - "pods-update": "cd example/ios && pod update --silent", - "bootstrap": "yarn && yarn example && yarn pods && yarn brew", + "integration-test": "yarn --cwd integration_test", + "pods": "yarn example pods && yarn integration-test pods", + "bootstrap": "yarn bootstrap:example && yarn bootstrap:integration-test", + "bootstrap:example": "yarn && yarn example && yarn example pods && yarn brew", + "bootstrap:integration-test": "yarn && yarn integration-test && yarn integration-test pods && yarn brew", "brew": "[ \"$(uname)\" = \"Darwin\" ] && brew bundle install --no-lock", "prepare": "husky install", "docs": "typedoc"