Skip to content

Commit fc2e98b

Browse files
committed
feat: upgrade deps, node
1 parent 7118189 commit fc2e98b

File tree

8 files changed

+4467
-1594
lines changed

8 files changed

+4467
-1594
lines changed

.babelrc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
"plugins": [
3-
"transform-strict-mode",
4-
"transform-class-properties",
5-
["transform-object-rest-spread", { "useBuiltIns": true }]
3+
"@babel/plugin-transform-strict-mode",
4+
"@babel/plugin-proposal-class-properties",
5+
[
6+
"@babel/plugin-proposal-object-rest-spread",
7+
{
8+
"useBuiltIns": true
9+
}
10+
]
611
],
712
"env": {
813
"test": {
9-
"plugins": ["istanbul"]
14+
"plugins": [
15+
"istanbul"
16+
]
1017
}
1118
}
1219
}

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"extends": "makeomatic"
2+
"extends": "makeomatic",
3+
"parser": "babel-eslint"
34
}

.mdeprc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"node": "10.5.0",
2+
"node": "10.14.1",
33
"repo": "microfleet",
44
"p": "html-to-pdf",
55
"nycCoverage": false,

.nycrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"src/**/*.spec.js"
77
],
88
"require": [
9-
"babel-register"
9+
"@babel/register"
1010
],
1111
"sourceMap": false,
1212
"instrument": false,

__tests__/docker-compose.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
version: '2'
22
services:
33
redis:
4-
hostname: redis
5-
container_name: redis
64
image: makeomatic/redis-cluster:3.2.9
75

86
rabbitmq:
9-
image: makeomatic/rabbitmq:3.6.12
10-
container_name: rabbitmq
11-
hostname: rabbitmq
7+
image: rabbitmq:3-alpine
128

139
ms-files:
14-
image: makeomatic/ms-files:9.11.0-11.1.3
15-
container_name: ms-files
16-
hostname: ms-files
10+
image: makeomatic/ms-files:10.14.1-13.0.3
1711
depends_on:
1812
- redis
1913
- rabbitmq
@@ -26,7 +20,7 @@ services:
2620

2721
tester:
2822
container_name: tester
29-
image: makeomatic/node:10.5.0-chrome-tester
23+
image: makeomatic/node:10.14.1-chrome-tester
3024
links:
3125
- redis
3226
- rabbitmq

