-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
regex source property escaping value changed? #29888
Comments
I think it is expected behavior – it matches my understanding of the JS spec – but it’s not in our changelog because this came along with a JS engine upgrade. Unfortunately, V8 itself does not always keep detailed changelogs. |
Bisected to v8/v8@17b9d87 |
Thanks for the reference! Knowing this I can take the appropriate actions for my use-case safely. Unsure if there is anything else you'd like to do with the issue, but feel free to close if necessary. |
I just spent the last 4 hours debugging our React Native application release build script. It is failing since today, I wouldn't have realized it was a node/v8 issue. I went through the changelog in the morning to make sure there are no clashes.
Shall we expect a fix from node or from the library maintainers? |
I guess we could consider reverting this for Node 12 if there’s agreement that we should do that, but given that it’s a bugfix (it aligns us with the spec and other browsers) and coming from V8 rather than us directly, I wouldn’t be a huge fan of that. /cc @nodejs/v8 @nodejs/tsc |
I would prefer we not revert and let the issue be handled (or not) upstream. |
@cjihrig I assume V8 would not be reverting anything here because from their perspective V8 7.7 was already a major release and they can do breaking changes in it. |
Yea, that's what I assumed. |
With a little more digging, I found this PR facebook/metro#454 for at least the library used by React Native, to make it compliant with the new V8 regex tests, but I wonder what else is broken.. |
Just to confirm, v8/v8@17b9d87 was an intentional change to better align V8 with the spec. I'm not sure I fully understand if there is a bug. Are you saying that V8's current behavior is incorrect? |
I'm going to close this issue. It's unfortunate that the bug fix affects some users, but this can always be the case. |
12.10.0
->12.11.0
Darwin mtvl1502b5c63 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
It would appear the regex
source
property behavior changed between node versions12.10.0
and12.11.0
It would appear the generated string with escaped slashes differs.
Granted, the regex itself behaves the same (as far as I can tell) any tooling/logic depending on the value of
source
may be impacted (for example Jest snapshots).If this was intended behavior and listed in a changelog, I could not locate it.
The text was updated successfully, but these errors were encountered: