Skip to content

Commit 82c6de2

Browse files
authored
chore(package): update flow-bin to version 0.71.0 (#1069)
* chore(package): update flow-bin to version 0.71.0 Closes #1054 * chore: Update yarn.lock * style: Add new flow annotations required by new version
1 parent f350680 commit 82c6de2

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"eslint": "^4.16.0",
7373
"eslint-config-prettier": "^2.9.0",
7474
"eslint-plugin-flowtype": "^2.41.0",
75-
"flow-bin": "^0.69.0",
75+
"flow-bin": "^0.71.0",
7676
"fs-extra": "^5.0.0",
7777
"husky": "^0.14.3",
7878
"jest": "^22.1.4",

src/commands/shared_options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ module.exports.sharedInputOptions = {
3434
"additional extensions to include in require() and import's search algorithm." +
3535
'For instance, adding .es5 would allow require("adder") to find "adder.es5"',
3636
// Ensure that the value is an array
37-
coerce: (value: string | Array<string>) => [].concat(value),
37+
coerce: (value: string | Array<string>): Array<string> => [].concat(value),
3838
alias: 're'
3939
},
4040
'parse-extension': {
4141
describe: 'additional extensions to parse as source code.',
4242
// Ensure that the value is an array
43-
coerce: (value: string | Array<string>) => [].concat(value),
43+
coerce: (value: string | Array<string>): Array<string> => [].concat(value),
4444
alias: 'pe'
4545
},
4646
private: {

src/output/util/format_type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function commaList(getHref, items, start, end, sep) {
8181
* @param {boolean} prefix string to put after the type comment
8282
* @returns {Array<Object>} suffixed and potentially prefixed type
8383
*/
84-
function decorate(formatted, str, prefix) {
84+
function decorate(formatted, str, prefix): Array<Object> {
8585
if (prefix) {
8686
return [t(str)].concat(formatted);
8787
}
@@ -100,7 +100,7 @@ function decorate(formatted, str, prefix) {
100100
* formatType({ type: 'NameExpression', name: 'String' })[0].url
101101
* // => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String'
102102
*/
103-
function formatType(getHref: Function, node: ?Object) {
103+
function formatType(getHref: Function, node: ?Object): Array<Object> {
104104
let result = [];
105105

106106
if (!node) {

src/sort.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ const fs = require('fs');
1414
* @returns {number} sorting value
1515
* @private
1616
*/
17-
module.exports = function sortDocs(comments: Array<Comment>, options: Object) {
17+
module.exports = function sortDocs(
18+
comments: Array<Comment>,
19+
options: Object
20+
): Array<Comment> {
1821
if (!options || !options.toc) {
1922
return sortComments(comments, options && options.sortOrder);
2023
}
@@ -124,7 +127,10 @@ function compareCommentsBySourceLocation(a: Comment, b: Comment): number {
124127
return a.context.sortKey.localeCompare(b.context.sortKey);
125128
}
126129

127-
function sortComments(comments: Array<Comment>, sortOrder: string) {
130+
function sortComments(
131+
comments: Array<Comment>,
132+
sortOrder: string
133+
): Array<Comment> {
128134
return comments.sort(
129135
sortOrder === 'alpha'
130136
? compareCommentsByName

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,9 +2424,9 @@ flat-cache@^1.2.1:
24242424
graceful-fs "^4.1.2"
24252425
write "^0.2.1"
24262426

2427-
flow-bin@^0.69.0:
2428-
version "0.69.0"
2429-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.69.0.tgz#053159a684a6051fcbf0b71a2eb19a9679082da6"
2427+
flow-bin@^0.71.0:
2428+
version "0.71.0"
2429+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.71.0.tgz#fd1b27a6458c3ebaa5cb811853182ed631918b70"
24302430

24312431
flush-write-stream@^1.0.2:
24322432
version "1.0.2"

0 commit comments

Comments
 (0)