@immense/vue-pom-generator 1.0.35 → 1.0.36

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,28 +1,33 @@
1
- # Release Notes: v1.0.35
1
+ ## v1.0.36
2
2
 
3
- ## Highlights
4
- - Fixed wrapper collision fallbacks in transform logic
5
- - Added comprehensive test coverage for wrapper collision scenarios
6
- - Improved PR workflow with release-notes preview comments
3
+ ### Highlights
7
4
 
8
- ## Changes
5
+ - Fixed handler collision suffixes to prevent naming conflicts in strict error mode
6
+ - Improved handler suffix derivation by skipping unstable leading arguments
7
+ - Enhanced detection of constant-like member expressions for more stable naming
8
+ - Added comprehensive test coverage for collision avoidance scenarios
9
9
 
10
- ### Bug Fixes
11
- - Resolved issues with wrapper collision fallback behavior in transform module
10
+ ### Changes
12
11
 
13
- ### Testing
14
- - Added 41 lines of new tests for wrapper collision scenarios in `transform.test.ts`
12
+ **Bug Fixes**
13
+ - Fixed handler collision suffixes when generating test IDs and POM methods (#27dc566)
14
+ - Skip unstable leading arguments when deriving handler suffixes from function arguments
15
+ - Check up to 4 arguments (previously 2) to find stable literal/constant values
16
+ - Validate constant-like root identifiers (e.g., `RebootPreference.Suppress`) before using
17
+ member expression names
18
+
19
+ **Testing**
20
+ - Added test for strict-mode collision avoidance with later stable args
21
+ - Added utility test coverage for `getRootIdentifierFromMemberChain` function
22
+ - New test validates `clickRunDeploymentActionAssign` method generation without conflicts
15
23
 
16
- ### Developer Experience
17
- - Integrated automated release-notes preview comments on pull requests
24
+ ### Pull Requests Included
18
25
 
19
- ## Breaking Changes
20
- None
26
+ - [#1](https://github.com/immense/vue-pom-generator/pull/1) - Add PR release-notes preview
27
+ comments (merged 2026-02-02, not in v1.0.36 window)
21
28
 
22
- ## Pull Requests Included
23
- - #1 Add PR release-notes preview comments (https://github.com/immense/vue-pom-generator/pull/1)
24
- by @dkattan
29
+ ### Testing
25
30
 
26
- ## Testing
27
- New test cases added to validate wrapper collision fallback fixes. All tests passing.
31
+ Added 44 lines of test coverage across `transform.test.ts` and `utils-coverage.test.ts` to
32
+ validate collision handling improvements.
28
33
 
package/dist/index.cjs CHANGED
@@ -1005,6 +1005,18 @@ function nodeHandlerAttributeInfo(node) {
1005
1005
  }
1006
1006
  return null;
1007
1007
  };
1008
+ const getRootIdentifierFromMemberChain = (node2) => {
1009
+ if (!node2) {
1010
+ return null;
1011
+ }
1012
+ if (isIdentifierNode(node2)) {
1013
+ return node2.name;
1014
+ }
1015
+ if (isMemberExpressionNode(node2)) {
1016
+ return getRootIdentifierFromMemberChain(node2.object);
1017
+ }
1018
+ return null;
1019
+ };
1008
1020
  const getAssignmentTargetName = (lhs) => {
1009
1021
  if (!lhs) {
1010
1022
  return null;
@@ -1059,7 +1071,10 @@ function nodeHandlerAttributeInfo(node) {
1059
1071
  }
1060
1072
  if (isMemberExpressionNode(arg)) {
1061
1073
  const stableName = getLastIdentifierFromMemberChain(arg);
1062
- if (stableName) {
1074
+ const rootName = getRootIdentifierFromMemberChain(arg);
1075
+ const firstChar = (rootName ?? "").charAt(0);
1076
+ const isConstantLikeRoot = firstChar !== "" && firstChar === firstChar.toUpperCase() && firstChar !== firstChar.toLowerCase();
1077
+ if (stableName && isConstantLikeRoot) {
1063
1078
  return toPascalCase(stableName.slice(0, 24));
1064
1079
  }
1065
1080
  }
@@ -1077,12 +1092,15 @@ function nodeHandlerAttributeInfo(node) {
1077
1092
  const first = args.length > 0 ? args[0] : null;
1078
1093
  if (!isObjectExpressionNode(first)) {
1079
1094
  const parts2 = [];
1080
- for (const arg of args.slice(0, 2)) {
1095
+ for (const arg of args.slice(0, 4)) {
1081
1096
  const w = stableWordFromValue(arg ?? null);
1082
1097
  if (!w) {
1083
- return null;
1098
+ continue;
1084
1099
  }
1085
1100
  parts2.push(w);
1101
+ if (parts2.length >= 2) {
1102
+ break;
1103
+ }
1086
1104
  }
1087
1105
  if (parts2.length === 0) {
1088
1106
  return null;