Merge pull request #4326 from existentialism/flow70

Bump flow to 0.70
This commit is contained in:
Brian Ng authored and GitHub committed 2018-04-18 17:04:14 -05:00
commit 7cb6790ce0
9 files changed
+37 -24

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@
"escape-string-regexp": "1.0.5",
"esutils": "2.0.2",
"find-project-root": "1.1.1",
"flow-parser": "0.69",
"flow-parser": "0.70",
"get-stream": "3.0.0",
"globby": "6.1.0",
"graphql": "0.13.2",
-9
View File
@@ -19,15 +19,6 @@ export default Object.assign(baseConfig, {
include: "node_modules/typescript-eslint-parser/parser.js"
})
: {},
// In flow-parser 0.59.0 there's a dynamic require: `require(s8)` which not
// supported by rollup-plugin-commonjs, so we have to replace the variable
// by its value before bundling.
parser.endsWith("flow")
? replace({
"require(tf)": 'require("fs")',
include: "node_modules/flow-parser/flow_parser.js"
})
: {},
json(),
resolve({ preferBuiltins: true }),
commonjs(
+8 -8
View File
@@ -3852,6 +3852,14 @@ function printClass(path, options, print) {
parts.push(" extends ", join(", ", path.map(print, "extends")));
}
if (n["mixins"] && n["mixins"].length > 0) {
partsGroup.push(
line,
"mixins ",
group(indent(join(concat([",", line]), path.map(print, "mixins"))))
);
}
if (n["implements"] && n["implements"].length > 0) {
partsGroup.push(
line,
@@ -3867,14 +3875,6 @@ function printClass(path, options, print) {
);
}
if (n["mixins"] && n["mixins"].length > 0) {
partsGroup.push(
line,
"mixins ",
group(indent(join(concat([",", line]), path.map(print, "mixins"))))
);
}
if (partsGroup.length > 0) {
parts.push(group(indent(concat(partsGroup))));
}
@@ -22,7 +22,7 @@ declare class Baz<T> {
((new Foo).y: string); // error: Bar wins
((new Foo).z: number); // error: Qux wins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
declare class Foo extends Qux<string> {
declare class Foo extends Qux<string> mixins Bar<number> {
// KeyedCollection <: Collection
// ...KeyedIterable
}
@@ -51,6 +51,6 @@ declare interface I { }
declare class C mixins I { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
declare interface I {}
declare class C {}
declare class C mixins I {}
`;
@@ -0,0 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`implements.js 1`] = `
class A implements B {}
class A implements B, C {}
declare class A implements B {}
declare class A mixins B implements C {}
declare class A implements B, C {}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class A implements B {}
class A implements B, C {}
declare class A implements B {}
declare class A mixins B implements C {}
declare class A implements B, C {}
`;
+5
View File
@@ -0,0 +1,5 @@
class A implements B {}
class A implements B, C {}
declare class A implements B {}
declare class A mixins B implements C {}
declare class A implements B, C {}
+1
View File
@@ -0,0 +1 @@
run_spec(__dirname, ["flow"]);
+1 -1
View File
@@ -1 +1 @@
run_spec(__dirname, ["babylon"]);
run_spec(__dirname, ["babylon", "flow"]);
+3 -3
View File
@@ -1971,9 +1971,9 @@ flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
flow-parser@0.69:
version "0.69.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.69.0.tgz#378b5128d6d0b554a8b2f16a4ca3e1ab9649f00e"
flow-parser@0.70:
version "0.70.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.70.0.tgz#9c310187efe4380ba9a251284e9b83b95c49e857"
for-in@^1.0.1:
version "1.0.2"