@immense/vue-pom-generator 1.0.72 → 1.0.74
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 +62 -92
- package/class-generation/index.ts +2 -2
- package/dist/index.cjs +28 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +28 -7
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/internal/dev-plugin.d.ts.map +1 -1
- package/dist/transform.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,109 +1,79 @@
|
|
|
1
|
-
● # Release Notes
|
|
1
|
+
● # Release Notes: v1.0.74
|
|
2
2
|
|
|
3
3
|
## Highlights
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
POMs
|
|
9
|
-
- **Zero runtime dependencies**: Eliminated all runtime dependencies for lighter installation
|
|
10
|
-
footprint
|
|
11
|
-
- **Improved type handling**: Enhanced TypeScript template expression parsing and test ID
|
|
12
|
-
generation
|
|
13
|
-
- **Split POM output**: Added separate Playwright POM files for better discoverability
|
|
14
|
-
- **Relaxed peer dependencies**: More flexible Vite and Playwright version requirements
|
|
5
|
+
- Fixed dynamic test ID preservation when `prefixIdentifiers` compiler option is enabled
|
|
6
|
+
- Improved component grid attachment logic to support non-view components
|
|
7
|
+
- Removed unused internal tracking code for better maintainability
|
|
15
8
|
|
|
16
9
|
## Changes
|
|
17
10
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
- Add manifest and locator descriptions (#24)
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
- Fixed test ID generation to preserve dynamic `data-testid` attributes when `prefixIdentifiers`
|
|
13
|
+
is enabled in Vue compiler options
|
|
14
|
+
- Extended grid attachment to work with non-view components, improving POM generation coverage
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
**Code Generation**
|
|
28
|
-
- Add split Playwright POM output for discoverability (#12)
|
|
29
|
-
- Avoid reparsing generated test ids (#21)
|
|
30
|
-
- Parse TypeScript template expressions and allow submit-button fallback (#20)
|
|
31
|
-
- Fail fast on unnameable wrapper handlers (#11)
|
|
32
|
-
|
|
33
|
-
**Build & Integration**
|
|
34
|
-
- Eliminate all runtime dependencies (#9)
|
|
35
|
-
- Normalize file scope path checks (#29)
|
|
36
|
-
- Harden local app integration (#19)
|
|
37
|
-
- Resolve Nuxt app-root dev POM clobber (#15)
|
|
38
|
-
- Dev-mode POM generation parity with build mode (#5)
|
|
39
|
-
|
|
40
|
-
**Bug Fixes**
|
|
41
|
-
- Restore router DOM globals after introspection (#18)
|
|
42
|
-
- Support awaited handler wrappers (#17)
|
|
43
|
-
- Fix keyed POM dedupe and C# navigation returns (#4)
|
|
44
|
-
- Fail fast on dev snapshot generation errors (#6)
|
|
45
|
-
|
|
46
|
-
**Dependencies & CI**
|
|
47
|
-
- Relax Playwright peer pinning (#30)
|
|
48
|
-
- Relax Vite peer dependency range (#13)
|
|
49
|
-
- Update GitHub actions for Node 24 (#28)
|
|
50
|
-
|
|
51
|
-
**Developer Experience**
|
|
52
|
-
- Add PR release-notes preview comments (#1)
|
|
53
|
-
- Guard manual releases (#16)
|
|
16
|
+
### Code Quality
|
|
17
|
+
- Removed unused `rawTestIdExpByElement` WeakMap that was no longer serving a purpose
|
|
54
18
|
|
|
55
19
|
## Breaking Changes
|
|
56
20
|
|
|
57
|
-
|
|
58
|
-
project was relying on transitive dependencies, you may need to install them directly.
|
|
21
|
+
None.
|
|
59
22
|
|
|
60
23
|
## Pull Requests Included
|
|
61
24
|
|
|
62
|
-
- #
|
|
63
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
64
|
-
- #
|
|
65
|
-
-
|
|
66
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- #
|
|
81
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
82
|
-
- #
|
|
83
|
-
(
|
|
84
|
-
- #
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- #
|
|
89
|
-
|
|
90
|
-
- #
|
|
91
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
92
|
-
- #
|
|
93
|
-
(
|
|
94
|
-
- #
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
(
|
|
99
|
-
-
|
|
100
|
-
(https://github.com/immense/vue-pom-generator/pull/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
25
|
+
- #32 [fix: stop passing glob paths to
|
|
26
|
+
server.watcher.add()](https://github.com/immense/vue-pom-generator/pull/32) (by @dkschruteBeets)
|
|
27
|
+
- #31 [feat: export mountAnnotatorClient from main entry
|
|
28
|
+
point](https://github.com/immense/vue-pom-generator/pull/31) (by @dkattan)
|
|
29
|
+
- #30 [fix: relax Playwright peer pinning](https://github.com/immense/vue-pom-generator/pull/30)
|
|
30
|
+
(by @dkattan)
|
|
31
|
+
- #29 [fix: normalize file scope path
|
|
32
|
+
checks](https://github.com/immense/vue-pom-generator/pull/29) (by @dkattan)
|
|
33
|
+
- #28 [ci: update GitHub actions for Node
|
|
34
|
+
24](https://github.com/immense/vue-pom-generator/pull/28) (by @dkattan)
|
|
35
|
+
- #27 [feat: add runtime annotator
|
|
36
|
+
metadata](https://github.com/immense/vue-pom-generator/pull/27) (by @dkattan)
|
|
37
|
+
- #25 [feat: add accessibility audit metadata and
|
|
38
|
+
warnings](https://github.com/immense/vue-pom-generator/pull/25) (by @dkattan)
|
|
39
|
+
- #24 [feat: add manifest and locator
|
|
40
|
+
descriptions](https://github.com/immense/vue-pom-generator/pull/24) (by @dkattan)
|
|
41
|
+
- #21 [fix: avoid reparsing generated test
|
|
42
|
+
ids](https://github.com/immense/vue-pom-generator/pull/21) (by @dkattan)
|
|
43
|
+
- #20 [fix: parse TypeScript template expressions + allow submit-button
|
|
44
|
+
fallback](https://github.com/immense/vue-pom-generator/pull/20) (by @bretesq)
|
|
45
|
+
- #19 [fix: harden local app integration](https://github.com/immense/vue-pom-generator/pull/19)
|
|
46
|
+
(by @dkattan)
|
|
47
|
+
- #18 [fix: restore router DOM globals after
|
|
48
|
+
introspection](https://github.com/immense/vue-pom-generator/pull/18) (by @dkattan)
|
|
49
|
+
- #17 [fix: support awaited handler
|
|
50
|
+
wrappers](https://github.com/immense/vue-pom-generator/pull/17) (by @dkattan)
|
|
51
|
+
- #16 [fix: guard manual releases](https://github.com/immense/vue-pom-generator/pull/16) (by
|
|
52
|
+
@dkattan)
|
|
53
|
+
- #15 [fix: resolve Nuxt app-root dev POM
|
|
54
|
+
clobber](https://github.com/immense/vue-pom-generator/pull/15) (by @dkattan)
|
|
55
|
+
- #13 [Relax Vite peer dependency range](https://github.com/immense/vue-pom-generator/pull/13)
|
|
56
|
+
(by @Copilot)
|
|
57
|
+
- #12 [feat: add split Playwright POM output for
|
|
58
|
+
discoverability](https://github.com/immense/vue-pom-generator/pull/12) (by @dkattan)
|
|
59
|
+
- #11 [feat: fail fast on unnameable wrapper
|
|
60
|
+
handlers](https://github.com/immense/vue-pom-generator/pull/11) (by @dkattan)
|
|
61
|
+
- #9 [refactor(deps): eliminate all runtime
|
|
62
|
+
dependencies](https://github.com/immense/vue-pom-generator/pull/9) (by @mayfieldiv)
|
|
63
|
+
- #8 [chore: bump version to 1.0.43](https://github.com/immense/vue-pom-generator/pull/8) (by
|
|
64
|
+
@mayfieldiv)
|
|
65
|
+
- #7 [test: add build–serve parity regression
|
|
66
|
+
tests](https://github.com/immense/vue-pom-generator/pull/7) (by @mayfieldiv)
|
|
67
|
+
- #6 [fix: fail fast on dev snapshot generation
|
|
68
|
+
errors](https://github.com/immense/vue-pom-generator/pull/6) (by @dkattan)
|
|
69
|
+
- #5 [fix: dev-mode POM generation parity with build
|
|
70
|
+
mode](https://github.com/immense/vue-pom-generator/pull/5) (by @mayfieldiv)
|
|
71
|
+
- #4 [Fix keyed POM dedupe and C# navigation
|
|
72
|
+
returns](https://github.com/immense/vue-pom-generator/pull/4) (by @dkattan)
|
|
73
|
+
- #1 [Add PR release-notes preview
|
|
74
|
+
comments](https://github.com/immense/vue-pom-generator/pull/1) (by @dkattan)
|
|
104
75
|
|
|
105
76
|
## Testing
|
|
106
77
|
|
|
107
|
-
|
|
108
|
-
and production modes.
|
|
78
|
+
No new tests added in these commits; existing test suite covers the changes.
|
|
109
79
|
|
|
@@ -1637,8 +1637,8 @@ function prepareViewObjectModelClass(
|
|
|
1637
1637
|
return match;
|
|
1638
1638
|
};
|
|
1639
1639
|
|
|
1640
|
-
const rawComponentRefsForInstances =
|
|
1641
|
-
?
|
|
1640
|
+
const rawComponentRefsForInstances = usedComponentSet?.size
|
|
1641
|
+
? usedComponentSet
|
|
1642
1642
|
: childrenComponentSet;
|
|
1643
1643
|
const componentRefsForInstances = new Set<string>();
|
|
1644
1644
|
for (const ref of rawComponentRefsForInstances) {
|
package/dist/index.cjs
CHANGED
|
@@ -2657,10 +2657,28 @@ function tryGetExistingElementDataTestId(node, attributeName = "data-testid") {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
const directive = existing;
|
|
2659
2659
|
const exp = directive.exp;
|
|
2660
|
-
if (!exp
|
|
2660
|
+
if (!exp) {
|
|
2661
|
+
return null;
|
|
2662
|
+
}
|
|
2663
|
+
let simpleExp;
|
|
2664
|
+
if (exp.type === compilerCore.NodeTypes.SIMPLE_EXPRESSION) {
|
|
2665
|
+
simpleExp = exp;
|
|
2666
|
+
} else if (exp.type === compilerCore.NodeTypes.COMPOUND_EXPRESSION) {
|
|
2667
|
+
const compoundExp = exp;
|
|
2668
|
+
const source = compoundExp.loc?.source;
|
|
2669
|
+
if (!source) {
|
|
2670
|
+
return null;
|
|
2671
|
+
}
|
|
2672
|
+
simpleExp = {
|
|
2673
|
+
type: compilerCore.NodeTypes.SIMPLE_EXPRESSION,
|
|
2674
|
+
content: source,
|
|
2675
|
+
isStatic: false,
|
|
2676
|
+
constType: 0,
|
|
2677
|
+
loc: compoundExp.loc
|
|
2678
|
+
};
|
|
2679
|
+
} else {
|
|
2661
2680
|
return null;
|
|
2662
2681
|
}
|
|
2663
|
-
const simpleExp = exp;
|
|
2664
2682
|
const ast = tryGetVueExpressionAst(simpleExp, {
|
|
2665
2683
|
preferredViews: ["content", "loc", "compiled"],
|
|
2666
2684
|
plugins: ["typescript"]
|
|
@@ -5673,7 +5691,7 @@ function prepareViewObjectModelClass(componentName, dependencies, componentHiera
|
|
|
5673
5691
|
}
|
|
5674
5692
|
return match;
|
|
5675
5693
|
};
|
|
5676
|
-
const rawComponentRefsForInstances =
|
|
5694
|
+
const rawComponentRefsForInstances = usedComponentSet?.size ? usedComponentSet : childrenComponentSet;
|
|
5677
5695
|
const componentRefsForInstances = /* @__PURE__ */ new Set();
|
|
5678
5696
|
for (const ref of rawComponentRefsForInstances) {
|
|
5679
5697
|
const resolvedRef = resolveTrackedComponentRef(ref) ?? normalizeTrackedComponentRef(ref);
|
|
@@ -7334,6 +7352,11 @@ function createTestIdTransform(componentName, componentHierarchyMap, nativeWrapp
|
|
|
7334
7352
|
}
|
|
7335
7353
|
const element = node;
|
|
7336
7354
|
const parentIsRoot = context?.parent?.type === compilerCore.NodeTypes.ROOT;
|
|
7355
|
+
{
|
|
7356
|
+
element.props.find(
|
|
7357
|
+
(p) => p.type === compilerCore.NodeTypes.DIRECTIVE && p.name === "bind" && p.arg?.type === compilerCore.NodeTypes.SIMPLE_EXPRESSION && p.arg.content === testIdAttribute && !!p.exp
|
|
7358
|
+
);
|
|
7359
|
+
}
|
|
7337
7360
|
const parentElement = !parentIsRoot && context?.parent?.type === compilerCore.NodeTypes.ELEMENT ? context.parent : null;
|
|
7338
7361
|
hierarchyMap.set(element, parentElement);
|
|
7339
7362
|
const normalizeFilePath = (filePath) => path.normalize(safeRealpath2(path.resolve(filePath)));
|
|
@@ -8335,12 +8358,10 @@ function createDevProcessorPlugin(options) {
|
|
|
8335
8358
|
regenerationSequence = currentRun.then(() => void 0, () => void 0);
|
|
8336
8359
|
return currentRun;
|
|
8337
8360
|
};
|
|
8338
|
-
const watchedVueGlobs = getSourceDirRoots().map((scanDirAbs) => path.resolve(scanDirAbs, "**", "*.vue"));
|
|
8339
|
-
const watchedPluginGlob = path.resolve(projectRootRef.current, "vite-plugins", "vue-pom-generator", "**", "*.ts");
|
|
8340
8361
|
const runtimeDir = path.dirname(basePageClassPath);
|
|
8362
|
+
const localPluginDir = path.resolve(projectRootRef.current, "vite-plugins", "vue-pom-generator");
|
|
8341
8363
|
server.watcher.add([
|
|
8342
|
-
...
|
|
8343
|
-
watchedPluginGlob,
|
|
8364
|
+
...fs.existsSync(localPluginDir) ? [localPluginDir] : [],
|
|
8344
8365
|
basePageClassPath,
|
|
8345
8366
|
path.resolve(runtimeDir, "pointer.ts"),
|
|
8346
8367
|
path.resolve(runtimeDir, "callout.ts"),
|