Skip to content

chore(deps): update dependency sinon to v18 - autoclosed

Renovate requested to merge renovate/sinon-18.x into v4.0-dev

This MR contains the following updates:

Package Type Update Change
sinon (source) devDependencies major 2.2.0 -> 18.0.1

Release Notes

sinonjs/sinon (sinon)

v18.0.1

Compare Source

Basically a patch release to update a transitive dependency in Nise.

  • 03e33ec6 Pin fake-timers@11.2.2 to avoid breaking change (Carl-Erik Kopseng)
  • 5a7924ad Add createStubInstance header in stubs.md (Daniel Kaplan)
  • ad6804cd Bump elliptic from 6.5.5 to 6.5.7 (#​2608) (dependabot[bot])
  • 033287bd Bump path-to-regexp and nise (#​2611) (dependabot[bot])

    Bumps path-to-regexp to 8.1.0 and updates ancestor dependency nise. These dependencies need to be updated together.

    Updates path-to-regexp from 6.2.2 to 8.1.0

    Updates nise from 6.0.0 to 6.0.1


    updated-dependencies:

    • dependency-name: path-to-regexp

      dependency-type: indirect

    • dependency-name: nise

      dependency-type: direct:production

    ...

    Signed-off-by: dependabot[bot] support@github.com

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • 0c609f95 re-add testing of esm browser builds (Carl-Erik Kopseng)

    It seems unclear why it was removed in the first place: I have tested extensively that it does work and it does fail the build if changing any assertion in the script

  • da4230a0 Bump braces from 3.0.2 to 3.0.3 (#​2605) (dependabot[bot])

    Bumps braces from 3.0.2 to 3.0.3.


    updated-dependencies:

    • dependency-name: braces

      dependency-type: indirect

    ...

    Signed-off-by: dependabot[bot] support@github.com

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • 02542370 feat(ci): add node v22 (#​2600) (Rotzbua)
  • 794cb81a fix(tests): typo (#​2603) (Rotzbua)
  • 1eb2a254 Use NodeJS 22.2.0 as base development version (Carl-Erik Kopseng)
  • 1aa713fd Bump rexml from 3.2.5 to 3.2.8 (#​2599) (dependabot[bot])

    Bumps rexml from 3.2.5 to 3.2.8. >

Released by Carl-Erik Kopseng on 2024-09-10.

v18.0.0

Compare Source

This is what 17.0.2 should have been, as that contained two breaking changes. After updating Nise we are down to one breaking change, which only affects sinon-test (which has been updated), so most people are not affected. The legacyRoutes flag that is currently enabled in Nise by default will at some later version be disabled. We will then issue a little migration note.

  • 01d45312 Use Nise 6 with legacyRoutes flag enabled (Carl-Erik Kopseng)

    This should be disabled in a future Sinon version by default.

  • c618edc5 fix #​2594: remove needless sandbox creation (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2024-05-15.

v17.0.2

Compare Source

  • f6dca0ba upgrade packages (#​2595) (Carl-Erik Kopseng)
  • 5025d001 Avoid return and callArg* clearing each other's state (#​2593) (Carl-Erik Kopseng)
    • Partially revert "fix returns does not override call through (#​2567)"
    • revert to the old manual clearing of props
  • ed068a88 Bump ip from 1.1.8 to 1.1.9 (#​2587) (dependabot[bot])
  • ec4d592e fix #​2589: avoid invoking getter as side-effect (#​2592) (Carl-Erik Kopseng)
  • 9972e1e3 Fix typo in mocks documentation (#​2591) (Eduardo de la Cruz Palacios)
  • 52e6e4c5 chore: prefer cache option of setup-node (Morgan Roderick)
  • 08da1235 Bump actions/cache from 3 to 4 (dependabot[bot])
  • 404ef47e Bump nokogiri from 1.14.3 to 1.16.2 (dependabot[bot])
  • fd79612c Update Bug_report.md (Carl-Erik Kopseng)
  • 1fbc812a Re-add about (Carl-Erik Kopseng)
  • fc8f6c3e Fix formatting 🤡 (Carl-Erik Kopseng)
  • c57e38ae Remove old template (Carl-Erik Kopseng)
  • 754bf7a9 Update Bug_report.md (Carl-Erik Kopseng)
  • 87eed9d2 Fix some typos at code comments (#​2581) (EliyahuMachluf)
  • cbae6997 Link to createStubInstance util.md docs in stubs.md (#​2577) (Daniel Kaplan)
  • adcf936d Fix Mocha watch task by delegating to Node (#​2573) (Carl-Erik Kopseng)
  • 30ad2372 prettier:write (Carl-Erik Kopseng)
  • 45c4d6b9 Remove outdated info from README (#​2571) (Carl-Erik Kopseng)
  • 6c9f5c2a Add a notice that the Fake Timers API doc is incomplete (#​2570) (Carl-Erik Kopseng)
  • 93db3ef3 breaking: Remove sinon.defaultConfig and related modules (#​2565) (Carl-Erik Kopseng)
    • breaking: Remove sinon.defaultConfig and related modules

    default-config and get-config are leftovers from when Sinon

    shipped with sinon.test (now the independent NPM module

    'sinon-test').

Released by Carl-Erik Kopseng on 2024-05-07.

v17.0.1

Compare Source

Released by Carl-Erik Kopseng on 2023-11-01.

v17.0.0

Compare Source

  • 11a8e3f2 Remove Proxyquire as it did not handle newer syntax (Carl-Erik Kopseng)
  • ec37d634 Drop Node 16, as it is out of maintenance (Carl-Erik Kopseng)
  • 75e2b691 Upgrade fake-timers@11.2.2: new Intl mirroring and bugfixes (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-10-20.

v16.1.3

Compare Source

  • 93e8aa93 Remove postinstall script as it causes issues for consumers (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-10-19.

v16.1.2

Compare Source

v16.1.1

Compare Source

v16.1.0

Compare Source

  • cac5184b Enable use of assignment in the presence of accessors (#​2538) (Carl-Erik Kopseng)
  • f8c20e54 New article: making Sinon work with complex setups (#​2540) (Carl-Erik Kopseng)

    Co-authored-by: Morgan Roderick morgan@roderick.dk >

  • cb5b9621 Add NPM script 'dev-docs' and document its usage (Carl-Erik Kopseng)
  • dd7c6091 Add a little update to contributing (Carl-Erik Kopseng)
  • 79acdf38 Move tool versions into single file at root (Carl-Erik Kopseng)
  • 03b1db50 Expose Changelog page (#​2550) (Carl-Erik Kopseng)
  • e1c3dad2 Add section on tooling and recommend using ASDF for tool versioning (#​2547) (Carl-Erik Kopseng) Released by Carl-Erik Kopseng on 2023-10-05.

v16.0.0

Compare Source

  • c3396058 fix(2525): ensure non empty message when error of type string is passed, but no message (#​2544) (Mark de Dios)
  • baa1aee9 .define method (#​2539) (Konstantin Gukov)
    • .define method for temporarily defining new properties during the tests
  • fe799e78 Fix issue 2534: spies are not restored (#​2535) (Carl-Erik Kopseng)
  • 305fb6cc fix: actaully reset 'injectedKeys' (#​2456) (Morgan Roderick)
  • de2635dd Bump LTS version one notch: 20 (#​2529) (Carl-Erik Kopseng)

Released by Morgan Roderick on 2023-09-13.

v15.2.0

Compare Source

  • 66b0081e Use fake-timers v10.1.0 re-released as v10.3.0 (Carl-Erik Kopseng)

    Version 10.2.0 of fake-timers had an unexpected breaking change. We re-released 10.1.0 as 10.3.0 to force users into jumping over the deprecated version.

    v10.2.0 was re-released as v11.0.0 and will be part of the next Sinon major

  • a79ccaeb Support callable instances (#​2517) (bojavou)
    • Support callable instances
    • Clean prettier lint

    Co-authored-by: - <->

  • d220c995 fix: bundling compatibility with webpack@5 (#​2519) (Avi Vahl)
    • fix: bundling compatibility with webpack@5

    when using webpack v5 to bundle code that calls require('sinon') (cjs) , it would have defaulted to "exports->require" and fail with multiple node-api requirements (util, timers, etc.)

    this patch ensures that anyone who bundles sinon for browser gets the (browser-compatible) esm version.

    tested on both webpack v5 and v4. should be noted that v4 worked even without this patch, as it automatically injected polyfills. v5 no longer does so. with this MR, people using webpack@4 to bundle sinon at least see size improvement, as the polyfills are no longer required.

    • fix: revert change for package.json -> "browser"

    browserify doesn't seem to like esm. leave that entry point alone, and ensure "exports" -> "browser" (which webpack@5 uses) is esm.

Released by Carl-Erik Kopseng on 2023-06-20.

v15.1.2

Compare Source

  • 02b73aed Update lock file after removing node_modules ... (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-06-12.

v15.1.1

Compare Source

  • 194fc2ef Change fake-timers version to specifically target the one containing the 'jump' feature (Carl-Erik Kopseng)

    Instead of the later (breaking) version. See #​470

  • 05f05ac3 docs: Remove threw(obj) from docs (#​2513) (Morgan Roderick)

    Since the introduction of threw in

    0feec9f, no one have reported that

    threw(obj) doesn't work as the documentation states.

    const sinon = require("sinon");
    
    const o = { pie: "apple" };
    
    const f = sinon.fake.throws(o);
    
    f();
    
    // this is supposed to return true
    
    f.threw(o);
    
    // => false

    Since it has been 12+ years without an error report, it's safe to assume

    that no one uses the threw method in this way. Let's remove it from

    the documentation.

Released by Carl-Erik Kopseng on 2023-06-12.

v15.1.0

Compare Source

  • 79e719f2 Ensure we use a fake-timers version with clock.jump (Carl-Erik Kopseng)
  • b2a4df5a Add docs for clock.jump method (#​2512) (Jason O'Neill)
  • f096abff fix (#​2514): only force new or inherited descriptors to be configurable (#​2515) (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-05-18.

v15.0.4

Compare Source

  • e9042c4f Handling non-configurable object descriptors on the prototype (#​2508) (Carl-Erik Kopseng)

    This should essentially make decorated methods stubbable again (see #​2491)

  • 430c9a60 Remove uses of var (#​2506) (Carl-Erik Kopseng)

    Replace var with const where possible in /lib and /test.

    Modified the let codemod to be a codemod.

    Took about half an hour with --watch running

Released by Carl-Erik Kopseng on 2023-04-20.

v15.0.3

Compare Source

  • b775f1b4 Avoid tampering with globals and other modules' exports in tests (#​2504) (Carl-Erik Kopseng)
  • 477064b6 fix: make it possible to call through to underlying stub in stub instance (#​2503) (Carl-Erik Kopseng)

    closes #​2501

  • 6e19746e Remove dead Travis and Gitter references (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-03-26.

v15.0.2

Compare Source

  • 19bd99f3 Use no-op for every function when restoring instances (#​2499) (Carl-Erik Kopseng)
  • 8663ffa0 Upgrade deps (#​2498) (Carl-Erik Kopseng)

    Browserify, supports-color, husky had to be held back.

  • e01275bb Un-pin @​sinonjs/fake-timers (#​2495) (Jordan Hawker)

    The commit upgrading from v9 to v10 appears to have accidentally dropped the caret from the version range

  • 6cbde9b0 fix throws().callsFake() precedence (#​2497) (Eduardo Diaz)

    This makes sure an unconditional callsFake() invoked on the same stub that was previously setup to throw will overwrite the previous behavior. This aligns it with the other behaviors.

  • 45be60f3 Replace probot/stale with official stale action (Morgan Roderick)

Released by Carl-Erik Kopseng on 2023-03-12.

v15.0.1

Compare Source

  • aa493da4 Upgrade to fake-timers v10.0.2 (Carl-Erik Kopseng)

    Contains several fixes

  • b3ee0aa5 Use Node version 18 in Runkit examples (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2022-12-15.

v15.0.0

Compare Source

  • b75fbfa9 Fix 2448: remove custom formatter (Morgan Roderick)

    Remove option to pass a custom formatter.

    The sub libraries of Sinon has long moved on to use util.inspect from Node. By using that in Sinon itself, we align all the libraries.

Released by Morgan Roderick on 2022-11-28.

v14.0.2

Compare Source

Released by Morgan Roderick on 2022-11-07.

v14.0.1

Compare Source

  • 6c4753ef Fixed CSS selectors in _base.scss and changed blockquote default size to 16px. (Jose Lupianez)
  • A bunch of dependency updates

Released by Carl-Erik Kopseng on 2022-10-03.

v14.0.0

Compare Source

Released by Morgan Roderick on 2022-05-07.

v13.0.2

Compare Source

  • bddb631a Update fake-timers (Carl-Erik Kopseng)
  • eaed0eb2 Bump nokogiri from 1.13.3 to 1.13.4 (#​2451) (dependabot[bot])

Released by Carl-Erik Kopseng on 2022-04-14.

v13.0.1

Compare Source

  • ec4223f9 Bump nise to fix sinonjs/nise#193 (Carl-Erik Kopseng)
  • f329a010 Add unimported to workflow (#​2441) (Morgan Roderick)
  • 7f16cec9 Enable updates to same major version (Carl-Erik Kopseng)
  • f784d7ad Re-introduce new version.sh script to version hook (Joel Bradshaw)

    This was inadvertently removed during merge conflicts, and is required for any of the new release process stuff to work

  • 51c508ab Add dry run mode to npm version (#​2436) (Joel Bradshaw)
    • Add DRY_RUN flag to skip publish/push
    • Allow overriding branch names for testing
  • 05341dcf Update npm version scripts to manage new releases branch (Joel Bradshaw)
  • fe658261 Remove release archives from master (Joel Bradshaw)

    These archives made it difficult to find things in the GitHub interface, and take up a lot of space in a checked-out repo for something that is not useful to most people checking out the repository.

    The main purpose of these archives is to make old versions and documentation available on the Sinon website that is run out of this repo. This can be supported by using a separate branch for website releases, and to maintain the archives.

    Following this commit, the npm version scripts will be updated to automatically handle archiving the releases in the new releases branch and keeping it up to date with master.

    Also remove the directories we removed from .prettierignore, since they don't exist any more.

Released by Carl-Erik Kopseng on 2022-02-01.

v13.0.0

Compare Source

  • cf3d6c0c Upgrade packages (#​2431) (Carl-Erik Kopseng)
    • Update all @​sinonjs/ packages
    • Upgrade to fake-timers 9
    • chore: ensure always using latest LTS release
  • 41710467 Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master (#​2426) (Joel Bradshaw)

    Co-authored-by: Carl-Erik Kopseng carlerik@gmail.com

  • c80a7266 Bump node-fetch from 2.6.1 to 2.6.7 (#​2430) (dependabot[bot])

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • a00f14a9 Add explicit export for ./* (#​2413) (なつき)
  • b82ca7ad Bump cached-path-relative from 1.0.2 to 1.1.0 (#​2428) (dependabot[bot])
  • a9ea1427 Add documentation for assert.calledOnceWithMatch (#​2424) (Mathias Schreck)
  • 1d5ab86b Be more general in stripping off stack frames to fix Firefox tests (#​2425) (Joel Bradshaw)
  • 56b06129 Check call count type (#​2410) (Joel Bradshaw)
  • 7863e2df Fix #​2414: make Sinon available on homepage (Carl-Erik Kopseng)
  • fabaabdd Bump nokogiri from 1.11.4 to 1.13.1 (#​2423) (dependabot[bot])
  • dbc0fbd2 Bump shelljs from 0.8.4 to 0.8.5 (#​2422) (dependabot[bot])
  • fb8b3d72 Run Prettier (Carl-Erik Kopseng)
  • 12a45939 Fix 2377: Throw error when trying to stub non-configurable or non-writable properties (#​2417) (Stuart Dotson)

    Fixes issue #​2377 by throwing an error when trying to stub non-configurable or non-writable properties

Released by Carl-Erik Kopseng on 2022-01-28.

v12.0.1

Compare Source

  • 3f598221 Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng)
  • 51417a38 Fix bundling of cjs module (#​2412) (Julian Grinblat)

Released by Carl-Erik Kopseng on 2021-11-04.

v12.0.0

Compare Source

  • b20ef9e4 Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be, as the breaking change deals with the Node timer object created by fake timers.
  • eba42cc3 Enable esm named exports (#​2382) (Julian Grinblat)
  • b0cf5448 Spelling (#​2398) (Josh Soref)
  • e78a6706 Make calledWith() assertions idempotent (#​2407) (Joel Bradshaw)
  • 2814c0a2 Generate CHANGES.md using @​studio/changes (Morgan Roderick)

    This will bring us closer to having the same release process as the other @sinonjs packages.

  • 2d5d6ad4 Run tests in Node 16 in GitHub Actions (Morgan Roderick)

Released by Carl-Erik Kopseng on 2021-11-03.

v11.1.2

Compare Source

v11.1.1

Compare Source

  • Fix #​2379 by using v7 of supports-color

v11.1.0

Compare Source

  • Add sinon.promise() implementation (#​2369)
  • Set wrappedMethod on getters/setters (#​2378)
  • [Docs] Update fake-server usage & descriptions (#​2365)
  • Fake docs improvement (#​2360)
  • Update nise to 5.1.0 (fixed #​2318)

v11.0.0

Compare Source

  • Explicitly use samsam 6.0.2 with fix for #​2345
  • Update most packages (#​2371)
  • Update compatibility docs (#​2366)
  • Update packages (includes breaking fake-timers change, see #​2352)
  • Warn of potential memory leaks (#​2357)
  • Fix clock test errors

v10.0.1

Compare Source

  • Upgrade sinon components (bumps y18n to 4.0.1)
  • Bump y18n from 4.0.0 to 4.0.1

v10.0.0

Compare Source

v9.2.4

Compare Source

v9.2.3

Compare Source

v9.2.2

Compare Source

v9.2.1

Compare Source

  • Fix #​2203: skip writing 'name' property if not writable (#​2304)
  • Update error message on assert when representation of expected and actual value is equal, fixing issue #​2084 (#​2303)
  • Make sandboxes each use their own assert object (#​2302)
  • Add usingPromise() method on fakes to fix issue #​2293 (#​2301)

v9.2.0

Compare Source

  • Update dependencies (#​2299)
  • Update sandbox docs with missing comma
  • Add minor markdown formatting to release docs for sandbox
  • Minor formatting improvements to legacy sandbox documentation

v9.1.0

Compare Source

  • Add a calledOnceWithMatch assertion (#​2294)

v9.0.3

Compare Source

v9.0.2

Compare Source

v9.0.1

Compare Source

  • Fix #​2226: restore props defined on prototype chain by deleting

v9.0.0

Compare Source

  • Ignore errors on thisValue property accesses (#​2216)
  • Add firstArg to spy calls and fakes. (#​2150)
  • Drop Node 8 support

v8.1.1

Compare Source

v8.1.0

Compare Source

  • Support negative indices in getCall (#​2199)

v8.0.4

Compare Source

  • Remove misleading 'own' from exception message

v8.0.3

Compare Source

  • Move .printf to proxy

v8.0.2

Compare Source

v8.0.1

Compare Source

Basically a patch release to update a transitive dependency in Nise.

  • 03e33ec6 Pin fake-timers@11.2.2 to avoid breaking change (Carl-Erik Kopseng)
  • 5a7924ad Add createStubInstance header in stubs.md (Daniel Kaplan)
  • ad6804cd Bump elliptic from 6.5.5 to 6.5.7 (#​2608) (dependabot[bot])
  • 033287bd Bump path-to-regexp and nise (#​2611) (dependabot[bot])

    Bumps path-to-regexp to 8.1.0 and updates ancestor dependency nise. These dependencies need to be updated together.

    Updates path-to-regexp from 6.2.2 to 8.1.0

    Updates nise from 6.0.0 to 6.0.1


    updated-dependencies:

    • dependency-name: path-to-regexp

      dependency-type: indirect

    • dependency-name: nise

      dependency-type: direct:production

    ...

    Signed-off-by: dependabot[bot] support@github.com

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • 0c609f95 re-add testing of esm browser builds (Carl-Erik Kopseng)

    It seems unclear why it was removed in the first place: I have tested extensively that it does work and it does fail the build if changing any assertion in the script

  • da4230a0 Bump braces from 3.0.2 to 3.0.3 (#​2605) (dependabot[bot])

    Bumps braces from 3.0.2 to 3.0.3.


    updated-dependencies:

    • dependency-name: braces

      dependency-type: indirect

    ...

    Signed-off-by: dependabot[bot] support@github.com

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • 02542370 feat(ci): add node v22 (#​2600) (Rotzbua)
  • 794cb81a fix(tests): typo (#​2603) (Rotzbua)
  • 1eb2a254 Use NodeJS 22.2.0 as base development version (Carl-Erik Kopseng)
  • 1aa713fd Bump rexml from 3.2.5 to 3.2.8 (#​2599) (dependabot[bot])

    Bumps rexml from 3.2.5 to 3.2.8. >

Released by Carl-Erik Kopseng on 2024-09-10.

v8.0.0

Compare Source

This is what 17.0.2 should have been, as that contained two breaking changes. After updating Nise we are down to one breaking change, which only affects sinon-test (which has been updated), so most people are not affected. The legacyRoutes flag that is currently enabled in Nise by default will at some later version be disabled. We will then issue a little migration note.

  • 01d45312 Use Nise 6 with legacyRoutes flag enabled (Carl-Erik Kopseng)

    This should be disabled in a future Sinon version by default.

  • c618edc5 fix #​2594: remove needless sandbox creation (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2024-05-15.

v7.5.0

Compare Source

  • Add sinon.assert.calledOnceWithExactly
  • Feature parity: support spying all methods on an object

v7.4.2

Compare Source

  • Restore sinon.createStubInstance() behaviour (#​2073)
  • Fix Typo in migration 6 and updated migration docs for migration from… (#​2074)

v7.4.1

Compare Source

  • Update nise and lolex (minor versions)
  • add callThroughWithNew method
  • add browser field
  • Create COMPATIBILITY.md (#​2051)
  • Fix sinon.resetHistory() does not reset history (#​2022)

v7.3.2

Compare Source

v7.3.1

Compare Source

v7.3.0

Compare Source

  • Simplify Circle CI setup
  • Add a Docker Compose config file for testing the setup locally
  • Inject createStubInstance and fake functionality
  • Remove unused prop 'injectIntoThis'
  • Fix #​1974 by upgrading to @​sinonjs/samsam@​3.3.0

v7.2.7

Compare Source

  • Retain spy function names and fix spy.named(name) (#​1987)
  • Document spying on accessors (#​1976)

v7.2.6

Compare Source

v7.2.5

Compare Source

  • don't call extends.nonEnum in spy.resetHistory (#​1984)

v7.2.4

Compare Source

  • minor package updates
  • Update eslint-plugin-mocha
  • Fix high prio audit warnings
  • Update nise to use @​sinonjs/text-encoding
  • Make all properties non-enumerable in spies, stubs, mocks and fakes
  • docs(sandbox): add example for default sandbox

v7.2.3

Compare Source

v7.2.2

Compare Source

  • Fix mock.withArgs using matchers (#​1961)

v7.2.1

Compare Source

v7.2.0

Compare Source

  • Upgrade to samsam 3 (#​1955)
  • Rename History.md to CHANGELOG.md

v7.1.1

Compare Source

  • Make the spy functions non enumerable so that printing it is more concise (#​1936)

v7.1.0

Compare Source

  • Issue #​1852: Add a way to pass a global context to lolex when calling useFakeTimers
  • Get latest 'nise' patch

v7.0.0

Compare Source

  • 11a8e3f2 Remove Proxyquire as it did not handle newer syntax (Carl-Erik Kopseng)
  • ec37d634 Drop Node 16, as it is out of maintenance (Carl-Erik Kopseng)
  • 75e2b691 Upgrade fake-timers@11.2.2: new Intl mirroring and bugfixes (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-10-20.

v6.3.5

Compare Source

  • Upgrade lolex
  • Upgrade @​sinonjs/samsam - fixes minor issue with IE11 introduced in 6.3.4

v6.3.4

Compare Source

  • Update samsam, puppeteer and rollup
  • Fix #​1850 (keep context in fakes)

v6.3.3

Compare Source

  • Upgrade formatio, samsam, nise and referee

v6.3.2

Compare Source

  • Adds guard for empty properties in deepEqual when a matcher is provided (#​1901)

v6.3.1

Compare Source

  • Fix use of non-cached reference to forEach

v6.3.0

Compare Source

  • Allow providing stubs overrides for sinon.createStubInstance (#​1864)
  • Bump Lolex to 2.7.4 to include IE fixes for performance.mark

v6.2.0

Compare Source

  • Add mock.usingPromise to set the Promise library for mock expectations

v6.1.6

Compare Source

  • Upgrade Lolex, Nise and other dependencies

v6.1.5

Compare Source

  • Fix #​1796, failing to stub Array.prototype.sort

v6.1.4

Compare Source

  • Update lolex and nise dependencies to latest versions

v6.1.3

Compare Source

  • 93e8aa93 Remove postinstall script as it causes issues for consumers (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-10-19.

v6.1.2

Compare Source

  • Made callsArg, returnsArg, and throwsArg more strict (#​1848)

v6.1.1

Compare Source

  • Restore useFakeXMLHttpRequest correctly in default sandbox (#​1840)

v6.1.0

Compare Source

  • cac5184b Enable use of assignment in the presence of accessors (#​2538) (Carl-Erik Kopseng)
  • f8c20e54 New article: making Sinon work with complex setups (#​2540) (Carl-Erik Kopseng)

    Co-authored-by: Morgan Roderick morgan@roderick.dk >

  • cb5b9621 Add NPM script 'dev-docs' and document its usage (Carl-Erik Kopseng)
  • dd7c6091 Add a little update to contributing (Carl-Erik Kopseng)
  • 79acdf38 Move tool versions into single file at root (Carl-Erik Kopseng)
  • 03b1db50 Expose Changelog page (#​2550) (Carl-Erik Kopseng)
  • e1c3dad2 Add section on tooling and recommend using ASDF for tool versioning (#​2547) (Carl-Erik Kopseng) Released by Carl-Erik Kopseng on 2023-10-05.

v6.0.1

Compare Source

  • Add fake behaviors to sandbox (#​1815)

v6.0.0

Compare Source

  • c3396058 fix(2525): ensure non empty message when error of type string is passed, but no message (#​2544) (Mark de Dios)
  • baa1aee9 .define method (#​2539) (Konstantin Gukov)
    • .define method for temporarily defining new properties during the tests
  • fe799e78 Fix issue 2534: spies are not restored (#​2535) (Carl-Erik Kopseng)
  • 305fb6cc fix: actaully reset 'injectedKeys' (#​2456) (Morgan Roderick)
  • de2635dd Bump LTS version one notch: 20 (#​2529) (Carl-Erik Kopseng)

Released by Morgan Roderick on 2023-09-13.

v5.1.1

Compare Source

  • 194fc2ef Change fake-timers version to specifically target the one containing the 'jump' feature (Carl-Erik Kopseng)

    Instead of the later (breaking) version. See #​470

  • 05f05ac3 docs: Remove threw(obj) from docs (#​2513) (Morgan Roderick)

    Since the introduction of threw in

    0feec9f, no one have reported that

    threw(obj) doesn't work as the documentation states.

    const sinon = require("sinon");
    
    const o = { pie: "apple" };
    
    const f = sinon.fake.throws(o);
    
    f();
    
    // this is supposed to return true
    
    f.threw(o);
    
    // => false

    Since it has been 12+ years without an error report, it's safe to assume

    that no one uses the threw method in this way. Let's remove it from

    the documentation.

Released by Carl-Erik Kopseng on 2023-06-12.

v5.1.0

Compare Source

  • 79e719f2 Ensure we use a fake-timers version with clock.jump (Carl-Erik Kopseng)
  • b2a4df5a Add docs for clock.jump method (#​2512) (Jason O'Neill)
  • f096abff fix (#​2514): only force new or inherited descriptors to be configurable (#​2515) (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-05-18.

v5.0.10

Compare Source

v5.0.9

Compare Source

  • Upgrade @std/esm to esm.

v5.0.8

Compare Source

  • Add isSealed check to is-es-module to make certain ESM mocks possible

v5.0.7

Compare Source

v5.0.6

Compare Source

  • Remove support-sinon.js as postinstall banner

v5.0.5

Compare Source

  • Refuse to replace already replaced values (#​1779)

v5.0.4

Compare Source

  • e9042c4f Handling non-configurable object descriptors on the prototype (#​2508) (Carl-Erik Kopseng)

    This should essentially make decorated methods stubbable again (see #​2491)

  • 430c9a60 Remove uses of var (#​2506) (Carl-Erik Kopseng)

    Replace var with const where possible in /lib and /test.

    Modified the let codemod to be a codemod.

    Took about half an hour with --watch running

Released by Carl-Erik Kopseng on 2023-04-20.

v5.0.3

Compare Source

  • b775f1b4 Avoid tampering with globals and other modules' exports in tests (#​2504) (Carl-Erik Kopseng)
  • 477064b6 fix: make it possible to call through to underlying stub in stub instance (#​2503) (Carl-Erik Kopseng)

    closes #​2501

  • 6e19746e Remove dead Travis and Gitter references (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2023-03-26.

v5.0.2

Compare Source

  • 19bd99f3 Use no-op for every function when restoring instances (#​2499) (Carl-Erik Kopseng)
  • 8663ffa0 Upgrade deps (#​2498) (Carl-Erik Kopseng)

    Browserify, supports-color, husky had to be held back.

  • e01275bb Un-pin @​sinonjs/fake-timers (#​2495) (Jordan Hawker)

    The commit upgrading from v9 to v10 appears to have accidentally dropped the caret from the version range

  • 6cbde9b0 fix throws().callsFake() precedence (#​2497) (Eduardo Diaz)

    This makes sure an unconditional callsFake() invoked on the same stub that was previously setup to throw will overwrite the previous behavior. This aligns it with the other behaviors.

  • 45be60f3 Replace probot/stale with official stale action (Morgan Roderick)

Released by Carl-Erik Kopseng on 2023-03-12.

v5.0.1

Compare Source

  • aa493da4 Upgrade to fake-timers v10.0.2 (Carl-Erik Kopseng)

    Contains several fixes

  • b3ee0aa5 Use Node version 18 in Runkit examples (Carl-Erik Kopseng)

Released by Carl-Erik Kopseng on 2022-12-15.

v5.0.0

Compare Source

  • b75fbfa9 Fix 2448: remove custom formatter (Morgan Roderick)

    Remove option to pass a custom formatter.

    The sub libraries of Sinon has long moved on to use util.inspect from Node. By using that in Sinon itself, we align all the libraries.

Released by Morgan Roderick on 2022-11-28.

v4.5.0

Compare Source

  • Add .lastArg and .callback to spy call

v4.4.10

Compare Source

v4.4.9

Compare Source

  • Fix #​1746: Remove dependency on ES2015 code from post-install script

v4.4.8

Compare Source

  • Fix 1743: Add scripts/support-sinon.js to package

v4.4.6

Compare Source

  • Return returned value of invokant when using yields* and callsArg* (#​1724)

v4.4.5

Compare Source

  • Add postinstall banner pointing to Open Collective

v4.4.4

Compare Source

v4.4.3

Compare Source

  • Fix inconsistent newline usage for %D in spy.printf (#​1717)

v4.4.2

Compare Source

  • Add descriptive error message on attempt to call argument that is not a function (#​1695)

v4.4.1

Compare Source

  • Docs: make it clear that it is possible to use assert with spy calls (#​1688)

v4.4.0

Compare Source

  • Change return value of yield and callArg

v4.3.0

Compare Source

  • add calledOnceWithExactly assertion (#​1247)

v4.2.3

Compare Source

v4.2.2

Compare Source

  • Fix #​1638: Make resetHistory work for props

v4.2.1

Compare Source

  • Performance: spend less time stubbing methods (#​1627)

v4.2.0

Compare Source

v4.1.6

Compare Source

  • Fix bad build, missing nise@1.2.0 (#​1656)
  • Upgrade dependency supports-color

v4.1.5

Compare Source

  • Use nise.fakeServer as the sandbox serverPrototype (#​1534)

v4.1.4

Compare Source

  • Fix: assertion error messages did not handle Symbol names (#​1640)
  • Deprecate spy.reset(), use spy.resetHistory() instead (#​1446)

v4.1.3

Compare Source

  • Spy passes through calling with new (#​1626)

v4.1.2

Compare Source

  • Update Lolex to include fix for #​872
  • Remove deprecated methods from documentation (#​1613)

v4.1.1

Compare Source

  • Remove "engines" from package.json

v4.1.0

Compare Source

  • Add sandbox.createStubInstance (#​1598)

v4.0.2

Compare Source

Released by Morgan Roderick on 2022-11-07.

v4.0.1

Compare Source

  • 6c4753ef Fixed CSS selectors in _base.scss and changed blockquote default size to 16px. (Jose Lupianez)
  • A bunch of dependency updates

Released by Carl-Erik Kopseng on 2022-10-03.

v4.0.0

Compare Source

Released by Morgan Roderick on 2022-05-07.

v3.3.0

Compare Source

  • Adds sinon.match.hasNested
  • fix 'callThrough with a mock expectation' (#​1442)
  • Documentation updates
  • Allow custom defined instance checks if supported

v3.2.1

Compare Source

  • resolvesThis should override previous throws
  • preserve context of functions from nise: fakeServer, fakeServerWithClock
  • Fix regression for issue #​1526 regarding onFirstCall().throws()
  • Fix docs regression introduced by #​1523

v3.2.0

Compare Source

v3.1.0

Compare Source

  • Lots of documentation updates
  • Fix regression on sandbox.stub(obj,protoMethod)
  • Add factory functions for sandbox and fake server
  • Add support for passing a function to stub.throws(...). (#​1511)

v3.0.0

Compare Source

  • cf3d6c0c Upgrade packages (#​2431) (Carl-Erik Kopseng)
    • Update all @​sinonjs/ packages
    • Upgrade to fake-timers 9
    • chore: ensure always using latest LTS release
  • 41710467 Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master (#​2426) (Joel Bradshaw)

    Co-authored-by: Carl-Erik Kopseng carlerik@gmail.com

  • c80a7266 Bump node-fetch from 2.6.1 to 2.6.7 (#​2430) (dependabot[bot])

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@​users.noreply.github.com>

  • a00f14a9 Add explicit export for ./* (#​2413) (なつき)
  • b82ca7ad Bump cached-path-relative from 1.0.2 to 1.1.0 (#​2428) (dependabot[bot])
  • a9ea1427 Add documentation for assert.calledOnceWithMatch (#​2424) (Mathias Schreck)
  • 1d5ab86b Be more general in stripping off stack frames to fix Firefox tests (#​2425) (Joel Bradshaw)
  • 56b06129 Check call count type (#​2410) (Joel Bradshaw)
  • 7863e2df Fix #​2414: make Sinon available on homepage (Carl-Erik Kopseng)
  • fabaabdd Bump nokogiri from 1.11.4 to 1.13.1 (#​2423) (dependabot[bot])
  • dbc0fbd2 Bump shelljs from 0.8.4 to 0.8.5 (#​2422) (dependabot[bot])
  • fb8b3d72 Run Prettier (Carl-Erik Kopseng)
  • 12a45939 Fix 2377: Throw error when trying to stub non-configurable or non-writable properties (#​2417) (Stuart Dotson)

    Fixes issue #​2377 by throwing an error when trying to stub non-configurable or non-writable properties

Released by Carl-Erik Kopseng on 2022-01-28.

v2.4.1

Compare Source

  • stub#withArgs: set promiseLibrary correctly (#​1497)

v2.4.0

Compare Source

  • Allow anonymous mock functions to be named

v2.3.8

Compare Source

  • Fix 1474: propagates promiseLibrary to new stub behaviors (#​1484)

v2.3.7

Compare Source

  • Fix #​1476: spy.withArgs(args...).firstCall is broken

v2.3.6

Compare Source

  • Fix #​1274: spy.withArgs(args...).callCount is incorrect

v2.3.5

Compare Source

v2.3.4

Compare Source

v2.3.3

Compare Source

  • Fix #​1445: make stubbing of static function properties possible

v2.3.2

Compare Source

  • Fix failing sandbox.resetBehavior() (#​1428)
  • Fix restoring getters/setters/values for previously unexisting props (#​1419)
  • Called in order takes callCount into account. Closes #​1398.

v2.3.1

Compare Source

  • Make calledAfter symmetric with calledBefore (#​1407)

v2.3.0

Compare Source

  • Allow stubbing of accessors with and without sandbox (#​1416)
  • add throwsArg(index) to stubs (#​1319)
  • Fix: forEach() requires 'this' argument (#​1356)
  • Only reset history when calling resetHistory()

Configuration

📅 Schedule: 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: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

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


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

This MR has been generated by Renovate Bot.

Edited by Renovate

Merge request reports