Skip to content

Commit 2eded7f

Browse files
alecgibsonclaude
andcommitted
⬆️ Bump sinon-chai to support chai@6
Dependabot bumped `chai` to v6, but CI then fails at `npm install`: npm error ERESOLVE unable to resolve dependency tree npm error peer chai@"^4.0.0" from sinon-chai@3.7.0 `sinon-chai@3.7.0` only peer-depends on `chai@^4`, so it can't coexist with `chai@6`. This change bumps `sinon-chai` to `^4.0.1`, whose peer range is `chai@^5 || ^6`, which clears the conflict. `sinon-chai@4` ships as ESM with a default export, so under Node's `require(esm)` interop `require('sinon-chai')` resolves to the module namespace rather than the plugin function; we now reach for `.default` so `chai.use()` gets the function it expects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ae9a6bd commit 2eded7f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"sharedb": "^6.0.0",
2727
"sharedb-mingo-memory": "^5.0.0",
2828
"sinon": "^22.0.0",
29-
"sinon-chai": "^3.7.0"
29+
"sinon-chai": "^4.0.1"
3030
},
3131
"scripts": {
3232
"lint": "./node_modules/.bin/eslint .",

test/test_mongo_middleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var async = require('async');
22
var sinon = require('sinon');
33
var chai = require('chai');
4-
chai.use(require('sinon-chai'));
4+
chai.use(require('sinon-chai').default);
55
var expect = chai.expect;
66
var ShareDbMongo = require('..');
77
var mongodb = require('./../mongodb');

0 commit comments

Comments
 (0)