Skip to content

Commit 7ba3261

Browse files
authored
Merge pull request #186 from curveball/update-deps6
Update dependencies
2 parents 0f333d0 + e4cd5a1 commit 7ba3261

10 files changed

Lines changed: 1598 additions & 1448 deletions

File tree

‎.eslintrc.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"SwitchCase": 1
2727
}],
2828
"linebreak-style": ["error", "unix"],
29+
"no-constant-condition": ["error", {
30+
"checkLoops": false
31+
}],
2932
"quotes": ["error", "single",
3033
{
3134
"allowTemplateLiterals": false,

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2021 Evert Pot
3+
Copyright (c) 2018-2022 Evert Pot
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎changelog.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
0.16.4 (2022-01-05)
5+
-------------------
6+
7+
* Update all dependencies and ensure compatibility with latest Typescript
8+
changes.
9+
10+
411
0.16.3 (2021-05-06)
512
-------------------
613

‎package-lock.json‎

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

‎package.json‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@
3535
"devDependencies": {
3636
"@types/accepts": "^1.3.5",
3737
"@types/chai": "^4.2.15",
38-
"@types/co-body": "^5.1.0",
39-
"@types/mocha": "^8.2.1",
38+
"@types/co-body": "^6.1.0",
39+
"@types/mocha": "^9.0.0",
4040
"@types/node": "^12.20.12",
4141
"@types/node-fetch": "^2.5.8",
42-
"@types/sinon": "^9.0.10",
43-
"@typescript-eslint/eslint-plugin": "^4.15.1",
44-
"@typescript-eslint/parser": "^4.15.1",
42+
"@types/sinon": "^10.0.6",
43+
"@typescript-eslint/eslint-plugin": "^5.9.0",
44+
"@typescript-eslint/parser": "^5.9.0",
4545
"chai": "^4.3.0",
46-
"eslint": "^7.20.0",
47-
"mocha": "^8.3.0",
46+
"eslint": "^8.6.0",
47+
"mocha": "^9.1.3",
4848
"node-fetch": "^2.6.1",
4949
"nyc": "^15.1.0",
50-
"sinon": "^9.2.4",
51-
"ts-node": "^9.1.1",
50+
"sinon": "^12.0.1",
51+
"ts-node": "^10.4.0",
5252
"typescript": "^4.1.5"
5353
},
5454
"types": "dist/",
@@ -59,10 +59,10 @@
5959
},
6060
"dependencies": {
6161
"@curveball/http-errors": "^0.4.0",
62-
"@types/ws": "^7.2.9",
62+
"@types/ws": "^7.4.7",
6363
"accepts": "^1.3.7",
6464
"raw-body": "^2.4.1",
65-
"ws": "^7.4.3"
65+
"ws": "^7.5.6"
6666
},
6767
"engines": {
6868
"node": ">=9.4"

‎src/application.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default class Application extends EventEmitter {
140140
const ctx = this.buildContextFromHttp(req, res);
141141
await this.handle(ctx);
142142
sendBody(res, ctx.response.body);
143-
} catch (err) {
143+
} catch (err: any) {
144144
// eslint-disable-next-line no-console
145145
console.error(err);
146146

@@ -206,7 +206,7 @@ export default class Application extends EventEmitter {
206206

207207
try {
208208
await this.handle(context);
209-
} catch (err) {
209+
} catch (err: any) {
210210
// eslint-disable-next-line no-console
211211
console.error(err);
212212
if (this.listenerCount('error')) {

‎src/base-context.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export default class BaseContext<ReqT = any, ResT = any> implements Context<ReqT
191191
*
192192
* @see https://github.com/websockets/ws#simple-server
193193
*/
194-
webSocket?: WebSocket
194+
webSocket?: WebSocket;
195195

196196
}
197197

‎src/middleware/not-found.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class NoHandler extends Error implements HttpProblem {
1515

1616
detail: string;
1717
httpStatus: number;
18-
instance: null;
18+
instance: null = null;
1919
title: string;
2020
type: string;
2121

‎src/node/push.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function push(stream: http2.ServerHttp2Stream, pushCtx: Con
1919
stream,
2020
requestHeaders,
2121
);
22-
} catch (err) {
22+
} catch (err: any) {
2323
if (err.code === 'ERR_HTTP2_PUSH_DISABLED') {
2424
// HTTP/2 disabled pusing after all
2525
return;

‎test/node/push.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ describe('NodeResponse http/2 push', () => {
302302
// eslint-disable-next-line @typescript-eslint/no-empty-function
303303
});
304304

305-
} catch (e) {
305+
} catch (e: any) {
306306
console.error(e);
307307
err = e;
308308
}
@@ -335,7 +335,7 @@ describe('NodeResponse http/2 push', () => {
335335
pushCtx.request.path = '/foo';
336336
});
337337

338-
} catch (e) {
338+
} catch (e: any) {
339339
console.error(e);
340340
err = e;
341341
}
@@ -445,7 +445,7 @@ describe('push() function', () => {
445445
new MemoryResponse()
446446
)
447447
);
448-
} catch (e) {
448+
} catch (e: any) {
449449
caught = true;
450450
}
451451

0 commit comments

Comments
 (0)