From e90abc9ac7111fe3c41cf09a63a18ba4bdcd5cc8 Mon Sep 17 00:00:00 2001 From: Martin Jonsson Date: Tue, 2 Jul 2019 11:47:13 +0200 Subject: [PATCH] Drop node 8 support and update dependencies --- .gitignore | 1 + .travis.yml | 4 +--- handlers.js | 2 +- index.js | 4 ++-- package.json | 29 ++++++++++++++--------------- test/index.test.js | 2 +- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 0972d12..a525206 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules coverage package-lock.json +.nyc_output diff --git a/.travis.yml b/.travis.yml index f21a8e0..6d4bba3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ language: node_js node_js: - - 8 + - 10 -script: - - npm run ci diff --git a/handlers.js b/handlers.js index ebf45a3..c29365d 100644 --- a/handlers.js +++ b/handlers.js @@ -1,7 +1,7 @@ 'use strict'; const Promise = require('bluebird'); -const Hoek = require('hoek'); +const Hoek = require('@hapi/hoek'); const request = require('request-prom'); exports.hook = (sns, {handlers, skipPayloadValidation, topic}) => { diff --git a/index.js b/index.js index 71bb65e..17253e9 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ 'use strict'; -const Joi = require('joi'); -const Hoek = require('hoek'); +const Joi = require('@hapi/joi'); +const Hoek = require('@hapi/hoek'); const SNS = require('./lib/sns'); const handlers = require('./handlers'); diff --git a/package.json b/package.json index 9cbd923..19e2878 100644 --- a/package.json +++ b/package.json @@ -6,15 +6,14 @@ "scripts": { "lint": "eslint --ext '.js' lib test *.js", "watch": "mocha --watch 'test/**/*.js' 'lib/**/*.js' '*.js' --timeout 500", - "test": "npm run lint && NODE_ENV=test istanbul cover -i '*.js' _mocha -- -u exports -R spec --timeout 3000 test/*.test.js test/**/*.test.js", - "ci": "npm test --coverage && istanbul report cobertura", + "test": "npm run lint && nyc --reporter=text-summary --reporter=lcov mocha --exit 'test/**/*.test.js'", "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:\" * %s\"", "release": "npm run ci && release-it -n -i patch", "release:minor": "npm run ci && release-it -n -i minor", "release:major": "npm run ci && release-it -n -i major" }, "engines": { - "node": ">=8.x.x" + "node": ">=10.x.x" }, "repository": { "type": "git", @@ -32,21 +31,21 @@ }, "homepage": "https://github.com/martinj/hookido", "dependencies": { - "aws-sdk": "^2.160.0", - "bluebird": "^3.5.1", - "hoek": "^5.0.2", - "joi": "^13.0.2", - "request-prom": "^3.1.0", - "sns-validator": "^0.3.2" + "@hapi/hoek": "^8.0.2", + "@hapi/joi": "^15.1.0", + "aws-sdk": "^2.486.0", + "bluebird": "^3.5.5", + "request-prom": "^4.0.1", + "sns-validator": "^0.3.4" }, "devDependencies": { "@aptoma/eslint-config": "^7.0.1", - "chai": "^4.1.2", - "eslint": "^4.12.1", - "hapi": "^17.1.1", - "istanbul": "^1.1.0-alpha.1", - "mocha": "^4.0.1", - "nock": "^9.1.3", + "@hapi/hapi": "^18.3.1", + "chai": "^4.2.0", + "eslint": "^6.0.1", + "mocha": "^6.1.4", + "nock": "^10.0.6", + "nyc": "^14.1.1", "release-it": "^2.7.3" } } diff --git a/test/index.test.js b/test/index.test.js index 8664211..76f22be 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,7 +1,7 @@ 'use strict'; const Promise = require('bluebird'); -const Hapi = require('hapi'); +const Hapi = require('@hapi/hapi'); const plugin = require('../'); const expect = require('chai').expect; const nock = require('nock');