Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit da63be9

Browse files
authored
Merge pull request #1040 from lightninglabs/upgrade-npm-deps
Upgrade npm deps
2 parents 4e05f82 + 81192f8 commit da63be9

File tree

13 files changed

+17936
-13760
lines changed

13 files changed

+17936
-13760
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [],
33
"plugins": [
4-
"transform-es2015-modules-commonjs",
5-
"transform-object-rest-spread"
4+
"@babel/plugin-transform-modules-commonjs",
5+
"@babel/plugin-proposal-object-rest-spread"
66
]
77
}

.eslintrc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
"prettier"
44
],
55
"parserOptions": {
6-
"ecmaVersion": 2017,
6+
"ecmaVersion": 2018,
77
"sourceType": "module",
88
"ecmaFeatures": {
99
"jsx": true,
10-
"spread": true,
11-
"experimentalObjectRestSpread": true
10+
"spread": true
1211
}
1312
},
1413
globals: {
@@ -34,7 +33,7 @@
3433
"trailingComma": "es5",
3534
"bracketSpacing": true,
3635
"jsxBracketSameLine": false,
37-
"parser": "babylon"
36+
"parser": "babel"
3837
}],
3938
"no-console": "off"
4039
}

.storybook/.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
"react-native"
3+
"module:metro-react-native-babel-preset"
44
],
55
"plugins": [
66
"react-native-web"

package-lock.json

Lines changed: 17872 additions & 13699 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,55 +29,59 @@
2929
"protobuf": "pbjs assets/rpc.proto -t static-module -w es6 -o assets/rpc.js"
3030
},
3131
"dependencies": {
32-
"@grpc/proto-loader": "^0.3.0",
33-
"electron-is-dev": "^0.3.0",
34-
"electron-log": "^2.2.14",
35-
"electron-updater": "^3.2.3",
36-
"grpc": "^1.15.1",
32+
"@grpc/proto-loader": "0.3.0",
33+
"electron-is-dev": "0.3.0",
34+
"electron-log": "2.2.14",
35+
"electron-updater": "3.2.3",
36+
"grpc": "1.15.1",
3737
"locale-currency": "0.0.2",
38-
"mobx": "^4.5.0",
39-
"mobx-react": "^5.2.8",
38+
"mobx": "^4.9.4",
39+
"mobx-react": "^5.4.3",
4040
"qr-image": "^3.2.0",
41-
"react": "^16.7.0",
42-
"react-art": "^16.7.0",
43-
"react-dom": "^16.7.0",
44-
"react-native-web": "^0.9.13",
45-
"react-scripts": "^1.1.5",
46-
"svgs": "^4.0.0"
41+
"react": "^16.8.6",
42+
"react-art": "^16.8.6",
43+
"react-dom": "^16.8.6",
44+
"react-native-web": "^0.11.2",
45+
"svgs": "4.0.0"
4746
},
4847
"devDependencies": {
49-
"@storybook/addon-actions": "^3.3.15",
50-
"@storybook/addon-links": "^3.3.15",
51-
"@storybook/addons": "^3.3.15",
52-
"@storybook/react": "^3.3.15",
53-
"@svgr/cli": "^3.1.0",
48+
"@babel/cli": "^7.2.3",
49+
"@babel/core": "^7.4.0",
50+
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
51+
"@babel/plugin-transform-modules-commonjs": "^7.4.0",
52+
"@babel/register": "^7.4.0",
53+
"@storybook/addon-actions": "^5.0.6",
54+
"@storybook/addon-links": "^5.0.6",
55+
"@storybook/addons": "^5.0.6",
56+
"@storybook/react": "^5.0.6",
57+
"@svgr/cli": "3.1.0",
5458
"ajv": "^6.5.0",
55-
"babel-cli": "^6.26.0",
56-
"babel-core": "^6.26.0",
57-
"babel-plugin-react-native-web": "^0.9.13",
58-
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
59-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
60-
"babel-preset-react-native": "^4.0.0",
59+
"babel-plugin-react-native-web": "^0.11.2",
6160
"concurrently": "^3.5.1",
62-
"electron": "^3.0.9",
63-
"electron-builder": "^20.8.1",
64-
"eslint": "^4.19.0",
65-
"eslint-config-google": "^0.9.1",
66-
"eslint-config-prettier": "^2.9.0",
67-
"eslint-plugin-html": "^4.0.2",
68-
"eslint-plugin-prettier": "^2.6.0",
69-
"eslint-plugin-react": "^7.7.0",
61+
"electron": "3.0.9",
62+
"electron-builder": "20.8.1",
63+
"eslint-config-google": "^0.12.0",
64+
"eslint-config-prettier": "^4.1.0",
65+
"eslint-plugin-html": "^5.0.3",
66+
"eslint-plugin-prettier": "^3.0.1",
67+
"eslint-plugin-react": "^7.12.4",
7068
"isomorphic-fetch": "^2.2.1",
69+
"metro-react-native-babel-preset": "^0.53.1",
7170
"mocha": "^5.0.0",
7271
"nock": "^9.1.6",
7372
"prettier": "^1.11.1",
7473
"prop-types": "^15.6.2",
7574
"protobufjs": "^6.8.8",
75+
"react-scripts": "2.1.8",
7676
"sinon": "^6.0.0",
7777
"unexpected": "^10.37.2",
7878
"unexpected-sinon": "^10.10.1",
79-
"wait-on": "^2.1.0"
79+
"wait-on": "^2.1.0",
80+
"webpack": "4.28.3"
8081
},
82+
"browserslist": [
83+
"electron 3.0"
84+
],
8185
"build": {
8286
"appId": "engineering.lightning.lightning-app",
8387
"publish": {

public/electron.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ function createWindow() {
128128
network: isDev
129129
? 'simnet'
130130
: lndArgs.includes('--bitcoin.mainnet')
131-
? 'mainnet'
132-
: 'testnet',
131+
? 'mainnet'
132+
: 'testnet',
133133
});
134134
}
135135

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<!-- Mitigate XSS -->
6-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; connect-src *; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:">
6+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; object-src 'none'; connect-src *; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:">
77
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
88
<title>Lightning</title>
99
</head>

