Skip to content

Commit

Permalink
Merge pull request #106 from mollie/vernon/fix-vulnerability-alerts
Browse files Browse the repository at this point in the history
DASH-1618 - Fix vulnerability alerts
  • Loading branch information
vernondegoede committed Mar 31, 2019
2 parents 96e857e + 633f5d6 commit 9ef5046
Show file tree
Hide file tree
Showing 14 changed files with 3,580 additions and 2,780 deletions.
18 changes: 5 additions & 13 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"presets": [
[
"es2015",
"@babel/preset-env",
{
"modules": false
}
],
"stage-2"
],
"plugins": [
"external-helpers"
]
],
"plugins": ["@babel/plugin-external-helpers", "@babel/plugin-proposal-class-properties"],
"env": {
"test": {
"presets": [
"es2015",
"stage-2"
],
"plugins": [
"transform-runtime"
]
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime", "@babel/plugin-proposal-class-properties"]
}
}
}
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: false
language: node_js
node_js:
- "node"
- "4.8"
- "6.14"
cache: yarn
script:
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then yarn run test:unit:cov; fi'
Expand All @@ -15,4 +15,4 @@ deploy:
skip_cleanup: true
on:
tags: true
node: "4.8"
node: "6.14"
40 changes: 17 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"main": "dist/mollie.js",
"engines": {
"node" : ">=4.8"
"node": ">=6.14"
},
"scripts": {
"prepublish": "yarn run build",
Expand All @@ -32,39 +32,38 @@
"test:unit:cov": "jest ./tests/unit --coverage",
"build": "rollup -c",
"lint:prettier": "prettier --write \"{src,tests,examples}/**/*.js\"",
"lint:eslint": "eslint {src,test,examples}/**/*.js",
"lint:eslint": "eslint {src,tests}/**/*.js",
"lint": "yarn run lint:eslint && yarn run lint:prettier"
},
"dependencies": {
"axios": "^0.16.1",
"lodash": "^4.17.4",
"lodash": "^4.17.11",
"qs": "^6.4.0"
},
"devDependencies": {
"@babel/core": "^7.4.0",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-transform-runtime": "^7.4.0",
"@babel/preset-env": "^7.4.1",
"@babel/runtime": "^7.4.0",
"@mollie/eslint-config-node": "0.0.1-alpha.3",
"axios-mock-adapter": "^1.8.1",
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-jest": "^19.0.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.5.0",
"dotenv": "^4.0.0",
"eslint": "^3.19.0",
"@mollie/eslint-config-node": "0.0.1-alpha.3",
"eslint": "^5.16.0",
"eslint-import-resolver-node": "^0.3.0",
"eslint-plugin-import": "^2.2.0",
"husky": "^0.13.4",
"jest-cli": "^19.0.2",
"jest": "^24.5.0",
"lint-staged": "^3.4.1",
"prettier": "^1.14.0",
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",
"rollup": "^1.7.3",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-includepaths": "^0.2.2",
"rollup-plugin-json": "^2.1.1",
"rollup-plugin-url": "^1.1.0"
"rollup-plugin-url": "^2.2.0"
},
"lint-staged": {
"{src,test}/**/*.js": [
Expand All @@ -86,10 +85,5 @@
"^.+\\.jsx?$": "babel-jest",
"^.+\\.pem$": "<rootDir>/tests/unit/__stubs__/fileTransformer.js"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}
10 changes: 6 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import includePaths from 'rollup-plugin-includepaths';
import url from 'rollup-plugin-url';

export default {
entry: 'src/mollie.js',
format: 'cjs',
dest: 'dist/mollie.js',
input: 'src/mollie.js',
output: {
format: 'cjs',
file: 'dist/mollie.js',
},
plugins: [
json(),
babel({ exclude: 'node_modules/**' }),
babel({ exclude: 'node_modules/**', plugins: ['@babel/external-helpers'] }),
includePaths({ paths: ['src'] }),
url({ limit: 0, include: ['**/*.pem'] }),
],
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resources/__snapshots__/chargebacks.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`chargebacks .all() should return a list of all chargebacks 1`] = `
Array [
List [
Chargeback {
"_links": Object {
"documentation": Object {
Expand Down Expand Up @@ -35,7 +35,7 @@ Array [
`;

exports[`chargebacks .all() should work with a callback 1`] = `
Array [
List [
Chargeback {
"_links": Object {
"documentation": Object {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resources/__snapshots__/customers.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customers .all() should return a list of all customers 1`] = `
Array [
List [
Customer {
"_links": Object {
"documentation": Object {
Expand Down Expand Up @@ -30,7 +30,7 @@ Array [
`;

exports[`customers .all() should work with a callback 1`] = `
Array [
List [
Customer {
"_links": Object {
"documentation": Object {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resources/__snapshots__/methods.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`methods .all() should return a list of all methods 1`] = `
Array [
List [
Method {
"_links": Object {
"self": Object {
Expand Down Expand Up @@ -81,7 +81,7 @@ Array [
`;

exports[`methods .all() should work with a callback 1`] = `
Array [
List [
Method {
"_links": Object {
"self": Object {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resources/__snapshots__/payments.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`payments .all() should return a list of all payments 1`] = `
Array [
List [
Payment {
"_links": Object {
"checkout": Object {
Expand Down Expand Up @@ -57,7 +57,7 @@ Array [
`;

exports[`payments .all() should work with a callback 1`] = `
Array [
List [
Payment {
"_links": Object {
"checkout": Object {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/resources/__snapshots__/refunds.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`refunds .all() should return a list of all payment refunds 1`] = `
Array [
List [
Refund {
"_links": Object {
"documentation": Object {
Expand Down Expand Up @@ -33,7 +33,7 @@ Array [
`;

exports[`refunds .all() should work with a callback 1`] = `
Array [
List [
Refund {
"_links": Object {
"documentation": Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customers_mandates .all() should return a list of all customer mandates 1`] = `
Array [
List [
Mandate {
"_links": Object {
"customer": Object {
Expand Down Expand Up @@ -34,7 +34,7 @@ Array [
`;

exports[`customers_mandates .all() should work with a callback 1`] = `
Array [
List [
Mandate {
"_links": Object {
"customer": Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customers_payments .all() should return a list of all customer payments 1`] = `
Array [
List [
Payment {
"_links": Object {
"checkout": Object {
Expand Down Expand Up @@ -57,7 +57,7 @@ Array [
`;

exports[`customers_payments .all() should work with a callback 1`] = `
Array [
List [
Payment {
"_links": Object {
"checkout": Object {
Expand Down Expand Up @@ -113,7 +113,7 @@ Array [
`;

exports[`customers_payments .all() should work with withParent 1`] = `
Array [
List [
Payment {
"_links": Object {
"checkout": Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`customers_subscriptions .all() should return a list of all customer subscriptions 1`] = `
Array [
List [
Subscription {
"_links": Object {
"customer": Object {
Expand Down Expand Up @@ -34,7 +34,7 @@ Array [
`;

exports[`customers_subscriptions .all() should work with a callback 1`] = `
Array [
List [
Subscription {
"_links": Object {
"customer": Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`payments_refunds .all() should return a list of all payment refunds 1`] = `
Array [
List [
Refund {
"_links": Object {
"documentation": Object {
Expand Down Expand Up @@ -33,7 +33,7 @@ Array [
`;

exports[`payments_refunds .all() should work with a callback 1`] = `
Array [
List [
Refund {
"_links": Object {
"documentation": Object {
Expand Down

0 comments on commit 9ef5046

Please sign in to comment.