Skip to content

✨ Support negated unicode properties in stringMatching#6871

Merged
dubzzz merged 3 commits into
mainfrom
claude/add-negated-unicode-property-ekLB5
Apr 16, 2026
Merged

✨ Support negated unicode properties in stringMatching#6871
dubzzz merged 3 commits into
mainfrom
claude/add-negated-unicode-property-ekLB5

Conversation

@dubzzz

@dubzzz dubzzz commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Description

Add support for negated unicode properties (e.g., \P{Emoji}) in the stringMatching arbitrary, complementing the existing support for positive unicode properties (e.g., \p{Emoji}) added in #6870.

Changes:

  • Modified extractRangesForProperty to accept a negative parameter and generate the appropriate regex pattern (\P for negated, \p for positive)
  • Updated extractRangesForPropertyOrFromCache to include the negation flag in the cache key, ensuring negated and positive properties are cached separately
  • Removed the error that was thrown when encountering negated unicode properties in unicodePropertyArbitrary
  • Added test coverage for negated unicode properties

Checklist

Don't delete this checklist and make sure you do the following before opening the PR

  • I have a full understanding of every line in this PR — whether the code was hand-written, AI-generated, copied from external sources or produced by any other tool
  • I flagged the impact of my change (minor / patch / major) either by running pnpm run bump or by following the instructions from the changeset bot
  • I kept this PR focused on a single concern and did not bundle unrelated changes
  • I followed the gitmoji specification for the name of the PR, including the package scope (e.g. 🐛(vitest) Something...) when the change targets a package other than fast-check
  • I added relevant tests and they would have failed without my PR (when applicable)

@changeset-bot

changeset-bot Bot commented Apr 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e394abe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
fast-check Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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! 🙏

@dubzzz

dubzzz commented Apr 16, 2026

Copy link
Copy Markdown
Owner Author

@claude use pr template

@claude

claude Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

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


Updated PR to use template

  • Read PR template
  • Read PR changes
  • Update PR description with template

Updated the PR description to follow the repository's PR template from .github/PULL_REQUEST_TEMPLATE.md, including the Description and Checklist sections.

@dubzzz dubzzz changed the title ✨ Support negated unicode properties in stringMatching ✨ Support negated unicode properties in stringMatching Apr 16, 2026
@dubzzz
dubzzz enabled auto-merge (squash) April 16, 2026 23:04
@pkg-pr-new

pkg-pr-new Bot commented Apr 16, 2026

Copy link
Copy Markdown
@fast-check/ava

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

fast-check

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

@fast-check/jest

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

@fast-check/packaged

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

@fast-check/poisoning

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

@fast-check/vitest

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

@fast-check/worker

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

commit: e394abe

@dubzzz
dubzzz merged commit 6661a31 into main Apr 16, 2026
50 checks passed
@dubzzz
dubzzz deleted the claude/add-negated-unicode-property-ekLB5 branch April 16, 2026 23:09
@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.75%. Comparing base (332f905) to head (e394abe).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6871      +/-   ##
==========================================
+ Coverage   94.73%   94.75%   +0.01%     
==========================================
  Files         211      211              
  Lines        5778     5778              
  Branches     1526     1527       +1     
==========================================
+ Hits         5474     5475       +1     
+ Misses        296      295       -1     
  Partials        8        8              
Flag Coverage Δ
tests 94.75% <100.00%> (+0.01%) ⬆️

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.

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.

2 participants