From de7dd7f0159aac005adaf5bed639f6c81b87a461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 21 Mar 2019 10:38:21 +0100 Subject: [PATCH] Mark the core-js warning as such (#9732) --- packages/babel-preset-env/src/normalize-options.js | 2 +- .../test/debug-fixtures/entry-no-corejs-no-import/stdout.txt | 2 +- .../debug-fixtures/entry-no-corejs-shippedProposals/stdout.txt | 2 +- .../test/debug-fixtures/entry-no-corejs-uglify/stdout.txt | 2 +- .../test/debug-fixtures/entry-no-corejs/stdout.txt | 2 +- .../test/debug-fixtures/usage-no-corejs-none/stdout.txt | 2 +- .../test/debug-fixtures/usage-no-corejs/stdout.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/babel-preset-env/src/normalize-options.js b/packages/babel-preset-env/src/normalize-options.js index 026ac96e83..edbaaa52e9 100644 --- a/packages/babel-preset-env/src/normalize-options.js +++ b/packages/babel-preset-env/src/normalize-options.js @@ -204,7 +204,7 @@ export function normalizeCoreJSOption( if (useBuiltIns && corejs === undefined) { rawVersion = 2; console.log( - "\nWe noticed you're using the `useBuiltIns` option without declaring a " + + "\nWARNING: 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 " + diff --git a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-no-import/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-no-import/stdout.txt index d16a002045..e17f65ad8f 100644 --- a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-no-import/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-no-import/stdout.txt @@ -1,4 +1,4 @@ -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: 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: diff --git a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-shippedProposals/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-shippedProposals/stdout.txt index e338c6d932..b54f7b6358 100644 --- a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-shippedProposals/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-shippedProposals/stdout.txt @@ -1,4 +1,4 @@ -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: 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: diff --git a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-uglify/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-uglify/stdout.txt index 31c42932de..1c478c4eae 100644 --- a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-uglify/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs-uglify/stdout.txt @@ -1,4 +1,4 @@ -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: 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: diff --git a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs/stdout.txt index 5d7438003c..6467473c2b 100644 --- a/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/entry-no-corejs/stdout.txt @@ -1,4 +1,4 @@ -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: 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: diff --git a/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs-none/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs-none/stdout.txt index 13cb1284bd..cd94fc7915 100644 --- a/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs-none/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs-none/stdout.txt @@ -1,4 +1,4 @@ -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: 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: diff --git a/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs/stdout.txt index 197bbf297e..1f62218fb7 100644 --- a/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/usage-no-corejs/stdout.txt @@ -1,4 +1,4 @@ -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: 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: