Skip to content

Commit 1474220

Browse files
committed
flow fixes
1 parent 4ec3832 commit 1474220

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"prettier": "^1.10.2"
2020
},
2121
"scripts": {
22-
"test": "jest --coverage",
22+
"test": "lerna run flow && jest --coverage",
2323
"coveralls": "cat ./coverage/lcov.info | coveralls",
2424
"watch:test": "jest --watch --notify",
2525
"precommit": "lint-staged",

packages/container-query/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"main": "dist/bundle.cjs.js",
1111
"module": "dist/bundle.esm.js",
1212
"scripts": {
13-
"test": "jest && yarn run build && yarn run size",
14-
"prebuild": "flow check",
13+
"test": "yarn run flow && jest && yarn run build && yarn run size",
14+
"flow": "flow check",
15+
"prebuild": "yarn run flow",
1516
"build:esm": "BABEL_ENV=production rollup -c rollup/rollup.esm.js",
1617
"build:cjs": "BABEL_ENV=production rollup -c rollup/rollup.cjs.js",
1718
"build:umd": "BABEL_ENV=production rollup -c rollup/rollup.umd.js",

packages/container-query/src/containerRegistry.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import type { RegistryData } from "../flow/types";
55
const containerRegistry: WeakMap = new WeakMap();
66

77
export default {
8-
set: function(element: Element, data: RegistryData) {
8+
set: function(element: Element | Node, data: RegistryData) {
99
containerRegistry.set(element, data);
1010
},
1111

12-
get: function(element: Element) {
12+
get: function(element: Element | Node) {
1313
return containerRegistry.get(element);
1414
},
1515

16-
has: function(element: Element) {
16+
has: function(element: Element | Node) {
1717
return containerRegistry.has(element);
1818
},
1919

20-
delete: function(element: Element) {
20+
delete: function(element: Element | Node) {
2121
containerRegistry.delete(element);
2222
}
2323
};

packages/postcss-container-query/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"fs": false
1313
},
1414
"scripts": {
15-
"test": "jest",
15+
"test": "yarn run flow && jest",
1616
"build": "rollup -c",
17-
"prebuild": "flow check",
17+
"flow": "flow check",
18+
"prebuild": "yarn run flow",
1819
"prepublish": "yarn build"
1920
},
2021
"devDependencies": {

0 commit comments

Comments
 (0)