@babel/helper-plugin-utils
Advanced tools
Comparing version 7.22.5 to 8.0.0-alpha.0
@@ -1,8 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.declare = declare; | ||
exports.declarePreset = void 0; | ||
const apiPolyfills = { | ||
@@ -13,27 +6,14 @@ assertVersion: api => range => { | ||
}; | ||
{ | ||
Object.assign(apiPolyfills, { | ||
targets: () => () => { | ||
return {}; | ||
}, | ||
assumption: () => () => { | ||
return undefined; | ||
} | ||
}); | ||
} | ||
function declare(builder) { | ||
return (api, options, dirname) => { | ||
var _clonedApi2; | ||
let clonedApi; | ||
for (const name of Object.keys(apiPolyfills)) { | ||
var _clonedApi; | ||
if (api[name]) continue; | ||
(_clonedApi = clonedApi) != null ? _clonedApi : clonedApi = copyApiObject(api); | ||
clonedApi ??= copyApiObject(api); | ||
clonedApi[name] = apiPolyfills[name](clonedApi); | ||
} | ||
return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname); | ||
return builder(clonedApi ?? api, options || {}, dirname); | ||
}; | ||
} | ||
const declarePreset = declare; | ||
exports.declarePreset = declarePreset; | ||
function copyApiObject(api) { | ||
@@ -82,2 +62,3 @@ let proto = null; | ||
export { declare, declarePreset }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/helper-plugin-utils", | ||
"version": "7.22.5", | ||
"version": "8.0.0-alpha.0", | ||
"description": "General utilities for plugins to use", | ||
@@ -18,5 +18,9 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"engines": { | ||
"node": ">=6.9.0" | ||
"node": "^16.20.0 || ^18.16.0 || >=20.0.0" | ||
}, | ||
"type": "commonjs" | ||
"exports": { | ||
".": "./lib/index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"type": "module" | ||
} |
@@ -5,3 +5,3 @@ # @babel/helper-plugin-utils | ||
See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/babel-helper-plugin-utils) for more information. | ||
See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/babel-helper-plugin-utils) for more information. | ||
@@ -8,0 +8,0 @@ ## Install |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Yes
11628
62
2