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
Update transform-unicode-escapes test to output minimal strings #11721
Update transform-unicode-escapes test to output minimal strings #11721
Conversation
manipulateOptions(opts) { | ||
opts.generatorOpts.jsescOption = { | ||
minimal: false, | ||
...opts.generatorOpts.jsescOption, |
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.
Should I swap these lines? Or throw an error if jsescOption
is set to true
?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit cd52a04:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/24119/ |
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.
I actually think this is fine to leave as is. Given:
// Input
const \u{1d49c} = "\u{1d49c}";
// minimal: false (this PR)
var _ud835_udc9c = "\uD835\uDC9C";
// minimal: true (current next-8)
var _ud835_udc9c = "𝒜";
The non-ASCII 𝒜
inside strings is actually fine, and well-supported back to ES5 browsers. That's actually a valid transform we could have done with #11377.
10bad01
to
cd52a04
Compare
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.
Thanks for fixing these!
next-8-dev
is currently failing; this PR fixes it.While merging
master
intonext-8-dev
, I noticed that #11384 and #11377 are incompatible with eachother.This PR attemps to fix it by setting
jsescOption.minimal: false
when usingtransform-unicode-escapes
.