@babel/preset-env
Advanced tools
Comparing version 7.4.1 to 7.4.2
@@ -165,3 +165,3 @@ "use strict"; | ||
rawVersion = 2; | ||
console.log("\nWith `useBuiltIns` option, required direct setting of `corejs` option\n"); | ||
console.log("\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 " + "you are using via the `corejs` option.\n" + "\nYou 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"); | ||
} else if (typeof corejs === "object" && corejs !== null) { | ||
@@ -177,7 +177,7 @@ rawVersion = corejs.version; | ||
if (!useBuiltIns && version) { | ||
console.log("\n`corejs` option required only with `useBuiltIns` option\n"); | ||
console.log("\nThe `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n"); | ||
} | ||
if (useBuiltIns && (!version || version.major < 2 || version.major > 3)) { | ||
throw new RangeError("Supported only core-js@2 and core-js@3."); | ||
throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported."); | ||
} | ||
@@ -184,0 +184,0 @@ |
@@ -204,4 +204,6 @@ "use strict"; | ||
for (const property of path.get("properties")) { | ||
const key = resolveKey(property.get("key")); | ||
this.addPropertyDependencies(source, key); | ||
if (property.isObjectProperty()) { | ||
const key = resolveKey(property.get("key")); | ||
this.addPropertyDependencies(source, key); | ||
} | ||
} | ||
@@ -208,0 +210,0 @@ }, |
{ | ||
"name": "@babel/preset-env", | ||
"version": "7.4.1", | ||
"version": "7.4.2", | ||
"description": "A Babel preset for each environment.", | ||
@@ -45,3 +45,3 @@ "author": "Henry Zhu <hi@henryzoo.com>", | ||
"@babel/plugin-transform-modules-umd": "^7.2.0", | ||
"@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", | ||
"@babel/plugin-transform-named-capturing-groups-regex": "^7.4.2", | ||
"@babel/plugin-transform-new-target": "^7.4.0", | ||
@@ -77,3 +77,3 @@ "@babel/plugin-transform-object-super": "^7.2.0", | ||
}, | ||
"gitHead": "94d1a5e8d7711fba6d821069d37acc4ec23d04b7" | ||
"gitHead": "7dea0f23de51af336a2fab0286a73af30cddf3be" | ||
} |
169476
4457