NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2830 most downloaded on npm
JavaScript test spies, stubs and mocks.
Last release 2 months ago
20 Jul 2026
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 21 of 22 stable releases
199 versions withdrawn
withdrawn after publishing
16 years old
221 releases · first in 2010
`d36e921b` fix: let returns override returnsArg (王胜)
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.
One column per quarter.
`ed911df5` Update Ruby gems (Carl-Erik Kopseng)
ed911df5
Update Ruby gems (Carl-Erik Kopseng)75a1e5b8
Update to Node 26 (Carl-Erik Kopseng)197d6608
Update documentation on faking timers to reflect the current state of fake-timers (Carl-Erik Kopseng)c5ddf80b
Update fake-timers@15.4: includes new Temporal API (Carl-Erik Kopseng)f4ab02f6
Update updatable packages (Carl-Erik Kopseng)0536afc8
Quality: Global mutable call id can grow unbounded across long-lived processes (#2691) (tuanaiseo)
- refactor: global mutable call id can grow unbounded across l
callIdis module-scoped and incremented on every invocation. In long-running test runners or embedded usage, this can grow indefinitely and eventually lose integer precision semantics for strict ordering comparisons.Affected files: proxy-invoke.js
Signed-off-by: tuanaiseo 221258316+tuanaiseo@users.noreply.github.com
- Wrap around for all values that are too high
Signed-off-by: tuanaiseo 221258316+tuanaiseo@users.noreply.github.com Co-authored-by: Carl-Erik Kopseng carlerik@gmail.com
f4f7d93b
Perform additional cleanup when calling callThrough() (#2670) (Cyrille)6199e9e4
improve GitHubworkflows by introducing zizmor for monitoring (#2686) (Till!)
- fix(workflows): fetch-depth is for actions/checkout
- chore(workflows): update
- pin all actions to precise commits
- avoid credential leakage from actions/checkout
- group action updates going forward
- add zimor config to ignore "secrets outside env"
- add job to keep validating workflows
f7476b59
Use path.normalize() for path normalization (Carl-Erik Kopseng)2c975393
fix: make build and node test scripts cross-platform (laplace young)a7692917
fix: isolate walk state from Object prototype (laplace young)66df977a
Fix sinon.restore() cascade-restoring sub-sandboxes (#2704) (Charlie Leitheiser)
The ESM port of
createApi(#2683, shipped in 21.1.0) replacedcreateSandbox: createSandboxwith a wrapper that pushes every newly-created sandbox into the root sandbox's fake collection:createSandbox: function createSandbox(config) { const s = createConfiguredSandbox(config); sandbox.getFakes().push(s); return s; }
Sandbox#restorethen walks that collection and calls.restore()on each entry. Because a sub-sandbox is itself an entry, every top-levelsinon.restore()cascades into every sub-sandbox and undoes its stubs/timers/etc. — defeating the whole point of having an isolated sub-sandbox. The same cascade hitsresetHistoryandverifyAndRestore. This is the regression reported in #2701.Restore the pre-21.1 behaviour: hand the root API a direct reference to
createConfiguredSandbox. Sub-sandboxes are now isolated; onlysubSandbox.restore()(orverifyAndRestore) clears their fakes.Also flip the four sandbox tests that were locking in the buggy cascade: they now assert the parent's restore/resetHistory leaves the child untouched, with an explicit child-side cleanup at the end.
Closes #2701
f0bd6e1b
fix: exclude proto from walk() (#2699) (Kevin Locke)
__proto__is a special property to access an object's prototype. It has many pitfalls:
- Setting it to an object value changes an object's prototype, which is generally discouraged and may be unexpected by the
iteratorcallback.- Setting it to a non-object value does nothing (meaning
seen[k] = truehas no effect).- When Node.js is run with the
--disable-proto=throwoption, getting or setting__proto__causes an exception with codeERR_PROTO_ACCESSto be thrown.Additionally, since this property (and all properties of
Object.prototype) are currently unused in this project by consumers ofwalk(), it is both safe and preferable to exclude.Fixes: #2695
Signed-off-by: Kevin Locke kevin@kevinlocke.name
1f8afd50
chore: add context7.json for ownership confirmation (Morgan Roderick)Released by Carl-Erik Kopseng on 2026-05-05.
`53817f7d` Upgrade to ESLint 10 and new shared config (#2696) (Carl-Erik Kopseng)
53817f7d
Upgrade to ESLint 10 and new shared config (#2696) (Carl-Erik Kopseng)
- Upgrade to ESLint 10 and new shared config
- Update deps
d7a682e0
fix: move npm-run-all to devDeps (#2694) (Avi Vahl)
used only during dev, and caused a considerable dep count jump downstream
5b8720ec
use latest shared eslint-config (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2026-04-11.
`3c8b023b` Update deps (Carl-Erik Kopseng)
3c8b023b
Update deps (Carl-Erik Kopseng)2eabf5da
fix(#2692): Remove ESM-only supports-color as it breaks CJS exports (#2693) (Carl-Erik Kopseng)
- fix(#2692): Remove ESM-only supports-color as it breaks CJS exports
Released by Carl-Erik Kopseng on 2026-04-10.
`0a5526c5` updated deps (Carl-Erik Kopseng)
0a5526c5
updated deps (Carl-Erik Kopseng)5262204f
fix: build artifacts before running bundled tests (Carl-Erik Kopseng)819bb64b
Migration to ECMAScript modules (ESM) (#2683) (Carl-Erik Kopseng)
This allowed us to finally consume ESM-only dependencies and has broken us free from some CJS shackes. Now produce the same API surface for CJS consumers, as well, by generating
./lib
- Modern ignores 😁
- test: add distribution harness
- test: verify packed cjs and esm entrypoints
- test: lock distribution api manifest
- test: smoke test built pkg artifacts
- docs: require contract tests for package migration
- test: guard esm migration regressions
- docs: require contract gate for esm migration
- build: generate cjs lib from esm source entries
- refactor: port root api surface to esm
- build: clean port of root api to esm
- docs: include implementation plans
- fix: align lint and smoke tests with esm migration
- refactor: complete esm port of all core components
- refactor: finalize esm migration with sandbox and naming fixes
- fix: finish esm migration stabilization
- chore: stop tracking generated lib output
- remove plans
- prettier
- linting
- fix: make distribution tests self-contained
- fix: build before coverage test bundle
- refactor: move simple unit tests to src
- refactor: flatten test and coverage script chains
- refactor: use parallel mocha for node tests
- test: restore fake timers cleanup
- refactor: remove node test runner script
- remove unneccessary clutter
- fix: make mocha watch use polling
- simplify
- Increase coverage
- Fix coverage by removing duplicated tests
These were covering the generated lib/ folder.
- Move shared util into esm dir
- fix package dep issues
- Adjust coverage
- Upgrade all dependencies
npx npm-check-updates -u
cd2bf5a3
Use newer endpoint (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2026-04-09.
`0494251b` fix(#2678): upgrade samsam to fix buffer comparisons (Carl-Erik Kopseng)
0494251b
fix(#2678): upgrade samsam to fix buffer comparisons (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2026-03-16.
`b836fccb` fix: js-yaml breaking change from v3 to v4 (Carl-Erik Kopseng)
024321c4
fix: skip Node specific tests in browser env (Carl-Erik Kopseng)b836fccb
fix: js-yaml breaking change from v3 to v4 (Carl-Erik Kopseng)ebf0c431
docs: add how-to article for stubbing ES module imports (#1832) (#2676) (Eduard Barrera)
- docs: add how-to article for stubbing ES module imports with esm package
Adds a comprehensive How-To guide that addresses issue #1832, documenting how to configure Node.js to allow Sinon stubs to work with ES modules.
- Explains why ES module namespace bindings are immutable by spec
- Shows how to use the 'esm' npm package with mutableNamespace: true
- Provides a complete working example with project layout, package.json, loader file, source modules, and a full test suite
- Documents limitations (destructured imports, non-standard behavior)
- Replaces the TODO comment in link-seams-commonjs.md with a cross-reference
Closes #1832 Co-authored-by: Eduard Barrera eduardbar@users.noreply.github.com Co-authored-by: Carl-Erik Kopseng carlerik@gmail.com
ebcd506c
Fix spies not being reset properly (#2673) (simon-id)3beab2ba
Make doc tests pass with new jQuery (Carl-Erik Kopseng)766715c6
build: reduce transitive audit findings (Carl-Erik Kopseng)92aaf5c9
build: upgrade eslint config and replace dependency-check (Carl-Erik Kopseng)c6aaa871
chore: ignore project worktrees (Carl-Erik Kopseng)ef387e8e
Upgrade most deps (Carl-Erik Kopseng)3cf4e77d
docs: improve writing of documentation (#2675) (Eduardo de la Cruz Palacios)6349032f
Check login status before publishing steps are performed (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2026-03-04.
> Updated compatibility target from ES2017 to ES2023 and clarified the note on breaking changes.
456a65c2
Update dependencies - except @sinonjs/samsam (#2669) (Carl-Erik Kopseng)f04f3eb1
Fix issue 2618 - Remove browserify in favor of esbuild (#2661) (Artur Parkhisenko)48b69df2
fix(docs): remove assert.failException from documentation (#2666) (Steffen Schroeder)13b27ccc
Fix sandbox restore not handling stubbed functions (#2667) (thamion)ae9e09ac
Update compatibility target to ES2023 (Carl-Erik Kopseng)
Updated compatibility target from ES2017 to ES2023 and clarified the note on breaking changes.
26055043
Improve error message for immutable descriptors (#2664) (Stuart Dotson)80fa9a5b
Also mirror the calledOnceWith assertion (#2660) (Benedikt Meurer)Released by Carl-Erik Kopseng on 2025-12-19.
> BREAKING CHANGE: this removes assert.failException from the API
fd10f13f
chore!: remove assert.failException property (#2659) (Morgan Roderick)
BREAKING CHANGE: this removes assert.failException from the API
Released by Morgan Roderick on 2025-06-13.
> BREAKING CHANGE: remove fakeXMLHttpRequest and fakeServer from the API
b6daed26
chore!: remove usingPromise (Morgan Roderick)
Everyone should be using native promises by now, or should know how to stub natives
95d4b8fc
chore!: remove fakeXMLHttpRequest and fakeServer (Morgan Roderick)
BREAKING CHANGE: remove fakeXMLHttpRequest and fakeServer from the API
Released by Morgan Roderick on 2025-03-24.
`67d19ff0` chore: deprecate usingPromise (#2651) (Morgan Roderick)
The release script failed half-way in 19.0.3, so re-releasing.
Basically just documentation updates
Basically just documentation updates
1f1d3706
Verifying links procedure (Carl-Erik Kopseng)37623efc
Catch latest two missing redirects (Carl-Erik Kopseng)2404a45f
Ignore ancient deadlinks to Sinon child projects in previous releases (Carl-Erik Kopseng)fba6f877
Ignore historic links in changelog (Carl-Erik Kopseng)e3950d9b
Fix external link (Carl-Erik Kopseng)0be40825
Fix the missing redirects to the migration guide (Carl-Erik Kopseng)108fbca0
Fix internal ../assertions link in source (Carl-Erik Kopseng)bb10e53a
Fix spy-call reference in source (Carl-Erik Kopseng)ef582e31
Remove bash-ism from Makefile (use POSIX) (Carl-Erik Kopseng)7af1d235
chore: remove .unimportedrc.json (Morgan Roderick)dfcad710
chore: fix codecov upload (Morgan Roderick)
We are seeing errors uploading coverage reports to codecov:
Rate limit reached. Please upload with the Codecov repository upload token to resolve issueI've added a repository token, as instructed in https://docs.codecov.com/docs/adding-the-codecov-token.
This changeset should fix the upload issue.
0ca2e49e
fix: browser-test job fails in ubuntu-latest (Morgan Roderick)e9eb2eb2
chore: remove unused unused job (Morgan Roderick)
This crucial part of this workflow was removed in 278e667e095cd1a666c3ab2dc4268379a5754598, we should have removed the entire job.
278e667e
chore: remove unimported (Morgan Roderick)
The repository has been archived. See https://github.com/smeijer/unimported
9e30835b
npm audit (Morgan Roderick)a74301cf
chore: remove RunKit (Morgan Roderick)
This service is dead.
80bc1d96
Fix out-of-date fake-timers docs (#2628) (Carl-Erik Kopseng)
- Fix documentation issue for fake-timers mentioned in #2625
The docs were out of sync with the fake-timers docs.
- Update dependencies before new patch version
527568cc
Bump rexml from 3.3.7 to 3.3.9 (#2626) (dependabot[bot])
Bumps rexml from 3.3.7 to 3.3.9.
updated-dependencies:
dependency-name: rexml
dependency-type: indirect
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ed029725
Bump webrick from 1.8.1 to 1.8.2 (#2623) (dependabot[bot])
Bumps webrick from 1.8.1 to 1.8.2.
updated-dependencies:
dependency-name: webrick
dependency-type: indirect
...
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Released by Carl-Erik Kopseng on 2025-03-19.
`a5b03db3` Add links to code that is affected by the breaking changes (Carl-Erik Kopseng)
4eb4c4bc
Use fix 13.0.2 version of fake-timers to get Date to pass instanceof checks (Carl-Erik Kopseng)a5b03db3
Add links to code that is affected by the breaking changes (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2024-09-13.
`037ec2d2` Update migration docs (Carl-Erik Kopseng)
037ec2d2
Update migration docs (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2024-09-13.
`3534ab4f` Bump samsam and nise to latest versions (#2617) (Carl-Erik Kopseng)
3534ab4f
Bump samsam and nise to latest versions (#2617) (Carl-Erik Kopseng)
Ensures consistency and less breakage when there are "circular" dependencies.
912c568d
upgrade fake timers and others (#2612) (Carl-Erik Kopseng)
- Upgrade dependencies (includes breaking API in Fake Timers)
- fake-timers: no longer creating dates using the original Date class, but a subclass (proxy)
9715798e
Use newer @mochify/* packages (#2609) (Carl-Erik Kopseng)
Co-authored-by: Maximilian Antoni mail@maxantoni.de
Released by Carl-Erik Kopseng on 2024-09-13.
`03e33ec6` Pin fake-timers@11.2.2 to avoid breaking change (Carl-Erik Kopseng)
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-regexpfrom 6.2.2 to 8.1.0Updates
nisefrom 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. >
- Release notes >
- Changelog >
- Commits > > --- > updated-dependencies: >
- dependency-name: rexml > dependency-type: indirect > ... > > Signed-off-by: dependabot[bot] support@github.com > Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Released by Carl-Erik Kopseng on 2024-09-10.
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 affec…
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.
`f6dca0ba` upgrade packages (#2595) (Carl-Erik Kopseng)
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 :clown: (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.
`5fde5aeb` fix returns does not override call through (#2567) (Raz Luvaton)
5fde5aeb
fix returns does not override call through (#2567) (Raz Luvaton)b5fc3671
Documentation for assertion options for the sandbox (#2564) (Carl-Erik Kopseng)f7d180cc
fix: assertion log limit (#2485) (Spencer Goossens)4f538e3e
Fix mochify breaking on node:assert (#2559) (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2023-11-01.
`11a8e3f2` Remove Proxyquire as it did not handle newer syntax (Carl-Erik Kopseng)
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.
`93e8aa93` Remove postinstall script as it causes issues for consumers (Carl-Erik Kopseng)
93e8aa93
Remove postinstall script as it causes issues for consumers (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2023-10-19.
Nothing published for this version
Nothing published for this version
`cac5184b` Enable use of assignment in the presence of accessors (#2538) (Carl-Erik Kopseng)
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.`c3396058` fix(2525): ensure non empty message when error of type string is passed, but no message (#2544) (Mark de Dios)
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.
> into jumping over the deprecated version.
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 PR, 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.
`02b73aed` Update lock file after removing node_modules ... (Carl-Erik Kopseng)
02b73aed
Update lock file after removing node_modules ... (Carl-Erik Kopseng)Released by Carl-Erik Kopseng on 2023-06-12.
`194fc2ef` Change fake-timers version to specifically target the one containing the 'jump' feature (Carl-Erik Kopseng)
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
0feec9ffba0da6bc2996cefa0c6e71872e8bedb2, 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); // => falseSince it has been 12+ years without an error report, it's safe to assume
that no one uses the
threwmethod in this way. Let's remove it fromthe documentation.
Released by Carl-Erik Kopseng on 2023-06-12.
`79e719f2` Ensure we use a fake-timers version with clock.jump (Carl-Erik Kopseng)
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.
`e9042c4f` Handling non-configurable object descriptors on the prototype (#2508) (Carl-Erik Kopseng)
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.
`b775f1b4` Avoid tampering with globals and other modules' exports in tests (#2504) (Carl-Erik Kopseng)
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.
`19bd99f3` Use no-op for every function when restoring instances (#2499) (Carl-Erik Kopseng)
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.
`aa493da4` Upgrade to fake-timers v10.0.2 (Carl-Erik Kopseng)
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.
`b75fbfa9` Fix 2448: remove custom formatter (Morgan Roderick)
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.inspectfrom Node. By using that in Sinon itself, we align all the libraries.
Released by Morgan Roderick on 2022-11-28.
`4d70f6e0` Upgrade nise to latest (Morgan Roderick)
`6c4753ef` Fixed CSS selectors in _base.scss and changed blockquote default size to 16px. (Jose Lupianez)
6c4753ef
Fixed CSS selectors in _base.scss and changed blockquote default size to 16px. (Jose Lupianez)Released by Carl-Erik Kopseng on 2022-10-03.
`c2bbd826` Drop node 12 (Morgan Roderick)
c2bbd826
Drop node 12 (Morgan Roderick)
And embrace Node 18
See https://nodejs.org/en/about/releases/
Released by Morgan Roderick on 2022-05-07.
`bddb631a` Update fake-timers (Carl-Erik Kopseng)
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.
`ec4223f9` Bump nise to fix sinonjs/nise#193 (Carl-Erik Kopseng)
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 versionscripts 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.
`cf3d6c0c` Upgrade packages (#2431) (Carl-Erik Kopseng)
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.
`3f598221` Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng)
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.
`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 t…
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
@sinonjspackages.
2d5d6ad4
Run tests in Node 16 in GitHub Actions (Morgan Roderick)Released by Carl-Erik Kopseng on 2021-11-03.
Upgrade @sinonjs/fake-timers to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#712--2021-05-28
Fix #2379 by using v7 of supports-color
Add sinon.promise() implementation
Explicitly use samsam 6.0.2 with fix for #2345
Upgrade sinon components (bumps y18n to 4.0.1)
Use @sinonjs/eslint-config@4 => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
- Upgrade @sinonjs/samsam@5.3.1
Use util.inspect for formatting human readable output (this retires @sinonjs/formatio)
util.inspect for formatting human readable output
(this retires @sinonjs/formatio)Fix #2316: handle absent Promise
Fix #2203: skip writing 'name' property if not writable
Update sandbox docs with missing comma
Add a calledOnceWithMatch assertion
Upgrade @sinonjs/samsam to latest
Bump @sinonjs/fake-timers (fix error when using Node's util/promisify with setTimeout)
Fix #2226: restore props defined on prototype chain by deleting
Ignore errors on thisValue property accesses
Fundraiser for better docs: https://www.gofundme.com/f/sinon-docs
Your coding agent can read these notes before it upgrades. Set up the MCP server →