-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add placeholders support to @babel/types and @babel/generator #9542
Add placeholders support to @babel/types and @babel/generator #9542
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10427/ |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10177/ |
packages/babel-generator/test/fixtures/misc/.placeholders/input.js
Outdated
Show resolved
Hide resolved
0500381
to
a79a0df
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.
The change makes sense to me and not controversial at all.
I guess that most of the time nobody will see Placeholders in the AST anyway as it will be exclusively used by @babel/template
, right?
That makes me wonder though if the changes to @babel/types
are actually necessary? As long as
there is no error thrown I would think they are not really needed unless @babel/template
needs them?
Yeah, 99% of the times they will only be used by
|
a79a0df
to
759049d
Compare
%%:+1:%% |
759049d
to
f88d6ac
Compare
* master: (58 commits) Remove dependency on home-or-tmp package (babel#9678) [proposal-object-rest-spread] fix templateLiteral in extractNormalizedKeys (babel#9628) Partial application plugin (babel#9474) Private Static Class Methods (Stage 3) (babel#9446) gulp-uglify@3.0.2 rollup@1.6.0 eslint@5.15.1 jest@24.5.0 regexpu-core@4.5.4 Remove input and length from state (babel#9646) Switch from rollup-stream to rollup and update deps (babel#9640) System modules - Hoist classes like other variables (babel#9639) fix: Don't transpile ES2018 symbol properties (babel#9650) Add WarningsToErrorsPlugin to webpack to avoid missing build problems on CI (babel#9647) Update regexpu-core dependency (babel#9642) Add placeholders support to @babel/types and @babel/generator (babel#9542) Generate plugins file Make babel-standalone an ESModule and enable flow (babel#9025) Reorganize token types and use a map for them (babel#9645) [TS] Allow context type annotation on getters/setters (babel#9641) ...
Related to #9364, but those two PRs can be merged in any order.
The "core" of this PR is at https://github.com/babel/babel/pull/9542/files#diff-70f395c5d000299ece93fa4d13b656f9R18: does it make sense? That same logic is replicated for the
is[Type]
helpers.