From 8d5adc51e007559caaa8024f256e8f7811e9ce35 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Thu, 29 Jan 2026 11:30:06 +0100 Subject: [PATCH] chore: update devDependencies to latest versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - @sinonjs/fake-timers: ^11.2.2 → ^15.1.0 - @typescript-eslint/eslint-plugin: ^5.30.3 → ^8.54.0 - @typescript-eslint/parser: ^5.30.3 → ^8.54.0 - tsd: ^0.32.0 → ^0.33.0 - wait-on: ^8.0.0 → ^9.0.3 Fix gateway refresh test timing for fake-timers v15 compatibility. Co-Authored-By: Claude Opus 4.5 --- package.json | 10 +++++----- test/refresh.js | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index efb1683..53e95e9 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "devDependencies": { "@mercuriusjs/federation": "^5.0.0", "@mercuriusjs/gateway": "^5.0.0", - "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/fake-timers": "^15.1.0", "@types/node": "^25.0.2", "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^5.30.3", - "@typescript-eslint/parser": "^5.30.3", + "@typescript-eslint/eslint-plugin": "^8.54.0", + "@typescript-eslint/parser": "^8.54.0", "autocannon": "^8.0.0", "borp": "^0.21.0", "concurrently": "^9.0.0", @@ -49,9 +49,9 @@ "pre-commit": "^1.2.2", "snazzy": "^9.0.0", "standard": "^17.1.0", - "tsd": "^0.32.0", + "tsd": "^0.33.0", "typescript": "^5.4.2", - "wait-on": "^8.0.0" + "wait-on": "^9.0.3" }, "dependencies": { "@fastify/error": "^4.0.0", diff --git a/test/refresh.js b/test/refresh.js index b5b4139..9a25032 100644 --- a/test/refresh.js +++ b/test/refresh.js @@ -195,12 +195,14 @@ describe('gateway refresh', () => { messageService.graphql.replaceSchema(buildFederationSchema(newSchema)) messageService.graphql.defineResolvers(resolvers) - await clock.tickAsync(2000) + // Tick past the polling interval and allow async operations to settle + await clock.tickAsync(3000) - // We need the event loop to actually spin twice to + // We need the event loop to actually spin multiple times to // be able to propagate the change - await immediate() - await immediate() + for (let i = 0; i < 10; i++) { + await immediate() + } { const res = await gateway.inject({