From 8dc0cb6c943b63cd967f037705abdc79d60e4aea Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Thu, 2 Oct 2025 14:05:56 -0500 Subject: [PATCH] Major update: (#8158) - bump pQueue: https://github.com/sindresorhus/p-queue/releases/tag/v9.0.0 - throwOnTimeout is removed (and is always `true`) - 0 is not a valid timeout, so, updated tests to pass a big number (no normal code path assumes 0) - happy dom: breaking changes: removed commonjs, new jest; nothing affects us --- lib/compilation-queue.ts | 8 ++------ package-lock.json | 28 ++++++++++++++-------------- package.json | 4 ++-- test/handlers/health-check-tests.ts | 8 ++++---- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/lib/compilation-queue.ts b/lib/compilation-queue.ts index 81332f553..fac3bd25d 100644 --- a/lib/compilation-queue.ts +++ b/lib/compilation-queue.ts @@ -61,11 +61,7 @@ export class CompilationQueue { private readonly _staleAfterMs: number; constructor(concurrency: number, timeout: number, staleAfterMs: number) { - this._queue = new Queue({ - concurrency, - timeout, - throwOnTimeout: true, - }); + this._queue = new Queue({concurrency, timeout}); this._staleAfterMs = staleAfterMs; } @@ -112,7 +108,7 @@ export class CompilationQueue { queueCompleted.inc(); } }, - {priority: options?.highPriority ? 100 : 0, throwOnTimeout: true, timeout: undefined}, + {priority: options?.highPriority ? 100 : 0, timeout: undefined}, ); } diff --git a/package-lock.json b/package-lock.json index 453f62a7a..fcc26ba48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "monaco-vim": "^0.4.2", "morgan": "^1.10.1", "node-targz": "^0.2.0", - "p-queue": "^8.1.1", + "p-queue": "^9.0.0", "path-browserify": "^1.0.1", "profanities": "^3.0.1", "prom-client": "^15.1.3", @@ -102,7 +102,7 @@ "css-minimizer-webpack-plugin": "^7.0.2", "cypress": "^15.3.0", "file-loader": "^6.2.0", - "happy-dom": "^18.0.1", + "happy-dom": "^19.0.2", "husky": "^9.1.7", "lint-staged": "^16.2.3", "mini-css-extract-plugin": "^2.9.4", @@ -9367,9 +9367,9 @@ "license": "ISC" }, "node_modules/happy-dom": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-18.0.1.tgz", - "integrity": "sha512-qn+rKOW7KWpVTtgIUi6RVmTBZJSe2k0Db0vh1f7CWrWclkkc7/Q+FrOfkZIb2eiErLyqu5AXEzE7XthO9JVxRA==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-19.0.2.tgz", + "integrity": "sha512-831CLbgDyjRbd2lApHZFsBDe56onuFcjsCBPodzWpzedTpeDr8CGZjs7iEIdNW1DVwSFRecfwzLpVyGBPamwGA==", "dev": true, "license": "MIT", "dependencies": { @@ -12155,16 +12155,16 @@ } }, "node_modules/p-queue": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz", - "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.0.0.tgz", + "integrity": "sha512-KO1RyxstL9g1mK76530TExamZC/S2Glm080Nx8PE5sTd7nlduDQsAfEl4uXX+qZjLiwvDauvzXavufy3+rJ9zQ==", "license": "MIT", "dependencies": { "eventemitter3": "^5.0.1", - "p-timeout": "^6.1.2" + "p-timeout": "^7.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12177,12 +12177,12 @@ "license": "MIT" }, "node_modules/p-timeout": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz", - "integrity": "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.0.tgz", + "integrity": "sha512-DhZ7ydOE3JXtXzDf2wz/KEamkKAD7Il5So09I2tOz4i+9pLcdghDKKmODkkoHKJ0TyczmhcHNxyTeTrsENT81A==", "license": "MIT", "engines": { - "node": ">=14.16" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" diff --git a/package.json b/package.json index fb4a1eeb9..a2cf44ed9 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "monaco-vim": "^0.4.2", "morgan": "^1.10.1", "node-targz": "^0.2.0", - "p-queue": "^8.1.1", + "p-queue": "^9.0.0", "path-browserify": "^1.0.1", "profanities": "^3.0.1", "prom-client": "^15.1.3", @@ -111,7 +111,7 @@ "css-minimizer-webpack-plugin": "^7.0.2", "cypress": "^15.3.0", "file-loader": "^6.2.0", - "happy-dom": "^18.0.1", + "happy-dom": "^19.0.2", "husky": "^9.1.7", "lint-staged": "^16.2.3", "mini-css-extract-plugin": "^2.9.4", diff --git a/test/handlers/health-check-tests.ts b/test/handlers/health-check-tests.ts index 7aa7185ae..c24d8015e 100644 --- a/test/handlers/health-check-tests.ts +++ b/test/handlers/health-check-tests.ts @@ -38,7 +38,7 @@ describe('Health checks', () => { const compileHandlerMock = { hasLanguages: () => true, }; - compilationQueue = new CompilationQueue(1, 0, 0); + compilationQueue = new CompilationQueue(1, 1000 * 1000, 1000 * 1000); app = express(); const controller = new HealthcheckController(compilationQueue, null, compileHandlerMock, false); app.use(controller.createRouter()); @@ -67,7 +67,7 @@ describe('Health checks without lang/comp', () => { const compileHandlerMock = { hasLanguages: () => false, }; - compilationQueue = new CompilationQueue(1, 0, 0); + compilationQueue = new CompilationQueue(1, 1000 * 1000, 1000 * 1000); app = express(); const controller = new HealthcheckController(compilationQueue, null, compileHandlerMock, false); app.use(controller.createRouter()); @@ -86,7 +86,7 @@ describe('Health checks without lang/comp but in execution worker mode', () => { const compileHandlerMock = { hasLanguages: () => false, }; - compilationQueue = new CompilationQueue(1, 0, 0); + compilationQueue = new CompilationQueue(1, 1000 * 1000, 1000 * 1000); app = express(); const controller = new HealthcheckController(compilationQueue, null, compileHandlerMock, true); app.use(controller.createRouter()); @@ -105,7 +105,7 @@ describe('Health checks on disk', () => { const compileHandlerMock = { hasLanguages: () => true, }; - const compilationQueue = new CompilationQueue(1, 0, 0); + const compilationQueue = new CompilationQueue(1, 1000 * 1000, 1000 * 1000); healthyApp = express(); const hc1 = new HealthcheckController(compilationQueue, '/fake/.health', compileHandlerMock, false);