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

Add proposal-unicode-sets-regex to @babel/standalone #14697

Merged
merged 1 commit into from Jun 27, 2022

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jun 27, 2022

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

We forgot to add this when we added the plugin, it's stage 3 and it would be nice to have it in the repl (cc @mathiasbynens)

@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jun 27, 2022
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52380/

1 similar comment
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52380/

Copy link
Contributor

@mathiasbynens mathiasbynens left a comment

Choose a reason for hiding this comment

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

Yay! This would be awesome :)

@nicolo-ribaudo
Copy link
Member Author

It works, I just had a wrong input 🙂

https://babeljs.io/repl/build/52380/#?code_lz=DYUwLgBATiDmIA8AOEC8ED0BtLBDAtAGYC6AZKVgMb4AWxxGAbgNxA&presets=stage-3&version=7.18.5%2Bpr.14697

Also, I found a bug in the transform: it fails with /\p{RGI_Emoji}/v.

@nicolo-ribaudo
Copy link
Member Author

Same time 😄

@nicolo-ribaudo
Copy link
Member Author

@mathiasbynens Why /x|*️⃣|0️⃣/u isn't valid? 🤔

@nicolo-ribaudo
Copy link
Member Author

Oh damn, I got it.

Magic 🪄
/^x*️⃣?$/u.test("xxxx\uFE0F") -> true

@mathiasbynens
Copy link
Contributor

Oh damn, I got it.

Magic 🪄 /^x*️⃣?$/u.test("xxxx\uFE0F") -> true

Ah, good catch! /x|*️⃣|0️⃣/u is actually /x|*\uFE0F\u20E3|0\uFE0F\u20E3/u, where * is treated as a quantifier. Whoops!

@macchiati
Copy link

Yup, the keycaps are a pain, because they have 0-9 and * and #

@nicolo-ribaudo nicolo-ribaudo merged commit e6ddab1 into babel:main Jun 27, 2022
@nicolo-ribaudo nicolo-ribaudo deleted the regexp-v-standalone branch June 27, 2022 17:58
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants