Skip to content

Commit

Permalink
add express 5 as optional version
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Dec 26, 2024
1 parent 988bf71 commit 1731150
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"@bull-board/api": "6.5.3",
"@bull-board/ui": "6.5.3",
"ejs": "^3.1.10",
"express": "^4.21.1"
"express": "^4.21.1 || ^5.0.0"
},
"devDependencies": {
"@types/ejs": "^3.1.5",
"@types/express": "^4.17.21"
"@types/express": "^4.17.21 || ^5.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/express/src/ExpressAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
UIConfig,
} from '@bull-board/api/dist/typings/app';
import ejs from 'ejs';
import express, { Express, NextFunction, Request, Response, Router } from 'express';
import express, { Express, Request, Response, Router } from 'express';
import { wrapAsync } from './helpers/wrapAsync';

export class ExpressAdapter implements IServerAdapter {
Expand Down Expand Up @@ -74,7 +74,7 @@ export class ExpressAdapter implements IServerAdapter {
)
);

router.use((err: Error, _req: Request, res: Response, next: NextFunction) => {
router.use((err: Error, _req: Request, res: Response, next: any) => {
if (!this.errorHandler) {
return next();
}
Expand Down
24 changes: 22 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3257,7 +3257,17 @@
"@types/range-parser" "*"
"@types/send" "*"

"@types/express@*", "@types/express@^4.17.21":
"@types/express-serve-static-core@^5.0.0":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.2.tgz#812d2871e5eea17fb0bd5214dda7a7b748c0e12a"
integrity sha512-vluaspfvWEtE4vcSDlKRNer52DvOGrB2xv6diXy6UKyKW0lqZiWHGNApSyxOv+8DE5Z27IzVvE7hNkxg7EXIcg==
dependencies:
"@types/node" "*"
"@types/qs" "*"
"@types/range-parser" "*"
"@types/send" "*"

"@types/express@*":
version "4.17.21"
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d"
integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==
Expand All @@ -3267,6 +3277,16 @@
"@types/qs" "*"
"@types/serve-static" "*"

"@types/express@^4.17.21 || ^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.0.tgz#13a7d1f75295e90d19ed6e74cab3678488eaa96c"
integrity sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==
dependencies:
"@types/body-parser" "*"
"@types/express-serve-static-core" "^5.0.0"
"@types/qs" "*"
"@types/serve-static" "*"

"@types/graceful-fs@^4.1.3":
version "4.1.9"
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4"
Expand Down Expand Up @@ -6385,7 +6405,7 @@ expect@^29.7.0:
jest-message-util "^29.7.0"
jest-util "^29.7.0"

express@^4.21.1:
"express@^4.21.1 || ^5.0.0":
version "4.21.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32"
integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==
Expand Down

0 comments on commit 1731150

Please sign in to comment.