Skip to content

Commit d698403

Browse files
authored
chore(deps): Bump sinon to 21.0.2 (#7715)
1 parent c555085 commit d698403

File tree

8 files changed

+24
-28
lines changed

8 files changed

+24
-28
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
"retry": "^0.13.1",
194194
"semifies": "^1.0.0",
195195
"semver": "^7.7.2",
196-
"sinon": "^21.0.1",
196+
"sinon": "^21.0.2",
197197
"tiktoken": "^1.0.21",
198198
"typescript": "^5.9.2",
199199
"workerpool": "^10.0.0",

packages/datadog-instrumentations/test/passport-http.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ withVersions('passport-http', 'passport-http', version => {
106106

107107
beforeEach(() => {
108108
subscriberStub = sinon.stub()
109+
sinon.reset()
109110
})
110111

111112
after(() => {
@@ -202,7 +203,7 @@ withVersions('passport-http', 'passport-http', version => {
202203
login: 'test',
203204
user: { _id: 1, username: 'test', password: '1234', email: '[email protected]' },
204205
success: true,
205-
abortController: new AbortController(),
206+
abortController: sinon.match(ac => ac instanceof AbortController && ac.signal.aborted === true),
206207
})
207208
})
208209
})

packages/datadog-instrumentations/test/passport-local.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ withVersions('passport-local', 'passport-local', version => {
177177
login: 'test',
178178
user: { _id: 1, username: 'test', password: '1234', email: '[email protected]' },
179179
success: true,
180-
abortController: new AbortController(),
180+
abortController: sinon.match(ac => ac instanceof AbortController && ac.signal.aborted === true),
181181
})
182182
})
183183
})

