Skip to content

Commit c39aa44

Browse files
samwgoldmanfacebook-github-bot
authored andcommitted
v0.68.0
Reviewed By: gabelevi Differential Revision: D7281595 fbshipit-source-id: 946dc96e9a88f49fb40fec607fe6cf94492952f3
1 parent 4be7b7f commit c39aa44

10 files changed

Lines changed: 44 additions & 23 deletions

File tree

‎Changelog.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
### 0.68.0
2+
3+
Likely to cause new Flow errors:
4+
5+
Previously, Flow would allow you to write `if (foo.unknownProp) { ... }`.
6+
7+
Now Flow disallows testing unknown properties in conditionals. If `foo` is a
8+
union type like ` { x: string } | { y: number }`, `x` and `y` are known
9+
properties and `z` would be an unknown property
10+
11+
New Features:
12+
* Improve union optimizations
13+
* Add type declarations for new React 16.3 lifecycle methods
14+
15+
Notable bug fixes:
16+
* Fix get-def for declare var
17+
* Fix type-at-pos for opaque types
18+
19+
Misc:
20+
* Remove special-casing of `declare var exports`, long deprecated
21+
122
### 0.67.1
223

324
Restore accidentally-deleted Object.setPrototypeOf library definition.

‎opam‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "1.2"
22
name: "flowtype"
3-
version: "0.67.1"
3+
version: "0.68.0"
44
maintainer: "[email protected]"
55
homepage: "https://flow.org"
66
dev-repo: "https://github.com/facebook/flow.git"

‎packages/flow-parser-bin/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flow-parser-bin",
3-
"version": "0.67.1",
3+
"version": "0.68.0",
44
"description": "The Flow JavaScript parser, via bindings to the native OCaml implementation",
55
"main": "index.js",
66
"repository": "https://github.com/facebook/flow.git",

‎packages/flow-parser/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flow-parser",
3-
"version": "0.67.1",
3+
"version": "0.68.0",
44
"description": "JavaScript parser written in OCaml. Produces SpiderMonkey AST",
55
"homepage": "https://flow.org",
66
"license": "MIT",

‎src/common/flow_version.ml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*)
77

8-
let version = "0.67.1"
8+
let version = "0.68.0"

‎src/parser/META‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name="parser_flow"
2-
version="0.67.1"
2+
version="0.68.0"
33
description="flow parser ocamlfind package"
44
archive(byte)="parser_flow.cma"
55
archive(native)="parser_flow.cmxa"

