JS Ninja アドベントペアプロ #4 expo/expo
本記事は JS Ninja OSSペアプロ Advent Calendar 2018 - Qiitaの#4です。
ファシリテータ: @ggtmtmgg セクリタリ: @ggtmtmgg 参加者: @hmktsu
方針の整理
実務で使うためにレポジトリを良くする。そのためにPRを送る。
- react-navigation v2 -> v3の変更でうまれた歪の回収
- expoのpackageを作る
- expoのいい感じのissueを見つける
- expoのTODOコメントアウトを探す ←
$ git grep 'TODO' G apps apps/native-component-list/screens/Contacts/ContactUtils.js: // TODO: Evan: add support for calendars: https://github.com/moment/moment/issues/1454 apps/native-component-list/screens/MediaLibrary/MediaDetailsScreen.js: case MediaLibrary.MediaType.video: // TODO: render Expo.Video component apps/test-suite/tests/AdMobRewarded.js: // TODO: Fix apps/test-suite/tests/SQLite.js:// TODO: Only tests successful cases, needs to test error cases like bad database name etc. packages/expo-firebase-app/tests/App.js: // TODO add back in when android sdk support for deleting apps becomes available
apps/test-suite/tests/SQLite.js:// TODO: Only tests successful cases, needs to test error cases like bad database name etc.
↑これをがんばる
方針の整理
apps/test-suite/tests/SQLite.jsに失敗する場合のテストも追加してPRを投げる。
PRのメッセージで @ide さんにフィードバックを求める。
やることリスト
etcは無視してbad database nameな例のテストを書く- テストを実行する ←
- PRを送る
test-suiteを実行するための手順
$ cd Desktop $ git clone https://github.com/watanabeyu/expo expo $ cd expo/apps/test-suite ~~$ yarn add --dev expo-yarn-workspaces~~ # 下記のfileから始まるパスのexpo-yarn-workspacesを使う $ yarn $ yarn test // ← エラーになりました
副産物PR
package.jsonのdevパッケージにexpo-yarn-workspacesを追加する
yarn add --dev expo-yarn-warkspacesだと、
Error: Cannot find module metro/src/blacklistになる
以下の追加の仕方が筋が良さそう
"devDependencies": {
"expo-yarn-workspaces": "file:../../packages/expo-yarn-workspaces"
}
だと思ったけど、Error: Cannot find module 'metro-config/src/defaults/blacklist'になるところで断念。
package.jsonのcd Runnerをcd runnerにする
VSCodeの一部の環境ではcd Runnerでrunner/ディレクトリに移動できる。
他の環境ではRunner/ディレクトリが見つからないよエラーになってしまう。
PRを送ってマージされた。 https://github.com/expo/expo/pull/2929
