Skip to content
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

Update to flow v0.38.0 #671

Merged
merged 1 commit into from
Jan 18, 2017
Merged

Update to flow v0.38.0 #671

merged 1 commit into from
Jan 18, 2017

Conversation

gabelevi
Copy link
Contributor

I noticed some errors when running Flow v0.38.0 against a repo that used graphql-js. It looks like these two files were using [string], which is a tuple with a single string element, when they meant string[], which is an array of strings.

Flow v0.38.0 is stricter about tuples, so this no longer typechecked.

node_modules/graphql/validation/rules/ArgumentsOfCorrectType.js.flow:48
 48:               errors
                   ^^^^^^ array type. Only tuples and array literals with known elements can flow to
 22:   verboseErrors?: [string]
                       ^^^^^^^^ tuple type

node_modules/graphql/validation/rules/DefaultValuesOfCorrectType.js.flow:66
 66:               errors
                   ^^^^^^ array type. Only tuples and array literals with known elements can flow to
 33:   verboseErrors?: [string]
                       ^^^^^^^^ tuple type

server/fb-transforms/babel-relay-plugin/node_modules/graphql/validation/rules/ArgumentsOfCorrectType.js.flow:48
 48:               errors
                   ^^^^^^ array type. Only tuples and array literals with known elements can flow to
 22:   verboseErrors?: [string]
                       ^^^^^^^^ tuple type

server/fb-transforms/babel-relay-plugin/node_modules/graphql/validation/rules/DefaultValuesOfCorrectType.js.flow:66
 66:               errors
                   ^^^^^^ array type. Only tuples and array literals with known elements can flow to
 33:   verboseErrors?: [string]
                       ^^^^^^^^ tuple type

@gabelevi
Copy link
Contributor Author

It would be great if this change could be published as soon as possible. Anyone using Flow >v0.38.0 with graphql-js will get those 4 errors.

As for yarn, I did the following

yarn install --pure-lockfile # avoid messing with yarn.lock more than necessary
yarn add --dev flow-bin@0.38.0
./node_modules/.bin/flow check # no errors

@gabelevi
Copy link
Contributor Author

If this is merged then #670 is no longer necessary

@robzhu
Copy link
Contributor

robzhu commented Jan 18, 2017

Thanks!

@robzhu robzhu merged commit 9215a89 into graphql:master Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants