@immense/vue-pom-generator 1.0.40 → 1.0.41

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,38 +1,41 @@
1
- ● # Release Notes - v1.0.40
1
+ ● # Release Notes - v1.0.41
2
2
 
3
3
  ## Highlights
4
4
 
5
- - Fixed keyed POM deduplication logic
6
- - Fixed C# navigation return handling
7
- - Added PR release-notes preview comment automation
8
- - Improved test coverage with new test cases for class generation and utilities
5
+ - Fixed keyed click test ID scoping to prevent conflicts
6
+ - Aligned attachment scopes for consistent behavior
7
+ - Aligned dev snapshot options across plugin configurations
8
+ - Added PR release notes preview comments via GitHub Actions
9
+ - Expanded test coverage with new dev plugin options tests
9
10
 
10
11
  ## Changes
11
12
 
12
13
  **Bug Fixes**
13
- - Fixed keyed POM dedupe logic in utils
14
- - Corrected C# navigation return handling in class generation
14
+ - Fixed keyed click test ID scoping issues
15
+ - Aligned attachment scopes for proper C# navigation returns
16
+ - Aligned dev snapshot options across build and dev plugins
15
17
 
16
- **Tooling & Automation**
17
- - Added automated PR release-notes preview comments
18
+ **Tooling & CI**
19
+ - Updated release workflow to use npm 11.5.1 via npx
20
+ - Added automated PR release notes preview comments
18
21
 
19
22
  **Testing**
20
- - Added 60+ new test cases for class generation coverage
21
- - Added 50+ new test cases for utilities coverage
23
+ - Added comprehensive dev plugin options test suite (`tests/dev-plugin-options.test.ts`)
24
+ - Expanded transform tests with additional coverage
22
25
 
23
- ## Breaking Changes
24
-
25
- None
26
+ **Internal**
27
+ - Updated utility functions for improved scoping logic
28
+ - Refined plugin configuration handling
26
29
 
27
30
  ## Pull Requests Included
28
31
 