src/action/info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class InfoAction {
8888
? bestHeaderTimestamp - this.startingSyncTimestamp
8989
: 0;
9090
const totalProgress = currTimestamp - this.startingSyncTimestamp || 0.001;
91-
const percentSynced = progressSoFar * 1.0 / totalProgress;
91+
const percentSynced = (progressSoFar * 1.0) / totalProgress;
9292
return percentSynced;
9393
}
9494
}

src/component/notification.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ export const alertColor = type => {
7979
return type === 'success'
8080
? color.greenSig
8181
: type === 'error'
82-
? color.pinkSig
83-
: type === 'inactive'
84-
? color.greySig
85-
: color.orangeSig;
82+
? color.pinkSig
83+
: type === 'inactive'
84+
? color.greySig
85+
: color.orangeSig;
8686
};
8787

8888
const alertStyles = StyleSheet.create({

src/computed/channel.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const ComputedChannel = store => {
1313
const p = pendingChannels ? pendingChannels.slice() : [];
1414
const cl = closedChannels ? closedChannels.slice() : [];
1515
c.sort((a, b) => (a.active === b.active ? 0 : a.active ? -1 : 1));
16-
p.sort(
17-
(a, b) => (a.status > b.status ? -1 : a.status < b.status ? 1 : 0)
16+
p.sort((a, b) =>
17+
a.status > b.status ? -1 : a.status < b.status ? 1 : 0
1818
);
1919
let all = [].concat(c, p, cl);
2020
all.forEach((c, i) => {
@@ -25,10 +25,10 @@ const ComputedChannel = store => {
2525
c.status === 'open' && c.active
2626
? 'success'
2727
: c.status === 'open'
28-
? 'inactive'
29-
: c.status.includes('open')
30-
? 'info'
31-
: 'error';
28+
? 'inactive'
29+
: c.status.includes('open')
30+
? 'info'
31+
: 'error';
3232
c.capacityLabel = toAmountLabel(c.capacity, settings);
3333
c.localBalanceLabel = toAmountLabel(c.localBalance, settings);
3434
c.remoteBalanceLabel = toAmountLabel(c.remoteBalance, settings);
@@ -94,10 +94,10 @@ const ComputedChannel = store => {
9494
return opened
9595
? 'success'
9696
: inactive
97-
? 'inactive'
98-
: pending
99-
? 'info'
100-
: 'error';
97+
? 'inactive'
98+
: pending
99+
? 'info'
100+
: 'error';
101101
},
102102
});
103103
};

src/computed/wallet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const ComputedWallet = store => {
4343
},
4444
get channelPercentageLabel() {
4545
const { balanceSatoshis: onChain, totalBalanceSatoshis: total } = store;
46-
const percent = total ? (total - onChain) / total * 100 : 0;
46+
const percent = total ? ((total - onChain) / total) * 100 : 0;
4747
return `${Math.round(percent)}% on Lightning`;
4848
},
4949
get newPasswordCopy() {

src/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export const retry = async (api, interval = 100, retries = 1000) => {
309309
* @return {Point} The point in cartesian form
310310
*/
311311
const polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
312-
const angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
312+
const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
313313
return {
314314
x: centerX + radius * Math.cos(angleInRadians),
315315
y: centerY + radius * Math.sin(angleInRadians),

test/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
--exit
22
--recursive
3-
--require babel-core/register
3+
--require @babel/register
44
-r ./test/setup.js

0 commit comments

Comments
 (0)