Skip to content

Releases: slevithan/xregexp

v5.1.0

Compare
Choose a tag to compare

Breaking Changes

  • XRegExp.matchRecursive: When doing a global, non-sticky search and providing valueNames, return an empty array if no matches are found, rather than an array with one object containing a between value that contains the whole target string (this change is to match every other case when no matches are found, e.g. when not providing valueNames, not using global with flag g, or doing a sticky search with flag y): 6e1711e

Improvements

  • XRegExp.matchRecursive: Add support for matching with unbalanced delimiters (new unbalanced option with supported values 'error' [default], 'skip', and 'skip-lazy'): #96
  • Upgrade to Unicode 14.0.0: 0f52a62

v5.0.2

Compare
Choose a tag to compare
  • Fix TypeScript definition for XRegExp.matchChain: #325
  • Fix XRegExp.escape to handle -, ,, and # in a way that is compatible with ES6 flag u: #323

v5.0.1

Compare
Choose a tag to compare
  • Hotfix for broken npm package.
  • Adds docs folder with extensive documentation.

v5.0.0

e52e0a0
Compare
Choose a tag to compare

Breaking Changes

  • Enable the namespacing feature by default for alignment with ES2018 (moves named capture properties to the groups object of matches and to the last argument of replacement callbacks): #316
  • Handle ES2018 capture names (mostly this adds support for an extended set of Unicode characters, but it also prevents using a number as the first character in a capture name): #247
  • Remove support for Unicode blocks, for alignment with ES2018 (use Unicode scripts instead): #225

Improvements

  • Support optional 'Script=' prefix (from ES2018 syntax) for Unicode script tokens: #225
  • XRegExp.matchRecursive: Add delimiter and position info to error when unbalanced delimiters are found: #293
  • Avoid inserting unneeded (?:) into native regex source in more cases: 076f950 and d78a262
  • Defer to native flag s in ES2018 environments: 98abea8

Bug Fixes

  • XRegExp.exec: Preserve the groups object that comes from native ES2018 named capture: c4a83e7
  • XRegExp.exec: Set the groups property to undefined if there are no named captures: #320
  • XRegExp.escape: Escape whitespace in a way that works with ES6 flag u: #197
  • XRegExp.replace: Throw when using native named capture and a numbered backreference one higher than the number of captures in the replacement text: #317
  • XRegExp.replace: Fix edge case issues with replacement text syntax: #318

v4.4.1

1e8e3fa
Compare
Choose a tag to compare
  • Add browser field to package.json to fix webpack: #308

v4.4.0

Compare
Choose a tag to compare
  • Upgrade to Unicode 13.0.0
  • Add TypeScript definitions and tests #285 #286 #288
  • Fix infinite loop in IE11 when used with core-js 3.6.0+ #300

v4.3.0

1623cfe
Compare
Choose a tag to compare
  • Upgrade to Unicode 12.1.0 : #278
  • Upgrade to @babel/runtime-corejs3 : #280

v4.2.4

Compare
Choose a tag to compare

Update @babel dependencies to v7.2.x

v4.2.3

Compare
Choose a tag to compare

Hotfix for Babel removing core-js from the runtime package.

v4.2.0

Compare
Choose a tag to compare

Upgrades the Unicode addons to Unicode 11.0.0.