@babel/helper-plugin-utils
Advanced tools
+6
-3
@@ -20,3 +20,3 @@ const apiPolyfills = { | ||
| let proto = null; | ||
| if (typeof api.version === "string" && /^7\./.test(api.version)) { | ||
| if (typeof api.version === "string" && api.version.startsWith("7.")) { | ||
| proto = Object.getPrototypeOf(api); | ||
@@ -27,3 +27,6 @@ if (proto && (!Object.hasOwn(proto, "version") || !Object.hasOwn(proto, "transform") || !Object.hasOwn(proto, "template") || !Object.hasOwn(proto, "types"))) { | ||
| } | ||
| return Object.assign({}, proto, api); | ||
| return { | ||
| ...proto, | ||
| ...api | ||
| }; | ||
| } | ||
@@ -45,3 +48,3 @@ function throwVersionError(range, version) { | ||
| let err; | ||
| if (version.slice(0, 2) === "7.") { | ||
| if (version.startsWith("7.")) { | ||
| err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`); | ||
@@ -48,0 +51,0 @@ } else { |
+3
-3
| { | ||
| "name": "@babel/helper-plugin-utils", | ||
| "version": "8.0.0-beta.3", | ||
| "version": "8.0.0-beta.4", | ||
| "description": "General utilities for plugins to use", | ||
@@ -21,6 +21,6 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
| "devDependencies": { | ||
| "@babel/core": "^8.0.0-beta.3" | ||
| "@babel/core": "^8.0.0-beta.4" | ||
| }, | ||
| "peerDependencies": { | ||
| "@babel/core": "^8.0.0-beta.3" | ||
| "@babel/core": "^7.0.0" | ||
| }, | ||
@@ -27,0 +27,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
66
4.76%11795
-3.66%