Skip to content

fix: Update fake-timers to 15.3.0#10043

Open
BPScott wants to merge 1 commit intovitest-dev:mainfrom
BPScott:faketimers
Open

fix: Update fake-timers to 15.3.0#10043
BPScott wants to merge 1 commit intovitest-dev:mainfrom
BPScott:faketimers

Conversation

@BPScott
Copy link
Copy Markdown

@BPScott BPScott commented Apr 2, 2026

Description

Updating fake-timers to v15.3.0

This version adds bundled types, a fix to properly restore cancelIdleCallback when uninstalling fake timers, and a toNotFake API to complement toFake

  • Use bundled types instead of @types/sinonjs__fake-timers
  • Document passing toNotFake into vi.useFakeTimers()

AI disclaimer: This code was AI generated with Copilot using the Sonnet model. I babysat it heavily and iterated to make sure it matches existing patterns and produced as minimal a change as possible.

Question for reviewers

At the moment, toNotFake will require the user to add nextTick to ensure that nextTick is not mocked, otherwise we'll often throw an error. Should that be added by default?

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

This version adds bundled types, and a `toNotFake` API to complement
`toFake`

- Use bundled types instead of @types/sinonjs__fake-timers
- Allow passing toNotFake into `vi.useFakeTimers()`
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 2, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 96c2f16
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69ce0f9349ad4200099411ed
😎 Deploy Preview https://deploy-preview-10043--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va added this to the 5.0.0 milestone Apr 7, 2026
@sheremet-va sheremet-va added the p2-nice-to-have Not breaking anything but nice to have (priority) label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants