Skip to content

Commit e269f5b

Browse files
committed
fix(dependencies): switched to the scoped version of boom
1 parent 8a88e67 commit e269f5b

File tree

4 files changed

+164
-19
lines changed

4 files changed

+164
-19
lines changed

package-lock.json

Lines changed: 157 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
"@babel/node": "^7.6.1",
4747
"@babel/plugin-external-helpers": "^7.2.0",
4848
"@babel/register": "^7.6.0",
49+
"@hapi/boom": "^8.0.1",
4950
"@hapi/glue": "^6.1.1",
5051
"@travi/any": "^2.0.3",
5152
"@travi/babel-preset": "^3.0.0",
5253
"@travi/eslint-config-travi": "^1.8.4",
5354
"@travi/hapi-html-request-router": "^3.0.0",
54-
"boom": "^6.0.0",
5555
"chai": "^4.2.0",
5656
"chai-as-promised": "7.1.1",
5757
"codecov": "^3.5.0",
@@ -83,7 +83,7 @@
8383
"vision": "^5.4.4"
8484
},
8585
"peerDependencies": {
86-
"boom": "^6.0.0",
86+
"@hapi/boom": "^8.0.0",
8787
"@hapi/hapi": "^18.0.0",
8888
"react": "^16.0.0",
8989
"react-dom": "^16.0.0",

src/router-wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Boom from 'boom';
1+
import Boom from '@hapi/boom';
22
import {MOVED_PERMANENTLY, MOVED_TEMPORARILY} from 'http-status-codes';
33
import matchRoute from './route-matcher';
44
import fetchData from './data-fetcher';
@@ -31,6 +31,6 @@ export default async function renderThroughReactRouter(request, h, {render, rout
3131
});
3232
}
3333
} catch (e) {
34-
throw Boom.wrap(e);
34+
throw Boom.boomify(e);
3535
}
3636
}

test/unit/router-wrapper-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {MOVED_PERMANENTLY, MOVED_TEMPORARILY} from 'http-status-codes';
22
import sinon from 'sinon';
33
import {assert} from 'chai';
44
import any from '@travi/any';
5-
import Boom from 'boom';
5+
import Boom from '@hapi/boom';
66
import renderThroughReactRouter from '../../src/router-wrapper';
77
import * as defaultRenderFactory from '../../src/default-render-factory';
88
import * as routeMatcher from '../../src/route-matcher';
@@ -22,7 +22,7 @@ suite('router-wrapper', () => {
2222

2323
sandbox.stub(routeMatcher, 'default');
2424
sandbox.stub(dataFetcher, 'default');
25-
sandbox.stub(Boom, 'wrap');
25+
sandbox.stub(Boom, 'boomify');
2626
sandbox.stub(defaultRenderFactory, 'default');
2727
});
2828

@@ -128,7 +128,7 @@ suite('router-wrapper', () => {
128128
const error = new Error('from test');
129129
const wrappedError = any.simpleObject();
130130
routeMatcher.default.rejects(error);
131-
Boom.wrap.withArgs(error).returns(wrappedError);
131+
Boom.boomify.withArgs(error).returns(wrappedError);
132132

133133
return assert.isRejected(renderThroughReactRouter({raw: {req: {url: any.string()}}}, reply, {}), wrappedError);
134134
});

0 commit comments

Comments
 (0)