Skip to content
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

Tweak preset-env corejs/useBuiltIns warning and error messages #9716

Merged
merged 2 commits into from Mar 21, 2019

Conversation

existentialism
Copy link
Member

Q                       A
Fixed Issues?
Patch: Bug Fix? N
Major: Breaking Change? N
Minor: New Feature? N
Tests Added + Pass? Y/Y
Documentation PR Link
Any Dependency Changes?
License MIT

@existentialism existentialism added PR: Polish 💅 A type of pull request used for our changelog categories pkg: preset-env labels Mar 20, 2019
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 20, 2019

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

"core-js version. Currently, we assume version 2.x when no version " +
"is passed. Since this default version will likely change in future " +
"versions of Babel, we recommend explicitly setting the core-js version " +
"you are using via the `corejs` option.\n",
Copy link
Member

Choose a reason for hiding this comment

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

We should also say they users should be sure that they have the correct version of core-js in their dependencies.
For example, angular-cli was broken by the core-js@3 release because they were relying on core-js@2 being in node_modules without specifying it in dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"you are using via the `corejs` option.\n",
"you are using via the `corejs` option.\n" +
"You should also be sure that the version you pass to the `corejs` " +
"option matches the version specified in your `package.json`'s " +
"`dependencies` section. If it doesn't, you need to run one of the " +
"following commands:\n\n" +
" npm install --save core-js@2 npm install --save core-js@3\n" +
" yarn add core-js@2 yarn add core-js@3\n",

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@htulipe
Copy link

htulipe commented Mar 27, 2019

The corejs mentioned in this new warning message is undocumented: https://babeljs.io/docs/en/babel-preset-env

@nicolo-ribaudo
Copy link
Member

Doc PR at babel/website#1987

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
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 pkg: preset-env PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants