first commit
This commit is contained in:
22
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/LICENSE
generated
vendored
Normal file
22
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
19
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/README.md
generated
vendored
Normal file
19
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/plugin-bugfix-safari-class-field-initializer-scope
|
||||
|
||||
> Wrap class field initializers with IIFE to workaround https://webkit.org/b/236843
|
||||
|
||||
See our website [@babel/plugin-bugfix-safari-class-field-initializer-scope](https://babeljs.io/docs/babel-plugin-bugfix-safari-class-field-initializer-scope) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-bugfix-safari-class-field-initializer-scope
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-bugfix-safari-class-field-initializer-scope --dev
|
||||
```
|
73
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/lib/index.js
generated
vendored
Normal file
73
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var helperPluginUtils = require('@babel/helper-plugin-utils');
|
||||
var core = require('@babel/core');
|
||||
|
||||
function needsWrapping(node) {
|
||||
if (core.types.isLiteral(node) && !core.types.isTemplateLiteral(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isCallExpression(node) || core.types.isOptionalCallExpression(node) || core.types.isNewExpression(node)) {
|
||||
return needsWrapping(node.callee) || node.arguments.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isTemplateLiteral(node)) {
|
||||
return node.expressions.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isTaggedTemplateExpression(node)) {
|
||||
return needsWrapping(node.tag) || needsWrapping(node.quasi);
|
||||
}
|
||||
if (core.types.isArrayExpression(node)) {
|
||||
return node.elements.some(needsWrapping);
|
||||
}
|
||||
if (core.types.isObjectExpression(node)) {
|
||||
return node.properties.some(prop => {
|
||||
if (core.types.isObjectProperty(prop)) {
|
||||
return needsWrapping(prop.value) || prop.computed && needsWrapping(prop.key);
|
||||
}
|
||||
if (core.types.isObjectMethod(prop)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if (core.types.isMemberExpression(node) || core.types.isOptionalMemberExpression(node)) {
|
||||
return needsWrapping(node.object) || node.computed && needsWrapping(node.property);
|
||||
}
|
||||
if (core.types.isFunctionExpression(node) || core.types.isArrowFunctionExpression(node) || core.types.isClassExpression(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isThisExpression(node)) {
|
||||
return false;
|
||||
}
|
||||
if (core.types.isSequenceExpression(node)) {
|
||||
return node.expressions.some(needsWrapping);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function wrapInitializer(path) {
|
||||
const {
|
||||
value
|
||||
} = path.node;
|
||||
if (value && needsWrapping(value)) {
|
||||
path.node.value = core.types.callExpression(core.types.arrowFunctionExpression([], value), []);
|
||||
}
|
||||
}
|
||||
var index = helperPluginUtils.declare(api => {
|
||||
api.assertVersion("^7.16.0");
|
||||
return {
|
||||
name: "plugin-bugfix-safari-class-field-initializer-scope",
|
||||
visitor: {
|
||||
ClassProperty(path) {
|
||||
wrapInitializer(path);
|
||||
},
|
||||
ClassPrivateProperty(path) {
|
||||
wrapInitializer(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
exports.default = index;
|
||||
//# sourceMappingURL=index.js.map
|
1
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/lib/index.js.map
generated
vendored
Normal file
1
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
43
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/package.json
generated
vendored
Normal file
43
app_vue/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope/package.json
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@babel/plugin-bugfix-safari-class-field-initializer-scope",
|
||||
"version": "7.27.1",
|
||||
"description": "Wrap class field initializers with IIFE to workaround https://webkit.org/b/236843",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-bugfix-safari-class-field-initializer-scope"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-bugfix-safari-class-field-initializer-scope",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin",
|
||||
"bugfix"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.27.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.27.1",
|
||||
"@babel/helper-plugin-test-runner": "^7.27.1",
|
||||
"@babel/traverse": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
Reference in New Issue
Block a user