Releases: slevithan/regex
Releases · slevithan/regex
v6.0.1
v6.0.0
Version 6 includes breaking changes that don't affect direct use of the library. It alters APIs used by tools that build on top of Regex+.
🚨 Breaking
rewrite
: Renamed the returnedexpression
property aspattern
.- Plugins: Changed the API to expect an object with a string property
pattern
. - Plugins: Hidden capture indices are now explicitly provided/returned, rather than embedded via markers in the pattern.
./internals
: RemovedRegExpSubclass
's undocumented and experimental support for capture transfer../internals
: RemovedemulationGroupMarker
since pattern markers are no longer used for hidden captures.
🚀 Features
- Improved performance of the
subclass
option, especially with long patterns that contain extended syntax.
v5.1.1
v5.1.0
🚀 Features
- Export
emulationGroupMarker
in./internals
. - Add support for emulation groups with subpattern transfer to
RegExpSubclass
.- Intended for use in libraries that build on Regex+ internals. This feature is undocumented and experimental; it might change without following semver.
v5.0.2
v5.0.1
v5.0.0
This library was renamed from just regex
to Regex+, to make it easier to refer to the library and its regex flavor. The package and tag name remain regex
as before, so this has no effect on code.
Version 5 is a minor update with small breaking changes that won't affect most people.
🚨 Breaking
- Type files (
d.ts
) were moved from./types
to./dist/esm
and./dist/cjs
. - The undocumented
./atomic
export added in v4.4.0 was renamed as./internals
.
🚀 Features
RegExpSubclass
was made available via./internals
.
🐞 Fixes
- Type resolution works correctly when using the library as CommonJS. (#29, @tao-cumplido)
- When using option
subclass
and flagd
, resulting subpattern indices are adjusted to account for emulation groups.
v4.4.0
v4.3.3
🚀 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 likeregex`\u{${'160'}}`
returns/\u{160}/
, interpolating the numberregex`\u{${160}}`
in this context returns/\u{A0}/
. (#24, @graphemecluster)