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 3 commits
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C"() {} | ||
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 new test cases use var o = {
"\uD835\uDC9C": function () {}
} When unicode escapes are supported, the output should be var o = {
"\uD835\uDC9C": function 𝒜() {}
}; otherwise, the output should be var o = {
"\uD835\uDC9C": function () {}
}; In this case the plugin does nothing. |
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
The-x-Theorist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"plugins": ["transform-function-name", "transform-shorthand-properties"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C": function () {} | ||
}; |
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-function-name", "transform-shorthand-properties"], | ||
"targets": { "firefox": 52 } | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C": function () {} | ||
}; |
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-function-name", "transform-shorthand-properties"], | ||
"targets": { "firefox": 60 } | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var o = { | ||
"\uD835\uDC9C": function 𝒜() {} | ||
}; |
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?