📝 Add release notes for fast-check 4.7.0#6889
Conversation
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.
|
|
👋 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. The template includes:
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 |
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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
- 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)
- Ran a line-by-line
diffover the matching ranges:diff <(sed -n '6,41p' packages/fast-check/CHANGELOG.md) \ <(sed -n '56,91p' website/blog/.../index.md)
- 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
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
There was a problem hiding this comment.
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{...}) instringMatching, with examples. - Document reversibility of
fc.json()via an unmapper based onJSON.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: |
There was a problem hiding this comment.
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.
| 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: |
|
|
||
| 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. |
There was a problem hiding this comment.
The blog section uses American English spellings in other posts (see references in earlier release notes). For consistency, consider changing "internationalised" to "internationalized" here.
| 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. |
|
|
||
| ## 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()`. |
There was a problem hiding this comment.
The blog posts appear to follow American English spellings elsewhere. For consistency, consider changing "serialising" → "serializing" and "recognise" → "recognize" in this paragraph.
| 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()`. |
| - ([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` |
There was a problem hiding this comment.
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".
| - ([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` |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
Unicode property support in
stringMatching: Added support for Unicode property escapes (\p{...}and\P{...}) in regular expressions passed tostringMatching. This allows generating strings that match complex Unicode patterns like emoji, specific scripts, and Unicode categories without throwing "not implemented yet" errors.Reversible
jsonarbitrary: Made thefc.json()arbitrary reversible by adding an unmapper based onJSON.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
https://claude.ai/code/session_018RZYzq9rucKCxJtkV3FSHs