Skip to content

📝 Add release notes for fast-check 4.7.0#6889

Merged
dubzzz merged 3 commits into
mainfrom
claude/fast-check-release-post-Y8ezD
Apr 18, 2026
Merged

📝 Add release notes for fast-check 4.7.0#6889
dubzzz merged 3 commits into
mainfrom
claude/fast-check-release-post-Y8ezD

Conversation

@dubzzz

@dubzzz dubzzz commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Description

This PR adds the release notes blog post for fast-check version 4.7.0, documenting the key features and improvements included in this release.

The release highlights two major features:

  1. Unicode property support in stringMatching: Added support for Unicode property escapes (\p{...} and \P{...}) in regular expressions passed to stringMatching. This allows generating strings that match complex Unicode patterns like emoji, specific scripts, and Unicode categories without throwing "not implemented yet" errors.

  2. Reversible json arbitrary: Made the fc.json() arbitrary reversible by adding an unmapper based on JSON.parse. This allows the arbitrary to accept and shrink externally-provided JSON strings, enabling use cases like replaying captured payloads from production logs.

The post also includes a comprehensive changelog documenting all fixes, CI improvements, documentation updates, and other changes since version 4.6.0.

Checklist

  • I have a full understanding of every line in this PR — this is a documentation-only change
  • I kept this PR focused on a single concern (release notes for 4.7.0)
  • I followed the gitmoji specification for the PR title

https://claude.ai/code/session_018RZYzq9rucKCxJtkV3FSHs

claude added 3 commits April 18, 2026 08:21
Introduces the blog post announcing fast-check 4.7.0, walking
through Unicode property support in `stringMatching` and the
newly reversible `json` arbitrary, and embedding the full
changelog since 4.6.0.
@changeset-bot

changeset-bot Bot commented Apr 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8b702c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

👋 It looks like the PR template was not used for this pull request.

Please edit the PR description to use the template, or close this PR and open a new one that uses it.
Not using the template may result in your change not being reviewed.

The template includes:

  • A Description section
  • A Checklist section with items to verify before submitting

Thank you for your contribution! 🙏


This unlocks composition with other arbitraries that expect a reversible building block and makes `fc.json()` a drop-in candidate wherever you need to replay a JSON input without re-generating it from scratch.

## Changelog since 4.6.0

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please confirm that this changelog is fully equivalent to the how we have in the CHANGELOG.md file. Tell me how you checked it

@claude claude Bot Apr 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @dubzzz's task in 1m 14s —— View job


Changelog equivalence — confirmed ✅

The changelog section in website/blog/2026-04-18-whats-new-in-fast-check-4-7-0/index.md (lines 56–91) is fully equivalent to the 4.7.0 section in packages/fast-check/CHANGELOG.md (lines 6–41).

How I checked

  1. Read both files:
    • website/blog/2026-04-18-whats-new-in-fast-check-4-7-0/index.md (full file)
    • packages/fast-check/CHANGELOG.md (lines 1–100, covering the full 4.7.0 block which ends at line 42)
  2. Ran a line-by-line diff over the matching ranges:
    diff <(sed -n '6,41p' packages/fast-check/CHANGELOG.md) \
         <(sed -n '56,91p' website/blog/.../index.md)
  3. Inspected the diff output.

Diff result

