From e269f5b5b8ae11ae95ec510314cf8a1adf7ba510 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 3 Oct 2019 00:16:12 -0500 Subject: [PATCH] fix(dependencies): switched to the scoped version of boom --- package-lock.json | 169 ++++++++++++++++++++++++++++--- package.json | 4 +- src/router-wrapper.js | 4 +- test/unit/router-wrapper-test.js | 6 +- 4 files changed, 164 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90c5d120..e20ed448 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1895,6 +1895,17 @@ "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/address": { @@ -1922,9 +1933,9 @@ } }, "@hapi/boom": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.3.tgz", - "integrity": "sha512-3di+R+BcGS7HKy67Zi6mIga8orf67GdR0ubDEVBG1oqz3y9B70LewsuCMCSvWWLKlI6V1+266zqhYzjMrPGvZw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-8.0.1.tgz", + "integrity": "sha512-SnBM2GzEYEA6AGFKXBqNLWXR3uNBui0bkmklYXX1gYtevVhDTy2uakwkSauxvIWMtlANGRhzChYg95If3FWCwA==", "dev": true, "requires": { "@hapi/hoek": "8.x.x" @@ -1938,6 +1949,17 @@ "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/bourne": { @@ -1954,6 +1976,17 @@ "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/catbox": { @@ -1966,6 +1999,17 @@ "@hapi/hoek": "8.x.x", "@hapi/joi": "15.x.x", "@hapi/podium": "3.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/catbox-memory": { @@ -1976,6 +2020,17 @@ "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/content": { @@ -1985,6 +2040,17 @@ "dev": true, "requires": { "@hapi/boom": "7.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/cryptiles": { @@ -1994,6 +2060,17 @@ "dev": true, "requires": { "@hapi/boom": "7.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/file": { @@ -2037,6 +2114,17 @@ "@hapi/subtext": "6.x.x", "@hapi/teamwork": "3.x.x", "@hapi/topo": "3.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/heavy": { @@ -2048,6 +2136,17 @@ "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x", "@hapi/joi": "15.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/hoek": { @@ -2066,6 +2165,17 @@ "@hapi/boom": "7.x.x", "@hapi/cryptiles": "4.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/joi": { @@ -2111,6 +2221,17 @@ "@hapi/content": "4.x.x", "@hapi/hoek": "8.x.x", "@hapi/nigel": "3.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/podium": { @@ -2156,6 +2277,17 @@ "@hapi/hoek": "8.x.x", "@hapi/iron": "5.x.x", "@hapi/joi": "15.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/subtext": { @@ -2171,6 +2303,17 @@ "@hapi/hoek": "8.x.x", "@hapi/pez": "4.x.x", "@hapi/wreck": "15.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@hapi/teamwork": { @@ -2206,6 +2349,17 @@ "@hapi/boom": "7.x.x", "@hapi/bourne": "1.x.x", "@hapi/hoek": "8.x.x" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + } } }, "@marionebl/sander": { @@ -2787,15 +2941,6 @@ "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", "dev": true }, - "boom": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-6.0.0.tgz", - "integrity": "sha512-LYLa8BmiiOWjvxTMVh73lcZzd2E5yczrKvxAny1UuzO2tkarLrw4tdp3rdfmus3+YfKcZP0vRSM3Obh+fGK6eA==", - "dev": true, - "requires": { - "hoek": "5.x.x" - } - }, "bowser": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.3.tgz", diff --git a/package.json b/package.json index 738fa12d..cba8e936 100644 --- a/package.json +++ b/package.json @@ -46,12 +46,12 @@ "@babel/node": "^7.6.1", "@babel/plugin-external-helpers": "^7.2.0", "@babel/register": "^7.6.0", + "@hapi/boom": "^8.0.1", "@hapi/glue": "^6.1.1", "@travi/any": "^2.0.3", "@travi/babel-preset": "^3.0.0", "@travi/eslint-config-travi": "^1.8.4", "@travi/hapi-html-request-router": "^3.0.0", - "boom": "^6.0.0", "chai": "^4.2.0", "chai-as-promised": "7.1.1", "codecov": "^3.5.0", @@ -83,7 +83,7 @@ "vision": "^5.4.4" }, "peerDependencies": { - "boom": "^6.0.0", + "@hapi/boom": "^8.0.0", "@hapi/hapi": "^18.0.0", "react": "^16.0.0", "react-dom": "^16.0.0", diff --git a/src/router-wrapper.js b/src/router-wrapper.js index 7a48446f..c8286430 100644 --- a/src/router-wrapper.js +++ b/src/router-wrapper.js @@ -1,4 +1,4 @@ -import Boom from 'boom'; +import Boom from '@hapi/boom'; import {MOVED_PERMANENTLY, MOVED_TEMPORARILY} from 'http-status-codes'; import matchRoute from './route-matcher'; import fetchData from './data-fetcher'; @@ -31,6 +31,6 @@ export default async function renderThroughReactRouter(request, h, {render, rout }); } } catch (e) { - throw Boom.wrap(e); + throw Boom.boomify(e); } } diff --git a/test/unit/router-wrapper-test.js b/test/unit/router-wrapper-test.js index d71c15b8..2ed52a82 100644 --- a/test/unit/router-wrapper-test.js +++ b/test/unit/router-wrapper-test.js @@ -2,7 +2,7 @@ import {MOVED_PERMANENTLY, MOVED_TEMPORARILY} from 'http-status-codes'; import sinon from 'sinon'; import {assert} from 'chai'; import any from '@travi/any'; -import Boom from 'boom'; +import Boom from '@hapi/boom'; import renderThroughReactRouter from '../../src/router-wrapper'; import * as defaultRenderFactory from '../../src/default-render-factory'; import * as routeMatcher from '../../src/route-matcher'; @@ -22,7 +22,7 @@ suite('router-wrapper', () => { sandbox.stub(routeMatcher, 'default'); sandbox.stub(dataFetcher, 'default'); - sandbox.stub(Boom, 'wrap'); + sandbox.stub(Boom, 'boomify'); sandbox.stub(defaultRenderFactory, 'default'); }); @@ -128,7 +128,7 @@ suite('router-wrapper', () => { const error = new Error('from test'); const wrappedError = any.simpleObject(); routeMatcher.default.rejects(error); - Boom.wrap.withArgs(error).returns(wrappedError); + Boom.boomify.withArgs(error).returns(wrappedError); return assert.isRejected(renderThroughReactRouter({raw: {req: {url: any.string()}}}, reply, {}), wrappedError); });