Skip to content

Commit

Permalink
chore(deps): update dependency @middy/core to v3 (#122)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @middy/core to v3

* fix: adjust middleware order for middy v3

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Wojciech Iskra <wojciech.iskra@schibsted.com>
  • Loading branch information
3 people authored May 19, 2022
1 parent 641cee1 commit e8ede83
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,6 @@ test('Keep headers already present in the response on error from disallowed orig
throw new createError.InternalServerError('whoops');
});

// eslint-disable-next-line no-shadow
handler.onError(async (handler) => {
// eslint-disable-next-line no-param-reassign
handler.response = {
headers: {
someHeader: 'someValue',
},
};
});

handler.use(
middleware({
allowedOrigins: ['https://www.vg.no', 'https://www.tek.no'],
Expand All @@ -285,6 +275,16 @@ test('Keep headers already present in the response on error from disallowed orig
})
);

// eslint-disable-next-line no-shadow
handler.onError(async (handler) => {
// eslint-disable-next-line no-param-reassign
handler.response = {
headers: {
someHeader: 'someValue',
},
};
});

await expect(
handler(
{
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@commitlint/cli": "17.0.0",
"@commitlint/config-conventional": "17.0.0",
"@release-it/conventional-changelog": "5.0.0",
"@middy/core": "2.5.7",
"@middy/core": "3.0.3",
"eslint": "8.15.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "8.5.0",
Expand Down

0 comments on commit e8ede83

Please sign in to comment.