Skip to content

Commit 7a5a9ab

Browse files
IvanGoncharovleebyron
authored andcommitted
Update Flow to 0.75 + other deps (#1402)
* Update to Flow '0.75' * Update deps
1 parent 926e4d8 commit 7a5a9ab

File tree

4 files changed

+541
-744
lines changed

4 files changed

+541
-744
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)?)\\)
1313
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)?)\\)?:? #[0-9]+
1414

1515
[version]
16-
^0.73.0
16+
^0.75.0

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,34 @@
4848
"iterall": "^1.2.2"
4949
},
5050
"devDependencies": {
51-
"@babel/cli": "^7.0.0-beta.46",
52-
"@babel/core": "^7.0.0-beta.46",
53-
"@babel/node": "^7.0.0-beta.46",
54-
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.46",
55-
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.46",
56-
"@babel/plugin-syntax-async-generators": "^7.0.0-beta.46",
57-
"@babel/plugin-transform-classes": "^7.0.0-beta.46",
58-
"@babel/plugin-transform-destructuring": "^7.0.0-beta.46",
59-
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.46",
60-
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.46",
61-
"@babel/plugin-transform-spread": "^7.0.0-beta.46",
62-
"@babel/polyfill": "^7.0.0-beta.46",
63-
"@babel/preset-env": "^7.0.0-beta.46",
64-
"@babel/register": "^7.0.0-beta.46",
65-
"babel-eslint": "8.2.3",
51+
"@babel/cli": "^7.0.0-beta.51",
52+
"@babel/core": "^7.0.0-beta.51",
53+
"@babel/node": "^7.0.0-beta.51",
54+
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.51",
55+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.51",
56+
"@babel/plugin-syntax-async-generators": "^7.0.0-beta.51",
57+
"@babel/plugin-transform-classes": "^7.0.0-beta.51",
58+
"@babel/plugin-transform-destructuring": "^7.0.0-beta.51",
59+
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.51",
60+
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.51",
61+
"@babel/plugin-transform-spread": "^7.0.0-beta.51",
62+
"@babel/polyfill": "^7.0.0-beta.51",
63+
"@babel/preset-env": "^7.0.0-beta.51",
64+
"@babel/register": "^7.0.0-beta.51",
65+
"babel-eslint": "8.2.4",
6666
"babel-plugin-syntax-async-functions": "6.13.0",
6767
"beautify-benchmark": "0.2.4",
6868
"benchmark": "2.1.4",
6969
"chai": "4.1.2",
7070
"coveralls": "3.0.1",
7171
"eslint": "4.19.1",
7272
"eslint-plugin-babel": "5.1.0",
73-
"eslint-plugin-flowtype": "2.48.0",
73+
"eslint-plugin-flowtype": "2.49.3",
7474
"eslint-plugin-prettier": "2.6.0",
75-
"flow-bin": "0.73.0",
75+
"flow-bin": "0.75.0",
7676
"mocha": "5.2.0",
77-
"nyc": "^11.8.0",
78-
"prettier": "1.13.3",
77+
"nyc": "^12.0.2",
78+
"prettier": "1.13.5",
7979
"sane": "2.5.2"
8080
}
8181
}

src/jsutils/dedent.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
* @flow strict
88
*/
99

10+
import invariant from './invariant';
11+
1012
/**
1113
* fixes indentation by removing leading spaces and tabs from each line
1214
*/
1315
function fixIndent(str: string): string {
1416
const trimmedStr = str
1517
.replace(/^\n*/m, '') // remove leading newline
1618
.replace(/[ \t]*$/, ''); // remove trailing spaces and tabs
17-
const indent = /^[ \t]*/.exec(trimmedStr)[0]; // figure out indent
19+
const indentMatch = /^[ \t]*/.exec(trimmedStr);
20+
invariant(Array.isArray(indentMatch));
21+
const indent = indentMatch[0]; // figure out indent
1822
return trimmedStr.replace(RegExp('^' + indent, 'mg'), ''); // remove indent
1923
}
2024

0 commit comments

Comments
 (0)