Skip to content

Commit

Permalink
chore: update dependencies, small code-style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Feb 28, 2018
1 parent 2b38ff2 commit de1cacb
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 246 deletions.
1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@
[options]
esproposal.class_instance_fields=enable
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
unsafe.enable_getters_and_setters=true
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-jest": "^22.1.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.4.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-register": "^6.26.0",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.16.0",
"eslint": "^4.18.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-module-utils": "^2.1.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.5.0",
"fetch-mock": "^5.13.1",
"flow-bin": "^0.64.0",
"form-data": "^2.3.1",
"jest": "^22.1.4",
"prettier": "^1.10.2",
"relay-runtime": "^1.4.1",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-prettier": "^2.6.0",
"fetch-mock": "^6.0.1",
"flow-bin": "^0.66.0",
"form-data": "^2.3.2",
"jest": "^22.4.2",
"prettier": "^1.11.0",
"relay-runtime": "^1.5.0",
"rimraf": "^2.6.2",
"semantic-release": "^12.4.1"
},
Expand All @@ -76,7 +76,8 @@
"lint": "eslint src test *.js",
"coverage": "jest --coverage --maxWorkers 2",
"watch": "jest --watch",
"test": "npm run coverage && npm run lint",
"flow": "flow",
"test": "npm run coverage && npm run lint && npm run flow",
"semantic-release": "semantic-release"
}
}
2 changes: 1 addition & 1 deletion src/RelayRequestBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class RelayRequestBatch {
};
}

setFetchOption(name, value: mixed) {
setFetchOption(name: string, value: mixed) {
this.fetchOpts[name] = value;
}

Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/__tests__/auth-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('middlewares/auth', () => {
body: { data: 'PAYLOAD' },
};
}
return { status: 401 };
return { status: 401, body: '' };
},
method: 'POST',
});
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/__tests__/retry-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('middlewares/retry', () => {
response: () => {
attempt++;
if (attempt < 3) {
return { status: 500 };
return { status: 500, body: '' };
}
return {
status: 200,
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async function sendRequests(requestMap: BatchRequestMap, next, opts) {

if (headersOrThunk) {
const headers = await (isFunction(headersOrThunk)
? headersOrThunk(batchRequest)
? (headersOrThunk: any)(batchRequest)
: headersOrThunk);
batchRequest.setFetchOption('headers', headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function queryMiddleware(opts?: CacheMiddlewareOpts): Middleware
if (req.isFormData() && !allowFormData) {
return next(req);
}

if (req.cacheConfig && req.cacheConfig.force) {
return next(req);
}
Expand Down
Loading

0 comments on commit de1cacb

Please sign in to comment.