Archived
1
0

chore(deps): update dependency @types/node to v16 (#5170)

* Update Node types to 16

* Update Express core types

Fixes a number of conflicts it has with Node 16.

* Fix websocket router types

It seems req was `any` before so now we have to handle the types.  Also
it seems the socket is of type `stream.Duplex`, not `net.Socket`.

The ws types had to be updated to support the new type.

Unfortunately Code still uses the old type so cast for now.

In the web socket router just use a cast for the extra properties we
add.  We could add the types to the Express namespace but I am not sure
we really want these commonly accessible so keep with the casts for now.
Likely we should use Express's `locals` or something instead.

* Add missing return

Not sure why it only just now started complaining though.

Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
renovate[bot]
2022-08-10 16:15:52 -05:00
committed by GitHub
parent 3335d0a456
commit 91589fd106
7 changed files with 35 additions and 26 deletions

View File

@ -42,14 +42,14 @@
"@types/express": "^4.17.8",
"@types/http-proxy": "^1.17.4",
"@types/js-yaml": "^4.0.0",
"@types/node": "^14.17.1",
"@types/node": "^16.0.0",
"@types/pem": "^1.9.5",
"@types/proxy-from-env": "^1.0.1",
"@types/safe-compare": "^1.1.0",
"@types/semver": "^7.1.0",
"@types/split2": "^3.2.0",
"@types/trusted-types": "^2.0.2",
"@types/ws": "^8.0.0",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"audit-ci": "^6.0.0",
@ -85,7 +85,8 @@
"node-fetch": "^2.6.7",
"nanoid": "^3.1.31",
"minimist": "npm:minimist-lite@2.2.1",
"glob-parent": "^6.0.1"
"glob-parent": "^6.0.1",
"@types/node": "^16.0.0"
},
"dependencies": {
"@coder/logger": "1.1.16",