@immense/vue-pom-generator 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES.md +11 -12
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
● ## Highlights
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
-
|
|
3
|
+
- Added support for awaited handler wrappers in POM generation
|
|
4
|
+
- Enhanced async/await pattern detection in Vue event handlers
|
|
5
|
+
- Improved test coverage with 39 new test lines across transform and utils
|
|
6
6
|
|
|
7
7
|
## Changes
|
|
8
8
|
|
|
9
|
-
**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Removed stale regression test case
|
|
9
|
+
- **Handler Detection:** `utils.ts` now correctly identifies and processes event handlers
|
|
10
|
+
wrapped in `await` expressions
|
|
11
|
+
- **Test Coverage:** Added comprehensive tests for awaited handler scenarios in
|
|
12
|
+
`transform.test.ts` and `utils-coverage.test.ts`
|
|
14
13
|
|
|
15
14
|
## Breaking Changes
|
|
16
15
|
|
|
@@ -18,11 +17,11 @@
|
|
|
18
17
|
|
|
19
18
|
## Pull Requests Included
|
|
20
19
|
|
|
21
|
-
- #
|
|
22
|
-
(@dkattan
|
|
20
|
+
- #17 fix: support awaited handler wrappers
|
|
21
|
+
(https://github.com/immense/vue-pom-generator/pull/17) by @dkattan
|
|
23
22
|
|
|
24
23
|
## Testing
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
Added 39 lines of new tests covering awaited handler wrapper scenarios and edge cases. All tests
|
|
26
|
+
passing.
|
|
28
27
|
|
package/dist/index.cjs
CHANGED
|
@@ -1265,6 +1265,12 @@ function nodeHandlerAttributeInfo(node) {
|
|
|
1265
1265
|
const n = node2;
|
|
1266
1266
|
return typeof n.callee === "object" && n.callee !== null && Array.isArray(n.arguments);
|
|
1267
1267
|
};
|
|
1268
|
+
const isAwaitExpressionNode = (node2) => {
|
|
1269
|
+
if (!isNodeType(node2, "AwaitExpression"))
|
|
1270
|
+
return false;
|
|
1271
|
+
const n = node2;
|
|
1272
|
+
return typeof n.argument === "object" && n.argument !== null;
|
|
1273
|
+
};
|
|
1268
1274
|
const isAssignmentExpressionNode = (node2) => {
|
|
1269
1275
|
if (!isNodeType(node2, "AssignmentExpression"))
|
|
1270
1276
|
return false;
|
|
@@ -1471,14 +1477,15 @@ function nodeHandlerAttributeInfo(node) {
|
|
|
1471
1477
|
if (isArrowFunctionExpressionNode(expr)) {
|
|
1472
1478
|
const body = expr.body;
|
|
1473
1479
|
const tryFromCallExpression = (call) => {
|
|
1474
|
-
|
|
1480
|
+
const resolvedCall = isAwaitExpressionNode(call) ? call.argument : call;
|
|
1481
|
+
if (!isCallExpressionNode(resolvedCall)) {
|
|
1475
1482
|
return null;
|
|
1476
1483
|
}
|
|
1477
|
-
const name = getLastIdentifierFromMemberChain(
|
|
1484
|
+
const name = getLastIdentifierFromMemberChain(resolvedCall.callee);
|
|
1478
1485
|
if (!name) {
|
|
1479
1486
|
return null;
|
|
1480
1487
|
}
|
|
1481
|
-
const suffix = getStableSuffixFromCall(
|
|
1488
|
+
const suffix = getStableSuffixFromCall(resolvedCall);
|
|
1482
1489
|
const semanticNameHint = suffix ? `${toPascalCase(name)}${suffix}` : toPascalCase(name);
|
|
1483
1490
|
return semanticNameHint;
|
|
1484
1491
|
};
|