packages/dd-trace/test/appsec/index.express.plugin.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ withVersions('express', 'express', version => {
8282

8383
afterEach(() => {
8484
appsec.disable()
85-
// TODO: Remove the workaround once https://github.com/sinonjs/sinon/issues/2671 is resolved
86-
paramCallbackSpy.resetHistory()
8785
sinon.reset()
8886
})
8987

packages/dd-trace/test/appsec/index.fastify.plugin.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@ withVersions('fastify', 'fastify', '>=2', (fastifyVersion, _, fastifyLoadedVersi
322322

323323
afterEach(() => {
324324
appsec.disable()
325-
// TODO: Remove the workaround once https://github.com/sinonjs/sinon/issues/2671 is resolved
326-
preHandlerHookSpy.resetHistory()
327-
preValidationHookSpy.resetHistory()
328325
sinon.reset()
329326
})
330327

packages/dd-trace/test/datastreams/processor.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe('DataStreamsProcessor', () => {
293293
it('should export on interval', () => {
294294
processor.recordCheckpoint(mockCheckpoint)
295295
processor.onInterval()
296-
sinon.assert.calledWith(writer.flush, {
296+
assert.deepStrictEqual(writer.flush.lastCall.args[0], {
297297
Env: 'test',
298298
Service: 'service1',
299299
Version: 'v1',

packages/dd-trace/test/span_stats.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ describe('SpanStatsProcessor', () => {
297297
processor = new SpanStatsProcessor(config)
298298
clearTimeout(processor.timer)
299299

300-
assert.ok(SpanStatsExporter.calledWith({
300+
assert.deepStrictEqual(SpanStatsExporter.lastCall.args[0], {
301301
hostname: config.hostname,
302302
port: config.port,
303303
url: config.url,
304304
tags: config.tags,
305-
}))
305+
})
306306
assert.strictEqual(processor.interval, config.stats.interval)
307307
assert.ok(processor.buckets instanceof TimeBuckets)
308308
assert.strictEqual(processor.hostname, hostname())
@@ -362,7 +362,7 @@ describe('SpanStatsProcessor', () => {
362362
it('should export on interval', () => {
363363
processor.onInterval()
364364

365-
assert.ok(exporter.export.calledWith({
365+
assert.deepStrictEqual(exporter.export.lastCall.args[0], {
366366
Hostname: hostname(),
367367
Env: config.env,
368368
Version: config.version,
@@ -391,7 +391,7 @@ describe('SpanStatsProcessor', () => {
391391
RuntimeID: processor.tags['runtime-id'],
392392
Sequence: processor.sequence,
393393
ProcessTags: processTags.serialized,
394-
}))
394+
})
395395
})
396396

397397
it('should export on interval with default version', () => {
@@ -400,7 +400,7 @@ describe('SpanStatsProcessor', () => {
400400
const processor = new SpanStatsProcessor(versionlessConfig)
401401
processor.onInterval()
402402

403-
assert.ok(exporter.export.calledWith({
403+
assert.deepStrictEqual(exporter.export.lastCall.args[0], {
404404
Hostname: hostname(),
405405
Env: config.env,
406406
Version: version,
@@ -410,6 +410,6 @@ describe('SpanStatsProcessor', () => {
410410
RuntimeID: processor.tags['runtime-id'],
411411
Sequence: processor.sequence,
412412
ProcessTags: processTags.serialized,
413-
}))
413+
})
414414
})
415415
})

yarn.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -883,17 +883,17 @@
883883
dependencies:
884884
type-detect "4.0.8"
885885

886-
"@sinonjs/fake-timers@^15.1.0":
886+
"@sinonjs/fake-timers@^15.1.1":
887887
version "15.1.1"
888888
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-15.1.1.tgz#e1a6f7171941aadcc31d2cea1744264d58b8b34c"
889889
integrity sha512-cO5W33JgAPbOh07tvZjUOJ7oWhtaqGHiZw+11DPbyqh2kHTBc3eF/CjJDeQ4205RLQsX6rxCuYOroFQwl7JDRw==
890890
dependencies:
891891
"@sinonjs/commons" "^3.0.1"
892892

893-
"@sinonjs/samsam@^8.0.3":
894-
version "8.0.3"
895-
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.3.tgz#eb6ffaef421e1e27783cc9b52567de20cb28072d"
896-
integrity sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==
893+
"@sinonjs/samsam@^9.0.2":
894+
version "9.0.2"
895+
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-9.0.2.tgz#ff0ad0e50e41942891588989615fbc4df569b76b"
896+
integrity sha512-H/JSxa4GNKZuuU41E3b8Y3tbSEx8y4uq4UH1C56ONQac16HblReJomIvv3Ud7ANQHQmkeSowY49Ij972e/pGxQ==
897897
dependencies:
898898
"@sinonjs/commons" "^3.0.1"
899899
type-detect "^4.1.0"
@@ -1620,7 +1620,7 @@ diff@^7.0.0:
16201620
resolved "https://registry.yarnpkg.com/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a"
16211621
integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==
16221622

1623-
diff@^8.0.2:
1623+
diff@^8.0.3:
16241624
version "8.0.3"
16251625
resolved "https://registry.yarnpkg.com/diff/-/diff-8.0.3.tgz#c7da3d9e0e8c283bb548681f8d7174653720c2d5"
16261626
integrity sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==
@@ -4004,15 +4004,15 @@ signal-exit@^4.0.1:
40044004
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
40054005
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
40064006

4007-
sinon@^21.0.1:
4008-
version "21.0.1"
4009-
resolved "https://registry.yarnpkg.com/sinon/-/sinon-21.0.1.tgz#36b9126065a44906f7ba4a47b723b99315a8c356"
4010-
integrity sha512-Z0NVCW45W8Mg5oC/27/+fCqIHFnW8kpkFOq0j9XJIev4Ld0mKmERaZv5DMLAb9fGCevjKwaEeIQz5+MBXfZcDw==
4007+
sinon@^21.0.2:
4008+
version "21.0.2"
4009+
resolved "https://registry.yarnpkg.com/sinon/-/sinon-21.0.2.tgz#2dca6fc59eca5288d9f2284925e9ae586085f917"
4010+
integrity sha512-VHV4UaoxIe5jrMd89Y9duI76T5g3Lp+ET+ctLhLDaZtSznDPah1KKpRElbdBV4RwqWSw2vadFiVs9Del7MbVeQ==
40114011
dependencies:
40124012
"@sinonjs/commons" "^3.0.1"
4013-
"@sinonjs/fake-timers" "^15.1.0"
4014-
"@sinonjs/samsam" "^8.0.3"
4015-
diff "^8.0.2"
4013+
"@sinonjs/fake-timers" "^15.1.1"
4014+
"@sinonjs/samsam" "^9.0.2"
4015+
diff "^8.0.3"
40164016
supports-color "^7.2.0"
40174017

40184018
source-map@^0.6.1:

0 commit comments

Comments
 (0)