package.json

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,52 @@
1515
"prepublishOnly": "yarn compile",
1616
"semantic-release": "semantic-release",
1717
"docker-release": "mdep docker release",
18-
"release": "yarn --frozen-lockfile && yarn semantic-release",
19-
"commitmsg": "commitlint -e $GIT_PARAMS",
20-
"preparecommitmsg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $GIT_PARAMS"
18+
"release": "yarn --frozen-lockfile && yarn semantic-release"
2119
},
2220
"publishConfig": {
2321
"access": "public"
2422
},
2523
"dependencies": {
2624
"64": "^0.2.0",
27-
"@microfleet/core": "^10.3.1",
28-
"@microfleet/transport-amqp": "^13.0.1",
29-
"bluebird": "^3.5.1",
25+
"@microfleet/core": "^13.3.2",
26+
"@microfleet/transport-amqp": "^13.1.2",
27+
"@microfleet/validation": "^8.1.0",
28+
"bluebird": "^3.5.3",
3029
"bluebird-retry": "^0.11.0",
3130
"bunyan": "^1.8.12",
32-
"chrome-launcher": "^0.10.2",
33-
"chrome-remote-interface": "^0.25.5",
31+
"chrome-launcher": "^0.10.5",
32+
"chrome-remote-interface": "^0.27.0",
3433
"common-errors": "^1.0.5",
35-
"debug": "^3.1.0",
36-
"ms-conf": "^3.2.0",
37-
"ms-validation": "^7.0.0",
38-
"mustache": "^2.3.0",
39-
"request": "^2.85.0",
34+
"debug": "^4.1.0",
35+
"ms-conf": "^3.3.3",
36+
"mustache": "^3.0.1",
37+
"request": "^2.88.0",
4038
"request-promise": "^4.2.2",
41-
"stdout-stream": "^1.4.0"
39+
"stdout-stream": "^1.4.1"
4240
},
4341
"devDependencies": {
44-
"@makeomatic/deploy": "^6.1.1",
45-
"@semantic-release/changelog": "^2.0.2",
46-
"@semantic-release/exec": "^2.2.4",
47-
"@semantic-release/git": "6.0.2",
48-
"babel-cli": "^6.26.0",
49-
"babel-eslint": "^8.2.3",
50-
"babel-plugin-istanbul": "^4.1.6",
51-
"babel-plugin-transform-class-properties": "^6.24.1",
52-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
53-
"babel-plugin-transform-strict-mode": "^6.24.1",
54-
"babel-register": "^6.26.0",
42+
"@babel/cli": "^7.2.0",
43+
"@babel/core": "^7.2.2",
44+
"@babel/plugin-proposal-class-properties": "^7.2.1",
45+
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
46+
"@babel/plugin-transform-strict-mode": "^7.2.0",
47+
"@babel/register": "^7.0.0",
48+
"@makeomatic/deploy": "^8.3.0",
49+
"@semantic-release/changelog": "^3.0.1",
50+
"@semantic-release/exec": "^3.3.1",
51+
"@semantic-release/git": "7.0.5",
52+
"babel-core": "^7.0.0-bridge.0",
53+
"babel-eslint": "^10.0.1",
54+
"babel-jest": "^23.4.2",
55+
"babel-plugin-istanbul": "^5.1.0",
5556
"cheerio": "^1.0.0-rc.2",
56-
"codecov": "^3.0.2",
57-
"cross-env": "^5.1.5",
58-
"eslint": "^4.19.1",
59-
"eslint-config-makeomatic": "^2.0.1",
60-
"eslint-plugin-import": "^2.11.0",
61-
"eslint-plugin-promise": "^3.7.0",
62-
"jest": "^23.0.0",
57+
"codecov": "^3.1.0",
58+
"cross-env": "^5.2.0",
59+
"eslint": "^5.10.0",
60+
"eslint-config-makeomatic": "^3.0.0",
61+
"eslint-plugin-import": "^2.14.0",
62+
"eslint-plugin-promise": "^4.0.1",
63+
"jest": "^23.6.0",
6364
"json": "^9.0.6",
6465
"rimraf": "^2.6.2"
6566
},
@@ -76,5 +77,11 @@
7677
],
7778
"collectCoverage": true,
7879
"testEnvironment": "node"
80+
},
81+
"husky": {
82+
"hooks": {
83+
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
84+
"prepare-commit-msg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $HUSKY_GIT_PARAMS"
85+
}
7986
}
8087
}

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const Mservice = require('@microfleet/core');
1+
const { Microfleet, ConnectorsTypes } = require('@microfleet/core');
22
const merge = require('lodash/merge');
33

44
const Mustache = require('./utils/mustache');
@@ -9,7 +9,7 @@ const Chrome = require('./utils/chrome');
99
* @param {Object} opts - any overrides
1010
* @returns {Mailer}
1111
*/
12-
module.exports = class PdfPrinter extends Mservice {
12+
module.exports = class PdfPrinter extends Microfleet {
1313
/**
1414
* Default options that are merged into core
1515
* @type {Object}
@@ -31,13 +31,13 @@ module.exports = class PdfPrinter extends Mservice {
3131
Mustache(config);
3232

3333
// propagate logger to chrome
34-
if (this._log) config.chrome.logger = this._log.child({ component: 'chrome' });
34+
config.chrome.logger = this.log.child({ component: 'chrome' });
3535

3636
// define chrome config
3737
const chrome = this.chrome = new Chrome(this.config.chrome);
3838

3939
// add connectors & disconnectors
40-
this.addConnector(Mservice.ConnectorsTypes.essential, chrome.init.bind(chrome));
41-
this.addDestructor(Mservice.ConnectorsTypes.essential, chrome.kill.bind(chrome));
40+
this.addConnector(ConnectorsTypes.essential, chrome.init.bind(chrome));
41+
this.addDestructor(ConnectorsTypes.essential, chrome.kill.bind(chrome));
4242
}
4343
};

0 commit comments

Comments
 (0)