forked from uber/baseweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(flow): resolve errors on other flow versions (uber#2901)
* fix(flow): maintain suppression comment position * feat(flow): add tests to validate build against many flow versions * fix(flow): yarn install in regression test dir * fix(flow): lint build deps output * fix(flow): convert spawn to spawnSync * fix(flow): resolve flow errors on v0.111 * fix(flow): use public registry * fix(flow): only check flow 110 and 111 * fix(flow): ignore react-window errors * fix(flow): lint * chore(flow): test script cp result * fix(flow): build before flow check * chore(flow): debug build copy * chore(flow): log commands to stdout * chore(flow): copy correctly on linux ci machine * chore(flow): use an npm package
- Loading branch information
1 parent
4f37ccb
commit ae3c3ab
Showing
24 changed files
with
819 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ignore] | ||
; flow does not support negative lookaheads therefore each package with errors | ||
; must be ignored individually https://github.com/facebook/flow/issues/564 | ||
.*/node_modules/react-window/.*\.js.flow$ | ||
|
||
[include] | ||
index.js | ||
|
||
[libs] | ||
|
||
[lints] | ||
|
||
[options] | ||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.npmjs.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env node | ||
/* | ||
Copyright (c) 2018-2020 Uber Technologies, Inc. | ||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/* eslint-env node */ | ||
/* eslint-disable flowtype/require-valid-file-annotation */ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const baseui = fs | ||
.readdirSync(path.resolve(__dirname, 'node_modules/baseui')) | ||
.filter(item => { | ||
const ignore = ['es', 'esm', 'a11y', 'helpers', 'utils', 'node_modules']; | ||
return !ignore.includes(item) && !item.includes('.'); | ||
}); | ||
|
||
const imports = baseui | ||
.map((item, index) => { | ||
return `import * as $${index} from 'baseui/${item}';`; | ||
}) | ||
.join('\n'); | ||
|
||
const source = `/* | ||
Copyright (c) 2018-2020 Uber Technologies, Inc. | ||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
*/ | ||
// @flow | ||
/* eslint-disable */ | ||
${imports} | ||
import * as baseui from 'baseui'; | ||
/* eslint-enable */ | ||
`; | ||
|
||
fs.writeFileSync(path.resolve(__dirname, 'index.js'), source); | ||
/* eslint-enable flowtype/require-valid-file-annotation */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Copyright (c) 2018-2020 Uber Technologies, Inc. | ||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
*/ | ||
// @flow | ||
/* eslint-disable */ | ||
import * as $0 from 'baseui/accordion'; | ||
import * as $1 from 'baseui/aspect-ratio-box'; | ||
import * as $2 from 'baseui/avatar'; | ||
import * as $3 from 'baseui/block'; | ||
import * as $4 from 'baseui/breadcrumbs'; | ||
import * as $5 from 'baseui/button'; | ||
import * as $6 from 'baseui/button-group'; | ||
import * as $7 from 'baseui/card'; | ||
import * as $8 from 'baseui/checkbox'; | ||
import * as $9 from 'baseui/data-table'; | ||
import * as $10 from 'baseui/datepicker'; | ||
import * as $11 from 'baseui/dnd-list'; | ||
import * as $12 from 'baseui/drawer'; | ||
import * as $13 from 'baseui/file-uploader'; | ||
import * as $14 from 'baseui/flex-grid'; | ||
import * as $15 from 'baseui/form-control'; | ||
import * as $16 from 'baseui/header-navigation'; | ||
import * as $17 from 'baseui/heading'; | ||
import * as $18 from 'baseui/icon'; | ||
import * as $19 from 'baseui/input'; | ||
import * as $20 from 'baseui/layer'; | ||
import * as $21 from 'baseui/layout-grid'; | ||
import * as $22 from 'baseui/link'; | ||
import * as $23 from 'baseui/list'; | ||
import * as $24 from 'baseui/locale'; | ||
import * as $25 from 'baseui/menu'; | ||
import * as $26 from 'baseui/modal'; | ||
import * as $27 from 'baseui/notification'; | ||
import * as $28 from 'baseui/pagination'; | ||
import * as $29 from 'baseui/payment-card'; | ||
import * as $30 from 'baseui/phone-input'; | ||
import * as $31 from 'baseui/pin-code'; | ||
import * as $32 from 'baseui/popover'; | ||
import * as $33 from 'baseui/progress-bar'; | ||
import * as $34 from 'baseui/progress-steps'; | ||
import * as $35 from 'baseui/radio'; | ||
import * as $36 from 'baseui/rating'; | ||
import * as $37 from 'baseui/select'; | ||
import * as $38 from 'baseui/side-navigation'; | ||
import * as $39 from 'baseui/slider'; | ||
import * as $40 from 'baseui/spinner'; | ||
import * as $41 from 'baseui/styles'; | ||
import * as $42 from 'baseui/table'; | ||
import * as $43 from 'baseui/table-grid'; | ||
import * as $44 from 'baseui/table-semantic'; | ||
import * as $45 from 'baseui/tabs'; | ||
import * as $46 from 'baseui/tag'; | ||
import * as $47 from 'baseui/textarea'; | ||
import * as $48 from 'baseui/themes'; | ||
import * as $49 from 'baseui/timepicker'; | ||
import * as $50 from 'baseui/timezonepicker'; | ||
import * as $51 from 'baseui/toast'; | ||
import * as $52 from 'baseui/tokens'; | ||
import * as $53 from 'baseui/tooltip'; | ||
import * as $54 from 'baseui/tree-view'; | ||
import * as $55 from 'baseui/typography'; | ||
import * as baseui from 'baseui'; | ||
/* eslint-enable */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "flow-check-build", | ||
"version": "0.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"flow": "flow" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"baseui": "latest", | ||
"flow-bin": "0.110" | ||
} | ||
} |
Oops, something went wrong.