@immense/vue-pom-generator 1.0.67 → 1.0.69

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,94 +1,95 @@
1
1
  ● ## Highlights
2
2
 
3
- - **Runtime annotator metadata** New runtime metadata collection and annotation capabilities
4
- for enhanced POM generation
5
- - **Accessibility audit warnings** Automatic detection and reporting of accessibility issues
6
- in Vue components
7
- - **Manifest and locator descriptions** Human-readable descriptions for generated test
8
- locators and manifests
9
- - **Zero runtime dependencies** All runtime dependencies eliminated for smaller bundle size
10
- and fewer supply-chain risks
11
- - **Build–serve parity** – Dev mode POM generation now matches build mode behavior with
12
- comprehensive regression tests
3
+ - **Accessibility auditing**: Added accessibility audit metadata and warnings to generated POMs
4
+ - **Runtime metadata**: Introduced runtime annotator metadata for enhanced test introspection
5
+ - **Zero runtime dependencies**: Eliminated all runtime dependencies for a leaner installation
6
+ footprint
7
+ - **Dev-mode parity**: Fixed multiple issues ensuring dev-mode POM generation matches build mode
8
+ - **Node 24 support**: Updated CI workflows and actions for Node 24 compatibility
9
+ - **Enhanced Playwright discoverability**: Added split POM output with manifest and locator
10
+ descriptions
13
11
 
14
12
  ## Changes
15
13
 
