@immense/vue-pom-generator 1.0.86 → 1.0.87
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 +48 -46
- package/dist/index.cjs +51 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +51 -6
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/create-vue-pom-generator-plugins.d.ts.map +1 -1
- package/dist/plugin/internal/build-plugin.d.ts +2 -0
- package/dist/plugin/internal/build-plugin.d.ts.map +1 -1
- package/dist/plugin/internal/dev-plugin.d.ts +1 -0
- package/dist/plugin/internal/dev-plugin.d.ts.map +1 -1
- package/dist/plugin/internal-plugins.d.ts +1 -0
- package/dist/plugin/internal-plugins.d.ts.map +1 -1
- package/dist/plugin/resolved-injection-options.d.ts +2 -0
- package/dist/plugin/resolved-injection-options.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +13 -0
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/plugin/vue-plugin.d.ts +1 -0
- package/dist/plugin/vue-plugin.d.ts.map +1 -1
- package/dist/transform.d.ts +6 -0
- package/dist/transform.d.ts.map +1 -1
- package/dist/utils.d.ts +28 -5
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,68 +1,70 @@
|
|
|
1
|
-
I'll gather the
|
|
2
|
-
|
|
1
|
+
I'll gather accurate data about the release window using the gh CLI to determine which PRs were
|
|
2
|
+
actually merged in the specified time range.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
window.
|
|
4
|
+
The day-granularity search returned only #52. Let me query more broadly with precise timestamps to
|
|
5
|
+
ensure I capture all PRs in the exact window.
|
|
6
6
|
|
|
7
|
-
Let me
|
|
7
|
+
Let me examine the tags and commit relationships to understand what's actually in this release.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
The picture is now clear: v1.0.86 tag points to #52's commit, so #52 (and #51) belong to v1.0.86.
|
|
10
|
+
The 3 commits in v1.0.86..HEAD have no PR numbers. Let me confirm the commit dates and verify no PRs
|
|
11
|
+
were merged after #52 in the window.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
the actual
|
|
13
|
+
No PRs were merged after #52 in the window. v1.0.86 = #52's commit, so this release contains only
|
|
14
|
+
the 3 direct-push commits. Let me examine the actual diffs to write accurate notes.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
the
|
|
16
|
+
Let me do a final verification that #52 is indeed the most recently merged PR (confirming no PRs for
|
|
17
|
+
the 3 commits).
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
Verified: #52 (merged 2026-08-10T16:33:03Z) is the most recent merged PR and is the v1.0.86 tag
|
|
20
|
+
commit. The 3 commits in v1.0.86..HEAD have no PR numbers and no PRs were merged after #52 — they
|
|
21
|
+
were pushed directly. The diffstat confirms the option-keying/selection-event scope. Here are the
|
|
22
|
+
release notes:
|
|
20
23
|
|
|
21
24
|
Highlights
|
|
22
25
|
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
- Radio/checkbox and listbox-option POMs now recognize @change and @mousedown as action events (in
|
|
27
|
+
addition to @click), so v-for option lists using idiomatic control events generate complete POMs
|
|
28
|
+
instead of empty ones.
|
|
29
|
+
- Radios/checkboxes using the standard :value + :checked + @change pattern (no v-model) now derive
|
|
30
|
+
a role-based keyed accessor from the :value binding, rather than falling through to the handler-name
|
|
31
|
+
path.
|
|
32
|
+
- New per-component optionKeyAttribute option keys option accessors off a chosen binding (e.g.
|
|
33
|
+
:value) instead of Vue's reconciliation :key.
|
|
34
|
+
- Test suite extended with 164 new lines and four fixtures covering option-keying and
|
|
35
|
+
selection-event scenarios.
|
|
32
36
|
|
|
33
37
|
Changes
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Option-selection events
|
|
36
40
|
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- describeLocator, locatorByTestId, locatorByTestIdGetByLabel, and keyedLocators return
|
|
43
|
-
Playwright's full Locator instead of the narrowed PwLocator.
|
|
44
|
-
- PwLocator doc comment updated to clarify it is for internal parameters only; return types widen
|
|
45
|
-
at the boundary.
|
|
41
|
+
- Expanded the recognized action-event set to click, change, and mousedown (ACTION_EVENTS);
|
|
42
|
+
isClickDirective, tryGetClickDirective, and hasClickDirective now match all three.
|
|
43
|
+
- Native-role identifier resolution falls back to the :value binding for radios/checkboxes via the
|
|
44
|
+
new getBindingValueHint, emitting role-based keyed accessors for the component-library binding
|
|
45
|
+
pattern (:value + :checked + @change).
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Option-keying accessors
|
|
48
48
|
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.page usage in generated output.
|
|
49
|
+
- Added optionKeyAttribute plugin option (Record<string, string>) mapping an SFC component name to
|
|
50
|
+
the binding its keyed accessor derives a key fragment from; threaded through
|
|
51
|
+
VuePomGeneratorPluginOptions, resolved injection options, and the build/dev/vue plugins. Defaults to
|
|
52
|
+
{} (existing :key-based behavior unchanged).
|
|
53
|
+
- Added getBindingKeyInfo helper to read an arbitrary :bind directive (e.g. :value) and produce the
|
|
54
|
+
existing ResolvedKeyInfo shape, reusing the parameterized keyed-accessor machinery.
|
|
55
|
+
- Keyed-fragment resolution now consults optionKeyAttribute[componentName] before the default :key
|
|
56
|
+
directive.
|
|
58
57
|
|
|
59
58
|
Pull Requests Included
|
|
60
59
|
|
|
61
|
-
-
|
|
60
|
+
- None merged in this release window. The three changes were committed directly to main without an
|
|
61
|
+
associated pull request (#52, the most recent merge, is included in v1.0.86).
|
|
62
62
|
|
|
63
63
|
Testing
|
|
64
64
|
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
- New option-keying and selection-event scenarios added via TDD (red-then-green).
|
|
66
|
+
- 164 lines added to tests/transform.test.ts with four new fixtures: MyList_OptionMousedown,
|
|
67
|
+
MyRadioGroup_OptionChange, MyRadioGroup_OptionId, MyRadioGroup_OptionValue.
|
|
68
|
+
- Build–serve parity, dev-plugin-options, resolved-injection-options, and vue-plugin-state suites
|
|
69
|
+
updated for the new optionKeyAttribute option.
|
|
68
70
|
|
package/dist/index.cjs
CHANGED
|
@@ -277,6 +277,7 @@ function resolveInjectionSupportOptions(options) {
|
|
|
277
277
|
layoutDirs: isNuxt ? ["app/layouts"] : options.layoutDirs ?? ["src/layouts"],
|
|
278
278
|
wrapperSearchRoots: isNuxt ? [] : options.wrapperSearchRoots ?? [],
|
|
279
279
|
nativeWrappers: options.nativeWrappers ?? {},
|
|
280
|
+
optionKeyAttribute: options.optionKeyAttribute ?? {},
|
|
280
281
|
excludedComponents: options.excludedComponents ?? [],
|
|
281
282
|
existingIdBehavior: options.existingIdBehavior ?? "error",
|
|
282
283
|
testIdAttribute: (options.testIdAttribute ?? "data-testid").trim() || "data-testid"
|
|
@@ -1327,12 +1328,13 @@ function findDirectiveByName(node, directiveName, argumentName) {
|
|
|
1327
1328
|
return matchesDirective;
|
|
1328
1329
|
});
|
|
1329
1330
|
}
|
|
1331
|
+
const ACTION_EVENTS = /* @__PURE__ */ new Set(["click", "change", "mousedown"]);
|
|
1330
1332
|
function isClickDirective(prop) {
|
|
1331
1333
|
if (prop.type !== compilerCore.NodeTypes.DIRECTIVE) {
|
|
1332
1334
|
return false;
|
|
1333
1335
|
}
|
|
1334
1336
|
const directive = prop;
|
|
1335
|
-
return directive.name === "on" && directive.arg?.type === compilerCore.NodeTypes.SIMPLE_EXPRESSION && directive.arg.content
|
|
1337
|
+
return directive.name === "on" && directive.arg?.type === compilerCore.NodeTypes.SIMPLE_EXPRESSION && ACTION_EVENTS.has(directive.arg.content);
|
|
1336
1338
|
}
|
|
1337
1339
|
function tryGetClickDirective(node) {
|
|
1338
1340
|
return node.props.find((p) => isClickDirective(p));
|
|
@@ -1734,6 +1736,17 @@ function getKeyDirectiveInfo(node) {
|
|
|
1734
1736
|
const runtimeSource = getVueExpressionSource(keyExpression, "loc", "compiled");
|
|
1735
1737
|
return toResolvedKeyInfo(selectorSource, runtimeSource);
|
|
1736
1738
|
}
|
|
1739
|
+
function getBindingKeyInfo(node, attrName) {
|
|
1740
|
+
const directive = findDirectiveByName(node, "bind", attrName);
|
|
1741
|
+
const exp = directive?.exp;
|
|
1742
|
+
if (!exp || exp.type !== compilerCore.NodeTypes.SIMPLE_EXPRESSION && exp.type !== compilerCore.NodeTypes.COMPOUND_EXPRESSION) {
|
|
1743
|
+
return null;
|
|
1744
|
+
}
|
|
1745
|
+
const expression = exp;
|
|
1746
|
+
const selectorSource = getVueExpressionSource(expression, "compiled", "loc");
|
|
1747
|
+
const runtimeSource = getVueExpressionSource(expression, "loc", "compiled");
|
|
1748
|
+
return toResolvedKeyInfo(selectorSource, runtimeSource);
|
|
1749
|
+
}
|
|
1737
1750
|
function getModelBindingValues(node) {
|
|
1738
1751
|
let vModel = "";
|
|
1739
1752
|
const vModelDirective = findDirectiveByName(node, "model");
|
|
@@ -1753,6 +1766,15 @@ function getModelBindingValues(node) {
|
|
|
1753
1766
|
}
|
|
1754
1767
|
return { vModel, modelValue };
|
|
1755
1768
|
}
|
|
1769
|
+
function getBindingValueHint(node) {
|
|
1770
|
+
const directive = findDirectiveByName(node, "bind", "value");
|
|
1771
|
+
const exp = directive?.exp;
|
|
1772
|
+
if (!exp || exp.type !== compilerCore.NodeTypes.SIMPLE_EXPRESSION && exp.type !== compilerCore.NodeTypes.COMPOUND_EXPRESSION) {
|
|
1773
|
+
return null;
|
|
1774
|
+
}
|
|
1775
|
+
const source = getVueExpressionSource(exp, "loc", "content");
|
|
1776
|
+
return source || null;
|
|
1777
|
+
}
|
|
1756
1778
|
function getStaticIdOrNameHint(node) {
|
|
1757
1779
|
let idAttr = findAttributeByKey(node, "id");
|
|
1758
1780
|
if (!idAttr) {
|
|
@@ -7531,6 +7553,7 @@ function createTestIdTransform(componentName, componentHierarchyMap, nativeWrapp
|
|
|
7531
7553
|
const wrapperSearchRoots = options.wrapperSearchRoots ?? [];
|
|
7532
7554
|
const annotatorMetadata = options.annotatorMetadata ?? null;
|
|
7533
7555
|
const crossFileKeyRegistry = options.crossFileKeyRegistry;
|
|
7556
|
+
const optionKeyAttribute = options.optionKeyAttribute ?? {};
|
|
7534
7557
|
const safeRealpath2 = (p) => {
|
|
7535
7558
|
try {
|
|
7536
7559
|
return fs.existsSync(p) ? fs.realpathSync(p) : p;
|
|
@@ -7711,6 +7734,13 @@ Fix: set \`role\` explicitly in nativeWrappers (e.g. { "${element.tag}": { role:
|
|
|
7711
7734
|
const getBestAvailableKeyInfo = () => {
|
|
7712
7735
|
const parentNode = context.parent && typeof context.parent === "object" ? context.parent : null;
|
|
7713
7736
|
const isDirectVForChild = parentNode?.type === compilerCore.NodeTypes.FOR;
|
|
7737
|
+
const configuredAttrName = optionKeyAttribute[componentName];
|
|
7738
|
+
if (configuredAttrName && configuredAttrName !== "key") {
|
|
7739
|
+
const bindingKeyInfo = getBindingKeyInfo(element, configuredAttrName);
|
|
7740
|
+
if (bindingKeyInfo) {
|
|
7741
|
+
return bindingKeyInfo;
|
|
7742
|
+
}
|
|
7743
|
+
}
|
|
7714
7744
|
const vForKeyInfo = (isDirectVForChild ? getKeyDirectiveInfo(element) : null) || getContainedInVForDirectiveKeyInfo(context, element, hierarchyMap);
|
|
7715
7745
|
if (vForKeyInfo) {
|
|
7716
7746
|
return vForKeyInfo;
|
|
@@ -7918,7 +7948,8 @@ Fix: remove the explicit ${attrLabel}, or change existingIdBehavior to "overwrit
|
|
|
7918
7948
|
const rawIdentifier = getStaticAttributeContent(element, "id") || getStaticAttributeContent(element, "name");
|
|
7919
7949
|
const labelText = getAssociatedLabelText(element, hierarchyMap);
|
|
7920
7950
|
const { vModel, modelValue } = getModelBindingValues(element);
|
|
7921
|
-
const
|
|
7951
|
+
const valueBindingHint = nativeHtmlRole === "radio" || nativeHtmlRole === "checkbox" ? getBindingValueHint(element) : null;
|
|
7952
|
+
const bindingHint = modelValue || vModel || valueBindingHint || null;
|
|
7922
7953
|
const labelToken = labelText ? toPascalCase(labelText) : "";
|
|
7923
7954
|
const bindingToken = bindingHint ? toPascalCase(bindingHint) : "";
|
|
7924
7955
|
let identifierToken = null;
|
|
@@ -8089,6 +8120,7 @@ function createBuildProcessorPlugin(options) {
|
|
|
8089
8120
|
generation,
|
|
8090
8121
|
projectRootRef,
|
|
8091
8122
|
nativeWrappers,
|
|
8123
|
+
optionKeyAttribute,
|
|
8092
8124
|
excludedComponents,
|
|
8093
8125
|
getWrapperSearchRoots,
|
|
8094
8126
|
getResolvedRouterEntry,
|
|
@@ -8221,7 +8253,8 @@ function createBuildProcessorPlugin(options) {
|
|
|
8221
8253
|
warn: (message) => loggerRef.current.warn(message),
|
|
8222
8254
|
vueFilesPathMap,
|
|
8223
8255
|
wrapperSearchRoots: getWrapperSearchRoots(),
|
|
8224
|
-
crossFileKeyRegistry
|
|
8256
|
+
crossFileKeyRegistry,
|
|
8257
|
+
optionKeyAttribute
|
|
8225
8258
|
}
|
|
8226
8259
|
)
|
|
8227
8260
|
]
|
|
@@ -8340,6 +8373,7 @@ function createBuildProcessorPlugin(options) {
|
|
|
8340
8373
|
function createDevProcessorPlugin(options) {
|
|
8341
8374
|
const {
|
|
8342
8375
|
nativeWrappers,
|
|
8376
|
+
optionKeyAttribute,
|
|
8343
8377
|
excludedComponents,
|
|
8344
8378
|
getPageDirs,
|
|
8345
8379
|
getComponentDirs,
|
|
@@ -8573,7 +8607,8 @@ function createDevProcessorPlugin(options) {
|
|
|
8573
8607
|
warn: (message) => loggerRef.current.warn(message),
|
|
8574
8608
|
vueFilesPathMap: provisionalVuePathMap,
|
|
8575
8609
|
wrapperSearchRoots: getWrapperSearchRoots(),
|
|
8576
|
-
crossFileKeyRegistry: provisionalKeyRegistry
|
|
8610
|
+
crossFileKeyRegistry: provisionalKeyRegistry,
|
|
8611
|
+
optionKeyAttribute
|
|
8577
8612
|
}
|
|
8578
8613
|
)
|
|
8579
8614
|
]
|
|
@@ -9104,6 +9139,7 @@ function createInternalPlugins(options) {
|
|
|
9104
9139
|
elementMetadata,
|
|
9105
9140
|
vueFilesPathMap,
|
|
9106
9141
|
nativeWrappers,
|
|
9142
|
+
optionKeyAttribute,
|
|
9107
9143
|
excludedComponents,
|
|
9108
9144
|
getPageDirs,
|
|
9109
9145
|
getComponentDirs,
|
|
@@ -9154,6 +9190,7 @@ function createInternalPlugins(options) {
|
|
|
9154
9190
|
generation,
|
|
9155
9191
|
projectRootRef,
|
|
9156
9192
|
nativeWrappers,
|
|
9193
|
+
optionKeyAttribute,
|
|
9157
9194
|
excludedComponents,
|
|
9158
9195
|
getWrapperSearchRoots,
|
|
9159
9196
|
getResolvedRouterEntry: resolveRouterEntry2,
|
|
@@ -9161,6 +9198,7 @@ function createInternalPlugins(options) {
|
|
|
9161
9198
|
});
|
|
9162
9199
|
const devProcessor = createDevProcessorPlugin({
|
|
9163
9200
|
nativeWrappers,
|
|
9201
|
+
optionKeyAttribute,
|
|
9164
9202
|
excludedComponents,
|
|
9165
9203
|
getPageDirs,
|
|
9166
9204
|
getComponentDirs,
|
|
@@ -9365,6 +9403,7 @@ function createVuePluginWithTestIds(options) {
|
|
|
9365
9403
|
nameCollisionBehavior,
|
|
9366
9404
|
missingSemanticNameBehavior = "error",
|
|
9367
9405
|
nativeWrappers,
|
|
9406
|
+
optionKeyAttribute,
|
|
9368
9407
|
elementMetadata,
|
|
9369
9408
|
semanticNameMap,
|
|
9370
9409
|
componentHierarchyMap,
|
|
@@ -9439,7 +9478,8 @@ function createVuePluginWithTestIds(options) {
|
|
|
9439
9478
|
vueFilesPathMap,
|
|
9440
9479
|
wrapperSearchRoots: getWrapperSearchRoots(),
|
|
9441
9480
|
annotatorMetadata,
|
|
9442
|
-
crossFileKeyRegistry
|
|
9481
|
+
crossFileKeyRegistry,
|
|
9482
|
+
optionKeyAttribute
|
|
9443
9483
|
}
|
|
9444
9484
|
)
|
|
9445
9485
|
);
|
|
@@ -9496,7 +9536,8 @@ function createVuePluginWithTestIds(options) {
|
|
|
9496
9536
|
vueFilesPathMap,
|
|
9497
9537
|
wrapperSearchRoots: getWrapperSearchRoots(),
|
|
9498
9538
|
annotatorMetadata,
|
|
9499
|
-
crossFileKeyRegistry
|
|
9539
|
+
crossFileKeyRegistry,
|
|
9540
|
+
optionKeyAttribute
|
|
9500
9541
|
}
|
|
9501
9542
|
);
|
|
9502
9543
|
perFileTransform.set(componentName, transform);
|
|
@@ -9833,6 +9874,7 @@ function createVuePomGeneratorPlugins(options = {}) {
|
|
|
9833
9874
|
layoutDirs: injection.layoutDirs,
|
|
9834
9875
|
wrapperSearchRoots: injection.wrapperSearchRoots,
|
|
9835
9876
|
nativeWrappers: injection.nativeWrappers,
|
|
9877
|
+
optionKeyAttribute: injection.optionKeyAttribute,
|
|
9836
9878
|
excludedComponents: injection.excludeComponents,
|
|
9837
9879
|
existingIdBehavior: injection.existingIdBehavior,
|
|
9838
9880
|
testIdAttribute: injection.attribute
|
|
@@ -9840,6 +9882,7 @@ function createVuePomGeneratorPlugins(options = {}) {
|
|
|
9840
9882
|
};
|
|
9841
9883
|
const resolvedInjectionOptions = resolvedInjectionOptionsRef.current;
|
|
9842
9884
|
const nativeWrappers = resolvedInjectionOptions.nativeWrappers;
|
|
9885
|
+
const optionKeyAttribute = resolvedInjectionOptions.optionKeyAttribute;
|
|
9843
9886
|
const excludedComponents = resolvedInjectionOptions.excludedComponents;
|
|
9844
9887
|
const testIdAttribute = resolvedInjectionOptions.testIdAttribute;
|
|
9845
9888
|
const routerEntry = !isNuxt ? vueGenerationOptions?.router?.entry : void 0;
|
|
@@ -9962,6 +10005,7 @@ function createVuePomGeneratorPlugins(options = {}) {
|
|
|
9962
10005
|
nameCollisionBehavior: resolvedGenerationOptions.nameCollisionBehavior,
|
|
9963
10006
|
missingSemanticNameBehavior: resolvedGenerationOptions.missingSemanticNameBehavior,
|
|
9964
10007
|
nativeWrappers,
|
|
10008
|
+
optionKeyAttribute,
|
|
9965
10009
|
elementMetadata,
|
|
9966
10010
|
semanticNameMap,
|
|
9967
10011
|
componentHierarchyMap,
|
|
@@ -9987,6 +10031,7 @@ function createVuePomGeneratorPlugins(options = {}) {
|
|
|
9987
10031
|
elementMetadata,
|
|
9988
10032
|
vueFilesPathMap,
|
|
9989
10033
|
nativeWrappers,
|
|
10034
|
+
optionKeyAttribute,
|
|
9990
10035
|
excludedComponents,
|
|
9991
10036
|
getPageDirs,
|
|
9992
10037
|
getComponentDirs,
|