Add <%br= %> jqhtml syntax docs, class override detection, npm update
Document event handler placement and model fetch clarification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
102
node_modules/@babel/helper-create-class-features-plugin/lib/index.js
generated
vendored
102
node_modules/@babel/helper-create-class-features-plugin/lib/index.js
generated
vendored
@@ -54,19 +54,15 @@ function createClassFeaturePlugin({
|
||||
}) {
|
||||
var _api$assumption;
|
||||
if (feature & _features.FEATURES.decorators) {
|
||||
{
|
||||
if (decoratorVersion === "2023-11" || decoratorVersion === "2023-05" || decoratorVersion === "2023-01" || decoratorVersion === "2022-03" || decoratorVersion === "2021-12") {
|
||||
return (0, _decorators.default)(api, {
|
||||
loose
|
||||
}, decoratorVersion, inherits);
|
||||
}
|
||||
if (decoratorVersion === "2023-11" || decoratorVersion === "2023-05" || decoratorVersion === "2023-01" || decoratorVersion === "2022-03" || decoratorVersion === "2021-12") {
|
||||
return (0, _decorators.default)(api, {
|
||||
loose
|
||||
}, decoratorVersion, inherits);
|
||||
}
|
||||
}
|
||||
{
|
||||
api != null ? api : api = {
|
||||
assumption: () => void 0
|
||||
};
|
||||
}
|
||||
api != null ? api : api = {
|
||||
assumption: () => void 0
|
||||
};
|
||||
const setPublicClassFields = api.assumption("setPublicClassFields");
|
||||
const privateFieldsAsSymbols = api.assumption("privateFieldsAsSymbols");
|
||||
const privateFieldsAsProperties = api.assumption("privateFieldsAsProperties");
|
||||
@@ -98,21 +94,19 @@ function createClassFeaturePlugin({
|
||||
inherits,
|
||||
pre(file) {
|
||||
(0, _features.enableFeature)(file, feature, loose);
|
||||
{
|
||||
if (typeof file.get(versionKey) === "number") {
|
||||
file.set(versionKey, "7.28.5");
|
||||
return;
|
||||
}
|
||||
if (typeof file.get(versionKey) === "number") {
|
||||
file.set(versionKey, "7.28.6");
|
||||
return;
|
||||
}
|
||||
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.28.5")) {
|
||||
file.set(versionKey, "7.28.5");
|
||||
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.28.6")) {
|
||||
file.set(versionKey, "7.28.6");
|
||||
}
|
||||
},
|
||||
visitor: {
|
||||
Class(path, {
|
||||
file
|
||||
}) {
|
||||
if (file.get(versionKey) !== "7.28.5") return;
|
||||
if (file.get(versionKey) !== "7.28.6") return;
|
||||
if (!(0, _features.shouldTransform)(path, file)) return;
|
||||
const pathIsClassDeclaration = path.isClassDeclaration();
|
||||
if (pathIsClassDeclaration) (0, _typescript.assertFieldTransformed)(path);
|
||||
@@ -164,16 +158,12 @@ function createClassFeaturePlugin({
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (!props.length && !isDecorated) return;
|
||||
}
|
||||
if (!props.length && !isDecorated) return;
|
||||
const innerBinding = path.node.id;
|
||||
let ref;
|
||||
if (!innerBinding || !pathIsClassDeclaration) {
|
||||
{
|
||||
var _path$ensureFunctionN;
|
||||
(_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
||||
}
|
||||
var _path$ensureFunctionN;
|
||||
(_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
||||
path.ensureFunctionName(false);
|
||||
ref = path.scope.generateUidIdentifier((innerBinding == null ? void 0 : innerBinding.name) || "Class");
|
||||
}
|
||||
@@ -187,30 +177,26 @@ function createClassFeaturePlugin({
|
||||
innerBinding
|
||||
}, file);
|
||||
let keysNodes, staticNodes, instanceNodes, lastInstanceNodeReturnsThis, pureStaticNodes, classBindingNode, wrapClass;
|
||||
{
|
||||
if (isDecorated) {
|
||||
staticNodes = pureStaticNodes = keysNodes = [];
|
||||
({
|
||||
instanceNodes,
|
||||
wrapClass
|
||||
} = (0, _decorators2.buildDecoratedClass)(classRefForDefine, path, elements, file));
|
||||
} else {
|
||||
keysNodes = (0, _misc.extractComputedKeys)(path, computedPaths, file);
|
||||
({
|
||||
staticNodes,
|
||||
pureStaticNodes,
|
||||
instanceNodes,
|
||||
lastInstanceNodeReturnsThis,
|
||||
classBindingNode,
|
||||
wrapClass
|
||||
} = (0, _fields.buildFieldsInitNodes)(ref, path.node.superClass, props, privateNamesMap, file, setPublicClassFields != null ? setPublicClassFields : loose, privateFieldsAsSymbolsOrProperties != null ? privateFieldsAsSymbolsOrProperties : loose, noUninitializedPrivateFieldAccess, constantSuper != null ? constantSuper : loose, innerBinding));
|
||||
}
|
||||
if (isDecorated) {
|
||||
staticNodes = pureStaticNodes = keysNodes = [];
|
||||
({
|
||||
instanceNodes,
|
||||
wrapClass
|
||||
} = (0, _decorators2.buildDecoratedClass)(classRefForDefine, path, elements, file));
|
||||
} else {
|
||||
keysNodes = (0, _misc.extractComputedKeys)(path, computedPaths, file);
|
||||
({
|
||||
staticNodes,
|
||||
pureStaticNodes,
|
||||
instanceNodes,
|
||||
lastInstanceNodeReturnsThis,
|
||||
classBindingNode,
|
||||
wrapClass
|
||||
} = (0, _fields.buildFieldsInitNodes)(ref, path.node.superClass, props, privateNamesMap, file, setPublicClassFields != null ? setPublicClassFields : loose, privateFieldsAsSymbolsOrProperties != null ? privateFieldsAsSymbolsOrProperties : loose, noUninitializedPrivateFieldAccess, constantSuper != null ? constantSuper : loose, innerBinding));
|
||||
}
|
||||
if (instanceNodes.length > 0) {
|
||||
(0, _misc.injectInitialization)(path, constructor, instanceNodes, (referenceVisitor, state) => {
|
||||
{
|
||||
if (isDecorated) return;
|
||||
}
|
||||
if (isDecorated) return;
|
||||
for (const prop of props) {
|
||||
if (_core.types.isStaticBlock != null && _core.types.isStaticBlock(prop.node) || prop.node.static) continue;
|
||||
prop.traverse(referenceVisitor, state);
|
||||
@@ -232,19 +218,15 @@ function createClassFeaturePlugin({
|
||||
ExportDefaultDeclaration(path, {
|
||||
file
|
||||
}) {
|
||||
{
|
||||
if (file.get(versionKey) !== "7.28.5") return;
|
||||
const decl = path.get("declaration");
|
||||
if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) {
|
||||
if (decl.node.id) {
|
||||
{
|
||||
var _path$splitExportDecl;
|
||||
(_path$splitExportDecl = path.splitExportDeclaration) != null ? _path$splitExportDecl : path.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
|
||||
}
|
||||
path.splitExportDeclaration();
|
||||
} else {
|
||||
decl.node.type = "ClassExpression";
|
||||
}
|
||||
if (file.get(versionKey) !== "7.28.6") return;
|
||||
const decl = path.get("declaration");
|
||||
if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) {
|
||||
if (decl.node.id) {
|
||||
var _path$splitExportDecl;
|
||||
(_path$splitExportDecl = path.splitExportDeclaration) != null ? _path$splitExportDecl : path.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
|
||||
path.splitExportDeclaration();
|
||||
} else {
|
||||
decl.node.type = "ClassExpression";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user