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:
root
2026-01-15 10:16:06 +00:00
parent 61f8f058f2
commit 1594502cb2
791 changed files with 7044 additions and 6089 deletions

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
exports._call = _call;
exports._forceSetScope = _forceSetScope;
exports._getQueueContexts = _getQueueContexts;
exports._resyncKey = _resyncKey;
exports._resyncList = _resyncList;
@@ -63,9 +64,7 @@ function isDenylisted() {
const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
return denylist == null ? void 0 : denylist.includes(this.node.type);
}
{
exports.isBlacklisted = isDenylisted;
}
exports.isBlacklisted = isDenylisted;
function restoreContext(path, context) {
if (path.context !== context) {
path.context = context;
@@ -108,8 +107,22 @@ function skipKey(key) {
function stop() {
this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP;
}
function _forceSetScope() {
var _this$scope;
let path = this.parentPath;
if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
path = path.parentPath;
}
let target;
while (path && !target) {
target = path.scope;
path = path.parentPath;
}
this.scope = this.getScope(target);
(_this$scope = this.scope) == null || _this$scope.init();
}
function setScope() {
var _this$opts2, _this$scope;
var _this$opts2, _this$scope2;
if ((_this$opts2 = this.opts) != null && _this$opts2.noScope) return;
let path = this.parentPath;
if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) {
@@ -123,7 +136,7 @@ function setScope() {
path = path.parentPath;
}
this.scope = this.getScope(target);
(_this$scope = this.scope) == null || _this$scope.init();
(_this$scope2 = this.scope) == null || _this$scope2.init();
}
function setContext(context) {
if (this.skipKeys != null) {
@@ -208,7 +221,6 @@ function setKey(key) {
}
function requeue(pathToQueue = this) {
if (pathToQueue.removed) return;
;
const contexts = this.contexts;
for (const context of contexts) {
context.maybeQueue(pathToQueue);

File diff suppressed because one or more lines are too long

View File

@@ -100,12 +100,10 @@ function ensureBlock() {
_context.setup.call(body, parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
return this.node;
}
{
exports.arrowFunctionToShadowed = function () {
if (!this.isArrowFunctionExpression()) return;
this.arrowFunctionToExpression();
};
}
exports.arrowFunctionToShadowed = function () {
if (!this.isArrowFunctionExpression()) return;
this.arrowFunctionToExpression();
};
function unwrapFunctionEnvironment() {
if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
@@ -572,17 +570,13 @@ function ensureFunctionName(supportUnicodeId) {
}
if (!state.needsRename) {
this.node.id = id;
{
scope.getProgramParent().references[id.name] = true;
}
scope.getProgramParent().references[id.name] = true;
return this;
}
if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
scope.rename(id.name);
this.node.id = id;
{
scope.getProgramParent().references[id.name] = true;
}
scope.getProgramParent().references[id.name] = true;
return this;
}
if (!isFunction(this.node)) return null;

File diff suppressed because one or more lines are too long

View File

@@ -150,14 +150,19 @@ function _evaluate(path, state) {
deopt(binding.path, state);
return;
}
const resolved = path.resolve();
if (resolved === path) {
if (!binding) {
deopt(path, state);
return;
}
const value = evaluateCached(resolved, state);
const bindingPath = binding.path;
if (!bindingPath.isVariableDeclarator()) {
deopt(bindingPath, state);
return;
}
const initPath = bindingPath.get("init");
const value = evaluateCached(initPath, state);
if (typeof value === "object" && value !== null && binding.references > 1) {
deopt(resolved, state);
deopt(initPath, state);
return;
}
return value;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -226,51 +226,47 @@ const methods = {
addComments: NodePath_comments.addComments
};
Object.assign(NodePath_Final.prototype, methods);
{
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")];
Object.assign(NodePath_Final.prototype, {
has: NodePath_introspection[String("has")],
is: NodePath_introspection[String("is")],
isnt: NodePath_introspection[String("isnt")],
equals: NodePath_introspection[String("equals")],
hoist: NodePath_modification[String("hoist")],
updateSiblingKeys: NodePath_modification.updateSiblingKeys,
call: NodePath_context.call,
isBlacklisted: NodePath_context[String("isBlacklisted")],
setScope: NodePath_context.setScope,
resync: NodePath_context.resync,
popContext: NodePath_context.popContext,
pushContext: NodePath_context.pushContext,
setup: NodePath_context.setup,
setKey: NodePath_context.setKey
});
}
{
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
Object.assign(NodePath_Final.prototype, {
_getTypeAnnotation: NodePath_inference._getTypeAnnotation,
_replaceWith: NodePath_replacement._replaceWith,
_resolve: NodePath_introspection._resolve,
_call: NodePath_context._call,
_resyncParent: NodePath_context._resyncParent,
_resyncKey: NodePath_context._resyncKey,
_resyncList: NodePath_context._resyncList,
_resyncRemoved: NodePath_context._resyncRemoved,
_getQueueContexts: NodePath_context._getQueueContexts,
_removeFromScope: NodePath_removal._removeFromScope,
_callRemovalHooks: NodePath_removal._callRemovalHooks,
_remove: NodePath_removal._remove,
_markRemoved: NodePath_removal._markRemoved,
_assertUnremoved: NodePath_removal._assertUnremoved,
_containerInsert: NodePath_modification._containerInsert,
_containerInsertBefore: NodePath_modification._containerInsertBefore,
_containerInsertAfter: NodePath_modification._containerInsertAfter,
_verifyNodeList: NodePath_modification._verifyNodeList,
_getKey: NodePath_family._getKey,
_getPattern: NodePath_family._getPattern
});
}
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")];
Object.assign(NodePath_Final.prototype, {
has: NodePath_introspection[String("has")],
is: NodePath_introspection[String("is")],
isnt: NodePath_introspection[String("isnt")],
equals: NodePath_introspection[String("equals")],
hoist: NodePath_modification[String("hoist")],
updateSiblingKeys: NodePath_modification.updateSiblingKeys,
call: NodePath_context.call,
isBlacklisted: NodePath_context[String("isBlacklisted")],
setScope: NodePath_context.setScope,
resync: NodePath_context.resync,
popContext: NodePath_context.popContext,
pushContext: NodePath_context.pushContext,
setup: NodePath_context.setup,
setKey: NodePath_context.setKey
});
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
Object.assign(NodePath_Final.prototype, {
_getTypeAnnotation: NodePath_inference._getTypeAnnotation,
_replaceWith: NodePath_replacement._replaceWith,
_resolve: NodePath_introspection._resolve,
_call: NodePath_context._call,
_resyncParent: NodePath_context._resyncParent,
_resyncKey: NodePath_context._resyncKey,
_resyncList: NodePath_context._resyncList,
_resyncRemoved: NodePath_context._resyncRemoved,
_getQueueContexts: NodePath_context._getQueueContexts,
_removeFromScope: NodePath_removal._removeFromScope,
_callRemovalHooks: NodePath_removal._callRemovalHooks,
_remove: NodePath_removal._remove,
_markRemoved: NodePath_removal._markRemoved,
_assertUnremoved: NodePath_removal._assertUnremoved,
_containerInsert: NodePath_modification._containerInsert,
_containerInsertBefore: NodePath_modification._containerInsertBefore,
_containerInsertAfter: NodePath_modification._containerInsertAfter,
_verifyNodeList: NodePath_modification._verifyNodeList,
_getKey: NodePath_family._getKey,
_getPattern: NodePath_family._getPattern
});
for (const type of t.TYPES) {
const typeKey = `is${type}`;
const fn = t[typeKey];
@@ -285,7 +281,7 @@ for (const type of t.TYPES) {
}
Object.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);
for (const type of Object.keys(virtualTypes)) {
if (type[0] === "_") continue;
if (type.startsWith("_")) continue;
if (!t.TYPES.includes(type)) t.TYPES.push(type);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -13,16 +13,14 @@ const {
isTSType
} = _t;
function createUnionType(types) {
{
if (types.every(v => isFlowType(v))) {
if (createFlowUnionType) {
return createFlowUnionType(types);
}
return createUnionTypeAnnotation(types);
} else if (types.every(v => isTSType(v))) {
if (createTSUnionType) {
return createTSUnionType(types);
}
if (types.every(v => isFlowType(v))) {
if (createFlowUnionType) {
return createFlowUnionType(types);
}
return createUnionTypeAnnotation(types);
} else if (types.every(v => isTSType(v))) {
if (createTSUnionType) {
return createTSUnionType(types);
}
}
}

View File

@@ -1 +1 @@
{"version":3,"names":["_t","require","createFlowUnionType","createTSUnionType","createUnionTypeAnnotation","isFlowType","isTSType","createUnionType","types","every","v"],"sources":["../../../src/path/inference/util.ts"],"sourcesContent":["import {\n createFlowUnionType,\n createTSUnionType,\n createUnionTypeAnnotation,\n isFlowType,\n isTSType,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function createUnionType(\n types: (t.FlowType | t.TSType)[],\n): t.FlowType | t.TSType | undefined {\n if (process.env.BABEL_8_BREAKING) {\n if (types.every(v => isFlowType(v))) {\n return createFlowUnionType(types);\n }\n if (types.every(v => isTSType(v))) {\n return createTSUnionType(types);\n }\n } else {\n if (types.every(v => isFlowType(v))) {\n if (createFlowUnionType) {\n return createFlowUnionType(types);\n }\n\n return createUnionTypeAnnotation(types);\n } else if (types.every(v => isTSType(v))) {\n if (createTSUnionType) {\n return createTSUnionType(types);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAMsB;EALpBC,mBAAmB;EACnBC,iBAAiB;EACjBC,yBAAyB;EACzBC,UAAU;EACVC;AAAQ,IAAAN,EAAA;AAIH,SAASO,eAAeA,CAC7BC,KAAgC,EACG;EAQ5B;IACL,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIL,UAAU,CAACK,CAAC,CAAC,CAAC,EAAE;MACnC,IAAIR,mBAAmB,EAAE;QACvB,OAAOA,mBAAmB,CAACM,KAAK,CAAC;MACnC;MAEA,OAAOJ,yBAAyB,CAACI,KAAK,CAAC;IACzC,CAAC,MAAM,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIJ,QAAQ,CAACI,CAAC,CAAC,CAAC,EAAE;MACxC,IAAIP,iBAAiB,EAAE;QACrB,OAAOA,iBAAiB,CAACK,KAAK,CAAC;MACjC;IACF;EACF;AACF","ignoreList":[]}
{"version":3,"names":["_t","require","createFlowUnionType","createTSUnionType","createUnionTypeAnnotation","isFlowType","isTSType","createUnionType","types","every","v"],"sources":["../../../src/path/inference/util.ts"],"sourcesContent":["import {\n createFlowUnionType,\n createTSUnionType,\n createUnionTypeAnnotation,\n isFlowType,\n isTSType,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function createUnionType(\n types: (t.FlowType | t.TSType)[],\n): t.FlowType | t.TSType | undefined {\n if (process.env.BABEL_8_BREAKING) {\n if (types.every(v => isFlowType(v))) {\n return createFlowUnionType(types);\n }\n if (types.every(v => isTSType(v))) {\n return createTSUnionType(types);\n }\n } else {\n if (types.every(v => isFlowType(v))) {\n if (createFlowUnionType) {\n return createFlowUnionType(types);\n }\n\n return createUnionTypeAnnotation(types);\n } else if (types.every(v => isTSType(v))) {\n if (createTSUnionType) {\n return createTSUnionType(types);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAMsB;EALpBC,mBAAmB;EACnBC,iBAAiB;EACjBC,yBAAyB;EACzBC,UAAU;EACVC;AAAQ,IAAAN,EAAA;AAIH,SAASO,eAAeA,CAC7BC,KAAgC,EACG;EASjC,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIL,UAAU,CAACK,CAAC,CAAC,CAAC,EAAE;IACnC,IAAIR,mBAAmB,EAAE;MACvB,OAAOA,mBAAmB,CAACM,KAAK,CAAC;IACnC;IAEA,OAAOJ,yBAAyB,CAACI,KAAK,CAAC;EACzC,CAAC,MAAM,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIJ,QAAQ,CAACI,CAAC,CAAC,CAAC,EAAE;IACxC,IAAIP,iBAAiB,EAAE;MACrB,OAAOA,iBAAiB,CAACK,KAAK,CAAC;IACjC;EACF;AAEJ","ignoreList":[]}

View File

@@ -33,29 +33,25 @@ const {
function matchesPattern(pattern, allowPartial) {
return _matchesPattern(this.node, pattern, allowPartial);
}
{
exports.has = function has(key) {
var _this$node;
const val = (_this$node = this.node) == null ? void 0 : _this$node[key];
if (val && Array.isArray(val)) {
return !!val.length;
} else {
return !!val;
}
};
}
exports.has = function has(key) {
var _this$node;
const val = (_this$node = this.node) == null ? void 0 : _this$node[key];
if (val && Array.isArray(val)) {
return !!val.length;
} else {
return !!val;
}
};
function isStatic() {
return this.scope.isStatic(this.node);
}
{
exports.is = exports.has;
exports.isnt = function isnt(key) {
return !this.has(key);
};
exports.equals = function equals(key, value) {
return this.node[key] === value;
};
}
exports.is = exports.has;
exports.isnt = function isnt(key) {
return !this.has(key);
};
exports.equals = function equals(key, value) {
return this.node[key] === value;
};
function isNodeType(type) {
return isType(this.type, type);
}
@@ -109,7 +105,7 @@ function referencesImport(moduleSource, importName) {
return false;
}
const binding = this.scope.getBinding(this.node.name);
if (!binding || binding.kind !== "module") return false;
if ((binding == null ? void 0 : binding.kind) !== "module") return false;
const path = binding.path;
const parent = path.parentPath;
if (!parent.isImportDeclaration()) return false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -152,13 +152,11 @@ function isForAwaitStatement() {
await: true
});
}
{
exports.isExistentialTypeParam = function isExistentialTypeParam() {
throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.");
};
exports.isNumericLiteralTypeAnnotation = function isNumericLiteralTypeAnnotation() {
throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.");
};
}
exports.isExistentialTypeParam = function isExistentialTypeParam() {
throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.");
};
exports.isNumericLiteralTypeAnnotation = function isNumericLiteralTypeAnnotation() {
throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.");
};
//# sourceMappingURL=virtual-types-validator.js.map

File diff suppressed because one or more lines are too long

View File

@@ -221,11 +221,9 @@ function pushContainer(listKey, nodes) {
}).setContext(this.context);
return path.replaceWithMultiple(verifiedNodes);
}
{
exports.hoist = function hoist(scope = this.scope) {
const hoister = new _hoister.default(this, scope);
return hoister.run();
};
}
exports.hoist = function hoist(scope = this.scope) {
const hoister = new _hoister.default(this, scope);
return hoister.run();
};
//# sourceMappingURL=modification.js.map

File diff suppressed because one or more lines are too long

View File

@@ -184,8 +184,8 @@ function replaceExpressionWithStatements(nodes) {
}
callee.arrowFunctionToExpression();
const newCallee = callee;
const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", FUNCTION_TYPES);
const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", FUNCTION_TYPES);
const needToAwaitFunction = isParentAsync && _index.default.hasType(newCallee.node.body, "AwaitExpression", FUNCTION_TYPES);
const needToYieldFunction = isParentGenerator && _index.default.hasType(newCallee.node.body, "YieldExpression", FUNCTION_TYPES);
if (needToAwaitFunction) {
newCallee.set("async", true);
if (!needToYieldFunction) {

File diff suppressed because one or more lines are too long