npm / fast-check
fast-check
What changed in fast-check 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
7 deprecations20 new APIs and options10 performance6 behavior and defaults11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initfast-check 454 changes
Deprecations 7
The asyncReporter parameter is deprecated.
Life-cycle methods are deprecated in favor of plugin-based lifecycle hooks.
Parameters superseded by plugins are deprecated.
The reporter parameter is deprecated.
The timeout parameter is deprecated in favor of the timeout plugin.
Random.next(n) is deprecated.
Random.nextInt() is deprecated.
New APIs and options 20
Adds an afterEach plugin for lifecycle hooks.
Adds a plugin for hooking into the lifecycle, with support for teardown.
Adds plugins that drop runs on cases that are already covered.
Plugins can decorate generate.
Plugins can now be configured globally.
Adds an extra plugin method called after all runs complete.
Introduces a plugin API for extending fast-check behavior.
The plugin supports failOnInterrupt.
Plugins are passed a store.
Adds a plugin to interrupt after a time limit.
Adds a plugin to stop long-running predicates.
Adds a plugin to generate without bias.
Adds the chainUntil arbitrary for iterative chaining.
The json arbitrary is reversible, allowing generated JSON values to be reversed.
Adds basic maxLength support to stringMatching, allowing developers to constrain generated strings by length.
Adds entityGraph for generating schema-based structures.
Adds initial pool constraints to entityGraph.
Adds strategies to entityGraph.
Adds the fc.map arbitrary.
Adds the fc.set arbitrary.
Performance 10
Uses a single timer for interruptAfterTimeLimit.
fc.dictionary is faster on generate.
fc.entityGraph is faster on generate, with an early exit on an empty tuple.
fc.integer is faster on generate.
fc.record is faster on generate, and nested tuple is dropped for generate.
fc.stringMatching is faster for \W, \D, \S, and . and faster on generate.
fc.webPath is faster on generate.
fc.webUrl is faster on generate.
Optimizes array allocations in RunDetailsFormatter.
Uses Math.imul and shifts in performance-critical paths.
Behavior and default changes 6
entityGraph is being made shrinkable thanks to chainUntil.
stringMatching supports Unicode property escapes, including negated properties.
Allows recursions on many relations in entityGraph.
Tweaks the uniqueness of entities produced by entityGraph.
Supports inverse relations in entityGraph.
fc.dictionary(...) now supports the full PropertyKey type for keys.
Fixes and other changes 11
Fixes a bug where the interruptAfterTimeLimit plugin crashes.
Fixes timer capture for the interruptAfterTimeLimit plugin.
Fixes ordering between plugins.
Fixes a latent state-sharing bug in entityGraph.
Alternatives in stringMatching are now equiprobable.
Restores the ability to use fast-check without enabling skipLibCheck.
Fixes a bad TypeScript declaration import in BuildInversedRelationsMapping.
Fixes object unmapping and depth computation for special keys.
Prevents crashes when stringifying detached ArrayBuffers.
Improves clamping of regular expressions when maxLength is used with stringMatching.
Takes depth into account when generating entity graphs.