@groma/scanner-vue 0.1.4 → 0.2.0

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.
Files changed (113) hide show
  1. package/README.md +54 -36
  2. package/dist/index.js +594 -165
  3. package/dist/lib.d.ts +1 -3
  4. package/dist/lib.decorators.d.ts +1 -3
  5. package/dist/lib.decorators.legacy.d.ts +1 -3
  6. package/dist/lib.dom.asynciterable.d.ts +3 -26
  7. package/dist/lib.dom.d.ts +12638 -6942
  8. package/dist/lib.dom.iterable.d.ts +3 -556
  9. package/dist/lib.es2015.collection.d.ts +7 -4
  10. package/dist/lib.es2015.core.d.ts +2 -4
  11. package/dist/lib.es2015.d.ts +1 -3
  12. package/dist/lib.es2015.generator.d.ts +1 -3
  13. package/dist/lib.es2015.iterable.d.ts +2 -4
  14. package/dist/lib.es2015.promise.d.ts +1 -3
  15. package/dist/lib.es2015.proxy.d.ts +1 -3
  16. package/dist/lib.es2015.reflect.d.ts +1 -3
  17. package/dist/lib.es2015.symbol.d.ts +1 -3
  18. package/dist/lib.es2015.symbol.wellknown.d.ts +1 -3
  19. package/dist/lib.es2016.array.include.d.ts +1 -3
  20. package/dist/lib.es2016.d.ts +1 -3
  21. package/dist/lib.es2016.full.d.ts +1 -3
  22. package/dist/lib.es2016.intl.d.ts +1 -3
  23. package/dist/lib.es2017.arraybuffer.d.ts +1 -3
  24. package/dist/lib.es2017.d.ts +1 -3
  25. package/dist/lib.es2017.date.d.ts +1 -3
  26. package/dist/lib.es2017.full.d.ts +1 -3
  27. package/dist/lib.es2017.intl.d.ts +1 -3
  28. package/dist/lib.es2017.object.d.ts +1 -3
  29. package/dist/lib.es2017.sharedmemory.d.ts +1 -3
  30. package/dist/lib.es2017.string.d.ts +1 -3
  31. package/dist/lib.es2017.typedarrays.d.ts +1 -3
  32. package/dist/lib.es2018.asyncgenerator.d.ts +1 -3
  33. package/dist/lib.es2018.asynciterable.d.ts +1 -3
  34. package/dist/lib.es2018.d.ts +1 -3
  35. package/dist/lib.es2018.full.d.ts +1 -3
  36. package/dist/lib.es2018.intl.d.ts +1 -3
  37. package/dist/lib.es2018.promise.d.ts +1 -3
  38. package/dist/lib.es2018.regexp.d.ts +1 -3
  39. package/dist/lib.es2019.array.d.ts +1 -3
  40. package/dist/lib.es2019.d.ts +1 -3
  41. package/dist/lib.es2019.full.d.ts +1 -3
  42. package/dist/lib.es2019.intl.d.ts +1 -3
  43. package/dist/lib.es2019.object.d.ts +1 -3
  44. package/dist/lib.es2019.string.d.ts +1 -3
  45. package/dist/lib.es2019.symbol.d.ts +1 -3
  46. package/dist/lib.es2020.bigint.d.ts +5 -7
  47. package/dist/lib.es2020.d.ts +1 -3
  48. package/dist/lib.es2020.date.d.ts +1 -3
  49. package/dist/lib.es2020.full.d.ts +1 -3
  50. package/dist/lib.es2020.intl.d.ts +1 -3
  51. package/dist/lib.es2020.number.d.ts +1 -3
  52. package/dist/lib.es2020.promise.d.ts +1 -3
  53. package/dist/lib.es2020.sharedmemory.d.ts +1 -3
  54. package/dist/lib.es2020.string.d.ts +2 -4
  55. package/dist/lib.es2020.symbol.wellknown.d.ts +2 -4
  56. package/dist/lib.es2021.d.ts +1 -3
  57. package/dist/lib.es2021.full.d.ts +1 -3
  58. package/dist/lib.es2021.intl.d.ts +1 -3
  59. package/dist/lib.es2021.promise.d.ts +1 -3
  60. package/dist/lib.es2021.string.d.ts +1 -3
  61. package/dist/lib.es2021.weakref.d.ts +1 -3
  62. package/dist/lib.es2022.array.d.ts +1 -3
  63. package/dist/lib.es2022.d.ts +1 -3
  64. package/dist/lib.es2022.error.d.ts +1 -3
  65. package/dist/lib.es2022.full.d.ts +1 -3
  66. package/dist/lib.es2022.intl.d.ts +1 -3
  67. package/dist/lib.es2022.object.d.ts +1 -3
  68. package/dist/lib.es2022.regexp.d.ts +2 -4
  69. package/dist/lib.es2022.string.d.ts +1 -3
  70. package/dist/lib.es2023.array.d.ts +1 -3
  71. package/dist/lib.es2023.collection.d.ts +1 -3
  72. package/dist/lib.es2023.d.ts +1 -3
  73. package/dist/lib.es2023.full.d.ts +1 -3
  74. package/dist/lib.es2023.intl.d.ts +10 -4
  75. package/dist/lib.es2024.arraybuffer.d.ts +1 -3
  76. package/dist/lib.es2024.collection.d.ts +1 -3
  77. package/dist/lib.es2024.d.ts +1 -3
  78. package/dist/lib.es2024.full.d.ts +1 -3
  79. package/dist/lib.es2024.object.d.ts +1 -3
  80. package/dist/lib.es2024.promise.d.ts +1 -3
  81. package/dist/lib.es2024.regexp.d.ts +1 -3
  82. package/dist/lib.es2024.sharedmemory.d.ts +1 -3
  83. package/dist/lib.es2024.string.d.ts +1 -3
  84. package/dist/lib.es2025.collection.d.ts +94 -0
  85. package/dist/lib.es2025.d.ts +23 -0
  86. package/dist/{lib.esnext.float16.d.ts → lib.es2025.float16.d.ts} +1 -3
  87. package/dist/lib.es2025.full.d.ts +22 -0
  88. package/dist/lib.es2025.intl.d.ts +200 -0
  89. package/dist/{lib.esnext.iterator.d.ts → lib.es2025.iterator.d.ts} +1 -3
  90. package/dist/{lib.esnext.promise.d.ts → lib.es2025.promise.d.ts} +1 -3
  91. package/dist/lib.es2025.regexp.d.ts +30 -0
  92. package/dist/lib.es5.d.ts +22 -24
  93. package/dist/lib.es6.d.ts +1 -3
  94. package/dist/lib.esnext.array.d.ts +1 -3
  95. package/dist/lib.esnext.collection.d.ts +20 -69
  96. package/dist/lib.esnext.d.ts +6 -8
  97. package/dist/lib.esnext.date.d.ts +21 -0
  98. package/dist/lib.esnext.decorators.d.ts +1 -3
  99. package/dist/lib.esnext.disposable.d.ts +1 -3
  100. package/dist/lib.esnext.error.d.ts +1 -3
  101. package/dist/lib.esnext.full.d.ts +1 -3
  102. package/dist/lib.esnext.intl.d.ts +89 -3
  103. package/dist/lib.esnext.sharedmemory.d.ts +1 -3
  104. package/dist/lib.esnext.temporal.d.ts +485 -0
  105. package/dist/lib.esnext.typedarrays.d.ts +90 -0
  106. package/dist/lib.scripthost.d.ts +1 -3
  107. package/dist/lib.webworker.asynciterable.d.ts +3 -26
  108. package/dist/lib.webworker.d.ts +3396 -940
  109. package/dist/lib.webworker.importscripts.d.ts +1 -3
  110. package/dist/lib.webworker.iterable.d.ts +3 -325
  111. package/dist/typescript.cjs +2589 -1826
  112. package/package.json +29 -2
  113. package/validation.md +2 -2
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Vue scanner
2
2
 
