Skip to content

Commit 1589ca9

Browse files
committed
Update to Express v5
1 parent 31492c2 commit 1589ca9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"@types/common-tags": "1.8.1",
103103
"@types/connect": "3.4.35",
104104
"@types/dns2": "1.4.0",
105-
"@types/express": "4.17.13",
105+
"@types/express": "5.0.6",
106106
"@types/lodash": "4.14.178",
107107
"@types/mocha": "8.2.3",
108108
"@types/native-duplexpair": "^1.0.0",
@@ -176,7 +176,7 @@
176176
"cors": "^2.8.4",
177177
"cors-gate": "^1.1.3",
178178
"destroyable-server": "^1.1.1",
179-
"express": "^4.14.0",
179+
"express": "^5.2.1",
180180
"fast-json-patch": "^3.1.1",
181181
"graphql": "^14.0.2 || ^15.5 || ^16.0.0",
182182
"graphql-http": "^1.22.0",

src/admin/admin-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class AdminServer<Plugins extends { [key: string]: AdminPlugin<any, any>
240240
// Dynamically route to mock sessions ourselves, so we can easily add/remove
241241
// sessions as we see fit later on.
242242
const sessionRequest = (req: express.Request, res: express.Response, next: express.NextFunction) => {
243-
const sessionId = req.params.id;
243+
const sessionId = req.params.id as string;
244244
const sessionRouter = this.sessions[sessionId]?.router;
245245

246246
if (!sessionRouter) {
@@ -297,7 +297,7 @@ export class AdminServer<Plugins extends { [key: string]: AdminPlugin<any, any>
297297
if (this.server) throw new Error('Admin server already running');
298298

299299
await new Promise<void>((resolve, reject) => {
300-
this.server = makeDestroyable(this.app.listen(listenOptions, resolve));
300+
this.server = makeDestroyable(this.app.listen(listenOptions, () => resolve()));
301301

302302
this.server.on('error', reject);
303303

0 commit comments

Comments
 (0)