This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+3 -3
View File
@@ -2,18 +2,18 @@
> General utilities for plugins to use
See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/next/babel-helper-plugin-utils.html) for more information.
See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/babel-helper-plugin-utils) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/helper-plugin-utils
npm install --save @babel/helper-plugin-utils
```
or using yarn:
```sh
yarn add @babel/helper-plugin-utils --dev
yarn add @babel/helper-plugin-utils
```
+25 -7
View File
@@ -4,22 +4,40 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
exports.declare = declare;
exports.declarePreset = void 0;
function declare(builder) {
return (api, options, dirname) => {
if (!api.assertVersion) {
api = Object.assign(copyApiObject(api), {
assertVersion(range) {
throwVersionError(range, api.version);
}
var _clonedApi2;
});
let clonedApi;
for (const name of Object.keys(apiPolyfills)) {
var _clonedApi;
if (api[name]) continue;
clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api);
clonedApi[name] = apiPolyfills[name](clonedApi);
}
return builder(api, options || {}, dirname);
return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
};
}
const declarePreset = declare;
exports.declarePreset = declarePreset;
const apiPolyfills = {
assertVersion: api => range => {
throwVersionError(range, api.version);
},
targets: () => () => {
return {};
},
assumption: () => () => {
return undefined;
}
};
function copyApiObject(api) {
let proto = null;
+34 -18
View File
@@ -1,52 +1,63 @@
{
"_args": [
[
"@babel/helper-plugin-utils@7.10.4",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
"@babel/helper-plugin-utils@7.18.6",
"/home/node/nuxt"
]
],
"_from": "@babel/helper-plugin-utils@7.10.4",
"_id": "@babel/helper-plugin-utils@7.10.4",
"_from": "@babel/helper-plugin-utils@7.18.6",
"_id": "@babel/helper-plugin-utils@7.18.6",
"_inBundle": false,
"_integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
"_integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==",
"_location": "/@babel/helper-plugin-utils",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/helper-plugin-utils@7.10.4",
"raw": "@babel/helper-plugin-utils@7.18.6",
"name": "@babel/helper-plugin-utils",
"escapedName": "@babel%2fhelper-plugin-utils",
"scope": "@babel",
"rawSpec": "7.10.4",
"rawSpec": "7.18.6",
"saveSpec": null,
"fetchSpec": "7.10.4"
"fetchSpec": "7.18.6"
},
"_requiredBy": [
"/@babel/helper-create-class-features-plugin",
"/@babel/helper-define-polyfill-provider",
"/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression",
"/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining",
"/@babel/plugin-proposal-async-generator-functions",
"/@babel/plugin-proposal-class-properties",
"/@babel/plugin-proposal-class-static-block",
"/@babel/plugin-proposal-decorators",
"/@babel/plugin-proposal-dynamic-import",
"/@babel/plugin-proposal-export-namespace-from",
"/@babel/plugin-proposal-json-strings",
"/@babel/plugin-proposal-logical-assignment-operators",
"/@babel/plugin-proposal-nullish-coalescing-operator",
"/@babel/plugin-proposal-numeric-separator",
"/@babel/plugin-proposal-object-rest-spread",
"/@babel/plugin-proposal-optional-catch-binding",
"/@babel/plugin-proposal-optional-chaining",
"/@babel/plugin-proposal-private-methods",
"/@babel/plugin-proposal-private-property-in-object",
"/@babel/plugin-proposal-unicode-property-regex",
"/@babel/plugin-syntax-async-generators",
"/@babel/plugin-syntax-class-properties",
"/@babel/plugin-syntax-class-static-block",
"/@babel/plugin-syntax-decorators",
"/@babel/plugin-syntax-dynamic-import",
"/@babel/plugin-syntax-export-namespace-from",
"/@babel/plugin-syntax-import-assertions",
"/@babel/plugin-syntax-json-strings",
"/@babel/plugin-syntax-jsx",
"/@babel/plugin-syntax-logical-assignment-operators",
"/@babel/plugin-syntax-nullish-coalescing-operator",
"/@babel/plugin-syntax-numeric-separator",
"/@babel/plugin-syntax-object-rest-spread",
"/@babel/plugin-syntax-optional-catch-binding",
"/@babel/plugin-syntax-optional-chaining",
"/@babel/plugin-syntax-private-property-in-object",
"/@babel/plugin-syntax-top-level-await",
"/@babel/plugin-transform-arrow-functions",
"/@babel/plugin-transform-async-to-generator",
@@ -66,10 +77,12 @@
"/@babel/plugin-transform-modules-commonjs",
"/@babel/plugin-transform-modules-systemjs",
"/@babel/plugin-transform-modules-umd",
"/@babel/plugin-transform-named-capturing-groups-regex",
"/@babel/plugin-transform-new-target",
"/@babel/plugin-transform-object-super",
"/@babel/plugin-transform-parameters",
"/@babel/plugin-transform-property-literals",
"/@babel/plugin-transform-regenerator",
"/@babel/plugin-transform-reserved-words",
"/@babel/plugin-transform-runtime",
"/@babel/plugin-transform-shorthand-properties",
@@ -82,21 +95,23 @@
"/@babel/preset-env",
"/@babel/preset-modules"
],
"_resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
"_spec": "7.10.4",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"_resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz",
"_spec": "7.18.6",
"_where": "/home/node/nuxt",
"author": {
"name": "Logan Smyth",
"email": "loganfsmyth@gmail.com"
"name": "The Babel Team",
"url": "https://babel.dev/team"
},
"bugs": {
"url": "https://github.com/babel/babel/issues"
},
"description": "General utilities for plugins to use",
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df",
"homepage": "https://babeljs.io/",
"engines": {
"node": ">=6.9.0"
},
"homepage": "https://babel.dev/docs/en/next/babel-helper-plugin-utils",
"license": "MIT",
"main": "lib/index.js",
"main": "./lib/index.js",
"name": "@babel/helper-plugin-utils",
"publishConfig": {
"access": "public"
@@ -106,5 +121,6 @@
"url": "git+https://github.com/babel/babel.git",
"directory": "packages/babel-helper-plugin-utils"
},
"version": "7.10.4"
"type": "commonjs",
"version": "7.18.6"
}