Skip to content
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

BREAKING: Enable namespacing feature by default #316

Merged
merged 7 commits into from Jan 10, 2021

Conversation

josephfrazier
Copy link
Collaborator

@josephfrazier josephfrazier commented Jan 9, 2021

Following up on the change to use ES2018 constraints on the names of capture groups,
this makes it so that XRegExp namespacing feature is enabled by
default, so that named capture group matches will appear on the
.groups property of the match object, rather than directly on the
match object, in accordance with the ES2018 spec.

While this is a breaking change, users can restore the old behavior by running:

XRegExp.uninstall('namespacing')

Following up on the [change] to use ES2018 constraints on the names of capture groups,
this makes it so that XRegExp `namespacing` feature is enabled by
default, so that named capture group matches will appear on the
`.groups` property of the match object, rather than directly on the
match object, in accordance with the ES2018 spec.

While this is a breaking change, users can restore the old behavior by running:

    XRegExp.uninstall('namespacing')

[change]: #247 (comment)
@josephfrazier josephfrazier marked this pull request as ready for review January 9, 2021 23:35
Copy link
Owner

@slevithan slevithan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really solid!

@josephfrazier josephfrazier merged commit 0adaa26 into master Jan 10, 2021
@josephfrazier josephfrazier deleted the joseph/default.to.namespacing branch January 10, 2021 03:11
@josephfrazier
Copy link
Collaborator Author

thanks!

josephfrazier added a commit that referenced this pull request Feb 7, 2021
Changes include:

* BREAKING: Handle ES2018 capture names: #247
* BREAKING: Enable `namespacing` feature by default: #316
* BREAKING: Remove Unicode Blocks addon: 4860122
* restore perf tweak that made a meaningful difference in regex construction perf tests: 5f18261
* XRegExp.exec: preserve groups obj that comes from native ES2018 named capture: c4a83e7
* Make XRegExp.exec set groups prop to undefined if there are no named captures (closes #320): 7fea476
* Support optional 'Script=' prefix (from ES2018 syntax) for Unicode script tokens (#225): bb35ead
* XRegExp.matchRecursive: Add delimiter and pos info when unbalanced delimiters are found (closes #293): 9660b90
* XRegExp.escape: Escape whitespace in a way that works with ES6 flag u (fixes #197): e22a52b

To generate this commit, I adapted the steps at #205 (comment)

Here's a fuller list of changes that can be needed with new releases:

> * Version number
>   * Update version number and year in headers, config files, README.
>   * Update version number in `XRegExp.version`.
> * Publish
>   * Publish new git tag. E.g.:
>     * `git tag -a v3.1.0 -m "Release 3.1.0"`.
>     * `git push origin v3.1.0`.
>   * `npm publish`.
josephfrazier added a commit that referenced this pull request Feb 8, 2021
Changes include:

* BREAKING: Handle ES2018 capture names: #247
* BREAKING: Enable `namespacing` feature by default: #316
* BREAKING: Remove Unicode Blocks addon: 4860122
* restore perf tweak that made a meaningful difference in regex construction perf tests: 5f18261
* XRegExp.exec: preserve groups obj that comes from native ES2018 named capture: c4a83e7
* Make XRegExp.exec set groups prop to undefined if there are no named captures (closes #320): 7fea476
* Support optional 'Script=' prefix (from ES2018 syntax) for Unicode script tokens (#225): bb35ead
* XRegExp.matchRecursive: Add delimiter and pos info when unbalanced delimiters are found (closes #293): 9660b90
* XRegExp.escape: Escape whitespace in a way that works with ES6 flag u (fixes #197): e22a52b

To generate this commit, I adapted the steps at #205 (comment)

Here's a fuller list of changes that can be needed with new releases:

> * Version number
>   * Update version number and year in headers, config files, README.
>   * Update version number in `XRegExp.version`.
> * Publish
>   * Publish new git tag. E.g.:
>     * `git tag -a v3.1.0 -m "Release 3.1.0"`.
>     * `git push origin v3.1.0`.
>   * `npm publish`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants