From 88ac17fad1e64c783d4d8c3ccecc21c90b628c61 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Wed, 11 Sep 2024 16:59:06 +0900 Subject: [PATCH] Fix #2242 by upgrading express and its dependencies to newer major versions --- package.json | 2 +- src/receivers/ExpressReceiver.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7a4cab0ff..52358cd00 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@types/promise.allsettled": "^1.0.3", "@types/tsscmp": "^1.0.0", "axios": "^1.7.4", - "express": "^4.21.0", + "express": "^5.0.0", "path-to-regexp": "^8.1.0", "promise.allsettled": "^1.0.2", "raw-body": "^2.3.3", diff --git a/src/receivers/ExpressReceiver.spec.ts b/src/receivers/ExpressReceiver.spec.ts index 8497be08f..af3a7c1b3 100644 --- a/src/receivers/ExpressReceiver.spec.ts +++ b/src/receivers/ExpressReceiver.spec.ts @@ -529,7 +529,7 @@ describe('ExpressReceiver', function () { // Act const req = { body: { }, url: 'http://localhost/slack/oauth_redirect', method: 'GET' } as Request; const resp = { send: () => { } } as Response; - (receiver.router as any).handle(req, resp); + (receiver.router as any).handle(req, resp, () => {}); // Assert assert(handleStub.calledWith(req, resp, callbackOptions), 'installer.handleCallback not called'); @@ -552,7 +552,7 @@ describe('ExpressReceiver', function () { // Act const req = { body: { }, url: 'http://localhost/slack/oauth_redirect', method: 'GET' } as Request; const resp = { send: () => { } } as Response; - (receiver.router as any).handle(req, resp); + (receiver.router as any).handle(req, resp, () => {}); // Assert assert(handleStub.calledWith(req, resp, callbackOptions, sinon.match({ scopes })), 'installer.handleCallback not called');