Skip to content

Commit e546721

Browse files
authored
Merge pull request #33 from uphold/support/update-webpack
Update dependencies
2 parents 09b8e13 + 197bfa0 commit e546721

36 files changed

+4474
-2720
lines changed

.babelrc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
{
2-
"plugins": ["transform-object-rest-spread"],
3-
"presets": ["es2015-node"]
2+
"plugins": ["lodash"],
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"bugfixes": true,
8+
"corejs": { "version": 3, "proposals": true },
9+
"loose": true,
10+
"targets": { "esmodules": true },
11+
"useBuiltIns": "entry"
12+
}
13+
]
14+
]
415
}

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ language: node_js
22

33
matrix:
44
include:
5-
- node_js: 6
5+
- node_js: 10
66
script:
77
- yarn cover
8-
- node_js: 7
8+
- node_js: 11
99
script:
1010
- yarn cover
11-
- node_js: 8
11+
- node_js: node
1212
script:
1313
- yarn cover
14-
- node_js: 9
14+
- node_js: lts/*
1515
script:
1616
- yarn cover
1717

jest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"statements": 100
1313
}
1414
},
15-
"setupTestFrameworkScriptFile": "./test/index.js",
15+
"setupFilesAfterEnv": ["./test/index.js"],
1616
"testRegex": "test/.*\\.spec.js",
1717
"verbose": true
1818
}

package.json

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,61 +14,58 @@
1414
"repository": "git@github.com:uphold/uphold-sdk-javascript.git",
1515
"scripts": {
1616
"build": "rm -rf dist && yarn build:node && yarn build:browser",
17-
"build:browser": "yarn && webpack --progress",
17+
"build:browser": "yarn && webpack --progress -p",
1818
"build:node": "babel src/node -d dist/node && babel src/core -d dist/core",
1919
"changelog": "github-changelog-generator --owner uphold --repo uphold-sdk-javascript --future-release=v$npm_package_version > CHANGELOG.md",
20-
"cover": "yarn test -- --coverage",
20+
"cover": "yarn test --coverage",
2121
"docs": "yarn docs:build && yarn docs:prepare && yarn docs:publish",
2222
"docs:build": "gitbook install && cd docs && ../node_modules/.bin/gitbook build && cp -R images/* _book/gitbook/images",
2323
"docs:prepare": "cd docs/_book && git init && git checkout -b gh-pages && git add . && git commit -m 'Update documentation'",
2424
"docs:publish": "cd docs/_book && git push git@github.com:uphold/uphold-sdk-javascript gh-pages --force && cd .. && rm -rf _book",
2525
"lint": "eslint --cache src test",
2626
"release": "npm version $1 -m 'Release %s'",
27-
"tdd": "yarn test -- --watch",
27+
"tdd": "yarn test --watch",
2828
"test": "jest --config jest.json",
2929
"version": "yarn build && yarn changelog && git add -f dist CHANGELOG.md"
3030
},
3131
"browser": "dist/browser/uphold-sdk-javascript.js",
3232
"dependencies": {
33-
"base64-js": "1.2.0",
3433
"content-range": "1.1.0",
35-
"lodash.merge": "4.6.2",
36-
"qs": "6.4.0",
37-
"request": "2.88.0",
38-
"request-promise": "4.2.0",
39-
"standard-error": "1.1.0",
40-
"text-encoding": "0.6.4"
34+
"request": "2.88.2",
35+
"request-promise": "4.2.5",
36+
"standard-error": "1.1.0"
4137
},
4238
"devDependencies": {
43-
"@uphold/github-changelog-generator": "^0.8.1",
44-
"babel-cli": "6.24.1",
45-
"babel-core": "6.24.1",
46-
"babel-eslint": "7.2.3",
47-
"babel-loader": "7.0.0",
48-
"babel-plugin-istanbul": "5.1.4",
49-
"babel-plugin-transform-object-rest-spread": "6.23.0",
50-
"babel-polyfill": "6.23.0",
51-
"babel-preset-es2015": "6.24.1",
52-
"babel-preset-es2015-node": "4.0.2",
53-
"eslint": "6.0.1",
54-
"eslint-config-seegno": "9.0.0",
55-
"eslint-plugin-babel": "4.1.1",
56-
"fetch-mock": "5.10.0",
57-
"gitbook-cli": "^2.3.2",
58-
"html-tags": "1.1.1",
59-
"is-html": "1.1.0",
39+
"@babel/cli": "7.8.4",
40+
"@babel/core": "7.9.6",
41+
"@babel/preset-env": "7.9.6",
42+
"@babel/register": "7.9.0",
43+
"@uphold/github-changelog-generator": "1.0.2",
44+
"babel-eslint": "10.1.0",
45+
"babel-loader": "8.1.0",
46+
"babel-plugin-istanbul": "6.0.0",
47+
"babel-plugin-lodash": "3.3.4",
48+
"core-js": "3.6.5",
49+
"eslint": "6.8.0",
50+
"eslint-config-seegno": "15.0.0",
51+
"eslint-plugin-babel": "5.3.0",
52+
"fetch-mock": "5.13.1",
53+
"gitbook-cli": "2.3.2",
54+
"is-html": "2.0.0",
6055
"isomorphic-fetch": "2.2.1",
61-
"jest": "19.0.2",
62-
"json-loader": "0.5.4",
63-
"nock": "9.0.13",
56+
"jest": "26.0.1",
57+
"lodash": "4.17.15",
58+
"lodash-webpack-plugin": "0.11.5",
59+
"nock": "12.0.3",
6460
"pre-commit": "1.2.2",
65-
"webpack": "2.5.0"
61+
"terser-webpack-plugin": "3.0.1",
62+
"webpack": "4.43.0",
63+
"webpack-cli": "3.3.11"
6664
},
6765
"resolutions": {
68-
"braces": "^2.3.2",
69-
"hoek": "^4.2.0",
70-
"lodash": "^4.17.12",
71-
"ssri": "^5.2.2",
66+
"braces": "^3.0.2",
67+
"hoek": "^6.1.3",
68+
"ssri": "^8.0.0",
7269
"tunnel-agent": "^0.6.0"
7370
},
7471
"engines": {

src/browser/sdk.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { CookieStorage, FetchClient } from './services';
22
import SDK from '../core';
33

44
export default class extends SDK {
5+
56
constructor() {
67
super(...arguments);
78

89
this.client = new FetchClient();
910
this.storage = new CookieStorage(this.options.storageName);
1011
}
12+
1113
}

src/browser/services/cookie-storage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default class CookieStorage {
2+
23
constructor(storageName = '_token') {
34
this.cache = {};
45
this.storageName = storageName;
@@ -56,4 +57,5 @@ export default class CookieStorage {
5657
_setCookie(data) {
5758
document.cookie = `${this.storageName}=${encodeURIComponent(JSON.stringify(data))};path=/`;
5859
}
60+
5961
}

src/browser/services/fetch-client.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Client, createError } from '../../core';
22
import isHtml from 'is-html';
33

44
export default class FetchClient extends Client {
5+
56
request(url, method = 'get', body, headers = {}, options = {}) { // eslint-disable-line max-params
67
const requestOptions = {
78
...options,
@@ -71,4 +72,5 @@ export default class FetchClient extends Client {
7172
return text;
7273
}
7374
}
75+
7476
}

src/core/actions/card-address.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import merge from 'lodash.merge';
1+
import merge from 'lodash/merge';
22

33
export function createCardAddress(cardId, network, options) {
44
return this.api(`/me/cards/${cardId}/addresses`, merge({

src/core/actions/card-transaction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import merge from 'lodash.merge';
1+
import merge from 'lodash/merge';
22

33
export function cancelCardTransaction(cardId, transactionId, options) {
44
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/cancel`, {
@@ -28,7 +28,7 @@ export function commitCardTransaction(cardId, transactionId, { message, security
2828
}
2929

3030
// eslint-disable-next-line max-params
31-
export function createCardTransaction(cardId, { amount, currency, destination, origin, message, securityCode }, commit, otp, options) {
31+
export function createCardTransaction(cardId, { amount, currency, destination, message, origin, securityCode }, commit, otp, options) {
3232
options = merge({
3333
body: {
3434
denomination: {

src/core/actions/card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import merge from 'lodash.merge';
1+
import merge from 'lodash/merge';
22

33
export function createCard(currency, label, options) {
44
return this.api('/me/cards', merge({

0 commit comments

Comments
 (0)