From e361c79400972d060de845e18fba2945620314c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:37:37 +0000 Subject: [PATCH 1/2] Bump sinon from 11.1.2 to 22.0.0 Bumps [sinon](https://github.com/sinonjs/sinon) from 11.1.2 to 22.0.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/CHANGES.md) - [Commits](https://github.com/sinonjs/sinon/compare/v11.1.2...v22.0.0) --- updated-dependencies: - dependency-name: sinon dependency-version: 22.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0e08f3..1ee3e55 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "ot-json1": "^1.0.1", "rich-text": "^4.1.0", "sharedb": "^3.0.0 || ^4.0.0", - "sinon": "^11.1.2" + "sinon": "^22.0.0" }, "author": "Avital Oliver", "license": "MIT", From a17764b583151fe24cd08794fb2c5968003ea394 Mon Sep 17 00:00:00 2001 From: Alec Gibson <12036746+alecgibson@users.noreply.github.com> Date: Mon, 29 Jun 2026 12:05:57 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=85=20Fix=20test=20suite=20under=20`s?= =?UTF-8?q?inon@22`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `sinon@22` bump breaks the test suite. Newer Sinon fakes `process.nextTick` in `useFakeTimers()` by default, which stalls ShareDB's async callbacks (it schedules them on `nextTick`) and times the affected tests out. This bites in two places. ShareDB's own bundled `query-subscribe` suite, which we run via `require('sharedb/test/db')`, was written for `sinon@15` and times out on the `pollInterval`/`pollDebounce` tests. Bumping the `sharedb` dev dependency to `^6.0.0` pulls in a suite that targets `sinon@21+`; our `peerDependencies` already advertise `^6.0.0`. Our own `preserves doc metadata after deletion` test hits the same issue. Since it only needs a deterministic `Date` for `ctime`/`mtime`, we restrict `useFakeTimers()` to `toFake: ['Date']` so `nextTick` runs for real. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- package.json | 2 +- test/test.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1ee3e55..89c8359 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "nyc": "^14.1.1", "ot-json1": "^1.0.1", "rich-text": "^4.1.0", - "sharedb": "^3.0.0 || ^4.0.0", + "sharedb": "^6.0.0", "sinon": "^22.0.0" }, "author": "Avital Oliver", diff --git a/test/test.js b/test/test.js index a93803c..4145de3 100644 --- a/test/test.js +++ b/test/test.js @@ -30,7 +30,9 @@ describe('db', function() { }); it('preserves doc metadata after deletion', function(done) { - var clock = sinon.useFakeTimers(1000000); + // Only fake Date — newer Sinon also fakes process.nextTick by default, + // which stalls ShareDB's async callbacks and times the test out. + var clock = sinon.useFakeTimers({now: 1000000, toFake: ['Date']}); function expectMeta(property, value) { var snapshot = db._getSnapshotSync('testcollection', 'test1', true); expect(snapshot).to.have.property('m');