-
Notifications
You must be signed in to change notification settings - Fork 0
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
build(deps): update dependency xregexp to v5 #231
Conversation
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 15 15
Lines 542 542
=======================================
Hits 541 541
Misses 1 1
Continue to review full report at Codecov.
|
632292c
to
131791a
Compare
Hi! XRegExp v5 has a breaking change described at https://github.com/slevithan/xregexp#named-capture-breaking-change-in-xregexp-5 Specifically, named backreference properties now appear on the result's XRegExp 4.1.0 and later allow introducing the new behavior without upgrading to XRegExp 5 by running Following is the most commonly needed change to update code for the new behavior: // Change this
const name = XRegExp.exec(str, regexWithNamedCapture).name;
// To this
const name = XRegExp.exec(str, regexWithNamedCapture).groups.name; Let me know if you have any questions and I'll be happy to help! |
🎉 This PR is included in version 1.20.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi @slevithan That works great! Thank you very much for pointing us towards this and explaining the change 😄 Thanks, |
This PR contains the following updates:
4.4.1
->5.1.0
Release Notes
slevithan/xregexp
v5.1.0
Compare Source
XRegExp.matchRecursive
: Add support for matching with unbalanced delimiters: #960f52a62
XRegExp.matchRecursive
: Make global non-sticky matches withvalueNames
return an empty array if no matches found:6e1711e
v5.0.2
Compare Source
XRegExp.matchChain
: #325XRegExp.escape
to handle-
,,
, and#
in a way that is compatible with ES6 flagu
: #323v5.0.1
Compare Source
docs
folder with extensive documentation.v5.0.0
Compare Source
Breaking Changes
namespacing
feature by default for alignment with ES2018 (moves named capture properties to thegroups
object of matches and to the last argument of replacement callbacks): BREAKING: Enablenamespacing
feature by default slevithan/xregexp#316Improvements
Script=
' prefix (from ES2018 syntax) for Unicode script tokens: Align with native Unicode property escapes slevithan/xregexp#225XRegExp.matchRecursive
: Add delimiter and position info to error when unbalanced delimiters are found: Can we have some position information in Unbalanced delimiter error? slevithan/xregexp#293(?:)
into native regex source in more cases: slevithan/xregexp@076f950 and slevithan/xregexp@d78a262s
in ES2018 environments: slevithan/xregexp@98abea8Bug Fixes
XRegExp.exec
: Preserve thegroups
object that comes from native ES2018 named capture: slevithan/xregexp@c4a83e7XRegExp.exec
: Set thegroups
property toundefined
if there are no named captures:groups
property of matchObj for regex without named capture should have valueundefined
slevithan/xregexp#320XRegExp.escape
: Escape whitespace in a way that works with ES6 flagu
: Escape function returns regex that is incompatible with 'u' flag slevithan/xregexp#197XRegExp.replace
: Throw when using native named capture and a numbered backreference one higher than the number of captures in the replacement text: Should throw when using XRegExp.replace with native named capture and numbered backref one higher than number of captures slevithan/xregexp#317XRegExp.replace
: Fix edge case issues with replacement text syntax: Fix edge case issues with replacement text syntax slevithan/xregexp#318Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.