3
- The Vue scanner adds single-file component (SFC) event bindings to Groma's
3
+ The Vue scanner adds single-file component (SFC) event bindings to groma.md's
4
4
  TypeScript scanner evidence. Its bundled compiler tools read local source
5
- without project dependencies. The scanner reads each selected project's
6
- `tsconfig.json`; it does not execute application code.
5
+ without project dependencies. The scanner uses each selected project's
6
+ `tsconfig.json`, or the nearest one above that package; it does not execute
7
+ application code.
7
8
 
8
9
  ```sh
9
10
  bun install --frozen-lockfile --ignore-scripts
@@ -17,10 +18,11 @@ groma scanner add /absolute/path/to/groma/plugins/scanners/vue/dist/package
17
18
  groma scan
18
19
  ```
19
20
 
20
- The package bundles Vue language-core 3.3.11, Volar TypeScript 2.4.28,
21
- Vue compiler-dom 3.5.42 and its own TypeScript 5.9.3. Compiler-sfc 3.5.42
21
+ The package bundles Vue language-core, Volar TypeScript, Vue compiler-dom and
22
+ its own TypeScript 6.0, the last release with the classic compiler API these
23
+ tools use; the package manifest pins the exact versions. Compiler-sfc
22
24
  provides build-time declarations only. The build
