Skip to content

Update dependency sinon to v22.1.0#842

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/sinon-22.x
Open

Update dependency sinon to v22.1.0#842
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/sinon-22.x

Conversation

@renovate

@renovate renovate Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
sinon (source) 22.0.022.1.0 age confidence

Release Notes

sinonjs/sinon (sinon)

v22.1.0

Compare Source

  • d36e921b
    fix: let returns override returnsArg (王胜)

    Signed-off-by: 王胜 <2318857637@​qq.com>

  • 40c4caa0
    fix: align restoreObject docs test with idempotent behavior (#​2745) (Julia Miller)

    restoreObject was made idempotent in #​2737 — it no longer throws
    for objects with no restorable methods. Updates the docs page
    and its corresponding test to reflect this.

  • a68dac19
    fix: throw a clear error when throwArg index equals the argument count (#​2743) (spokodev)
    • fix: throw a clear error when throwArg index equals the argument count

    spyCall.throwArg(pos) guarded with pos > this.args.length, so calling it
    with pos equal to the number of recorded arguments slipped past the guard
    and reached throw this.args[pos], throwing undefined instead of the
    intended TypeError. A thrown undefined cannot be inspected as an Error and
    is reported by test frameworks as no exception thrown.

    Use >= to match ensureArgs in behavior.js and the sibling callArg helpers,
    which already reject an out-of-range index with a clear error.

  • 9ea504e3
    feat: make sinon.restoreObject idempotent (#​2737) (Ilia Choly)

    Passing an object with no live fakes to restoreObject now restores
    nothing instead of throwing, giving it symmetry with sinon.restore()
    and sandbox.restore(). The strict "found no methods" check is retained
    for spy(object) and stub(object), which now use a dedicated
    walkObjectStrict export, while restoreObject uses the loose walkObject.
    Passing a falsy value still throws.

    Fixes #​2736

  • 4db4feff
    fix: preserve fake undefined argument validation (Vishal Kumar Singh)
  • 755a40d7
    fix: isolate callId counter per sandbox for parallel test support (Vishal Kumar Singh)

    The global callId counter in proxy-invoke.js caused calledImmediatelyBefore
    and calledImmediatelyAfter to fail when tests run in parallel with separate
    sandboxes. Each sandbox now maintains its own callId counter, passed through
    the spy/stub/fake creation chain via a context object.

    Fixes #​2472

Released by Morgan Roderick on 2026-07-20.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.85%. Comparing base (69c09b2) to head (78a3597).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #842   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files         103      103           
  Lines        3403     3403           
  Branches      604      604           
=======================================
  Hits         3330     3330           
  Misses         22       22           
  Partials       51       51           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants