Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
update flow and eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Jul 4, 2019
1 parent aff09fd commit 61e5b9a
Show file tree
Hide file tree
Showing 31 changed files with 118 additions and 73 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"browserify": "^16.2.3",
"create-hash": "^1.1.3",
"documentation": "^11.0.1",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-flowtype": "^3.9.1",
"eslint-plugin-react": "^7.13.0",
"flow-bin": "^0.101.0",
"flow-copy-source": "^2.0.6",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-flowtype": "^3.11.1",
"eslint-plugin-react": "^7.14.2",
"flow-bin": "^0.102.0",
"flow-copy-source": "^2.0.7",
"flow-mono-cli": "^1.5.0",
"flow-typed": "^2.5.2",
"lerna": "3.15.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"license": "Apache-2.0",
"bin": "scripts/create-dapp",
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
}
}
2 changes: 1 addition & 1 deletion packages/devices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "lib/index.js",
"license": "Apache-2.0",
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"dependencies": {
"@ledgerhq/errors": "^4.63.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "lib/index.js",
"license": "Apache-2.0",
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-app-btc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"create-hash": "^1.1.3"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-app-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@ledgerhq/hw-transport": "^4.63.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-app-str/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"tweetnacl": "^1.0.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-app-xrp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"bip32-path": "0.4.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-hid-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"babel-polyfill": "^6.26.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-http-proxy-devserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ws": "6"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 2 additions & 0 deletions packages/hw-http-proxy-devserver/src/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ app.post("/", bodyParser.json(), async (req, res) => {
} catch (e) {
error = e.toString();
}
// eslint-disable-next-line require-atomic-updates
pending = false;
const result = { data, error };
if (data) {
Expand Down Expand Up @@ -163,6 +164,7 @@ wss.on("connection", ws => {
if (wsBusyIndex === index) {
log(`WS(${index}): close`);
await transportP.then(transport => transport.close(), () => {});
// eslint-disable-next-line require-atomic-updates
wsBusyIndex = 0;
}
if (saveToFile) {
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ws": "6"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-mocker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@ledgerhq/logs": "^4.62.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-node-ble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"rxjs": "^6.5.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
1 change: 1 addition & 0 deletions packages/hw-transport-node-ble/src/TransportNodeBle.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ async function open(deviceOrId: Device | string, needsReconnect: boolean) {
transport.emit("disconnect", e);
};

// eslint-disable-next-line require-atomic-updates
transportsCache[transport.id] = transport;
const disconnectedSub = listenDeviceDisconnect(device, e => {
if (!transport.notYetDisconnected) return;
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-node-hid-noevents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"node-hid": "^0.7.9"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-node-hid-singleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"usb-detection": "^4.3.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-node-hid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"usb": "^1.6.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-u2f/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"u2f-api": "0.2.7"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-web-ble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"rxjs": "^6.5.2"
},
"devDependencies": {
"flow-bin": "^0.101.0",
"flow-bin": "^0.102.0",
"flow-typed": "^2.5.2"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/hw-transport-web-ble/src/TransportWebBLE.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ async function open(deviceOrId: Device | string, needsReconnect: boolean) {
throw new DisconnectedDevice();
}

// eslint-disable-next-line require-atomic-updates
transportsCache[transport.id] = transport;
const onDisconnect = e => {
console.log("onDisconnect!", e);
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-webauthn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@ledgerhq/logs": "^4.62.0"
},
"devDependencies": {
"flow-bin": "^0.101.0",
"flow-bin": "^0.102.0",
"flow-typed": "^2.5.2"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport-webusb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@ledgerhq/logs": "^4.62.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/hw-transport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"events": "^3.0.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "lib/index.js",
"license": "Apache-2.0",
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-hid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"rxjs": "^6.5.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-hw-transport-ble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"uuid": "^3.3.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native-hw-transport-ble/src/BleTransport.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ async function open(deviceOrId: Device | string, needsReconnect: boolean) {
device = await bleManager.connectToDevice(deviceOrId, connectOptions);
} catch (e) {
if (e.errorCode === BleErrorCode.DeviceMTUChangeFailed) {
// eslint-disable-next-line require-atomic-updates
connectOptions = {};
device = await bleManager.connectToDevice(deviceOrId);
} else {
Expand All @@ -118,6 +119,7 @@ async function open(deviceOrId: Device | string, needsReconnect: boolean) {
await device.connect(connectOptions);
} catch (e) {
if (e.errorCode === BleErrorCode.DeviceMTUChangeFailed) {
// eslint-disable-next-line require-atomic-updates
connectOptions = {};
await device.connect();
} else {
Expand Down Expand Up @@ -215,6 +217,7 @@ async function open(deviceOrId: Device | string, needsReconnect: boolean) {
transport.emit("disconnect", e);
};

// eslint-disable-next-line require-atomic-updates
transportsCache[transport.id] = transport;
const disconnectedSub = device.onDisconnected(e => {
if (!transport.notYetDisconnected) return;
Expand Down
2 changes: 1 addition & 1 deletion packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"budo": "^11.6.2"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"test-browser": "budo --ssl lib/index-browser.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-subprovider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"web3-provider-engine": "^14.1.0"
},
"devDependencies": {
"flow-bin": "^0.101.0"
"flow-bin": "^0.102.0"
},
"scripts": {
"flow": "flow",
Expand Down
Loading

0 comments on commit 61e5b9a

Please sign in to comment.