Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DASH-1618 - Fix vulnerability alerts #106

Merged
merged 6 commits into from Mar 31, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 5 additions & 13 deletions .babelrc
@@ -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
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
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the examples directory? Shouldn't we run Eslint on the examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples have a lot of unused constants, which are only there for example purposes. I believe running Prettier on the examples will be sufficient.

"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.15.3",
"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": {
dabroek marked this conversation as resolved.
Show resolved Hide resolved
"commitizen": {
"path": "cz-conventional-changelog"
}
}
}
10 changes: 6 additions & 4 deletions rollup.config.js
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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