23
- pins compiler imports to that TypeScript installation. The separate TypeScript scanner uses its own 7.1 SDK. Compiler libraries and Vue helper declarations
25
+ pins compiler imports to that TypeScript installation. The separate TypeScript scanner uses the native TypeScript 7 SDK. Compiler libraries and Vue helper declarations
24
26
  ship in the package; no consumer build or installation script is required.
25
27
 
26
28
  [Vue language tools](https://github.com/vuejs/language-tools) supply project
@@ -30,6 +32,16 @@ code with the TypeScript checker, which resolves component imports and handler
30
32
  function identities. The scanner translates these facts into the existing
31
33
  supplied-callback evidence contract; it has no separate name or type resolver.
32
34
 
35
+ The package declares the default
36
+ [include and exclude lists](../index.md#selecting-source-files). It includes
37
+ `.vue` components, their JavaScript and TypeScript sources and stylesheets,
38
+ HTML pages, `tsconfig*.json` configs, and the `package.json`, `project.json` and
39
+ `nx.json` files the entry reader reads. It excludes `node_modules`, `dist`,
40
+ `build` and `coverage` folders. The scan and the readiness check read only the
41
+ files groma.md hands them, even when the project's `tsconfig.json` includes
42
+ more; a source they read can still import another file as compiler context, and
43
+ an external `src` block outside the files is left out of its component.
44
+
33
45
  ## Supported interaction
34
46
 
35
47
  ### External source blocks
@@ -53,35 +65,38 @@ trigger the existing shared scanner refresh.
53
65
  ### Inline event bindings
54
66
 
55
67
  The qualified example is Vue REPL's CodeMirror `change` event bound to the
56
- parent's `onChange` function. A static imported SFC must use a typed
57
- `defineEmits` declaration assigned to a constant. A call to that same symbol
58
- must supply a declared literal event name inside a source function. The parent
59
- template must bind the event directly to one source function declaration or
60
- constant function expression. Imported TypeScript functions use the same rule.
68
+ parent's `onChange` function. A static imported SFC must assign `defineEmits`
69
+ to a constant and declare the event in a type literal, function type, or
70
+ literal runtime array. A call to that same symbol must supply a declared
71
+ literal event name inside a source function or directly in an inline template
72
+ event expression. The parent template must bind the event directly to one
73
+ source function declaration or constant function expression. Imported
74
+ TypeScript functions use the same rule.
61
75
  See [Vue component events](https://vuejs.org/guide/components/events).
62
76
 
63
- The observation records the emitting function, literal emit call, concrete
64
- template attribute and supplied handler. All positions refer to the original
65
- physical source, as zero-based UTF-16 offsets; lines are one-based. The nearest
77
+ The observation records the emitting function or child template, literal emit
78
+ call, concrete parent template attribute and supplied handler. All positions
79
+ refer to the original physical source, as zero-based UTF-16 offsets; lines are one-based. The nearest
66
80
  function owns a nested emit call. Repeated scans are deterministic.
67
81
 
68
82
  Unresolved, dynamic or unsupported bindings produce `unsupported-vue-binding`
69
83
  diagnostics and no certain relationship. This revision does not support
70
- Options API events, runtime `defineEmits` arrays, dynamic components, dynamic
71
- event names, handler expressions or modifiers, state stores, routing, server
72
- frameworks or arbitrary event mutation. Compiler syntax/template errors fail
73
- the scan and preserve the previous complete map. Readiness errors explain
74
- invalid configuration or source syntax. Typed event names are read from the
75
- local `defineEmits` type literal; missing Vue types do not erase that evidence.
76
-
77
- Vue contributes `vue` Code provenance for configured source files. Shared core
84
+ Options API events, dynamic components, dynamic event names, handler
85
+ expressions or modifiers, state stores, or arbitrary event mutation. Nuxt
86
+ server routes and shared HTTP client calls are observed separately. Compiler
87
+ syntax/template errors fail the scan and preserve the previous complete map.
88
+ Missing generated TypeScript config bases and missing declared source roots
89
+ produce warnings while available source is scanned. Other invalid configuration
90
+ fails readiness. Missing Vue types do not erase local `defineEmits` evidence.
91
+
92
+ Vue contributes `vue` Code provenance for selected source files. Shared core
78
93
  keeps one physical-file owner, interprets complementary and conflicting
79
- observations, and writes readable relationship rows. `.vue` and TypeScript
80
- edits participate in the existing scan watcher.
94
+ observations, and writes readable relationship rows. A change to a file the
95
+ include list names triggers a rescan.
81
96
 
82
97
  In OKF, the result is ordinary source links and relationship Markdown. An SFC
83
98
  is source evidence; it does not automatically define a C4 responsibility or
84
- add a containment level. Groma's existing ownership and relationship model
99
+ add a containment level. groma.md's existing ownership and relationship model
85
100
  owns that interpretation. No new architecture metadata is added.
86
101
 
87
102
  See [fresh-checkout validation](../fresh-checkout-validation.md) for the pinned project and executed release
@@ -121,13 +136,14 @@ there.
121
136
  | --- | --- |
122
137
  | `fetch(url, options)`, `$fetch(url, options)`, `useFetch(url, options)` | Request; a literal `method` gives the method, no options means `GET`, and options the scanner cannot read leave it out |
123
138
  | `$fetch` and `useFetch` with a `baseURL` option | Request whose path follows that base |
124
- | `axios.get`, `.post`, `.put`, `.patch`, `.delete`, `.head`, `.options` | Request with that method |
139
+ | `axios.get`, `.post`, `.put`, `.patch`, `.delete`, `.head`, `.options`, `.postForm`, `.putForm`, `.patchForm` | Request with that method; form helpers use their matching HTTP method |
125
140
  | `axios(config)`, `axios.request(config)` | Request from the config's `url`; its `method`, else the client's, else `GET` |
126
141
  | `axios.create(config)` instances | Request whose path follows the config's `baseURL`, and whose method defaults to the config's |
127
142
  | `server/api/**` | Endpoint at `/api/...`, with the method its file name states |
128
143
  | `server/routes/**` | Endpoint at the path after `server/routes`, with the method its file name states |
129
144
 
130
- `fetch` counts when it is the runtime's or the default export of `node-fetch`,
145
+ `fetch` counts when it is the runtime's, the default export of `node-fetch`, or
146
+ a named `undici` import,
131
147
  as on the React page. `$fetch` and `useFetch` must resolve to a declaration
132
148
  outside the project source, such as an installed package's types, so a project's
133
149
  own `useFetch` composable, whose body decides the URL, is never read as Nuxt's;
@@ -205,20 +221,22 @@ In a component, the source range is in the `.vue` file's own lines. The
205
221
  functions a `<script setup>` block exposes to its template are compared.
206
222
  `setup()` on the argument of `defineComponent({ ... })` is an anonymous callback,
207
223
  while the methods under its `methods` property are compared. Top-level statements
208
- of a block are initializer code, and template expressions are not operations.
224
+ of a block are initializer code, and template expressions are not compared
225
+ operations. A direct template emit has a source operation named `(template)`
226
+ only for the event relationship.
209
227
  Scripts the component keeps in a separate file are TypeScript modules, which the
210
228
  TypeScript scanner compares.
211
229
 
212
230
  ## Nested projects
213
231
 
214
- Run Groma from the repository root. The scanner finds package declarations in
215
- tracked and unignored files, including nested apps and libraries. Dependencies,
216
- dev dependencies, peer dependencies and optional dependencies identify candidates.
217
- A candidate also needs a tracked or unignored `tsconfig.json` and Vue source
218
- files belonging to that package, outside nested packages. Declaration files and
219
- inactive fixtures with a `.fixture` suffix do not qualify. Packages with only
220
- framework tooling dependencies are skipped. No matching project produces no evidence. Each compiler uses that project's configuration and local source;
232
+ Run groma.md from the repository root. The scanner finds package declarations
233
+ among its files, including nested apps and libraries. Dependencies, dev
234
+ dependencies, peer dependencies and optional dependencies identify candidates.
235
+ A candidate also needs a `tsconfig.json` among its files in the package or an
236
+ ancestor, and Vue source files belonging to that package, outside nested
237
+ Vue projects. Declaration files and inactive fixtures with a `.fixture` suffix
238
+ do not qualify. Packages with only framework tooling dependencies are skipped.
239
+ No matching project produces no evidence. Each compiler uses the nearest configuration and local source;
221
240
  imported source in sibling repository libraries keeps its original source path.
222
241
  Readiness checks all selected projects. An invalid selected project fails this scanner's observation; other scanners
223
242
  can still update the architecture.
224
- Source and nested package/configuration changes use the shared scanner watch flow.