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
Warn in @babel/plugin-proposal-private-property-in-object
fallback
#15687
Warn in @babel/plugin-proposal-private-property-in-object
fallback
#15687
Conversation
d14f639
to
d9bf65c
Compare
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/54631/ |
Oh thank you |
The reason I considered adding the explicit workaround/fallback for create-react-app, instead of just erroring like for everyone else, is that I thought that create-react-app is very popular with 4 millions downloads per month. It turns out it has just ~100k downloads/week, and there has been some anomality in April that gave averaged to 4M/month. Maybe it's ok to error as or everyone else, and users can still work around the error by explicitly adding the package to their config. |
Those are some weird spikes! Daily downloads between 2022-04-01 and 2022-05-01: |
CI failures are unrelated, they are just because we enabled the import assertions syntax in test262. |
Trying to pinpoint an issue Not sure where to address the issue, as the proposal plugin is stating this version should not be used. @nicolo-ribaudo You maybe understand what is happening here? |
This version of the package should indeed not be used. We had to add it back as a dependency due to a bug with create-react-app, but nothing should be |
@@ -22,7 +22,7 @@ | |||
"@babel/helper-validator-option": "workspace:^", | |||
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "workspace:^", | |||
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "workspace:^", | |||
"@babel/plugin-proposal-private-property-in-object": "^7.21.0", | |||
"@babel/plugin-proposal-private-property-in-object": "condition:BABEL_8_BREAKING ? : 7.21.0-placeholder-for-preset-env.2", |
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.
Could this ternary require two values?
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.
This ternary is just to make sure that the dependency will be automatically removed in Babel 8, in the published package it's being resolved to 7.21.0-placeholder-for-preset-env.2
@nicolo-ribaudo I've seen two share already:
For me it's also just referring to my babel loader |
Those two screenshots are bugs with Nuxt's Babel preset and create-react-app. Nuxt is releasing a fix soon (nuxt/nuxt#21488), while the dependency
Could you share your package.json and your Babel configuration? Our error messages are not great sometimes 😅 |
Sorry @nicolo-ribaudo! Thanks for the quick action. For me personally it's coming from nuxt as-well. |
Oh good, hopefully the fix will be released soon :) Unfortunately due to how |
what reason I found the issuse is my project report a error when it install,
I don't know what cause it, but the ci build must be run at that time, so I had to fix the version of this babel plugin to "^7.21.0",Even though it seems unrelated now,when I read something about "semver" today. luckly the 7.21.11 be installed that time. ^_^.maybe Babel just happened to publish it. I'm not familiar with Open source project version management .I found the version logfile just now,but I still have some doubts after reading it . why did the version be called "7.21.0-placeholder-for-preset-env.2", what does the "placeholder-for-preset-env.2" represet . |
|
This is a better workaround for the create-react-app that replaces #15658. It warns when the fallback is triggered, explaining users how to fix the problem.
This is the code of the fallback package: