-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rust crate regex to 1.9 #123
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: Cargo.lock
|
Run & review this pull request in StackBlitz Codeflow. |
|
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [npm-run-all2](https://togithub.com/bcomnes/npm-run-all2) | [`5.0.2` -> `6.1.2`](https://renovatebot.com/diffs/npm/npm-run-all2/5.0.2/6.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/npm-run-all2/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/npm-run-all2/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/npm-run-all2/5.0.2/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/npm-run-all2/5.0.2/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>bcomnes/npm-run-all2 (npm-run-all2)</summary> ### [`v6.1.2`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v612) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.1.1...v6.1.2) ##### Merged - feat: move to read-package-json-fast [`#130`](https://togithub.com/bcomnes/npm-run-all2/pull/130) - Upgrade: Bump c8 from 8.0.1 to 9.0.0 [`#127`](https://togithub.com/bcomnes/npm-run-all2/pull/127) - Upgrade: Bump github/codeql-action from 2 to 3 [`#126`](https://togithub.com/bcomnes/npm-run-all2/pull/126) - Upgrade: Bump actions/setup-node from 3 to 4 [`#123`](https://togithub.com/bcomnes/npm-run-all2/pull/123) ##### Commits - Publish the whole project [`3dde20c`](https://togithub.com/bcomnes/npm-run-all2/commit/3dde20c1c8fa973045773e03f4fc121360fdbed4) - Utilize CJS require for 'read-package-json-fast' [`605ca15`](https://togithub.com/bcomnes/npm-run-all2/commit/605ca15d9adee3ce14da6fcaa98cb14d9c03795c) - Update FUNDING.yml [`c838ee9`](https://togithub.com/bcomnes/npm-run-all2/commit/c838ee9eea06e545d1a7f25592f7beb8468f1afd) ### [`v6.1.1`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v611) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.1.0...v6.1.1) ##### Commits - Add an npm-run-all2 bin alias [`e6dc017`](https://togithub.com/bcomnes/npm-run-all2/commit/e6dc0175006a9a703c1256949f8424922043a33a) - Fix npx on node 16 [`cfbd974`](https://togithub.com/bcomnes/npm-run-all2/commit/cfbd974a5990e8d549ae8bf7bfb632424ff4990b) ### [`v6.1.0`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v610---2023-10-04) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.6...v6.1.0) ##### Merged - Upgrade: Bump actions/checkout from 3 to 4 [`#119`](https://togithub.com/bcomnes/npm-run-all2/pull/119) ##### Commits - Lets avoid spawn.sync [`a3ee6cd`](https://togithub.com/bcomnes/npm-run-all2/commit/a3ee6cd9e051471bfd7b1b4d153aa260fc9b6634) - Add support for pnpm ([#​117](https://togithub.com/bcomnes/npm-run-all2/issues/117)) [`3df3708`](https://togithub.com/bcomnes/npm-run-all2/commit/3df37084ab1ae55f873fcbb449ad0d7df8bc328f) ### [`v6.0.6`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v606---2023-07-04) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.5...v6.0.6) ##### Merged - Update all esm only packages [`#114`](https://togithub.com/bcomnes/npm-run-all2/pull/114) - Upgrade: Bump c8 from 7.14.0 to 8.0.0 [`#111`](https://togithub.com/bcomnes/npm-run-all2/pull/111) - Delete .nycrc [`#109`](https://togithub.com/bcomnes/npm-run-all2/pull/109) - Update CodeQL workflow [`#110`](https://togithub.com/bcomnes/npm-run-all2/pull/110) ##### Commits - Lint fix and a few hand fixes [`2c81236`](https://togithub.com/bcomnes/npm-run-all2/commit/2c8123694b73084f37b68eb6719632024331d2e9) - Fix tests [`79e2c97`](https://togithub.com/bcomnes/npm-run-all2/commit/79e2c97c5b32c46d5cf64ce37b3b78cf4035498e) - Update p-queue and ansi-styles [`10b075c`](https://togithub.com/bcomnes/npm-run-all2/commit/10b075c849153822e9abc1447222d186a1cd6136) ### [`v6.0.5`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v605---2023-04-03) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.4...v6.0.5) ##### Merged - Upgrade: Bump bcomnes/npm-bump from 2.1.0 to 2.2.1 [`#104`](https://togithub.com/bcomnes/npm-run-all2/pull/104) - Upgrade: Bump minimatch from 6.2.0 to 7.0.0 [`#103`](https://togithub.com/bcomnes/npm-run-all2/pull/103) - Upgrade: Bump minimatch from 5.1.4 to 6.0.4 [`#102`](https://togithub.com/bcomnes/npm-run-all2/pull/102) - Upgrade: Bump fs-extra from 10.1.0 to 11.1.0 [`#98`](https://togithub.com/bcomnes/npm-run-all2/pull/98) ##### Commits - Merge pull request [#​105](https://togithub.com/bcomnes/npm-run-all2/issues/105) from bcomnes/dependabot/npm_and_yarn/minimatch-8.0.2 [`cbf78c8`](https://togithub.com/bcomnes/npm-run-all2/commit/cbf78c8155365db9ec06cb8054bc821e057d06e2) - Upgrade: Bump minimatch from 7.4.4 to 8.0.2 [`c90d02b`](https://togithub.com/bcomnes/npm-run-all2/commit/c90d02b02df6dd33cbab01caac44b9729e012bb9) - Merge pull request [#​101](https://togithub.com/bcomnes/npm-run-all2/issues/101) from bcomnes/dependabot/npm_and_yarn/rimraf-4.0.4 [`d0d46a2`](https://togithub.com/bcomnes/npm-run-all2/commit/d0d46a2b0aa87a3c0c79b78a013415e7902c8324) ### [`v6.0.4`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v604---2022-11-09) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.3...v6.0.4) ##### Merged - When running through npx, use the npm that should be next to it. [`#96`](https://togithub.com/bcomnes/npm-run-all2/pull/96) ### [`v6.0.3`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v603---2022-11-09) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.2...v6.0.3) ##### Merged - Upgrade: Bump jsdoc from 3.6.11 to 4.0.0 [`#95`](https://togithub.com/bcomnes/npm-run-all2/pull/95) - Upgrade: Bump bcomnes/npm-bump from 2.0.2 to 2.1.0 [`#92`](https://togithub.com/bcomnes/npm-run-all2/pull/92) - docs: update minimum supported Node version [`#90`](https://togithub.com/bcomnes/npm-run-all2/pull/90) ##### Commits - Merge pull request [#​94](https://togithub.com/bcomnes/npm-run-all2/issues/94) from MarmadileManteater/runjs-being-called-instead-of-npm-run [`da913f9`](https://togithub.com/bcomnes/npm-run-all2/commit/da913f9481543907457bd2298ad17192a4420874) - Use NPM_CLI_JS over npm_execpath [`0224167`](https://togithub.com/bcomnes/npm-run-all2/commit/022416740f0d9cf8eae2f2e4ca4de8d09a6b67d8) - Add a proper check for yarn [`bb41ef6`](https://togithub.com/bcomnes/npm-run-all2/commit/bb41ef6fd85a803a4a22e8382f67ea9e3e235b7d) ### [`v6.0.2`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v602---2022-08-16) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.1...v6.0.2) ##### Merged - Update package shell quote [`#89`](https://togithub.com/bcomnes/npm-run-all2/pull/89) ### [`v6.0.1`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v601---2022-06-14) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v6.0.0...v6.0.1) ##### Commits - Lower bound node engine to ^14.18.0 || >=16.0.0 [`fc2957f`](https://togithub.com/bcomnes/npm-run-all2/commit/fc2957f4814848b55bc29b0a0a1def8bfadda18b) ### [`v6.0.0`](https://togithub.com/bcomnes/npm-run-all2/blob/HEAD/CHANGELOG.md#v600---2022-06-11) [Compare Source](https://togithub.com/bcomnes/npm-run-all2/compare/v5.0.2...v6.0.0) ##### Merged - Move support to node 16 and npm 8 [`#85`](https://togithub.com/bcomnes/npm-run-all2/pull/85) - Upgrade: Bump pidtree from 0.5.0 to 0.6.0 [`#84`](https://togithub.com/bcomnes/npm-run-all2/pull/84) - Upgrade: Bump mocha from 9.2.2 to 10.0.0 [`#83`](https://togithub.com/bcomnes/npm-run-all2/pull/83) - Upgrade: Bump github/codeql-action from 1 to 2 [`#82`](https://togithub.com/bcomnes/npm-run-all2/pull/82) - Upgrade: Bump fastify/github-action-merge-dependabot from 3.0.2 to 3.1 [`#78`](https://togithub.com/bcomnes/npm-run-all2/pull/78) - Upgrade: Bump codecov/codecov-action from 2 to 3 [`#77`](https://togithub.com/bcomnes/npm-run-all2/pull/77) - Upgrade: Bump actions/setup-node from 2 to 3 [`#75`](https://togithub.com/bcomnes/npm-run-all2/pull/75) - Upgrade: Bump actions/checkout from 2 to 3 [`#76`](https://togithub.com/bcomnes/npm-run-all2/pull/76) - Upgrade: Bump minimatch from 4.2.1 to 5.0.0 [`#74`](https://togithub.com/bcomnes/npm-run-all2/pull/74) - Upgrade: Bump minimatch from 3.1.1 to 4.1.1 [`#73`](https://togithub.com/bcomnes/npm-run-all2/pull/73) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.7.1 to 3.0.2 [`#72`](https://togithub.com/bcomnes/npm-run-all2/pull/72) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.7.0 to 2.7.1 [`#71`](https://togithub.com/bcomnes/npm-run-all2/pull/71) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.6.0 to 2.7.0 [`#70`](https://togithub.com/bcomnes/npm-run-all2/pull/70) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.5.0 to 2.6.0 [`#69`](https://togithub.com/bcomnes/npm-run-all2/pull/69) - Simplify npm scripts [`#64`](https://togithub.com/bcomnes/npm-run-all2/pull/64) - Update CI config [`#62`](https://togithub.com/bcomnes/npm-run-all2/pull/62) - Add CodeQL workflow [`#65`](https://togithub.com/bcomnes/npm-run-all2/pull/65) - Switch to c8 for coverage [`#66`](https://togithub.com/bcomnes/npm-run-all2/pull/66) - tests: switch to assert's strict mode [`#67`](https://togithub.com/bcomnes/npm-run-all2/pull/67) - Enforce LF in the repo. [`#61`](https://togithub.com/bcomnes/npm-run-all2/pull/61) - Upgrade: Bump actions/setup-node from 2.4.0 to 2.4.1 [`#59`](https://togithub.com/bcomnes/npm-run-all2/pull/59) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.4.0 to 2.5.0 [`#58`](https://togithub.com/bcomnes/npm-run-all2/pull/58) - Upgrade: Bump codecov/codecov-action from 2.0.2 to 2.1.0 [`#57`](https://togithub.com/bcomnes/npm-run-all2/pull/57) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.2.0 to 2.4.0 [`#54`](https://togithub.com/bcomnes/npm-run-all2/pull/54) - Upgrade: Bump actions/setup-node from 2.3.2 to 2.4.0 [`#53`](https://togithub.com/bcomnes/npm-run-all2/pull/53) - Upgrade: Bump actions/setup-node from 2.3.1 to 2.3.2 [`#52`](https://togithub.com/bcomnes/npm-run-all2/pull/52) - Upgrade: Bump actions/setup-node from 2.3.0 to 2.3.1 [`#51`](https://togithub.com/bcomnes/npm-run-all2/pull/51) - Upgrade: Bump codecov/codecov-action from 2.0.1 to 2.0.2 [`#50`](https://togithub.com/bcomnes/npm-run-all2/pull/50) - Upgrade: Bump actions/setup-node from 2.2.0 to 2.3.0 [`#49`](https://togithub.com/bcomnes/npm-run-all2/pull/49) - Upgrade: Bump codecov/codecov-action from 1.5.2 to 2.0.1 [`#48`](https://togithub.com/bcomnes/npm-run-all2/pull/48) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.1.1 to 2.2.0 [`#47`](https://togithub.com/bcomnes/npm-run-all2/pull/47) - Upgrade: Bump actions/setup-node from 2.1.5 to 2.2.0 [`#46`](https://togithub.com/bcomnes/npm-run-all2/pull/46) - Upgrade: Bump codecov/codecov-action from 1.5.0 to 1.5.2 [`#44`](https://togithub.com/bcomnes/npm-run-all2/pull/44) - Upgrade: Bump mocha from 8.4.0 to 9.0.0 [`#43`](https://togithub.com/bcomnes/npm-run-all2/pull/43) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.1.0 to 2.1.1 [`#42`](https://togithub.com/bcomnes/npm-run-all2/pull/42) - Upgrade: Bump fastify/github-action-merge-dependabot from 2.0.0 to 2.1.0 [`#41`](https://togithub.com/bcomnes/npm-run-all2/pull/41) - Upgrade: Bump gh-release from 5.0.2 to 6.0.0 [`#40`](https://togithub.com/bcomnes/npm-run-all2/pull/40) - Upgrade: Bump codecov/codecov-action from 1 to 1.5.0 [`#39`](https://togithub.com/bcomnes/npm-run-all2/pull/39) - Upgrade: Bump fs-extra from 9.1.0 to 10.0.0 [`#38`](https://togithub.com/bcomnes/npm-run-all2/pull/38) - Upgrade: Bump fastify/github-action-merge-dependabot from v1.2.1 to v2.0.0 [`#33`](https://togithub.com/bcomnes/npm-run-all2/pull/33) - Upgrade: Bump fastify/github-action-merge-dependabot [`#32`](https://togithub.com/bcomnes/npm-run-all2/pull/32) - Upgrade: Bump fastify/github-action-merge-dependabot from v1.1.1 to v1.2.0 [`#31`](https://togithub.com/bcomnes/npm-run-all2/pull/31) - Upgrade: Bump actions/setup-node from v2.1.4 to v2.1.5 [`#30`](https://togithub.com/bcomnes/npm-run-all2/pull/30) - Upgrade: Bump gh-release from 4.0.4 to 5.0.0 [`#29`](https://togithub.com/bcomnes/npm-run-all2/pull/29) - Upgrade: Bump actions/setup-node from v2.1.3 to v2.1.4 [`#28`](https://togithub.com/bcomnes/npm-run-all2/pull/28) - Upgrade: Bump actions/setup-node from v2.1.2 to v2.1.3 [`#27`](https://togithub.com/bcomnes/npm-run-all2/pull/27) ##### Fixed - Disable override tests on > npm 7 [`#79`](https://togithub.com/bcomnes/npm-run-all2/issues/79) ##### Commits - **Breaking change:** Bump engines to node 16 and npm 8 [`7d19dd4`](https://togithub.com/bcomnes/npm-run-all2/commit/7d19dd47ee70286878f380934d18823310355471) - Add auto merge [`e598066`](https://togithub.com/bcomnes/npm-run-all2/commit/e598066fea7478e0fce14b4f09d64fdf37b0420f) - Update test.yml [`96260d6`](https://togithub.com/bcomnes/npm-run-all2/commit/96260d6c088ce0aa2bd367ff0736d653f5b0b1f1) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
This PR contains the following updates:
1.5
->1.9
Release Notes
rust-lang/regex (regex)
v1.9.5
Compare Source
==================
This is a patch release that hopefully mostly fixes a performance bug that
occurs when sharing a regex across multiple threads.
Issue #934
explains this in more detail. It is also noted in the crate
documentation.
The bug can appear when sharing a regex across multiple threads simultaneously,
as might be the case when using a regex from a
OnceLock
,lazy_static
orsimilar primitive. Usually high contention only results when using many threads
to execute searches on small haystacks.
One can avoid the contention problem entirely through one of two methods.
The first is to use lower level APIs from
regex-automata
that require passingstate explicitly, such as
meta::Regex::search_with
.The second is to clone a regex and send it to other threads explicitly. This
will not use any additional memory usage compared to sharing the regex. The
only downside of this approach is that it may be less convenient, for example,
it won't work with things like
OnceLock
orlazy_static
oronce_cell
.With that said, as of this release, the contention performance problems have
been greatly reduced. This was achieved by changing the free-list so that it
was sharded across threads, and that ensuring each sharded mutex occupies a
single cache line to mitigate false sharing. So while contention may still
impact performance in some cases, it should be a lot better now.
Because of the changes to how the free-list works, please report any issues you
find with this release. That not only includes search time regressions but also
significant regressions in memory usage. Reporting improvements is also welcome
as well! If possible, provide a reproduction.
Bug fixes:
Fix a performance bug where high contention on a single regex led to massive
slow downs.
v1.9.4
Compare Source
==================
This is a patch release that fixes a bug where
RegexSet::is_match(..)
couldincorrectly return false (even when
RegexSet::matches(..).matched_any()
returns true).
Bug fixes:
Fix a bug where a prefilter was incorrectly configured for a
RegexSet
.v1.9.3
Compare Source
==================
This is a patch release that fixes a bug where some searches could result in
incorrect match offsets being reported. It is difficult to characterize the
types of regexes susceptible to this bug. They generally involve patterns
that contain no prefix or suffix literals, but have an inner literal along with
a regex prefix that can conditionally match.
Bug fixes:
Fix a bug with the reverse inner literal optimization reporting incorrect match
offsets.
v1.9.2
Compare Source
==================
This is a patch release that fixes another memory usage regression. This
particular regression occurred only when using a
RegexSet
. In some cases,much more heap memory (by one or two orders of magnitude) was allocated than in
versions prior to 1.9.0.
Bug fixes:
Fix a memory usage regression when using a
RegexSet
.v1.9.1
Compare Source
==================
This is a patch release which fixes a memory usage regression. In the regex
1.9 release, one of the internal engines used a more aggressive allocation
strategy than what was done previously. This patch release reverts to the
prior on-demand strategy.
Bug fixes:
Change the allocation strategy for the backtracker to be less aggressive.
v1.9.0
Compare Source
==================
This release marks the end of a years long rewrite of the regex crate
internals. Since this is
such a big release, please report any issues or regressions you find. We would
also love to hear about improvements as well.
In addition to many internal improvements that should hopefully result in
"my regex searches are faster," there have also been a few API additions:
Captures::extract
method for quickly accessing the substringsthat match each capture group in a regex.
R
, which enables CRLF mode. This makes.
match anyUnicode scalar value except for
\r
and\n
, and also makes(?m:^)
and(?m:$)
match after and before both\r
and\n
, respectively, but neverbetween a
\r
and\n
.RegexBuilder::line_terminator
was added to further customize the lineterminator used by
(?m:^)
and(?m:$)
to be any arbitrary byte.std
Cargo feature is now actually optional. That is, theregex
cratecan be used without the standard library.
regex 1.9
may make binary size and compile times even worse, anew experimental crate called
regex-lite
has been published. It prioritizesbinary size and compile times over functionality (like Unicode) and
performance. It shares no code with the
regex
crate.New features:
One can opt into CRLF mode via the
R
flag.e.g.,
(?mR:$)
matches just before\r\n
.Multi-pattern searches with offsets can be done with
regex-automata 0.3
.std
is now an optional feature.regex
may be used with onlyalloc
.RegexBuilder::line_terminator
configures how(?m:^)
and(?m:$)
behave.Anchored search APIs are now available in
regex-automata 0.3
.Add new
Captures::extract
method for easier capture group access.Add
regex-lite
crate with smaller binary sizes and faster compile times.Add
TryFrom
implementations for theRegex
type.Performance improvements:
Added a one-pass DFA engine for faster capture group matching.
Inner literals are now used to accelerate searches, e.g.,
\w+@​\w+
will scanfor
@
.PERF #891:
Makes literal optimizations apply to regexes of the form
\b(foo|bar|quux)\b
.(There are many more performance improvements as well, but not all of them have
specific issues devoted to them.)
Bug fixes:
Fix matching bugs related to
\B
and inconsistencies across internal engines.Fix matching bug with capture groups.
Fix matching bug with word boundaries.
Fix bug where some regexes like
(re)+
were not equivalent to(re)(re)*
.Fix matching bug inconsistency between NFA and DFA engines.
Fix matching bug where literal extraction got confused by
$
.Add documentation to replacement routines about dealing with fallibility.
Use corpus rejection in fuzz testing.
v1.8.4
Compare Source
==================
This is a patch release that fixes a bug where
(?-u:\B)
was allowed inUnicode regexes, despite the fact that the current matching engines can report
match offsets between the code units of a single UTF-8 encoded codepoint. That
in turn means that match offsets that split a codepoint could be reported,
which in turn results in panicking when one uses them to slice a
&str
.This bug occurred in the transition to
regex 1.8
because the underlyingsyntactical error that prevented this regex from compiling was intentionally
removed. That's because
(?-u:\B)
will be permitted in Unicode regexes inregex 1.9
, but the matching engines will guarantee to never report matchoffsets that split a codepoint. When the underlying syntactical error was
removed, no code was added to ensure that
(?-u:\B)
didn't compile in theregex 1.8
transition release. This release,regex 1.8.4
, adds that codesuch that
Regex::new(r"(?-u:\B)")
returns to theregex <1.8
behavior ofnot compiling. (A
bytes::Regex
can still of course compile it.)Bug fixes:
Fix a bug where
(?-u:\B)
was allowed in Unicode regexes, and in turn couldlead to match offsets that split a codepoint in
&str
.v1.8.3
Compare Source
==================
This is a patch release that fixes a bug where the regex would report a
match at every position even when it shouldn't. This could occur in a very
small subset of regexes, usually an alternation of simple literals that
have particular properties. (See the issue linked below for a more precise
description.)
Bug fixes:
Fix a bug where a match at every position is erroneously reported.
v1.8.2
Compare Source
==================
This is a patch release that fixes a bug where regex compilation could panic
in debug mode for regexes with large counted repetitions. For example,
a{2147483516}{2147483416}{5}
resulted in an integer overflow that wrappedin release mode but panicking in debug mode. Despite the unintended wrapping
arithmetic in release mode, it didn't cause any other logical bugs since the
errant code was for new analysis that wasn't used yet.
Bug fixes:
Fix a bug where regex compilation with large counted repetitions could panic.
v1.8.1
Compare Source
==================
This is a patch release that fixes a bug where a regex match could be reported
where none was found. Specifically, the bug occurs when a pattern contains some
literal prefixes that could be extracted and an optional word boundary in the
prefix.
Bug fixes:
Fix a bug where a word boundary could interact with prefix literal
optimizations and lead to a false positive match.
v1.8.0
Compare Source
==================
This is a sizeable release that will be soon followed by another sizeable
release. Both of them will combined close over 40 existing issues and PRs.
This first release, despite its size, essentially represents preparatory work
for the second release, which will be even bigger. Namely, this release:
aho-corasick
to the recently released 1.0version.
regex-syntax
to the simultaneously released0.7
version. The changes toregex-syntax
principally revolve around arewrite of its literal extraction code and a number of simplifications and
optimizations to its high-level intermediate representation (HIR).
The second release, which will follow ~shortly after the release above, will
contain a soup-to-nuts rewrite of every regex engine. This will be done by
bringing
regex-automata
intothis repository, and then changing the
regex
crate to be nothing but an APIshim layer on top of
regex-automata
's API.These tandem releases are the culmination of about 3
years of on-and-off work that began in earnest in March
2020.
Because of the scale of changes involved in these releases, I would love to
hear about your experience. Especially if you notice undocumented changes in
behavior or performance changes (positive or negative).
Most changes in the first release are listed below. For more details, please
see the commit log, which reflects a linear and decently documented history
of all changes.
New features:
Permit many more characters to be escaped, even if they have no significance.
More specifically, any ASCII character except for
[0-9A-Za-z<>]
can now beescaped. Also, a new routine,
is_escapeable_character
, has been added toregex-syntax
to query whether a character is escapeable or not.Add
Regex::captures_at
. This fills a hole in the API, but doesn't otherwiseintroduce any new expressive power.
Capture group names are now Unicode-aware. They can now begin with either a
_
or any "alphabetic" codepoint. After the first codepoint, subsequent codepoints
can be any sequence of alpha-numeric codepoints, along with
_
,.
,[
and]
. Note that replacement syntax has not changed.Add
Match::is_empty
andMatch::len
APIs.Add an
impl Default for RegexSet
, with the default being the empty set.A new method,
Regex::static_captures_len
, has been added which returns thenumber of capture groups in the pattern if and only if every possible match
always contains the same number of matching groups.
Named captures can now be written as
(?<name>re)
in addition to(?P<name>re)
.regex-syntax
now supports empty character classes.regex-syntax
now has an optionalstd
feature. (This will cometo
regex
in the second release.)Hir
type inregex-syntax
has had a number of simplificationsmade to it.
regex-syntax
has support for a newR
flag for enabling CRLFmode. This will be supported in
regex
proper in the second release.regex-syntax
now has proper support for "regex that nevermatches" via
Hir::fail()
.hir::literal
module ofregex-syntax
has been completelyre-worked. It now has more documentation, examples and advice.
allow_invalid_utf8
option inregex-syntax
has been renamedto
utf8
, and the meaning of the boolean has been flipped.Performance improvements:
aho-corasick 1.0
may improve performance in somecases. It's difficult to characterize exactly which patterns this might impact,
but if there are a small number of longish (>= 4 bytes) prefix literals, then
it might be faster than before.
Bug fixes:
Improve
Debug
impl forMatch
so that it doesn't show the entire haystack.#731:
Fix a number of issues with printing
Hir
values as regex patterns.Add explicit example of
foo|bar
in the regex syntax docs.Clarify that
SetMatches::len
does not (regretably) refer to the number ofmatches in the set.
Clarify "verbose mode" in regex syntax documentation.
#950:
Fix
CaptureLocations::get
so that it never panics.Clarify documentation for
Regex::shortest_match
.Fix
\p{Sc}
so that it is equivalent to\p{Currency_Symbol}
.Add more clarifying documentation to the
CompiledTooBig
error variant.Clarify that
regex::Regex
searches as if the haystack is a sequence ofUnicode scalar values.
Replace
__Nonexhaustive
variants with#[non_exhaustive]
attribute.Optimize case folding since it can get quite slow in some pathological cases.
Reject
(?-u:\W)
inregex::Regex
APIs.Add a missing
void
keyword to indicate "no parameters" in C API.Fix
\p{Lc}
so that it is equivalent to\p{Cased_Letter}
.Clarify documentation for
\pX
syntax.v1.7.3
Compare Source
==================
This is a small release that fixes a bug in
Regex::shortest_match_at
thatcould cause it to panic, even when the offset given is valid.
Bug fixes:
Fix a bug in how the reverse DFA was called for
Regex::shortest_match_at
.v1.7.2
Compare Source
==================
This is a small release that fixes a failing test on FreeBSD.
Bug fixes:
Fix "no stack overflow" test which can fail due to the small stack size.
v1.7.1
Compare Source
==================
This release was done principally to try and fix the doc.rs rendering for the
regex crate.
Performance improvements:
Optimize
replacen
. This also applies toreplace
, but notreplace_all
.Bug fixes:
Maybe fix rustdoc rendering by just bumping a new release?
v1.7.0
Compare Source
==================
This release principally includes an upgrade to Unicode 15.
New features:
Upgrade to Unicode 15.
v1.6.0
Compare Source
==================
This release principally includes an upgrade to Unicode 14.
New features:
Clarify that
Captures::len
includes all groups, not just matching groups.Add an
ExactSizeIterator
impl forSubCaptureMatches
.Improve
RegexSet
documentation examples.Upgrade to Unicode 14.
Bug fixes:
Fix error message rendering bug.
v1.5.6
Compare Source
==================
This release includes a few bug fixes, including a bug that produced incorrect
matches when a non-greedy
?
operator was used.Fixes a bug where
[[:alnum:][:^ascii:]]
dropped[:alnum:]
from the class.Fixes a bug where
Hir::is_match_empty
returnedfalse
for\b
.Fixes a bug where 'ab??' matches 'ab' instead of 'a' in 'ab'.
v1.5.5
Compare Source
==================
This releases fixes a security bug in the regex compiler. This bug permits a
vector for a denial-of-service attack in cases where the regex being compiled
is untrusted. There are no known problems where the regex is itself trusted,
including in cases of untrusted haystacks.
Fixes a bug in the regex compiler where empty sub-expressions subverted the
existing mitigations in place to enforce a size limit on compiled regexes.
The Rust Security Response WG published an advisory about this:
https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw
v1.5.4
Compare Source
==================
This release fixes another compilation failure when building regex. This time,
the fix is for when the
pattern
feature is enabled, which only works onnightly Rust. CI has been updated to test this case.
Fix build when
pattern
feature is enabled.v1.5.3
Compare Source
==================
This releases fixes a bug when building regex with only the
unicode-perl
feature. It turns out that while CI was building this configuration, it wasn't
actually failing the overall build on a failed compilation.
Fix build in
regex-syntax
when only theunicode-perl
feature is enabled.v1.5.2
Compare Source
==================
This release fixes a performance bug when Unicode word boundaries are used.
Namely, for certain regexes on certain inputs, it's possible for the lazy DFA
to stop searching (causing a fallback to a slower engine) when it doesn't
actually need to.
PR #768 fixes the bug, which was
originally reported in
ripgrep#1860.
v1.5.1
Compare Source
==================
This is a patch release that fixes a compilation error when the
perf-literal
feature is not enabled.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.