hapi-locale-17
Advanced tools
Comparing version 2.0.22 to 2.0.23
{ | ||
"name": "hapi-locale-17", | ||
"version": "2.0.22", | ||
"version": "2.0.23", | ||
"description": "Locale and language detection for Hapi v17", | ||
@@ -21,5 +21,4 @@ "main": "src/index.js", | ||
"lint": "eslint . --ignore-path ./.eslintignore", | ||
"test": "NODE_ENV=test mocha --recursive test", | ||
"cover": "NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha --exit --recursive test", | ||
"coveralls": "npm run cover && nyc report --reporter=lcovonly && cat ./coverage/lcov.info | coveralls", | ||
"test": "NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha --exit --recursive test", | ||
"coveralls": "nyc report --reporter=lcovonly && cat ./coverage/lcov.info | coveralls", | ||
"preversion": "npm run lint && npm test" | ||
@@ -31,15 +30,17 @@ }, | ||
"devDependencies": { | ||
"@hapi/hapi": "^18.3.2", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"coveralls": "^3.0.6", | ||
"eslint": "^6.2.0", | ||
"coveralls": "^3.0.9", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-import": "^2.20.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-should-promised": "^2.0.0", | ||
"mocha": "^6.2.0", | ||
"nyc": "^14.1.1", | ||
"sinon": "^7.4.1", | ||
"sinon-chai": "^3.3.0" | ||
"hapi18": "npm:@hapi/hapi@^18.4.0", | ||
"hapi19": "npm:@hapi/hapi@^19.0.5", | ||
"mocha": "^7.0.0", | ||
"nyc": "^15.0.0", | ||
"semver": "^7.1.1", | ||
"sinon": "^8.1.1", | ||
"sinon-chai": "^3.4.0" | ||
}, | ||
@@ -46,0 +47,0 @@ "peerDependencies": { |
@@ -1,2 +0,1 @@ | ||
const Hapi = require('@hapi/hapi'); | ||
const chai = require('chai'); | ||
@@ -7,3 +6,4 @@ const chaiAsPromised = require('chai-as-promised'); | ||
const parser = require('accept-language-parser'); // to be mocked | ||
const locale = require('../src/index'); | ||
const semver = require('semver'); | ||
const locale = require('../src/index'); // eslint-disable-line import/order | ||
@@ -18,2 +18,9 @@ chai.use(chaiAsPromised); | ||
const nodeVersion = process.version; | ||
const node12 = semver.satisfies(nodeVersion, '>=12.x.x'); | ||
const Hapi = node12 ? require('hapi19') : require('hapi18'); | ||
// eslint-disable-next-line no-console | ||
console.log(`Testing Node ${nodeVersion} and Hapi ${node12 ? '19' : '18'}`); | ||
async function setup(options = {}) { | ||
@@ -20,0 +27,0 @@ const server = new Hapi.Server({ |
Sorry, the diff of this file is not supported yet
12817
265
15