‎src/parser/opam‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "1.2"
22
name: "flow_parser"
3-
version: "0.67.1"
3+
version: "0.68.0"
44
maintainer: "[email protected]"
55
authors: [
66
"Avik Chaudhuri"

‎tests/json2_output/json2_output.exp‎

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

‎tests/json_exit/json_exit.exp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
{"flowVersion":"0.67.1","exit":{"code":12,"reason":"Could_not_find_flowconfig","msg":"Could not find file or directory pants; canceling search for .flowconfig.\nSee \"flow init --help\" for more info"}}
1+
{"flowVersion":"0.68.0","exit":{"code":12,"reason":"Could_not_find_flowconfig","msg":"Could not find file or directory pants; canceling search for .flowconfig.\nSee \"flow init --help\" for more info"}}
22
{
3-
"flowVersion":"0.67.1",
3+
"flowVersion":"0.68.0",
44
"exit":{
55
"code":12,
66
"reason":"Could_not_find_flowconfig",
77
"msg":"Could not find file or directory pants; canceling search for .flowconfig.\nSee \"flow init --help\" for more info"
88
}
99
}
10-
{"flowVersion":"0.67.1","exit":{"code":64,"reason":"Commandline_usage_error","msg":"flow: --pants unknown option\nUsage: flow check [OPTION]... [ROOT]\n\nDoes a full Flow check and prints the results.\n\nFlow will search upward for a .flowconfig file, beginning at ROOT.\nROOT is assumed to be the current directory if unspecified.\n\n --all Typecheck all files, not just @flow\n --color Display terminal output in color. never, always, auto (default: auto)\n --debug Print debug info during typecheck\n --file-watcher Which file watcher Flow should use (none, dfind). Flow will ignore file system events if this is set to none. (default: dfind)\n --from Specify client (for use by editor plugins)\n --help This list of options\n --ignore Specify one or more ignore patterns, comma separated\n --ignore-version Ignore the version constraint in .flowconfig\n --include Specify one or more include patterns, comma separated\n --include-suppressed Ignore any `suppress_comment` lines in .flowconfig\n --include-warnings Include warnings in the error output (warnings are excluded by default)\n --json Output results in JSON format\n --json-version The version of the JSON format (defaults to 1)\n --lib Specify one or more lib files/directories, comma separated\n --lints Specify one or more lint rules, comma separated\n --max-warnings Warnings above this number will cause a nonzero exit code (implies --include-warnings)\n --max-workers Maximum number of workers to create (capped by number of cores)\n --merge-timeout The maximum time in seconds to attempt to typecheck a file or cycle of files. 0 means no timeout (default: 100)\n --message-width Sets the width of messages but not code snippets (defaults to the smaller of 120 or the terminal width)\n --munge-underscore-members Treat any class member name with a leading underscore as private\n --no-flowlib Do not include embedded declarations\n --one-line Escapes newlines so that each error prints on one line\n --pretty Pretty-print JSON output (implies --json)\n --profile Output profiling information\n --quiet Suppress output about server startup\n --sharedmemory-dep-table-pow The exponent for the size of the shared memory dependency table. The default is 17, implying a size of 2^17 bytes\n --sharedmemory-dirs Directory in which to store shared memory heap (default: /dev/shm/)\n --sharedmemory-hash-table-pow The exponent for the size of the shared memory hash table. The default is 19, implying a size of 2^19 bytes\n --sharedmemory-log-level The logging level for shared memory statistics. 0=none, 1=some\n --sharedmemory-minimum-available Flow will only use a filesystem for shared memory if it has at least these many bytes available (default: 536870912 - which is 512MB)\n --show-all-branches Print all branch errors (the default is to print the most relevant branches)\n --show-all-errors Print all errors (the default is to truncate after 50 errors)\n --strip-root Print paths without the root\n --temp-dir Directory in which to store temp files (default: FLOW_TEMP_DIR, or /tmp/flow/)\n --traces Outline an error path up to a specified level\n --unicode Display terminal output with unicode decoration. never, always, auto (default: auto)\n --untyped Specify one or more patterns, comma separated, for files to treat as untyped\n --verbose Print verbose info during typecheck\n --verbose-depth Recursively print types up to specified depth (default 1, implies --verbose)\n --verbose-indent Indent verbose info during typecheck (implies --verbose)\n --weak Typecheck with weak inference, assuming dynamic types by default"}}
10+
{"flowVersion":"0.68.0","exit":{"code":64,"reason":"Commandline_usage_error","msg":"flow: --pants unknown option\nUsage: flow check [OPTION]... [ROOT]\n\nDoes a full Flow check and prints the results.\n\nFlow will search upward for a .flowconfig file, beginning at ROOT.\nROOT is assumed to be the current directory if unspecified.\n\n --all Typecheck all files, not just @flow\n --color Display terminal output in color. never, always, auto (default: auto)\n --debug Print debug info during typecheck\n --file-watcher Which file watcher Flow should use (none, dfind). Flow will ignore file system events if this is set to none. (default: dfind)\n --from Specify client (for use by editor plugins)\n --help This list of options\n --ignore Specify one or more ignore patterns, comma separated\n --ignore-version Ignore the version constraint in .flowconfig\n --include Specify one or more include patterns, comma separated\n --include-suppressed Ignore any `suppress_comment` lines in .flowconfig\n --include-warnings Include warnings in the error output (warnings are excluded by default)\n --json Output results in JSON format\n --json-version The version of the JSON format (defaults to 1)\n --lib Specify one or more lib files/directories, comma separated\n --lints Specify one or more lint rules, comma separated\n --max-warnings Warnings above this number will cause a nonzero exit code (implies --include-warnings)\n --max-workers Maximum number of workers to create (capped by number of cores)\n --merge-timeout The maximum time in seconds to attempt to typecheck a file or cycle of files. 0 means no timeout (default: 100)\n --message-width Sets the width of messages but not code snippets (defaults to the smaller of 120 or the terminal width)\n --munge-underscore-members Treat any class member name with a leading underscore as private\n --no-flowlib Do not include embedded declarations\n --one-line Escapes newlines so that each error prints on one line\n --pretty Pretty-print JSON output (implies --json)\n --profile Output profiling information\n --quiet Suppress output about server startup\n --sharedmemory-dep-table-pow The exponent for the size of the shared memory dependency table. The default is 17, implying a size of 2^17 bytes\n --sharedmemory-dirs Directory in which to store shared memory heap (default: /dev/shm/)\n --sharedmemory-hash-table-pow The exponent for the size of the shared memory hash table. The default is 19, implying a size of 2^19 bytes\n --sharedmemory-log-level The logging level for shared memory statistics. 0=none, 1=some\n --sharedmemory-minimum-available Flow will only use a filesystem for shared memory if it has at least these many bytes available (default: 536870912 - which is 512MB)\n --show-all-branches Print all branch errors (the default is to print the most relevant branches)\n --show-all-errors Print all errors (the default is to truncate after 50 errors)\n --strip-root Print paths without the root\n --temp-dir Directory in which to store temp files (default: FLOW_TEMP_DIR, or /tmp/flow/)\n --traces Outline an error path up to a specified level\n --unicode Display terminal output with unicode decoration. never, always, auto (default: auto)\n --untyped Specify one or more patterns, comma separated, for files to treat as untyped\n --verbose Print verbose info during typecheck\n --verbose-depth Recursively print types up to specified depth (default 1, implies --verbose)\n --verbose-indent Indent verbose info during typecheck (implies --verbose)\n --weak Typecheck with weak inference, assuming dynamic types by default"}}
1111
{
12-
"flowVersion":"0.67.1",
12+
"flowVersion":"0.68.0",
1313
"exit":{
1414
"code":64,
1515
"reason":"Commandline_usage_error",

‎tests/version/version.exp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Wrong version of Flow. The config specifies version 0.1.0 but this is version 0.67.1
1+
Wrong version of Flow. The config specifies version 0.1.0 but this is version 0.68.0

0 commit comments

Comments
 (0)