Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify warning source about underspecified corejs option in preset-e…
…nv. (#12402) * Clarify these warnings are for babel-preset-env. * Fix lint. * Fix specs. * Fix merge conflict. * PR feedback.
- Loading branch information
1 parent
4b79ab4
commit 71f8787
Showing
10 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/babel-preset-env/test/fixtures/debug/corejs-without-usebuiltins/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-no-import/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-shippedProposals/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-uglify/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/entry-no-corejs/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
5 changes: 4 additions & 1 deletion
5
packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-1/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
5 changes: 4 additions & 1 deletion
5
packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-2/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-1/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |
7 changes: 5 additions & 2 deletions
7
packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-2/stderr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
WARNING: We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
WARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a 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. | ||
|
||
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: | ||
|
||
npm install --save core-js@2 npm install --save core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
yarn add core-js@2 yarn add core-js@3 | ||
|
||
More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins | ||
More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs |