unstale

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 init

@unstale/cli 0.1.1 on npm

fast-check 454 changes

Deprecations 7

  • The asyncReporter parameter is deprecated.

    4.10.0release notes

  • Life-cycle methods are deprecated in favor of plugin-based lifecycle hooks.

    4.10.0release notes

  • Parameters superseded by plugins are deprecated.

    4.10.0release notes

  • The reporter parameter is deprecated.

    4.10.0release notes

  • The timeout parameter is deprecated in favor of the timeout plugin.

    4.10.0release notes

  • Random.next(n) is deprecated.

    4.6.0release notes

  • Random.nextInt() is deprecated.

    4.6.0release notes

New APIs and options 20

  • Adds an afterEach plugin for lifecycle hooks.

    4.10.0release notes

  • Adds a plugin for hooking into the lifecycle, with support for teardown.

    4.10.0release notes

  • Adds plugins that drop runs on cases that are already covered.

    4.10.0release notes

  • Plugins can decorate generate.

    4.10.0release notes

  • Plugins can now be configured globally.

    4.10.0release notes

  • Adds an extra plugin method called after all runs complete.

    4.10.0release notes

  • Introduces a plugin API for extending fast-check behavior.

    4.10.0release notes

  • The plugin supports failOnInterrupt.

    4.10.0release notes

  • Plugins are passed a store.

    4.10.0release notes

  • Adds a plugin to interrupt after a time limit.

    4.10.0release notes

  • Adds a plugin to stop long-running predicates.

    4.10.0release notes

  • Adds a plugin to generate without bias.

    4.10.0release notes

  • Adds the chainUntil arbitrary for iterative chaining.

    4.8.0release notes

  • The json arbitrary is reversible, allowing generated JSON values to be reversed.

    4.7.0release notes

  • Adds basic maxLength support to stringMatching, allowing developers to constrain generated strings by length.

    4.6.0release notes

  • Adds entityGraph for generating schema-based structures.

    4.5.0release notes

  • Adds initial pool constraints to entityGraph.

    4.5.0release notes

  • Adds strategies to entityGraph.

    4.5.0release notes

  • Adds the fc.map arbitrary.

    4.4.0release notes

  • Adds the fc.set arbitrary.

    4.4.0release notes

Performance 10

  • Uses a single timer for interruptAfterTimeLimit.

    4.10.0release notes

  • fc.dictionary is faster on generate.

    4.9.0release notes

  • fc.entityGraph is faster on generate, with an early exit on an empty tuple.

    4.9.0release notes

  • fc.integer is faster on generate.

    4.9.0release notes

  • fc.record is faster on generate, and nested tuple is dropped for generate.

    4.9.0release notes

  • fc.stringMatching is faster for \W, \D, \S, and . and faster on generate.

    4.9.0release notes

  • fc.webPath is faster on generate.

    4.9.0release notes

  • fc.webUrl is faster on generate.

    4.9.0release notes

  • Optimizes array allocations in RunDetailsFormatter.

    4.6.0release notes

  • Uses Math.imul and shifts in performance-critical paths.

    4.4.0release notes

Behavior and default changes 6

  • entityGraph is being made shrinkable thanks to chainUntil.

    4.9.0release notes

  • stringMatching supports Unicode property escapes, including negated properties.

    4.7.0release notes

  • Allows recursions on many relations in entityGraph.

    4.5.0release notes

  • Tweaks the uniqueness of entities produced by entityGraph.

    4.5.0release notes

  • Supports inverse relations in entityGraph.

    4.5.0release notes

  • fc.dictionary(...) now supports the full PropertyKey type for keys.

    4.4.0release notes

Fixes and other changes 11

  • Fixes a bug where the interruptAfterTimeLimit plugin crashes.

    4.10.2release notes

  • Fixes timer capture for the interruptAfterTimeLimit plugin.

    4.10.1release notes

  • Fixes ordering between plugins.

    4.10.0release notes

  • Fixes a latent state-sharing bug in entityGraph.

    4.9.0release notes

  • Alternatives in stringMatching are now equiprobable.

    4.9.0release notes

  • Restores the ability to use fast-check without enabling skipLibCheck.

    4.8.0release notes

  • Fixes a bad TypeScript declaration import in BuildInversedRelationsMapping.

    4.6.0release notes

  • Fixes object unmapping and depth computation for special keys.

    4.6.0release notes

  • Prevents crashes when stringifying detached ArrayBuffers.

    4.6.0release notes

  • Improves clamping of regular expressions when maxLength is used with stringMatching.

    4.6.0release notes

  • Takes depth into account when generating entity graphs.

    4.5.0release notes