Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[babel 8] Other Babel 8 misc changes#15576

Merged
nicolo-ribaudo merged 10 commits into
babel:mainfrom
nicolo-ribaudo:babel-8-misc-again
Apr 27, 2023
Merged

[babel 8] Other Babel 8 misc changes#15576
nicolo-ribaudo merged 10 commits into
babel:mainfrom
nicolo-ribaudo:babel-8-misc-again

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo commented Apr 19, 2023

Q                       A
Documentations PR Link babel/website#2765
License MIT

These are almost all the remaining TODO(Babel 8) comments :)

What remains to do (in other PRs):

@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Apr 19, 2023

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

Copy link
Copy Markdown
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

So the breaking changes of this PR are:

  • Stop supporting presets/plugins with named exports, essentially reverting #4620
  • Per package renames, the includes and excludes preset-env options will now only respect new plugin names

Other changes like removing the compat code for legacy helpers are not actually breaking. Did I miss any breaking changes?

@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

@JLHwung That's correct 👍 All the other changes are just internal changes.

Comment on lines 11 to 21
function escape(code: number) {
let str = code.toString(16);
// Sigh, node 6 doesn't have padStart
// TODO: Remove in Babel 8, when we drop node 6.
while (str.length < 4) str = "0" + str;
return "\\u" + str;
if (process.env.BABEL_8_BREAKING) {
return "\\u" + code.toString(16);
} else {
let str = code.toString(16);
// Sigh, node 6 doesn't have padStart
// TODO: Remove in Babel 8, when we drop node 6.
while (str.length < 4) str = "0" + str;
return "\\u" + str;
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I've made a mistake, but it seems the tests don't cover it.

@nicolo-ribaudo nicolo-ribaudo merged commit c060e5e into babel:main Apr 27, 2023
@nicolo-ribaudo nicolo-ribaudo deleted the babel-8-misc-again branch April 27, 2023 11:56
@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 Jul 28, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 28, 2023
@nicolo-ribaudo nicolo-ribaudo added this to the v8.0.0 milestone Aug 8, 2023
@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 9, 2023
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: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants