Skip to content

Commit c4eeacc

Browse files
committed
chore: update flow
1 parent f6db9bf commit c4eeacc

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"rules": {
44
"global-require": 0,
55
"flowtype/no-weak-types": 0,
6-
"strict": [0, "global"]
6+
"strict": [0, "global"],
7+
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
78
}
89
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_install:
77
install: yarn --ignore-engines
88
before_script: greenkeeper-lockfile-update
99
script:
10-
- yarn lint && yarn flow && yarn test
10+
- yarn lint && yarn typecheck && yarn test
1111
after_script: greenkeeper-lockfile-upload
1212
jobs:
1313
include:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"build": "babel src --out-dir build",
1111
"lint": "eslint . --ext js --cache",
12-
"flow": "flow check",
12+
"typecheck": "flow check",
1313
"prepublish": "npm run build",
1414
"test": "jest",
1515
"watch": "babel -w src --out-dir build"
@@ -35,7 +35,7 @@
3535
"enzyme-to-json": "^3.4.0",
3636
"eslint": "^5.15.3",
3737
"eslint-config-callstack-io": "^1.1.1",
38-
"flow-bin": "^0.102.0",
38+
"flow-bin": "^0.111.1",
3939
"jest": "^24.0.0",
4040
"react": "^16.7.0",
4141
"react-dom": "16.7.0",

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const snapshotDiff = (valueA: any, valueB: any, options?: Options): string => {
4141
if (matchingSerializer) {
4242
const { print, diffOptions } = matchingSerializer;
4343
const serializerOptions = diffOptions
44-
? diffOptions(valueA, valueB) || {}
45-
: {};
44+
? diffOptions(valueA, valueB) || undefined
45+
: undefined;
4646
difference = diffStrings(print(valueA, identity), print(valueB, identity), {
4747
...mergedOptions,
4848
...serializerOptions,

src/react-serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getReactComponentSerializer() {
2727

2828
const reactSerializer = {
2929
test: (value: any) => value && value.$$typeof === reactElement,
30-
print: (value: any) => {
30+
print: (value: any, _serializer?: any => any) => {
3131
const reactComponentSerializer = getReactComponentSerializer();
3232
return reactComponentSerializer(value);
3333
},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,10 +2328,10 @@ flatted@^2.0.0:
23282328
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916"
23292329
integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==
23302330

2331-
flow-bin@^0.102.0:
2332-
version "0.102.0"
2333-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.102.0.tgz#3d5de44bcc26d26585e932b3201988b766f9b380"
2334-
integrity sha512-mYon6noeLO0Q5SbiWULLQeM1L96iuXnRtYMd47j3bEWXAwUW9EnwNWcn+cZg/jC/Dg4Wj/jnkdTDEuFtbeu1ww==
2331+
flow-bin@^0.111.1:
2332+
version "0.111.1"
2333+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.111.1.tgz#bfc1ff91927d0500aa869b0b3a48dd4b060c15c0"
2334+
integrity sha512-fOFFy4rsvV4zYXUqpNY2bChpzEMYbmumO6DlbcpndbJIHY3W8+UzyiWb8+iRDf2ME1YJgTIvKSJCzHpQ40OBOQ==
23352335

23362336
for-in@^1.0.2:
23372337
version "1.0.2"

0 commit comments

Comments
 (0)