Area restrita - Questionario

This commit is contained in:
2026-06-08 23:50:59 -03:00
parent f2e2400637
commit ef968f10ae
6972 changed files with 23454 additions and 2267883 deletions
+11 -9
View File
@@ -877,6 +877,17 @@ function transformClass(path, state, constantSuper, ignoreFunctionLength, classN
classLocals.push(classIdLocal, classInitLocal);
const statics = [];
path.get("body.body").forEach(element => {
if (element.isStaticBlock() || !element.isClassMethod() && element.node.static) {
const replaceSupers = new _helperReplaceSupers.default({
constantSuper,
methodPath: element,
objectRef: classIdLocal,
superRef: path.node.superClass,
file: state.file,
refToPreserve: classIdLocal
});
replaceSupers.replace();
}
if (element.isStaticBlock()) {
if (hasInstancePrivateAccess(element, instancePrivateNames)) {
const staticBlockClosureId = memoiseExpression(staticBlockToFunctionClosure(element.node), "staticBlock", staticClosures);
@@ -904,15 +915,6 @@ function transformClass(path, state, constantSuper, ignoreFunctionLength, classN
static: true
})) {
if (hasInstancePrivateAccess(element, instancePrivateNames)) {
const replaceSupers = new _helperReplaceSupers.default({
constantSuper,
methodPath: element,
objectRef: classIdLocal,
superRef: path.node.superClass,
file: state.file,
refToPreserve: classIdLocal
});
replaceSupers.replace();
const privateMethodDelegateId = memoiseExpression(createFunctionExpressionFromPrivateMethod(element.node), element.get("key.id").node.name, staticClosures);
if (ignoreFunctionLength) {
element.node.params = [_core.types.restElement(_core.types.identifier("arg"))];
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -95,18 +95,18 @@ function createClassFeaturePlugin({
pre(file) {
(0, _features.enableFeature)(file, feature, loose);
if (typeof file.get(versionKey) === "number") {
file.set(versionKey, "7.28.6");
file.set(versionKey, "7.29.7");
return;
}
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.28.6")) {
file.set(versionKey, "7.28.6");
if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.29.7")) {
file.set(versionKey, "7.29.7");
}
},
visitor: {
Class(path, {
file
}) {
if (file.get(versionKey) !== "7.28.6") return;
if (file.get(versionKey) !== "7.29.7") return;
if (!(0, _features.shouldTransform)(path, file)) return;
const pathIsClassDeclaration = path.isClassDeclaration();
if (pathIsClassDeclaration) (0, _typescript.assertFieldTransformed)(path);
@@ -218,7 +218,7 @@ function createClassFeaturePlugin({
ExportDefaultDeclaration(path, {
file
}) {
if (file.get(versionKey) !== "7.28.6") return;
if (file.get(versionKey) !== "7.29.7") return;
const decl = path.get("declaration");
if (decl.isClassDeclaration() && (0, _decorators.hasDecorators)(decl.node)) {
if (decl.node.id) {