The only differences are heading levels, which is expected because the blog nests the changelog one level deeper (## Changelog since 4.6.0### Features/### Fixes):

1c1
< ## Features
---
> ### Features
8c8
< ## Fixes
---
> ### Fixes

Every other line is byte-for-byte identical — same PR numbers, same descriptions, same order.

Counts

  • Features: 4 entries (PR#6866, PR#6868, PR#6870, PR#6871) — identical
  • Fixes: 28 entries (PR#6710 … PR#6859) — identical in content and order
  • Total: 32 entries, matching exactly

No entries are missing, added, reordered, or reworded between the two sources.
• Branch: claude/fast-check-release-post-Y8ezD

@pkg-pr-new

pkg-pr-new Bot commented Apr 18, 2026

Copy link
Copy Markdown
@fast-check/ava

npm i https://pkg.pr.new/@fast-check/ava@6889

fast-check

npm i https://pkg.pr.new/fast-check@6889

@fast-check/jest

npm i https://pkg.pr.new/@fast-check/jest@6889

@fast-check/packaged

npm i https://pkg.pr.new/@fast-check/packaged@6889

@fast-check/poisoning

npm i https://pkg.pr.new/@fast-check/poisoning@6889

@fast-check/vitest

npm i https://pkg.pr.new/@fast-check/vitest@6889

@fast-check/worker

npm i https://pkg.pr.new/@fast-check/worker@6889

commit: 8b702c1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new release-notes blog post for fast-check 4.7.0, highlighting the main user-facing changes and providing a detailed changelog since 4.6.0.

Changes:

  • Document Unicode property escape support (\p{...} / \P{...}) in stringMatching, with examples.
  • Document reversibility of fc.json() via an unmapper based on JSON.parse, with a quick usage snippet.
  • Add a structured changelog section listing merged PRs since 4.6.0.


Regular expressions can restrict their character set with Unicode property escapes such as `\p{Emoji}` or `\P{ASCII}`. Before 4.7.0, feeding such a regex to `stringMatching` threw a "not implemented yet" error.

Starting with 4.7.0, `stringMatching` recognises both `\p{...}` (positive) and `\P{...}` (negated) forms:

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog posts in this repo consistently use American English spellings (e.g. "optimization" in website/blog/2026-03-09-whats-new-in-fast-check-4-6-0/index.md:27, "favor" in website/blog/2024-07-12-whats-new-in-fast-check-3-20-0/index.md:7). For consistency, consider changing "recognises" to "recognizes" here.

Suggested change
Starting with 4.7.0, `stringMatching` recognises both `\p{...}` (positive) and `\P{...}` (negated) forms:
Starting with 4.7.0, `stringMatching` recognizes both `\p{...}` (positive) and `\P{...}` (negated) forms:

Copilot uses AI. Check for mistakes.

Under the hood, each property is expanded into the set of codepoints it covers and plugged into the existing machinery backing character classes. The resulting ranges are computed once and cached, so subsequent uses of the same property stay cheap.

Support covers binary properties like `Emoji`, `Alphabetic` or `Math`, general categories such as `Letter`, `Decimal_Number` or `Punctuation`, plus scripts through `Script=Greek`, `sc=Han` and friends. This should let you keep your regex expressive when testing code that handles internationalised inputs.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog section uses American English spellings in other posts (see references in earlier release notes). For consistency, consider changing "internationalised" to "internationalized" here.

Suggested change
Support covers binary properties like `Emoji`, `Alphabetic` or `Math`, general categories such as `Letter`, `Decimal_Number` or `Punctuation`, plus scripts through `Script=Greek`, `sc=Han` and friends. This should let you keep your regex expressive when testing code that handles internationalised inputs.
Support covers binary properties like `Emoji`, `Alphabetic` or `Math`, general categories such as `Letter`, `Decimal_Number` or `Punctuation`, plus scripts through `Script=Greek`, `sc=Han` and friends. This should let you keep your regex expressive when testing code that handles internationalized inputs.

Copilot uses AI. Check for mistakes.

## Reversible `json` arbitrary

The `json` arbitrary is built by serialising the output of `jsonValue` through `JSON.stringify`. Until this release, that mapping was one-way: fast-check could produce JSON strings but could not recognise externally-provided ones. As a consequence, scenarios relying on replaying or recomposing values (for instance shrinking a payload captured from production logs) could not leverage `fc.json()`.

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog posts appear to follow American English spellings elsewhere. For consistency, consider changing "serialising" → "serializing" and "recognise" → "recognize" in this paragraph.

Suggested change
The `json` arbitrary is built by serialising the output of `jsonValue` through `JSON.stringify`. Until this release, that mapping was one-way: fast-check could produce JSON strings but could not recognise externally-provided ones. As a consequence, scenarios relying on replaying or recomposing values (for instance shrinking a payload captured from production logs) could not leverage `fc.json()`.
The `json` arbitrary is built by serializing the output of `jsonValue` through `JSON.stringify`. Until this release, that mapping was one-way: fast-check could produce JSON strings but could not recognize externally-provided ones. As a consequence, scenarios relying on replaying or recomposing values (for instance shrinking a payload captured from production logs) could not leverage `fc.json()`.

Copilot uses AI. Check for mistakes.
- ([PR#6866](https://github.com/dubzzz/fast-check/pull/6866)) Reversible `json` arbitrary
- ([PR#6868](https://github.com/dubzzz/fast-check/pull/6868)) Parse `\p{}` and `\P{}` in `stringMatching`
- ([PR#6870](https://github.com/dubzzz/fast-check/pull/6870)) Support for `\p{UnicodeProperty}` in `stringMatching`
- ([PR#6871](https://github.com/dubzzz/fast-check/pull/6871)) Support negated unicode properties in `stringMatching`

Copilot AI Apr 18, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry uses "unicode" in lowercase while the rest of the post uses "Unicode" (and it’s a proper noun in this context). Consider capitalizing it for consistency: "Support negated Unicode properties".

Suggested change
- ([PR#6871](https://github.com/dubzzz/fast-check/pull/6871)) Support negated unicode properties in `stringMatching`
- ([PR#6871](https://github.com/dubzzz/fast-check/pull/6871)) Support negated Unicode properties in `stringMatching`

Copilot uses AI. Check for mistakes.
@codecov

codecov Bot commented Apr 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.75%. Comparing base (7b71cb0) to head (8b702c1).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6889   +/-   ##
=======================================
  Coverage   94.75%   94.75%           
=======================================
  Files         211      211           
  Lines        5778     5778           
  Branches     1528     1527    -1     
=======================================
  Hits         5475     5475           
  Misses        295      295           
  Partials        8        8           
Flag Coverage Δ
tests 94.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dubzzz
dubzzz merged commit 3d9b427 into main Apr 18, 2026
64 of 65 checks passed
@dubzzz
dubzzz deleted the claude/fast-check-release-post-Y8ezD branch April 18, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants