Skip to content

Commit b0dce7c

Browse files
committed
Merge branch 'master' into feature/IOHKLE-204-migrate-new-ledgerjs-api
2 parents 4959451 + 4cf5d06 commit b0dce7c

Some content is hidden

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

81 files changed

+2357
-1390
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ applications. There are implementations for Node and Browser.
2929
| [`@ledgerhq/hw-transport`](/packages/hw-transport) | [![npm](https://img.shields.io/npm/v/@ledgerhq/hw-transport.svg)](https://www.npmjs.com/package/@ledgerhq/hw-transport) | The generic interface of the communication layer |
3030
| **internal utility libraries** |
3131
| [`@ledgerhq/currencies`](/packages/currencies) | [![npm](https://img.shields.io/npm/v/@ledgerhq/currencies.svg)](https://www.npmjs.com/package/@ledgerhq/currencies) | deal with crypto currencies |
32-
| [`@ledgerhq/common`](/packages/common) | [![npm](https://img.shields.io/npm/v/@ledgerhq/common.svg)](https://www.npmjs.com/package/@ledgerhq/common) | internal library which share code across Ledger projects |
3332
| **Development Tools** |
3433
| [`@ledgerhq/hw-http-proxy-devserver`](/packages/hw-http-proxy-devserver) | [![npm](https://img.shields.io/npm/v/@ledgerhq/hw-http-proxy-devserver.svg)](https://www.npmjs.com/package/@ledgerhq/hw-http-proxy-devserver) | HTTP server proxy to use with `hw-transport-node-hid` **NB: DEV & testing purpose only. DO NOT use in PROD** |
3534
| [`@ledgerhq/hw-hid-cli`](/packages/hw-hid-cli) | [![npm](https://img.shields.io/npm/v/@ledgerhq/hw-hid-cli.svg)](https://www.npmjs.com/package/@ledgerhq/hw-hid-cli) | CLI utility to send APDU to the device via node-hid |
@@ -82,15 +81,23 @@ yarn
8281
Build all packages
8382

8483
```bash
85-
yarn run build
84+
yarn build
85+
```
86+
87+
### Watch
88+
89+
Watch all packages change. Very useful during development to build only file that changes.
90+
91+
```bash
92+
yarn watch
8693
```
8794

8895
### Lint
8996

9097
Lint all packages
9198

9299
```bash
93-
yarn run lint
100+
yarn lint
94101
```
95102

96103
### Run Tests
@@ -109,13 +116,13 @@ Then run the test and accept the commands on the devices for the tests to
109116
continue.
110117

111118
```bash
112-
yarn run test-node
119+
yarn test-node
113120
```
114121

115122
You can also test on the web:
116123

117124
```bash
118-
yarn run test-browser
125+
yarn test-browser
119126
```
120127

121128
> make sure to configure your device app with "Browser support" set to "YES".

lerna.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"lerna": "2.6.0",
2+
"lerna": "2.9.0",
33
"packages": [
44
"packages/*"
55
],
6-
"version": "4.6.0",
6+
"version": "4.10.1",
77
"npmClient": "yarn",
88
"useWorkspaces": true
99
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@
3131
"babel-preset-react": "^6.24.1",
3232
"babel-preset-stage-0": "^6.24.1",
3333
"babel-runtime": "^6.26.0",
34-
"browserify": "^15.1.0",
34+
"browserify": "^16.1.1",
3535
"create-hash": "^1.1.3",
36-
"documentation": "^5.3.5",
36+
"documentation": "^6.1.0",
3737
"eslint": "^4.11.0",
3838
"eslint-config-prettier": "^2.7.0",
3939
"eslint-plugin-flowtype": "^2.42.0",
4040
"eslint-plugin-react": "^7.6.1",
41-
"flow-bin": "^0.66.0",
41+
"flow-bin": "^0.68.0",
4242
"flow-copy-source": "^1.2.2",
4343
"flow-mono-cli": "^1.3.0",
44-
"flow-typed": "^2.3.0",
45-
"lerna": "2.8.0",
44+
"flow-typed": "^2.4.0",
45+
"lerna": "2.9.0",
4646
"prettier": "^1.10.2",
47-
"uglify-js": "^3.3.9"
47+
"uglify-js": "^3.3.15"
4848
}
4949
}

packages/common/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ledgerhq/common",
3-
"version": "4.2.0",
3+
"version": "4.7.3",
44
"description": "Ledger Hardware Wallet Common",
55
"keywords": [
66
"Ledger",
@@ -23,20 +23,20 @@
2323
"license": "Apache-2.0",
2424
"dependencies": {
2525
"fbjs": "^0.8.16",
26-
"invariant": "^2.2.2",
26+
"invariant": "^2.2.4",
2727
"lodash": "^4.17.4",
2828
"normalizr-gre": "^3.2.4",
2929
"prop-types": "^15.5.10",
30-
"query-string": "^5.0.0",
30+
"query-string": "^6.0.0",
3131
"react": "^16.0.0",
3232
"react-redux": "^5.0.5",
3333
"redux": "^3.7.2",
3434
"redux-thunk": "^2.2.0"
3535
},
3636
"devDependencies": {
3737
"babel-jest": "^22.0.4",
38-
"flow-bin": "^0.66.0",
39-
"flow-typed": "^2.3.0",
38+
"flow-bin": "^0.68.0",
39+
"flow-typed": "^2.4.0",
4040
"jest": "^22.1.3",
4141
"react-test-renderer": "^16.2.0"
4242
},

packages/common/src/formatters/error.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@flow
22

3-
export default (error: ?Error | string) => {
3+
export default (error: mixed) => {
44
if (typeof error === "string") return error;
5-
const genStr = ((error && error.message) || "").toString();
5+
const genStr = String((error && error.message) || "");
66
// u2f-api lib https://github.com/grantila/u2f-api/blob/1e75b41fd5d9d001e6ad2be2eda6b9b41d137a81/lib/u2f-api.js#L98
77
if (error && typeof error.metaData === "object" && error.metaData) {
88
const metaData = error.metaData;

packages/create-dapp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-dapp",
3-
"version": "4.1.0",
3+
"version": "4.7.3",
44
"description": "Create React Ethereum apps, ready to use with Ledger and MetaMask",
55
"keywords": [
66
"dapp",

packages/currencies/.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[libs]
66
flow-typed
7+
flow
78

89
[lints]
910

packages/currencies/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/data/icons/react
2+
src/data/icons/reactNative
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@flow
2+
declare module "react-native-svg" {
3+
declare module.exports: any;
4+
}

packages/currencies/package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ledgerhq/currencies",
3-
"version": "4.5.0",
3+
"version": "4.10.1",
44
"description": "Ledger Hardware Wallet currencies dataset",
55
"keywords": [],
66
"main": "lib/index.js",
@@ -23,15 +23,18 @@
2323
},
2424
"devDependencies": {
2525
"babel-jest": "^20.0.0",
26-
"flow-bin": "^0.66.0",
27-
"flow-typed": "^2.3.0",
28-
"jest": "^20.0.0"
26+
"flow-bin": "^0.68.0",
27+
"flow-typed": "^2.4.0",
28+
"glob": "^7.1.2",
29+
"jest": "^20.0.0",
30+
"path": "^0.12.7",
31+
"svgr": "^1.9.0"
2932
},
3033
"scripts": {
3134
"flow": "flow",
3235
"test": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && jest",
33-
"clean": "rm -rf lib/",
34-
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
35-
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
36+
"clean": "rm -rf lib/ src/data/icons/react src/data/icons/reactNative",
37+
"build": "node scripts/buildReactIcons.js && cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
38+
"watch": "node scripts/buildReactIcons.js && cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
3639
}
3740
}

0 commit comments

Comments
 (0)