@immense/vue-pom-generator 1.0.54 → 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,54 +1,27 @@
1
1
  ● ## Highlights
2
2
 
3
- - **Zero runtime dependencies**: Eliminated all runtime dependencies for smaller bundle size and
4
- reduced version conflicts
5
- - **Pluggable callout renderer architecture**: Extracted floating-ui implementation into
6
- swappable renderer system
7
- - **Stricter semantic naming**: Unnameable wrapper handlers now fail fast by default instead of
8
- silently succeeding
9
- - **Streamlined callout placement pipeline**: Refactored pointer callout rendering for improved
10
- maintainability
11
- - **Removed peer dependencies**: No longer requires `vue`, `vitest`, or `@vue/shared` as peer
12
- dependencies
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
13
6
 
14
7
  ## Changes
15
8
 
16
- ### Dependencies
17
- - Eliminated all runtime dependencies
18
- ([#9](https://github.com/immense/vue-pom-generator/pull/9))
19
- - Removed `vue`, `vitest`, and `@vue/shared` peer dependencies
20
- - Updated package structure for zero external runtime requirements
21
-
22
- ### Callout Rendering
23
- - Extracted floating-ui callout renderer into separate module (`floating-ui-callout.ts`)
24
- - Introduced pluggable pointer callout renderer system
25
- - Streamlined callout placement pipeline for better performance
26
- - Refactored pointer rendering logic for extensibility
27
-
28
- ### Error Handling
29
- - Semantic-name validation failures now default to throwing errors instead of warnings
30
- - Improved fail-fast behavior for unnameable wrapper handlers
31
-
32
- ### Testing
33
- - Aligned dev plugin options across test suite
34
- - Added pointer callout sequence documentation (GIF)
35
- - Enhanced test coverage for pointer rendering
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`
36
13
 
37
14
  ## Breaking Changes
38
15
 
39
- - **Peer dependencies removed**: `vue`, `vitest`, and `@vue/shared` are no longer peer
40
- dependencies. Ensure your build still works if you relied on these being present.
41
- - **Semantic naming errors**: Invalid semantic names now throw by default instead of warning.
42
- Handlers that cannot be named semantically will cause build failures unless explicitly
43
- configured otherwise.
16
+ None.
44
17
 
45
18
  ## Pull Requests Included
46
19
 
47
- - [#9](https://github.com/immense/vue-pom-generator/pull/9) - refactor(deps): eliminate all
48
- runtime dependencies
20
+ - #17 fix: support awaited handler wrappers
21
+ (https://github.com/immense/vue-pom-generator/pull/17) by @dkattan
49
22
 
50
23
  ## Testing
51
24
 
52
- Comprehensive test updates included to validate dependency removal, plugin option alignment, and
53
- pointer callout rendering behavior.
25
+ Added 39 lines of new tests covering awaited handler wrapper scenarios and edge cases. All tests
26
+ passing.
54
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
  };