@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 CHANGED
@@ -1,16 +1,15 @@
1
1
  ● ## Highlights
2
2
 
3
- - Fixed manual release workflow guardrails to prevent accidental triggers
4
- - Cleaned up stale regression test
5
- - Single workflow file change with improved safety checks
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
- **CI/CD Improvements**
10
- - Added guardrails to prevent unintended manual release triggers in GitHub Actions workflow
11
-
12
- **Testing**
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
- - #16 fix: guard manual releases (https://github.com/immense/vue-pom-generator/pull/16)
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
- Includes test cleanup (removal of stale regression test). Workflow changes validated through
27
- GitHub Actions.
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
- if (!isCallExpressionNode(call)) {
1480
+ const resolvedCall = isAwaitExpressionNode(call) ? call.argument : call;
1481
+ if (!isCallExpressionNode(resolvedCall)) {
1475
1482
  return null;
1476
1483
  }
1477
- const name = getLastIdentifierFromMemberChain(call.callee);
1484
+ const name = getLastIdentifierFromMemberChain(resolvedCall.callee);
1478
1485
  if (!name) {
1479
1486
  return null;
1480
1487
  }
1481
- const suffix = getStableSuffixFromCall(call);
1488
+ const suffix = getStableSuffixFromCall(resolvedCall);
1482
1489
  const semanticNameHint = suffix ? `${toPascalCase(name)}${suffix}` : toPascalCase(name);
1483
1490
  return semanticNameHint;
1484
1491
  };