feat: refactoring project
This commit is contained in:
16
node_modules/@babel/helper-create-class-features-plugin/lib/decorators-2018-09.js
generated
vendored
16
node_modules/@babel/helper-create-class-features-plugin/lib/decorators-2018-09.js
generated
vendored
@@ -50,13 +50,6 @@ function extractElementDescriptor(file, classRef, superRef, path) {
|
||||
if (path.node.type === "StaticBlock") {
|
||||
throw path.buildCodeFrameError(`Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.`);
|
||||
}
|
||||
if (path.isFunction()) {
|
||||
{
|
||||
var _path$ensureFunctionN;
|
||||
(_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
||||
}
|
||||
path.ensureFunctionName(false);
|
||||
}
|
||||
const {
|
||||
node,
|
||||
scope
|
||||
@@ -71,8 +64,13 @@ function extractElementDescriptor(file, classRef, superRef, path) {
|
||||
}).replace();
|
||||
}
|
||||
const properties = [prop("kind", _core.types.stringLiteral(_core.types.isClassMethod(node) ? node.kind : "field")), prop("decorators", takeDecorators(node)), prop("static", node.static && _core.types.booleanLiteral(true)), prop("key", getKey(node))].filter(Boolean);
|
||||
if (_core.types.isClassMethod(node)) {
|
||||
properties.push(prop("value", _core.types.toExpression(node)));
|
||||
if (isMethod) {
|
||||
{
|
||||
var _path$ensureFunctionN;
|
||||
(_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
||||
}
|
||||
path.ensureFunctionName(false);
|
||||
properties.push(prop("value", _core.types.toExpression(path.node)));
|
||||
} else if (_core.types.isClassProperty(node) && node.value) {
|
||||
properties.push(method("value", _core.template.statements.ast`return ${node.value}`));
|
||||
} else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js.map
generated
vendored
2
node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js.map
generated
vendored
File diff suppressed because one or more lines are too long
10
node_modules/@babel/helper-create-class-features-plugin/lib/index.js
generated
vendored
10
node_modules/@babel/helper-create-class-features-plugin/lib/index.js
generated
vendored
@@ -95,12 +95,12 @@ function createClassFeaturePlugin({
|
||||
(0, _features.enableFeature)(file, feature, loose);
|
||||
{
|
||||
if (typeof file.get(versionKey) === "number") {
|
||||
file.set(versionKey, "7.25.0");
|
||||
file.set(versionKey, "7.25.9");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.25.0")) {
|
||||
file.set(versionKey, "7.25.0");
|
||||
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.25.9")) {
|
||||
file.set(versionKey, "7.25.9");
|
||||
}
|
||||
},
|
||||
visitor: {
|
||||
@@ -108,7 +108,7 @@ function createClassFeaturePlugin({
|
||||
file
|
||||
}) {
|
||||
var _ref;
|
||||
if (file.get(versionKey) !== "7.25.0") return;
|
||||
if (file.get(versionKey) !== "7.25.9") return;
|
||||
if (!(0, _features.shouldTransform)(path, file)) return;
|
||||
const pathIsClassDeclaration = path.isClassDeclaration();
|
||||
if (pathIsClassDeclaration) (0, _typescript.assertFieldTransformed)(path);
|
||||
@@ -229,7 +229,7 @@ function createClassFeaturePlugin({
|
||||
file
|
||||
}) {
|
||||
{
|
||||
if (file.get(versionKey) !== "7.25.0") return;
|
||||
if (file.get(versionKey) !== "7.25.9") return;
|
||||
const decl = path.get("declaration");
|
||||
if (decl.isClassDeclaration() && (0, _decorators2.hasDecorators)(decl.node)) {
|
||||
if (decl.node.id) {
|
||||
|
||||
20
node_modules/@babel/helper-create-class-features-plugin/package.json
generated
vendored
20
node_modules/@babel/helper-create-class-features-plugin/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@babel/helper-create-class-features-plugin",
|
||||
"version": "7.25.0",
|
||||
"version": "7.25.9",
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"license": "MIT",
|
||||
"description": "Compile class public and private fields, private methods and decorators to ES6",
|
||||
@@ -18,21 +18,21 @@
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.24.7",
|
||||
"@babel/helper-member-expression-to-functions": "^7.24.8",
|
||||
"@babel/helper-optimise-call-expression": "^7.24.7",
|
||||
"@babel/helper-replace-supers": "^7.25.0",
|
||||
"@babel/helper-skip-transparent-expression-wrappers": "^7.24.7",
|
||||
"@babel/traverse": "^7.25.0",
|
||||
"@babel/helper-annotate-as-pure": "^7.25.9",
|
||||
"@babel/helper-member-expression-to-functions": "^7.25.9",
|
||||
"@babel/helper-optimise-call-expression": "^7.25.9",
|
||||
"@babel/helper-replace-supers": "^7.25.9",
|
||||
"@babel/helper-skip-transparent-expression-wrappers": "^7.25.9",
|
||||
"@babel/traverse": "^7.25.9",
|
||||
"semver": "^6.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.24.9",
|
||||
"@babel/helper-plugin-test-runner": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.0",
|
||||
"@babel/core": "^7.25.9",
|
||||
"@babel/helper-plugin-test-runner": "^7.25.9",
|
||||
"@babel/preset-env": "^7.25.9",
|
||||
"@types/charcodes": "^0.2.0",
|
||||
"charcodes": "^0.2.0"
|
||||
},
|
||||
|
||||
32
node_modules/@babel/helper-create-class-features-plugin/tsconfig.json
generated
vendored
32
node_modules/@babel/helper-create-class-features-plugin/tsconfig.json
generated
vendored
@@ -1,32 +0,0 @@
|
||||
/* This file is automatically generated by scripts/generators/tsconfig.js */
|
||||
{
|
||||
"extends": [
|
||||
"../../tsconfig.base.json",
|
||||
"../../tsconfig.paths.json"
|
||||
],
|
||||
"include": [
|
||||
"../../packages/babel-helper-create-class-features-plugin/src/**/*.ts",
|
||||
"../../lib/globals.d.ts",
|
||||
"../../scripts/repo-utils/*.d.ts"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/babel-helper-plugin-utils"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/babel-helper-annotate-as-pure"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/babel-helper-member-expression-to-functions"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/babel-helper-optimise-call-expression"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/babel-helper-replace-supers"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/babel-helper-skip-transparent-expression-wrappers"
|
||||
}
|
||||
]
|
||||
}
|
||||
1
node_modules/@babel/helper-create-class-features-plugin/tsconfig.tsbuildinfo
generated
vendored
1
node_modules/@babel/helper-create-class-features-plugin/tsconfig.tsbuildinfo
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user