diff --git a/package.json b/package.json index 4499b7d847..c15bd94a5f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "eslint-config-babel": "^7.0.2", "eslint-plugin-flowtype": "^2.50.0", "eslint-plugin-prettier": "^2.6.2", - "flow-bin": "^0.79.0", + "flow-bin": "^0.80.0", "graceful-fs": "^4.1.11", "gulp": "^4.0.0", "gulp-babel": "^8.0.0-beta.2", diff --git a/packages/babel-parser/src/options.js b/packages/babel-parser/src/options.js index 54e464d27c..3bab7c04a2 100755 --- a/packages/babel-parser/src/options.js +++ b/packages/babel-parser/src/options.js @@ -5,8 +5,10 @@ import type { PluginList } from "./plugin-utils"; // A second optional argument can be given to further configure // the parser process. These options are recognized: +export type SourceType = "script" | "module" | "unambiguous"; + export type Options = { - sourceType: "script" | "module" | "unambiguous", + sourceType: SourceType, sourceFilename?: string, startLine: number, allowAwaitOutsideFunction: boolean, diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index f895707cdd..0e87227563 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1,5 +1,6 @@ // @flow +import type { SourceType } from "./options"; import type { Token } from "./tokenizer"; import type { SourceLocation } from "./util/location"; @@ -135,7 +136,7 @@ export type File = NodeBase & { export type Program = NodeBase & { type: "Program", - sourceType: "script" | "module", + sourceType: SourceType, body: Array, // TODO: $ReadOnlyArray directives: $ReadOnlyArray, // TODO: Not in spec interpreter: InterpreterDirective | null, diff --git a/yarn.lock b/yarn.lock index 0cd07bb83d..e0c6706a87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3516,9 +3516,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.79.0: - version "0.79.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.79.0.tgz#a7029f2832d45e5b78f7e77a74fee898722fb6ef" +flow-bin@^0.80.0: + version "0.80.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.80.0.tgz#04cc1ee626a6f50786f78170c92ebe1745235403" flush-write-stream@^1.0.2: version "1.0.3"