Skip to content

Releases: slevithan/regex

v4.3.3

02 Oct 15:52
Compare
Choose a tag to compare

🚀 Features

  • When an invalid regex throws, always include the generated source and flags in the error message (some browsers automatically include them, but Firefox and Safari don't).

🐞 Fixes

  • Convert numbers interpolated in enclosed \u{…} to hexadecimal. In other words, although interpolating a string like regex`\u{${'160'}}` returns /\u{160}/, interpolating the number regex`\u{${160}}` in this context returns /\u{A0}/. (#24, @graphemecluster)

v4.3.2

07 Sep 23:36
Compare
Choose a tag to compare

🐞 Fixes

  • Don't find possessive quantifiers within character classes.

v4.3.1

06 Sep 21:06
Compare
Choose a tag to compare

🐞 Fixes

  • Fix usage of multiple possessive quantifiers in the same regex.

v4.3.0

06 Sep 03:21
Compare
Choose a tag to compare

🚀 Features

  • Replaced the use of \u{0} with \x00 in emitted source for sandboxed null tokens.
  • Removed the rewrite function's deprecated alias processRegex.
    • rewrite is no longer considered experimental.

v4.2.1

05 Sep 00:44
Compare
Choose a tag to compare

🚀 Features

  • Renamed function processRegex as rewrite.
    • processRegex remains as a deprecated alias but will be removed in the next release.

v4.2.0

04 Sep 19:31
Compare
Choose a tag to compare

🚀 Features

  • Added function processRegex, which returns an object with expression and flags strings.
    • Warning: This feature is experimental and may change without following semver.

🐞 Fixes

  • When using emulated flag x, if flag v is disabled or unsupported and unicodeSetsPlugin is explicitly set to null, allow whitespace-separated, unescaped (literal) hyphens on the end of character class ranges.

v4.1.3

24 Aug 16:46
Compare
Choose a tag to compare

🚀 Features

  • Added a top-level types field to package.json for tools and configurations that rely on it. (#23, @jaslong)
  • Avoids auto-escaping certain characters within character classes when not required. (#22)

v4.1.2

22 Aug 13:13
Compare
Choose a tag to compare

🚀 Features

v4.1.1

18 Aug 13:46
Compare
Choose a tag to compare

🚀 Features

  • Combining atomic/possessive syntax with subroutines previously resulted in subroutines using capturing wrappers. This is now avoided when the regex doesn’t use backreferences, resulting in faster-running generated regex source.
  • Possessive fixed repetition quantifiers (e.g. {2}+) are now converted to greedy quantifiers (e.g. {2}), which gives the same behavior with faster-running generated regex source.

🐞 Fixes

  • When using extended syntax (e.g. atomic groups) that resulted in the use of emulation groups in generated source, the subclass: true option could lead to incorrect values for submatches that preceded emulation groups, when used outside of the regex.

v4.1.0

16 Aug 09:43
Compare
Choose a tag to compare

🚀 Features

  • Added support for possessive quantifiers.