Skip to content

Commit e6dfd24

Browse files
feat: bump express version (#12045)
* feat: bump express version Signed-off-by: eternityduck <[email protected]> * fix: update jest versions and tests Signed-off-by: eternityduck <[email protected]> * fix: express 5 route matchers Signed-off-by: eternityduck <[email protected]> * fix: path regexp version update Signed-off-by: eternityduck <[email protected]> * fix: tests Signed-off-by: eternityduck <[email protected]> * chore: sync lock file Signed-off-by: eternityduck <[email protected]> * fix: missing package Signed-off-by: eternityduck <[email protected]> * chore: remove unneeded file Signed-off-by: eternityduck <[email protected]> --------- Signed-off-by: eternityduck <[email protected]> Co-authored-by: Alex <[email protected]>
1 parent 83ebc38 commit e6dfd24

File tree

5 files changed

+2684
-3923
lines changed

5 files changed

+2684
-3923
lines changed

frontend/server/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function createUIServer(options: UIConfigs) {
101101
const registerHandler = getRegisterHandler(app, basePath);
102102

103103
/** log to stdout */
104-
app.use((req, _, next) => {
104+
app.use((req, res, next) => {
105105
console.info(req.method + ' ' + req.originalUrl);
106106
next();
107107
});

frontend/server/integration-tests/artifact-proxy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('/artifacts/get namespaced proxy', () => {
4848
const receivedUrls: string[] = [];
4949
const artifactService = express();
5050
const response = `artifact service in ${namespace}`;
51-
artifactService.all('/*', (req, res) => {
51+
artifactService.use((req, res) => {
5252
receivedUrls.push(req.url);
5353
res.status(200).send(response);
5454
});

frontend/server/minio-helper.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ describe('minio-helper', () => {
184184
mockedMinioGetObject = minioClient.getObject as any;
185185
});
186186

187-
it('unpacks a gzipped tarball', async done => {
187+
it('unpacks a gzipped tarball', async () => {
188188
const objStream = new PassThrough();
189189
objStream.end(tarGzBuffer);
190190
mockedMinioGetObject.mockResolvedValueOnce(Promise.resolve(objStream));
@@ -198,11 +198,10 @@ describe('minio-helper', () => {
198198
.toString()
199199
.trim(),
200200
).toBe('hello world');
201-
done();
202201
});
203202
});
204203

205-
it('unpacks a uncompressed tarball', async done => {
204+
it('unpacks a uncompressed tarball', async () => {
206205
const objStream = new PassThrough();
207206
objStream.end(tarBuffer);
208207
mockedMinioGetObject.mockResolvedValueOnce(Promise.resolve(objStream));
@@ -216,11 +215,10 @@ describe('minio-helper', () => {
216215
.toString()
217216
.trim(),
218217
).toBe('hello world');
219-
done();
220218
});
221219
});
222220

223-
it('returns the content as a stream', async done => {
221+
it('returns the content as a stream', async () => {
224222
const objStream = new PassThrough();
225223
objStream.end('hello world');
226224
mockedMinioGetObject.mockResolvedValueOnce(Promise.resolve(objStream));
@@ -234,7 +232,6 @@ describe('minio-helper', () => {
234232
.toString()
235233
.trim(),
236234
).toBe('hello world');
237-
done();
238235
});
239236
});
240237
});

0 commit comments

Comments
 (0)