@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/dist/index.mjs CHANGED
@@ -698,14 +698,16 @@ function nodeHasForDirective(node) {
698
698
  function getKeyDirective(node) {
699
699
  return findDirectiveByName(node, "bind", "key") ?? null;
700
700
  }
701
- function getKeyDirectiveValue(node, context = null) {
701
+ function getKeyDirectiveValue(node, _context = null) {
702
702
  const keyDirective = getKeyDirective(node);
703
- let value = keyDirective?.exp?.loc.source;
704
- if (value) {
705
- if (context) {
706
- value = stringifyExpression(keyDirective.exp);
707
- }
708
- return `\${${value}}`;
703
+ const rawSource = keyDirective?.exp?.loc.source?.trim();
704
+ if (rawSource) {
705
+ return `\${${rawSource}}`;
706
+ }
707
+ if (keyDirective?.exp) {
708
+ const value = stringifyExpression(keyDirective.exp);
709
+ if (value)
710
+ return `\${${value}}`;
709
711
  }
710
712
  return null;
711
713
  }
@@ -5967,6 +5969,7 @@ function createDevProcessorPlugin(options) {
5967
5969
  customPomDir,
5968
5970
  customPomImportAliases,
5969
5971
  customPomImportNameCollisionBehavior,
5972
+ nameCollisionBehavior = "suffix",
5970
5973
  testIdAttribute,
5971
5974
  routerAwarePoms,
5972
5975
  resolvedRouterEntry,
@@ -6114,7 +6117,14 @@ function createDevProcessorPlugin(options) {
6114
6117
  nativeWrappers,
6115
6118
  excludedComponents,
6116
6119
  getViewsDirAbs(),
6117
- { existingIdBehavior: "preserve", testIdAttribute, wrapperSearchRoots: getWrapperSearchRoots() }
6120
+ {
6121
+ existingIdBehavior: "preserve",
6122
+ nameCollisionBehavior,
6123
+ testIdAttribute,
6124
+ warn: (message) => loggerRef.current.warn(message),
6125
+ vueFilesPathMap: snapshotVuePathMap,
6126
+ wrapperSearchRoots: getWrapperSearchRoots()
6127
+ }
6118
6128
  )
6119
6129
  ]
6120
6130
  });
@@ -6157,6 +6167,8 @@ function createDevProcessorPlugin(options) {
6157
6167
  customPomDir,
6158
6168
  customPomImportAliases,
6159
6169
  customPomImportNameCollisionBehavior,
6170
+ viewsDir,
6171
+ scanDirs,
6160
6172
  testIdAttribute,
6161
6173
  vueRouterFluentChaining: routerAwarePoms,
6162
6174
  routerEntry: resolvedRouterEntry,
@@ -6340,6 +6352,7 @@ function createSupportPlugins(options) {
6340
6352
  viewsDir,
6341
6353
  scanDirs,
6342
6354
  getWrapperSearchRoots,
6355
+ nameCollisionBehavior = "suffix",
6343
6356
  outDir,
6344
6357
  emitLanguages,
6345
6358
  csharp,
@@ -6416,6 +6429,7 @@ function createSupportPlugins(options) {
6416
6429
  customPomDir,
6417
6430
  customPomImportAliases,
6418
6431
  customPomImportNameCollisionBehavior,
6432
+ nameCollisionBehavior,
6419
6433
  testIdAttribute,
6420
6434
  routerAwarePoms,
6421
6435
  routerType,
@@ -6996,6 +7010,7 @@ function createVuePomGeneratorPlugins(options = {}) {
6996
7010
  viewsDir,
6997
7011
  scanDirs,
6998
7012
  getWrapperSearchRoots: getWrapperSearchRootsAbs,
7013
+ nameCollisionBehavior,
6999
7014
  outDir,
7000
7015
  emitLanguages,
7001
7016
  csharp,