Skip to content

Commit 2ed446a

Browse files
Upgrade Flow to v0.188.0 (#12588)
* Upgrade Flow to v0.188.0 * Revert flow method-unbinding fixes and suppress errors --------- Co-authored-by: Stepan Kuzmin <stepan.kuzmin@mapbox.com>
1 parent db0098c commit 2ed446a

File tree

110 files changed

+611
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+611
-231
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
.*/test/build/downstream-flow-fixture/.*
3131

3232
[version]
33-
0.152.0
33+
0.188.0
3434

3535
[options]
3636

bench/lib/benchmark.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class Benchmark {
9797
return this._end();
9898
}
9999

100+
// $FlowFixMe[duplicate-class-member]
100101
_measureAsync(): Promise<Array<Measurement>> {
101102
const time = performance.now() - this._start;
102103
this._elapsed += time;

bench/lib/tile_parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default class TileParser {
102102
return Promise.all([
103103
createStyle(this.styleJSON),
104104
fetchTileJSON(mapStub._requestManager, (this.styleJSON.sources[this.sourceID]: any).url)
105-
]).then(([style: Style, tileJSON: TileJSON]) => {
105+
]).then(([style, tileJSON]: [Style, TileJSON]) => {
106106
this.style = style;
107107
this.tileJSON = tileJSON;
108108
});

flow-typed/geojson.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ declare module "@mapbox/geojson-types" {
2727
geometries: Array<GeoJSONGeometry>
2828
};
2929

30-
declare export type GeoJSONFeature = {
31-
type: 'Feature',
32-
geometry: ?GeoJSONGeometry,
33-
properties: ?{},
34-
id?: number | string
35-
};
30+
declare export interface GeoJSONFeature {
31+
type: 'Feature';
32+
geometry: ?GeoJSONGeometry;
33+
properties: ?{};
34+
id?: number | string;
35+
}
3636

3737
declare export type GeoJSONFeatureCollection = {
3838
type: 'FeatureCollection',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"eslint-plugin-html": "^7.1.0",
6262
"eslint-plugin-import": "^2.26.0",
6363
"eslint-plugin-jsdoc": "^39.6.4",
64-
"flow-bin": "0.152.0",
64+
"flow-bin": "0.188.0",
6565
"gl": "6.0.2",
6666
"glob": "^8.0.3",
6767
"is-builtin-module": "^3.2.0",

src/data/bucket/circle_bucket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class CircleBucket<Layer: CircleStyleLayer | HeatmapStyleLayer> implements Bucke
107107
const needGeometry = this.layers[0]._featureFilter.needGeometry;
108108
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
109109

110+
// $FlowFixMe[method-unbinding]
110111
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;
111112

112113
const sortKey = circleSortKey ?

src/data/bucket/fill_bucket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class FillBucket implements Bucket {
8989
const needGeometry = this.layers[0]._featureFilter.needGeometry;
9090
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
9191

92+
// $FlowFixMe[method-unbinding]
9293
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;
9394

9495
const sortKey = fillSortKey ?

src/data/bucket/fill_extrusion_bucket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ class FillExtrusionBucket implements Bucket {
243243
const needGeometry = this.layers[0]._featureFilter.needGeometry;
244244
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
245245

246+
// $FlowFixMe[method-unbinding]
246247
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;
247248

248249
const bucketFeature: BucketFeature = {

src/data/bucket/line_bucket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class LineBucket implements Bucket {
146146
const needGeometry = this.layers[0]._featureFilter.needGeometry;
147147
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
148148

149+
// $FlowFixMe[method-unbinding]
149150
if (!this.layers[0]._featureFilter.filter(new EvaluationParameters(this.zoom), evaluationFeature, canonical)) continue;
150151

151152
const sortKey = lineSortKey ?

src/data/bucket/symbol_bucket.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ class SymbolBucket implements Bucket {
506506

507507
const needGeometry = layer._featureFilter.needGeometry;
508508
const evaluationFeature = toEvaluationFeature(feature, needGeometry);
509+
// $FlowFixMe[method-unbinding]
509510
if (!layer._featureFilter.filter(globalProperties, evaluationFeature, canonical)) {
510511
continue;
511512
}

0 commit comments

Comments
 (0)