16
- **Features**
17
- - Add runtime annotator metadata with Vue component detection (#27)
18
- - Add accessibility audit metadata and warnings (#25)
19
- - Add manifest and locator descriptions (#24)
20
- - Add split Playwright POM output for improved discoverability (#12)
21
- - Fail fast on unnameable wrapper handlers (#11)
14
+ ### Features & Enhancements
15
+ - Added accessibility audit metadata and warnings (#25)
16
+ - Added runtime annotator metadata (#27)
17
+ - Added manifest and locator descriptions (#24)
18
+ - Added split Playwright POM output for better discoverability (#12)
19
+ - Added fail-fast behavior for unnameable wrapper handlers (#11)
20
+ - Added PR release-notes preview comments (#1)
22
21
 
23
- **Fixes**
24
- - Parse TypeScript template expressions + allow submit-button fallback (#20)
25
- - Avoid reparsing generated test IDs (#21)
26
- - Harden local app integration (#19)
27
- - Restore router DOM globals after introspection (#18)
28
- - Support awaited handler wrappers (#17)
29
- - Resolve Nuxt app-root dev POM clobber (#15)
30
- - Guard manual releases (#16)
31
- - Fail fast on dev snapshot generation errors (#6)
32
- - Dev-mode POM generation parity with build mode (#5)
33
- - Fix keyed POM dedupe and C# navigation returns (#4)
22
+ ### Bug Fixes
23
+ - Normalized file scope path checks (#29)
24
+ - Avoided reparsing generated test IDs (#21)
25
+ - Parsed TypeScript template expressions and allowed submit-button fallback (#20)
26
+ - Hardened local app integration (#19)
27
+ - Restored router DOM globals after introspection (#18)
28
+ - Supported awaited handler wrappers (#17)
29
+ - Guarded manual releases (#16)
30
+ - Resolved Nuxt app-root dev POM clobber (#15)
31
+ - Fixed dev snapshot generation to fail fast on errors (#6)
32
+ - Achieved dev-mode POM generation parity with build mode (#5)
33
+ - Fixed keyed POM dedupe and C# navigation returns (#4)
34
34
 
35
- **Refactoring**
36
- - Eliminate all runtime dependencies (#9)
37
- - Rename `plugin/support` `plugin/internal` (internal restructuring)
35
+ ### Infrastructure & Dependencies
36
+ - Updated GitHub Actions for Node 24 (#28)
37
+ - Relaxed Vite peer dependency range (#13)
38
+ - Eliminated all runtime dependencies (#9)
38
39
 
39
- **Dependencies**
40
- - Relax Vite peer dependency range (#13)
41
-
42
- **Developer Experience**
43
- - Add PR release-notes preview comments (#1)
40
+ ### Testing
41
+ - Added build–serve parity regression tests (#7)
44
42
 
45
43
  ## Breaking Changes
46
44
 
47
- - Internal plugin structure reorganized: `plugin/support-plugins.ts`
48
- `plugin/internal-plugins.ts` and `plugin/support/*` `plugin/internal/*`. This should not
49
- affect public API users.
45
+ - **Runtime dependencies removed** (#9): All runtime dependencies have been eliminated. If your
46
+ project relied on transitive dependencies from this package, you may need to install them
47
+ directly.
50
48
 
51
49
  ## Pull Requests Included
52
50
 
53
- - #27 feat: add runtime annotator metadata
54
- (https://github.com/immense/vue-pom-generator/pull/27)
55
- - #25 feat: add accessibility audit metadata and warnings
56
- (https://github.com/immense/vue-pom-generator/pull/25)
57
- - #24 feat: add manifest and locator descriptions
58
- (https://github.com/immense/vue-pom-generator/pull/24)
59
- - #21 fix: avoid reparsing generated test ids
60
- (https://github.com/immense/vue-pom-generator/pull/21)
61
- - #20 fix: parse TypeScript template expressions + allow submit-button fallback
62
- (https://github.com/immense/vue-pom-generator/pull/20)
63
- - #19 fix: harden local app integration (https://github.com/immense/vue-pom-generator/pull/19)
64
- - #18 fix: restore router DOM globals after introspection
65
- (https://github.com/immense/vue-pom-generator/pull/18)
66
- - #17 fix: support awaited handler wrappers
67
- (https://github.com/immense/vue-pom-generator/pull/17)
68
- - #16 fix: guard manual releases (https://github.com/immense/vue-pom-generator/pull/16)
69
- - #15 fix: resolve Nuxt app-root dev POM clobber
70
- (https://github.com/immense/vue-pom-generator/pull/15)
71
- - #13 Relax Vite peer dependency range (https://github.com/immense/vue-pom-generator/pull/13)
72
- - #12 feat: add split Playwright POM output for discoverability
73
- (https://github.com/immense/vue-pom-generator/pull/12)
74
- - #11 feat: fail fast on unnameable wrapper handlers
75
- (https://github.com/immense/vue-pom-generator/pull/11)
76
- - #9 refactor(deps): eliminate all runtime dependencies
77
- (https://github.com/immense/vue-pom-generator/pull/9)
78
- - #8 chore: bump version to 1.0.43 (https://github.com/immense/vue-pom-generator/pull/8)
79
- - #7 test: add build–serve parity regression tests
80
- (https://github.com/immense/vue-pom-generator/pull/7)
81
- - #6 fix: fail fast on dev snapshot generation errors
82
- (https://github.com/immense/vue-pom-generator/pull/6)
83
- - #5 fix: dev-mode POM generation parity with build mode
84
- (https://github.com/immense/vue-pom-generator/pull/5)
85
- - #4 Fix keyed POM dedupe and C# navigation returns
86
- (https://github.com/immense/vue-pom-generator/pull/4)
87
- - #1 Add PR release-notes preview comments (https://github.com/immense/vue-pom-generator/pull/1)
51
+ - #29 [fix: normalize file scope path
52
+ checks](https://github.com/immense/vue-pom-generator/pull/29)
53
+ - #28 [ci: update GitHub actions for Node
54
+ 24](https://github.com/immense/vue-pom-generator/pull/28)
55
+ - #27 [feat: add runtime annotator
56
+ metadata](https://github.com/immense/vue-pom-generator/pull/27)
57
+ - #25 [feat: add accessibility audit metadata and
58
+ warnings](https://github.com/immense/vue-pom-generator/pull/25)
59
+ - #24 [feat: add manifest and locator
60
+ descriptions](https://github.com/immense/vue-pom-generator/pull/24)
61
+ - #21 [fix: avoid reparsing generated test
62
+ ids](https://github.com/immense/vue-pom-generator/pull/21)
63
+ - #20 [fix: parse TypeScript template expressions + allow submit-button
64
+ fallback](https://github.com/immense/vue-pom-generator/pull/20)
65
+ - #19 [fix: harden local app integration](https://github.com/immense/vue-pom-generator/pull/19)
66
+ - #18 [fix: restore router DOM globals after
67
+ introspection](https://github.com/immense/vue-pom-generator/pull/18)
68
+ - #17 [fix: support awaited handler
69
+ wrappers](https://github.com/immense/vue-pom-generator/pull/17)
70
+ - #16 [fix: guard manual releases](https://github.com/immense/vue-pom-generator/pull/16)
71
+ - #15 [fix: resolve Nuxt app-root dev POM
72
+ clobber](https://github.com/immense/vue-pom-generator/pull/15)
73
+ - #13 [Relax Vite peer dependency range](https://github.com/immense/vue-pom-generator/pull/13)
74
+ - #12 [feat: add split Playwright POM output for
75
+ discoverability](https://github.com/immense/vue-pom-generator/pull/12)
76
+ - #11 [feat: fail fast on unnameable wrapper
77
+ handlers](https://github.com/immense/vue-pom-generator/pull/11)
78
+ - #9 [refactor(deps): eliminate all runtime
79
+ dependencies](https://github.com/immense/vue-pom-generator/pull/9)
80
+ - #8 [chore: bump version to 1.0.43](https://github.com/immense/vue-pom-generator/pull/8)
81
+ - #7 [test: add build–serve parity regression
82
+ tests](https://github.com/immense/vue-pom-generator/pull/7)
83
+ - #6 [fix: fail fast on dev snapshot generation
84
+ errors](https://github.com/immense/vue-pom-generator/pull/6)
85
+ - #5 [fix: dev-mode POM generation parity with build
86
+ mode](https://github.com/immense/vue-pom-generator/pull/5)
87
+ - #4 [Fix keyed POM dedupe and C# navigation
88
+ returns](https://github.com/immense/vue-pom-generator/pull/4)
89
+ - #1 [Add PR release-notes preview
90
+ comments](https://github.com/immense/vue-pom-generator/pull/1)
88
91
 
89
92
  ## Testing
90
93
 
91
- Comprehensive test coverage added including build–serve parity regression tests (#7), class
92
- generation coverage tests, generated TypeScript compilation tests, and virtual test ID tests.
93
- All new features and fixes include corresponding test coverage.
94
+ Build–serve parity regression tests added. All changes validated through existing test suite.
94
95
 
package/dist/index.cjs CHANGED
@@ -3563,6 +3563,14 @@ function safeRealpath(value) {
3563
3563
  const resolvedParent = safeRealpath(parent);
3564
3564
  return resolvedParent === parent ? value : path.join(resolvedParent, path.basename(value));
3565
3565
  }
3566
+ function normalizeScopePath(value, pathImpl = path) {
3567
+ return pathImpl.normalize(value);
3568
+ }
3569
+ function isNormalizedPathWithinDir(filePathAbs, dirPathAbs, pathImpl = path) {
3570
+ const normalizedFileAbs = normalizeScopePath(filePathAbs, pathImpl);
3571
+ const normalizedDirAbs = normalizeScopePath(dirPathAbs, pathImpl);
3572
+ return normalizedFileAbs === normalizedDirAbs || normalizedFileAbs.startsWith(`${normalizedDirAbs}${pathImpl.sep}`);
3573
+ }
3566
3574
  function isPathWithinDir(filePathAbs, dirPathAbs) {
3567
3575
  const fileAbs = path.resolve(filePathAbs);
3568
3576
  const dirAbs = path.resolve(dirPathAbs);
@@ -3592,6 +3600,43 @@ function resolveComponentNameFromPath(options) {
3592
3600
  }
3593
3601
  return toPascalCase(path.parse(normalizedAbsFilename).name);
3594
3602
  }
3603
+ function isFileInConfiguredSourceScope(options) {
3604
+ const { filename, projectRoot, viewsDirAbs, sourceDirs, extraRoots = [], pathImpl = path } = options;
3605
+ if (!filename) {
3606
+ return false;
3607
+ }
3608
+ const cleanFilename = filename.includes("?") ? filename.substring(0, filename.indexOf("?")) : filename;
3609
+ const normalizedProjectRoot = normalizeScopePath(projectRoot, pathImpl);
3610
+ const normalizedAbsFilename = normalizeScopePath(
3611
+ pathImpl.isAbsolute(cleanFilename) ? cleanFilename : pathImpl.resolve(normalizedProjectRoot, cleanFilename),
3612
+ pathImpl
3613
+ );
3614
+ if (normalizedAbsFilename.includes(`${pathImpl.sep}node_modules${pathImpl.sep}`) || normalizedAbsFilename.includes("/node_modules/")) {
3615
+ return false;
3616
+ }
3617
+ const normalizedViewsDirAbs = normalizeScopePath(viewsDirAbs, pathImpl);
3618
+ if (isNormalizedPathWithinDir(normalizedAbsFilename, normalizedViewsDirAbs, pathImpl)) {
3619
+ return true;
3620
+ }
3621
+ const rootsToTry = Array.from(/* @__PURE__ */ new Set([
3622
+ normalizedProjectRoot,
3623
+ ...extraRoots.map((root) => normalizeScopePath(root, pathImpl))
3624
+ ]));
3625
+ return sourceDirs.some((dir) => {
3626
+ return rootsToTry.some((root) => {
3627
+ const normalizedAbsDir = normalizeScopePath(pathImpl.resolve(root, dir), pathImpl);
3628
+ if (isNormalizedPathWithinDir(normalizedAbsFilename, normalizedAbsDir, pathImpl)) {
3629
+ return true;
3630
+ }
3631
+ if (dir.startsWith("app/") && pathImpl.basename(root) === "app") {
3632
+ const relativeDir = dir.substring(4);
3633
+ const normalizedAbsDirAlt = normalizeScopePath(pathImpl.resolve(root, relativeDir), pathImpl);
3634
+ return isNormalizedPathWithinDir(normalizedAbsFilename, normalizedAbsDirAlt, pathImpl);
3635
+ }
3636
+ return false;
3637
+ });
3638
+ });
3639
+ }
3595
3640
  let routerIntrospectionQueue = Promise.resolve();
3596
3641
  async function runRouterIntrospectionExclusive(fn) {
3597
3642
  const prev = routerIntrospectionQueue.catch(() => void 0);
@@ -9007,27 +9052,15 @@ function createVuePluginWithTestIds(options) {
9007
9052
  return false;
9008
9053
  const cleanPath = filename.includes("?") ? filename.substring(0, filename.indexOf("?")) : filename;
9009
9054
  const projectRoot = getProjectRoot();
9010
- const absFilename = path.isAbsolute(cleanPath) ? cleanPath : path.resolve(projectRoot, cleanPath);
9011
- if (absFilename.includes(`${path.sep}node_modules${path.sep}`) || absFilename.includes("/node_modules/"))
9012
- return false;
9013
- const viewsDirAbs = getViewsDirAbs();
9014
- if (absFilename.startsWith(viewsDirAbs + path.sep) || absFilename === viewsDirAbs)
9015
- return true;
9016
- const rootsToTry = [projectRoot, process.cwd()];
9017
- const matched = getSourceDirs().some((dir) => {
9018
- return rootsToTry.some((root) => {
9019
- const absDir = path.resolve(root, dir);
9020
- if (absFilename.startsWith(absDir + path.sep) || absFilename === absDir)
9021
- return true;
9022
- if (dir.startsWith("app/") && root.endsWith("/app")) {
9023
- const relativeDir = dir.substring(4);
9024
- const absDirAlt = path.resolve(root, relativeDir);
9025
- return absFilename.startsWith(absDirAlt + path.sep) || absFilename === absDirAlt;
9026
- }
9027
- return false;
9028
- });
9055
+ const matched = isFileInConfiguredSourceScope({
9056
+ filename,
9057
+ projectRoot,
9058
+ viewsDirAbs: getViewsDirAbs(),
9059
+ sourceDirs: getSourceDirs(),
9060
+ extraRoots: [process.cwd()]
9029
9061
  });
9030
9062
  if (cleanPath.endsWith(".vue") && !matched) {
9063
+ const absFilename = path.normalize(path.isAbsolute(cleanPath) ? cleanPath : path.resolve(projectRoot, cleanPath));
9031
9064
  loggerRef.current.debug(`[isFileInScope] REJECTED: ${absFilename} (Clean: ${cleanPath})`);
9032
9065
  }
9033
9066
  return matched;