Skip to content

Commit 7b32b43

Browse files
committed
update flow to 0.100
1 parent 3c9f3b1 commit 7b32b43

File tree

92 files changed

+79
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+79
-33
lines changed

.flowconfig

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
.*/integration-test/.*
3131
.*/sandbox/.*
3232

33-
[libs]
34-
packages/styled-components/flow-typed/
35-
3633
[options]
3734
suppress_comment=.*\\$FlowFixMe
3835
suppress_comment=.*\\$FlowInvalidInputTest

packages/styled-components/flow-typed/express_v4.x.x.js flow-typed/express_v4.x.x.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ declare class express$Response extends http$ServerResponse mixins express$Reques
103103

104104
declare type express$NextFunction = (err?: ?Error | 'route') => mixed;
105105
declare type express$Middleware =
106-
((req: $Subtype<express$Request>, res: express$Response, next: express$NextFunction) => mixed) |
107-
((error: Error, req: $Subtype<express$Request>, res: express$Response, next: express$NextFunction) => mixed);
106+
((req: express$Request, res: express$Response, next: express$NextFunction) => mixed) |
107+
((error: Error, req: express$Request, res: express$Response, next: express$NextFunction) => mixed);
108108
declare interface express$RouteMethodType<T> {
109109
(middleware: express$Middleware): T;
110110
(...middleware: Array<express$Middleware>): T;
@@ -154,7 +154,7 @@ declare class express$Router extends express$Route {
154154
param(
155155
param: string,
156156
callback: (
157-
req: $Subtype<express$Request>,
157+
req: express$Request,
158158
res: express$Response,
159159
next: express$NextFunction,
160160
id: string

packages/styled-components/flow-typed/npm/@babel/helper-module-imports_vx.x.x.js flow-typed/npm/@babel/helper-module-imports_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 28023a2fc5b16f1b06322e5cfaa058ae
2-
// flow-typed version: <<STUB>>/@babel/helper-module-imports_v^7.0.0/flow_v0.93.0
1+
// flow-typed signature: 31eb46abbb940d1871cad5b72e2d5a1e
2+
// flow-typed version: <<STUB>>/@babel/helper-module-imports_v^7.0.0/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/babel-plugin-styled-components_vx.x.x.js flow-typed/npm/babel-plugin-styled-components_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 18bebea31f46f7fd38c7e73e7eee5c64
2-
// flow-typed version: <<STUB>>/babel-plugin-styled-components_v>= 1/flow_v0.93.0
1+
// flow-typed signature: 3631573e8a31615f5c06edf208a5d931
2+
// flow-typed version: <<STUB>>/babel-plugin-styled-components_v>= 1/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/css-to-react-native_vx.x.x.js flow-typed/npm/css-to-react-native_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: c4d3b342af002be982eed9ef28b4c764
2-
// flow-typed version: <<STUB>>/css-to-react-native_v^2.2.2/flow_v0.93.0
1+
// flow-typed signature: e6263c15ef6789188b11afd5007f8d74
2+
// flow-typed version: <<STUB>>/css-to-react-native_v^2.2.2/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/prop-types_v15.x.x.js flow-typed/npm/prop-types_v15.x.x.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare module 'prop-types' {
2626
declare var shape: React$PropType$Shape;
2727

2828
declare function checkPropTypes<V>(
29-
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
29+
propTypes: {[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType},
3030
values: V,
3131
location: string,
3232
componentName: string,

packages/styled-components/flow-typed/npm/react-frame-component_vx.x.x.js flow-typed/npm/react-frame-component_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 1568ba57b8d3998628360b6bfbd8a4fd
2-
// flow-typed version: <<STUB>>/react-frame-component_v^4.0.2/flow_v0.93.0
1+
// flow-typed signature: 0533cf4c3dd8abb74d7bfc21895ecbf1
2+
// flow-typed version: <<STUB>>/react-frame-component_v^4.0.2/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/react-is_vx.x.x.js flow-typed/npm/react-is_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 320c42728e11557b0e081c05d7c7ca5a
2-
// flow-typed version: <<STUB>>/react-is_v^16.8.0/flow_v0.93.0
1+
// flow-typed signature: 3da1f41fe3c1eac4ec9566f7bebc64de
2+
// flow-typed version: <<STUB>>/react-is_v>= 16.8.0/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/react-primitives_vx.x.x.js flow-typed/npm/react-primitives_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 4c6a09df60b4f4103206b2cb975f9a97
2-
// flow-typed version: <<STUB>>/react-primitives_v^0.6.1/flow_v0.93.0
1+
// flow-typed signature: 2f036fce35c841a66a3acc231ebe64c5
2+
// flow-typed version: <<STUB>>/react-primitives_v^0.8.0/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/stylis-rtl_vx.x.x.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// flow-typed signature: c2f55640f21684671437622668c77ece
2+
// flow-typed version: <<STUB>>/stylis-rtl_v^1.0.1/flow_v0.100.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'stylis-rtl'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module 'stylis-rtl' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module 'stylis-rtl/dist/stylis-rtl' {
26+
declare module.exports: any;
27+
}
28+
29+
declare module 'stylis-rtl/flow-typed/npm/flow-bin_v0.x.x' {
30+
declare module.exports: any;
31+
}
32+
33+
declare module 'stylis-rtl/flow-typed/npm/jest_v23.x.x' {
34+
declare module.exports: any;
35+
}
36+
37+
// Filename aliases
38+
declare module 'stylis-rtl/dist/stylis-rtl.js' {
39+
declare module.exports: $Exports<'stylis-rtl/dist/stylis-rtl'>;
40+
}
41+
declare module 'stylis-rtl/flow-typed/npm/flow-bin_v0.x.x.js' {
42+
declare module.exports: $Exports<'stylis-rtl/flow-typed/npm/flow-bin_v0.x.x'>;
43+
}
44+
declare module 'stylis-rtl/flow-typed/npm/jest_v23.x.x.js' {
45+
declare module.exports: $Exports<'stylis-rtl/flow-typed/npm/jest_v23.x.x'>;
46+
}

packages/styled-components/flow-typed/npm/stylis-rule-sheet_vx.x.x.js flow-typed/npm/stylis-rule-sheet_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: cd778a473db0eb2d14b70b56fa9dd858
2-
// flow-typed version: <<STUB>>/stylis-rule-sheet_v^0.0.10/flow_v0.93.0
1+
// flow-typed signature: 25a657cfecad14b46a99412c79f7d57d
2+
// flow-typed version: <<STUB>>/stylis-rule-sheet_v^0.0.10/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/stylis_vx.x.x.js flow-typed/npm/stylis_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 35d4eb9da83fea7e08b720bbb15abb46
2-
// flow-typed version: <<STUB>>/stylis_v^3.5.0/flow_v0.93.0
1+
// flow-typed signature: 8ad9fa0691948bf8ca06348d7e4dc447
2+
// flow-typed version: <<STUB>>/stylis_v^3.5.0/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

packages/styled-components/flow-typed/npm/supports-color_vx.x.x.js flow-typed/npm/supports-color_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: ccf9b2a0ffd1554319738597bb2401e4
2-
// flow-typed version: <<STUB>>/supports-color_v^5.5.0/flow_v0.93.0
1+
// flow-typed signature: a03f8da2c14979e1fd547f310e373abb
2+
// flow-typed version: <<STUB>>/supports-color_v^5.5.0/flow_v0.100.0
33

44
/**
55
* This is an autogenerated libdef stub for:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"eslint-plugin-react": "^7.12.4",
5151
"eslint-plugin-react-hooks": "^1.6.0",
5252
"express": "^4.16.4",
53-
"flow-bin": "^0.93.0",
53+
"flow-bin": "^0.100.0",
5454
"flow-watch": "^1.1.1",
5555
"husky": "^1.1.3",
5656
"jest": "^24.8.0",

packages/styled-components/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"react-is": ">= 16.8.0"
8080
},
8181
"devDependencies": {
82-
"flow-bin": "^0.93.0",
82+
"flow-bin": "^0.100.0",
8383
"react": "^16.8.6",
8484
"react-dom": "^16.8.6",
8585
"react-frame-component": "^4.0.2",

packages/styled-components/src/models/ThemeProvider.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ import isFunction from '../utils/isFunction';
55

66
export type Theme = { [key: string]: mixed };
77

8+
type ThemeArgument = Theme | ((outerTheme?: Theme) => Theme);
9+
810
type Props = {
911
children?: Element<any>,
10-
theme: Theme | ((outerTheme: Theme) => void),
12+
theme: ThemeArgument,
1113
};
1214

1315
export const ThemeContext: Context<Theme | void> = React.createContext();
1416

1517
export const ThemeConsumer = ThemeContext.Consumer;
1618

17-
function useMergedTheme(theme: Theme | ((outerTheme?: Theme) => Theme), outerTheme?: Theme): Theme {
19+
function useMergedTheme(theme: ThemeArgument, outerTheme?: Theme): Theme {
1820
if (isFunction(theme)) {
1921
const mergedTheme = theme(outerTheme);
2022

@@ -40,6 +42,7 @@ function useMergedTheme(theme: Theme | ((outerTheme?: Theme) => Theme), outerThe
4042
*/
4143
export default function ThemeProvider(props: Props) {
4244
const outerTheme = useContext(ThemeContext);
45+
4346
// NOTE: can't really memoize with props.theme as that'd cause incorrect memoization when it's a function
4447
const themeContext = useMergedTheme(props.theme, outerTheme);
4548

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -5170,10 +5170,10 @@ flatted@^2.0.0:
51705170
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916"
51715171
integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==
51725172

5173-
flow-bin@^0.93.0:
5174-
version "0.93.0"
5175-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.93.0.tgz#9192a08d88db2a8da0ff55e42420f44539791430"
5176-
integrity sha512-p8yq4ocOlpyJgOEBEj0v0GzCP25c9WP0ilFQ8hXSbrTR7RPKuR+Whr+OitlVyp8ocdX0j1MrIwQ8x28dacy1pg==
5173+
flow-bin@^0.100.0:
5174+
version "0.100.0"
5175+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.100.0.tgz#729902726658cfa0a81425d6401f9625cf9f5534"
5176+
integrity sha512-jcethhgrslBJukH7Z7883ohFFpzLrdsOEwHxvn5NwuTWbNaE71GAl55/PEBRJwYpDvYkRlqgcNkANTv0x5XjqA==
51775177

51785178
flow-remove-types@^1.1.0:
51795179
version "1.2.3"

0 commit comments

Comments
 (0)