Skip to content

Commit 61272b4

Browse files
mrochleebyron
authored andcommitted
Update to flow 0.54 (graphql#1026)
* Update to flow 0.54 * Semis
1 parent 87934f6 commit 61272b4

File tree

7 files changed

+30
-19
lines changed

7 files changed

+30
-19
lines changed

.flowconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010

1111
[options]
1212
experimental.const_params=true
13+
14+
[version]
15+
^0.54.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint": "4.4.1",
5757
"eslint-plugin-babel": "4.1.2",
5858
"eslint-plugin-flowtype": "2.35.0",
59-
"flow-bin": "0.52.0",
59+
"flow-bin": "^0.54.0",
6060
"isparta": "4.0.0",
6161
"mocha": "3.5.0",
6262
"sane": "2.0.0"

src/subscription/__tests__/eventEmitterAsyncIterator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ export default function eventEmitterAsyncIterator(
5353
}
5454
}
5555

56-
return {
56+
/* TODO: Flow doesn't support symbols as keys:
57+
https://github.com/facebook/flow/issues/3258 */
58+
return ({
5759
next() {
5860
return listening ? pullValue() : this.return();
5961
},
@@ -68,5 +70,5 @@ export default function eventEmitterAsyncIterator(
6870
[$$asyncIterator]() {
6971
return this;
7072
},
71-
};
73+
}: any);
7274
}

src/subscription/asyncIteratorReject.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import { $$asyncIterator } from 'iterall';
1818
*/
1919
export default function asyncIteratorReject(error: Error): AsyncIterator<void> {
2020
let isComplete = false;
21-
return {
21+
/* TODO: Flow doesn't support symbols as keys:
22+
https://github.com/facebook/flow/issues/3258 */
23+
return ({
2224
next() {
2325
const result = isComplete ?
2426
Promise.resolve({ value: undefined, done: true }) :
@@ -37,5 +39,5 @@ export default function asyncIteratorReject(error: Error): AsyncIterator<void> {
3739
[$$asyncIterator]() {
3840
return this;
3941
},
40-
};
42+
}: any);
4143
}

src/subscription/mapAsyncIterator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ export default function mapAsyncIterator<T, U>(
4545
asyncMapValue(error, reject).then(iteratorResult, abruptClose);
4646
}
4747

48-
return {
48+
/* TODO: Flow doesn't support symbols as keys:
49+
https://github.com/facebook/flow/issues/3258 */
50+
return ({
4951
next() {
5052
return iterator.next().then(mapResult, mapReject);
5153
},
@@ -63,7 +65,7 @@ export default function mapAsyncIterator<T, U>(
6365
[$$asyncIterator]() {
6466
return this;
6567
},
66-
};
68+
}: any);
6769
}
6870

6971
function asyncMapValue<T, U>(

src/type/definition.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,18 @@ export function assertType(type: mixed): GraphQLType {
7070
/**
7171
* These types may be used as input types for arguments and directives.
7272
*/
73-
export type GraphQLInputType =
73+
type GraphQLInputType_<T> =
7474
GraphQLScalarType |
7575
GraphQLEnumType |
7676
GraphQLInputObjectType |
77-
GraphQLList<GraphQLInputType> |
77+
GraphQLList<T> |
7878
GraphQLNonNull<
7979
GraphQLScalarType |
8080
GraphQLEnumType |
8181
GraphQLInputObjectType |
82-
GraphQLList<GraphQLInputType>
82+
GraphQLList<T>
8383
>;
84+
export type GraphQLInputType = GraphQLInputType_<*>;
8485

8586
export function isInputType(type: ?GraphQLType): boolean %checks {
8687
return (
@@ -210,14 +211,15 @@ export function assertAbstractType(type: ?GraphQLType): GraphQLAbstractType {
210211
/**
211212
* These types can all accept null as a value.
212213
*/
213-
export type GraphQLNullableType =
214+
type GraphQLNullableType_<T> =
214215
GraphQLScalarType |
215216
GraphQLObjectType |
216217
GraphQLInterfaceType |
217218
GraphQLUnionType |
218219
GraphQLEnumType |
219220
GraphQLInputObjectType |
220-
GraphQLList<*>;
221+
GraphQLList<T>;
222+
export type GraphQLNullableType = GraphQLNullableType_<*>;
221223

222224
export function getNullableType<T: GraphQLType>(
223225
type: ?T

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,9 +1224,9 @@ flat-cache@^1.2.1:
12241224
graceful-fs "^4.1.2"
12251225
write "^0.2.1"
12261226

1227-
flow-bin@0.52.0:
1228-
version "0.52.0"
1229-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.52.0.tgz#b6d9abe8bcd1ee5c62df386451a4e2553cadc3a3"
1227+
flow-bin@^0.54.0:
1228+
version "0.54.0"
1229+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.54.0.tgz#f2fb0478e9e99702b623c9ed84079a39903bba77"
12301230

12311231
for-in@^1.0.1:
12321232
version "1.0.2"
@@ -1332,7 +1332,7 @@ glob-parent@^2.0.0:
13321332
dependencies:
13331333
is-glob "^2.0.0"
13341334

1335-
[email protected], glob@^7.0.0, glob@^7.0.5:
1335+
[email protected], glob@^7.0.0:
13361336
version "7.1.1"
13371337
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
13381338
dependencies:
@@ -1353,7 +1353,7 @@ glob@^5.0.15:
13531353
once "^1.3.0"
13541354
path-is-absolute "^1.0.0"
13551355

1356-
glob@^7.0.3, glob@^7.1.2:
1356+
glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
13571357
version "7.1.2"
13581358
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
13591359
dependencies:
@@ -1691,14 +1691,14 @@ js-tokens@^3.0.0:
16911691
version "3.0.1"
16921692
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
16931693

1694-
1694+
16951695
version "3.6.1"
16961696
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
16971697
dependencies:
16981698
argparse "^1.0.7"
16991699
esprima "^2.6.0"
17001700

1701-
js-yaml@^3.9.1:
1701+
js-yaml@3.x, js-yaml@^3.9.1:
17021702
version "3.9.1"
17031703
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0"
17041704
dependencies:

0 commit comments

Comments
 (0)