29
- - #4 Fix keyed POM dedupe and C# navigation returns
30
- (https://github.com/immense/vue-pom-generator/pull/4) by @dkattan
31
- - #1 Add PR release-notes preview comments (https://github.com/immense/vue-pom-generator/pull/1)
32
- by @dkattan
32
+ - [#4 Fix keyed POM dedupe and C# navigation
33
+ returns](https://github.com/immense/vue-pom-generator/pull/4) (@dkattan)
34
+ - [#1 Add PR release-notes preview
35
+ comments](https://github.com/immense/vue-pom-generator/pull/1) (@dkattan)
33
36
 
34
37
  ## Testing
35
38
 
36
- Added comprehensive test coverage with 110+ new test cases across class generation and utility
37
- functions.
39
+ Added 160+ lines of new tests for dev plugin options. Existing transform tests expanded with
40
+ additional assertions.
38
41
 
@@ -75,7 +75,7 @@ interface CustomPomAttachment {
75
75
  className: string;
76
76
  propertyName: string;
77
77
  attachWhenUsesComponents: string[];
78
- attachTo?: "views" | "components" | "both";
78
+ attachTo?: "views" | "components" | "both" | "pagesAndComponents";
79
79
  flatten?: boolean;
80
80
  }
81
81
 
@@ -8,7 +8,7 @@ interface CustomPomAttachment {
8
8
  className: string;
9
9
  propertyName: string;
10
10
  attachWhenUsesComponents: string[];
11
- attachTo?: "views" | "components" | "both";
11
+ attachTo?: "views" | "components" | "both" | "pagesAndComponents";
12
12
  flatten?: boolean;
13
13
  }
14
14
  export interface GenerateFilesOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../class-generation/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAoE,MAAM,UAAU,CAAC;AAQpH,OAAO,EAAE,oCAAoC,EAAE,CAAC;AA8ChD,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AASD,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA8PD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;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;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,mDAAmD;IACnD,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAEnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClD;AA+BD,wBAAsB,aAAa,CACjC,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAC1D,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,oBAAyB,iBAmFnC"}
package/dist/index.cjs CHANGED
@@ -739,14 +739,16 @@ function nodeHasForDirective(node) {
739
739
  function getKeyDirective(node) {
740
740
  return findDirectiveByName(node, "bind", "key") ?? null;
741
741
  }
742
- function getKeyDirectiveValue(node, context = null) {
742
+ function getKeyDirectiveValue(node, _context = null) {
743
743
  const keyDirective = getKeyDirective(node);
744
- let value = keyDirective?.exp?.loc.source;
745
- if (value) {
746
- if (context) {
747
- value = compilerCore.stringifyExpression(keyDirective.exp);
748
- }
749
- return `\${${value}}`;
744
+ const rawSource = keyDirective?.exp?.loc.source?.trim();
745
+ if (rawSource) {
746
+ return `\${${rawSource}}`;
747
+ }
748
+ if (keyDirective?.exp) {
749
+ const value = compilerCore.stringifyExpression(keyDirective.exp);
750
+ if (value)
751
+ return `\${${value}}`;
750
752
  }
751
753
  return null;
752
754
  }
@@ -6008,6 +6010,7 @@ function createDevProcessorPlugin(options) {
6008
6010
  customPomDir,
6009
6011
  customPomImportAliases,
6010
6012
  customPomImportNameCollisionBehavior,
6013
+ nameCollisionBehavior = "suffix",
6011
6014
  testIdAttribute,
6012
6015
  routerAwarePoms,
6013
6016
  resolvedRouterEntry,
@@ -6155,7 +6158,14 @@ function createDevProcessorPlugin(options) {
6155
6158
  nativeWrappers,
6156
6159
  excludedComponents,
6157
6160
  getViewsDirAbs(),
6158
- { existingIdBehavior: "preserve", testIdAttribute, wrapperSearchRoots: getWrapperSearchRoots() }
6161
+ {
6162
+ existingIdBehavior: "preserve",
6163
+ nameCollisionBehavior,
6164
+ testIdAttribute,
6165
+ warn: (message) => loggerRef.current.warn(message),
6166
+ vueFilesPathMap: snapshotVuePathMap,
6167
+ wrapperSearchRoots: getWrapperSearchRoots()
6168
+ }
6159
6169
  )
6160
6170
  ]
6161
6171
  });
@@ -6198,6 +6208,8 @@ function createDevProcessorPlugin(options) {
6198
6208
  customPomDir,
6199
6209
  customPomImportAliases,
6200
6210
  customPomImportNameCollisionBehavior,
6211
+ viewsDir,
6212
+ scanDirs,
6201
6213
  testIdAttribute,
6202
6214
  vueRouterFluentChaining: routerAwarePoms,
6203
6215
  routerEntry: resolvedRouterEntry,
@@ -6381,6 +6393,7 @@ function createSupportPlugins(options) {
6381
6393
  viewsDir,
6382
6394
  scanDirs,
6383
6395
  getWrapperSearchRoots,
6396
+ nameCollisionBehavior = "suffix",
6384
6397
  outDir,
6385
6398
  emitLanguages,
6386
6399
  csharp,
@@ -6457,6 +6470,7 @@ function createSupportPlugins(options) {
6457
6470
  customPomDir,
6458
6471
  customPomImportAliases,
6459
6472
  customPomImportNameCollisionBehavior,
6473
+ nameCollisionBehavior,
6460
6474
  testIdAttribute,
6461
6475
  routerAwarePoms,
6462
6476
  routerType,
@@ -7037,6 +7051,7 @@ function createVuePomGeneratorPlugins(options = {}) {
7037
7051
  viewsDir,
7038
7052
  scanDirs,
7039
7053
  getWrapperSearchRoots: getWrapperSearchRootsAbs,
7054
+ nameCollisionBehavior,
7040
7055
  outDir,
7041
7056
  emitLanguages,
7042
7057
  csharp,