-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package.json: Add flow check commands for iOS and Android #21326
Conversation
Generated by 🚫 dangerJS |
I believe we have commands that run in circle CI that check flow for both ios and android. Can you update the config to use these commands? |
Added! |
@@ -187,7 +187,8 @@ aliases: | |||
|
|||
- &run-flow-checks | |||
name: Check for errors in code using Flow | |||
command: yarn flow check | |||
command: yarn flow-check-ios | |||
command: yarn flow-check-android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah! We weren't checking this!? Scary!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why yarn run flow
is not enough ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That only runs checking with the default config which checks .ios.js files but not .android.js files.
@@ -187,7 +187,8 @@ aliases: | |||
|
|||
- &run-flow-checks | |||
name: Check for errors in code using Flow | |||
command: yarn flow check | |||
command: yarn flow-check-ios | |||
command: yarn flow-check-android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the second command overwrites the first. Looking at the CI logs for this step in this PR show that it only ran flow on android: https://circleci.com/gh/facebook/react-native/53561?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
You'll probably need to change this from run-flow-checks
to run-flow-ios
and have another one for android.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed that up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you this to appveyor too ?
I don't know a whole lot about the AppVeyor syntax yet - would just adding more commands after |
Landing. The checks can be added to Appveyor's config on a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@empyrical merged commit 99cacf4 into Once this commit is added to a release, you will see the corresponding version tag below the description at 99cacf4. If the commit has a single |
…1326) Summary: This PR adds these two scripts to `package.json`: * `flow-check-ios` - for running `flow check` on `.ios.js` files * `flow-check-android` - for running `flow check` on `.android.js` files The Android command makes use of the new `--flowconfig-name` option added to Flow in `0.80.0` Pull Request resolved: facebook#21326 Differential Revision: D10055702 Pulled By: hramos fbshipit-source-id: e647f8d2995da0a9bd6af242218819fd5745df63
This PR adds these two scripts to
package.json
:flow-check-ios
- for runningflow check
on.ios.js
filesflow-check-android
- for runningflow check
on.android.js
filesThe Android command makes use of the new
--flowconfig-name
option added to Flow in0.80.0
Test Plan:
Both commands have been ran and work as expected.
Release Notes:
[GENERAL] [ENHANCEMENT] [package.json] - Added flow check commands for iOS and Android