Skip to content

Commit

Permalink
Update to flow 0.62.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Jan 4, 2018
1 parent b42bd9d commit 8c553d2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@
.*/test/unit/style-spec/fixture/invalidjson.input.json
.*/test/integration/render-tests/.*

[options]
unsafe.enable_getters_and_setters=true

[version]
0.61.0
0.62.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-react": "^7.3.0",
"execcommand-copy": "^1.1.0",
"flow-bin": "^0.61.0",
"flow-bin": "^0.62.0",
"flow-coverage-report": "^0.3.0",
"flow-remove-types": "^1.0.4",
"github-slugger": "^1.1.1",
Expand Down
6 changes: 5 additions & 1 deletion src/source/canvas_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class CanvasSource extends ImageSource {
this.canvas = this.canvas || window.document.getElementById(this.options.canvas);
this.width = this.canvas.width;
this.height = this.canvas.height;
if (this._hasInvalidDimensions()) return this.fire('error', new Error('Canvas dimensions cannot be less than or equal to zero.'));

if (this._hasInvalidDimensions()) {
this.fire('error', new Error('Canvas dimensions cannot be less than or equal to zero.'));
return;
}

this.play = function() {
this._playing = true;
Expand Down
4 changes: 3 additions & 1 deletion src/source/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export interface Source {
* implementation for this Source type by calling `self.registerWorkerSource(workerSource: WorkerSource)`.
* @private
*/
static workerSourceURL?: URL;
// Static interface properties are not supported in flow as of 0.62.0.
// https://github.com/facebook/flow/issues/5590
// static workerSourceURL?: URL;

+type: string;
id: string;
Expand Down
6 changes: 4 additions & 2 deletions src/style-spec/expression/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import type {Type} from './types';
import type {Value} from './values';
import type ParsingContext from './parsing_context';
import type EvaluationContext from './evaluation_context';

export interface Expression {
+type: Type;

static parse(args: Array<mixed>, context: ParsingContext): ?Expression;
// Static interface properties are not supported in flow as of 0.62.0.
// https://github.com/facebook/flow/issues/5590
// static parse(args: Array<mixed>, context: ParsingContext): ?Expression;

evaluate(ctx: EvaluationContext): any;

eachChild(fn: Expression => void): void;
Expand Down
3 changes: 2 additions & 1 deletion src/style-spec/expression/parsing_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class ParsingContext {

const Expr = context.definitions[op];
if (Expr) {
let parsed = Expr.parse(expr, context);
// https://github.com/facebook/flow/issues/5590
let parsed: ?Expression = (Expr: any).parse(expr, context);
if (!parsed) return null;

if (context.expectedType) {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4279,9 +4279,9 @@ flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"

flow-bin@^0.61.0:
version "0.61.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.61.0.tgz#d0473a8c35dbbf4de573823f4932124397d32d35"
flow-bin@^0.62.0:
version "0.62.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.62.0.tgz#14bca669a6e3f95c0bc0c2d1eb55ec4e98cb1d83"

flow-coverage-report@^0.3.0:
version "0.3.0"
Expand Down

0 comments on commit 8c553d2

Please sign in to comment.