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
Fix unicode handling in generated function names #14047
Changes from 1 commit
673c623
af6dcf7
70c508f
feaed13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
], | ||
"dependencies": { | ||
"@babel/helper-function-name": "workspace:^", | ||
"@babel/helper-plugin-utils": "workspace:^" | ||
"@babel/helper-plugin-utils": "workspace:^", | ||
"@babel/helper-compilation-targets": "workspace:^" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I will run |
||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.0.0-0" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
The-x-Theorist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"sourceType": "unambiguous", | ||
"plugins": ["transform-unicode-escapes"], | ||
"presets": ["env"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plugin enabled by preset env will not always be the same. Can you enable just this plugin instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I will enable only the plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we don't use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the plugin refers to the |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C"() {} | ||
}; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,4 @@ | ||||||
{ | ||||||
"plugins": ["transform-unicode-escapes"], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
See also https://github.com/babel/babel/pull/14047/files/673c623ec94a8daf6bce79b87b5f1f6c8f5bca3d..af6dcf7895b497080d54557977792fe7d0d26571#r770063967 and #14047 (comment) |
||||||
"targets": { "firefox": 60 } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test case is testing the behaviour of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I will use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After changing the targets it still gives the same result for different targets, I don't know what's happening? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var o = { | ||
"\uD835\uDC9C"() {} | ||
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C"() {} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"plugins": ["transform-unicode-escapes"], | ||
The-x-Theorist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"targets": { "firefox": 50 } | ||
The-x-Theorist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var o = { | ||
"\uD835\uDC9C"() {} | ||
|
||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This test is more expensive, consider place it after the
if (name === undefined)
check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will move it down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you commit the changes?