From 32ea12a57d799c44e28cbc9faec687c7353ad38d Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Thu, 21 Nov 2024 23:11:19 +0530 Subject: [PATCH 1/3] update: acorn walk package --- app/client/packages/ast/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/packages/ast/package.json b/app/client/packages/ast/package.json index e982902dd1b1..351e5b9602a8 100644 --- a/app/client/packages/ast/package.json +++ b/app/client/packages/ast/package.json @@ -16,8 +16,8 @@ "@rollup/plugin-commonjs": "^22.0.0", "@types/escodegen": "^0.0.7", "@types/lodash": "^4.14.120", - "acorn": "^8.8.0", - "acorn-walk": "^8.2.0", + "acorn": "8.14.0", + "acorn-walk": "8.3.4", "astravel": "^0.6.1", "astring": "^1.7.5", "escodegen": "^2.0.0", From 81bc61706e196b11ac6a1e04da3d10d30de89b9a Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Thu, 21 Nov 2024 23:12:48 +0530 Subject: [PATCH 2/3] update: yarn lock for package upgrade --- app/client/yarn.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/client/yarn.lock b/app/client/yarn.lock index dc86e9a1ddeb..abcbd21fa8b1 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -8405,8 +8405,8 @@ __metadata: "@types/lodash": ^4.14.120 "@typescript-eslint/eslint-plugin": ^5.25.0 "@typescript-eslint/parser": ^5.25.0 - acorn: ^8.8.0 - acorn-walk: ^8.2.0 + acorn: 8.14.0 + acorn-walk: 8.3.4 astravel: ^0.6.1 astring: ^1.7.5 escodegen: ^2.0.0 @@ -12463,14 +12463,7 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^7.0.0, acorn-walk@npm:^7.1.1, acorn-walk@npm:^7.2.0": - version: 7.2.0 - resolution: "acorn-walk@npm:7.2.0" - checksum: 9252158a79b9d92f1bc0dd6acc0fcfb87a67339e84bcc301bb33d6078936d27e35d606b4d35626d2962cd43c256d6f27717e70cbe15c04fff999ab0b2260b21f - languageName: node - linkType: hard - -"acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1, acorn-walk@npm:^8.2.0": +"acorn-walk@npm:8.3.4, acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1, acorn-walk@npm:^8.2.0": version: 8.3.4 resolution: "acorn-walk@npm:8.3.4" dependencies: @@ -12479,6 +12472,13 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^7.0.0, acorn-walk@npm:^7.1.1, acorn-walk@npm:^7.2.0": + version: 7.2.0 + resolution: "acorn-walk@npm:7.2.0" + checksum: 9252158a79b9d92f1bc0dd6acc0fcfb87a67339e84bcc301bb33d6078936d27e35d606b4d35626d2962cd43c256d6f27717e70cbe15c04fff999ab0b2260b21f + languageName: node + linkType: hard + "acorn@npm:8.10.0": version: 8.10.0 resolution: "acorn@npm:8.10.0" @@ -12488,6 +12488,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:8.14.0, acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.2.4, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 8755074ba55fff94e84e81c72f1013c2d9c78e973c31231c8ae505a5f966859baf654bddd75046bffd73ce816b149298977fff5077a3033dedba0ae2aad152d4 + languageName: node + linkType: hard + "acorn@npm:^4.0.9": version: 4.0.13 resolution: "acorn@npm:4.0.13" @@ -12506,15 +12515,6 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.2.4, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.0, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 8755074ba55fff94e84e81c72f1013c2d9c78e973c31231c8ae505a5f966859baf654bddd75046bffd73ce816b149298977fff5077a3033dedba0ae2aad152d4 - languageName: node - linkType: hard - "add-px-to-style@npm:1.0.0": version: 1.0.0 resolution: "add-px-to-style@npm:1.0.0" From 518c41104561b6f0df8f546eb5a4e0b3e82c2676 Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Thu, 21 Nov 2024 23:19:38 +0530 Subject: [PATCH 3/3] update: remove unused type skip commetns --- app/client/packages/ast/src/actionCreator/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/client/packages/ast/src/actionCreator/index.ts b/app/client/packages/ast/src/actionCreator/index.ts index 100734a2c02c..de42fb42b5c5 100644 --- a/app/client/packages/ast/src/actionCreator/index.ts +++ b/app/client/packages/ast/src/actionCreator/index.ts @@ -800,16 +800,13 @@ export function canTranslateToUI( simple(astWithComments, { ConditionalExpression(node) { if ( - // @ts-expect-error: types not matched isCallExpressionNode(node.consequent) || - // @ts-expect-error: types not matched isCallExpressionNode(node.alternate) ) { canTranslate = false; } }, LogicalExpression(node) { - // @ts-expect-error: types not matched if (isCallExpressionNode(node.left) || isCallExpressionNode(node.right)) { canTranslate = false; } @@ -912,12 +909,10 @@ export function getMainAction( ExpressionStatement(node) { simple(node, { CallExpression(node) { - // @ts-expect-error: types not matched if (node.callee.type === NodeTypes.Identifier) { mainAction = generate(node, { comments: true }).trim(); } else { mainAction = - // @ts-expect-error: types not matched generate(node.callee, { comments: true }).trim() + "()"; } },