@groma/scanner-vue 0.1.5 → 0.2.1
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/README.md +54 -36
- package/dist/index.js +595 -166
- package/dist/lib.d.ts +1 -3
- package/dist/lib.decorators.d.ts +1 -3
- package/dist/lib.decorators.legacy.d.ts +1 -3
- package/dist/lib.dom.asynciterable.d.ts +3 -26
- package/dist/lib.dom.d.ts +12638 -6942
- package/dist/lib.dom.iterable.d.ts +3 -556
- package/dist/lib.es2015.collection.d.ts +7 -4
- package/dist/lib.es2015.core.d.ts +2 -4
- package/dist/lib.es2015.d.ts +1 -3
- package/dist/lib.es2015.generator.d.ts +1 -3
- package/dist/lib.es2015.iterable.d.ts +2 -4
- package/dist/lib.es2015.promise.d.ts +1 -3
- package/dist/lib.es2015.proxy.d.ts +1 -3
- package/dist/lib.es2015.reflect.d.ts +1 -3
- package/dist/lib.es2015.symbol.d.ts +1 -3
- package/dist/lib.es2015.symbol.wellknown.d.ts +1 -3
- package/dist/lib.es2016.array.include.d.ts +1 -3
- package/dist/lib.es2016.d.ts +1 -3
- package/dist/lib.es2016.full.d.ts +1 -3
- package/dist/lib.es2016.intl.d.ts +1 -3
- package/dist/lib.es2017.arraybuffer.d.ts +1 -3
- package/dist/lib.es2017.d.ts +1 -3
- package/dist/lib.es2017.date.d.ts +1 -3
- package/dist/lib.es2017.full.d.ts +1 -3
- package/dist/lib.es2017.intl.d.ts +1 -3
- package/dist/lib.es2017.object.d.ts +1 -3
- package/dist/lib.es2017.sharedmemory.d.ts +1 -3
- package/dist/lib.es2017.string.d.ts +1 -3
- package/dist/lib.es2017.typedarrays.d.ts +1 -3
- package/dist/lib.es2018.asyncgenerator.d.ts +1 -3
- package/dist/lib.es2018.asynciterable.d.ts +1 -3
- package/dist/lib.es2018.d.ts +1 -3
- package/dist/lib.es2018.full.d.ts +1 -3
- package/dist/lib.es2018.intl.d.ts +1 -3
- package/dist/lib.es2018.promise.d.ts +1 -3
- package/dist/lib.es2018.regexp.d.ts +1 -3
- package/dist/lib.es2019.array.d.ts +1 -3
- package/dist/lib.es2019.d.ts +1 -3
- package/dist/lib.es2019.full.d.ts +1 -3
- package/dist/lib.es2019.intl.d.ts +1 -3
- package/dist/lib.es2019.object.d.ts +1 -3
- package/dist/lib.es2019.string.d.ts +1 -3
- package/dist/lib.es2019.symbol.d.ts +1 -3
- package/dist/lib.es2020.bigint.d.ts +5 -7
- package/dist/lib.es2020.d.ts +1 -3
- package/dist/lib.es2020.date.d.ts +1 -3
- package/dist/lib.es2020.full.d.ts +1 -3
- package/dist/lib.es2020.intl.d.ts +1 -3
- package/dist/lib.es2020.number.d.ts +1 -3
- package/dist/lib.es2020.promise.d.ts +1 -3
- package/dist/lib.es2020.sharedmemory.d.ts +1 -3
- package/dist/lib.es2020.string.d.ts +2 -4
- package/dist/lib.es2020.symbol.wellknown.d.ts +2 -4
- package/dist/lib.es2021.d.ts +1 -3
- package/dist/lib.es2021.full.d.ts +1 -3
- package/dist/lib.es2021.intl.d.ts +1 -3
- package/dist/lib.es2021.promise.d.ts +1 -3
- package/dist/lib.es2021.string.d.ts +1 -3
- package/dist/lib.es2021.weakref.d.ts +1 -3
- package/dist/lib.es2022.array.d.ts +1 -3
- package/dist/lib.es2022.d.ts +1 -3
- package/dist/lib.es2022.error.d.ts +1 -3
- package/dist/lib.es2022.full.d.ts +1 -3
- package/dist/lib.es2022.intl.d.ts +1 -3
- package/dist/lib.es2022.object.d.ts +1 -3
- package/dist/lib.es2022.regexp.d.ts +2 -4
- package/dist/lib.es2022.string.d.ts +1 -3
- package/dist/lib.es2023.array.d.ts +1 -3
- package/dist/lib.es2023.collection.d.ts +1 -3
- package/dist/lib.es2023.d.ts +1 -3
- package/dist/lib.es2023.full.d.ts +1 -3
- package/dist/lib.es2023.intl.d.ts +10 -4
- package/dist/lib.es2024.arraybuffer.d.ts +1 -3
- package/dist/lib.es2024.collection.d.ts +1 -3
- package/dist/lib.es2024.d.ts +1 -3
- package/dist/lib.es2024.full.d.ts +1 -3
- package/dist/lib.es2024.object.d.ts +1 -3
- package/dist/lib.es2024.promise.d.ts +1 -3
- package/dist/lib.es2024.regexp.d.ts +1 -3
- package/dist/lib.es2024.sharedmemory.d.ts +1 -3
- package/dist/lib.es2024.string.d.ts +1 -3
- package/dist/lib.es2025.collection.d.ts +94 -0
- package/dist/lib.es2025.d.ts +23 -0
- package/dist/{lib.esnext.float16.d.ts → lib.es2025.float16.d.ts} +1 -3
- package/dist/lib.es2025.full.d.ts +22 -0
- package/dist/lib.es2025.intl.d.ts +200 -0
- package/dist/{lib.esnext.iterator.d.ts → lib.es2025.iterator.d.ts} +1 -3
- package/dist/{lib.esnext.promise.d.ts → lib.es2025.promise.d.ts} +1 -3
- package/dist/lib.es2025.regexp.d.ts +30 -0
- package/dist/lib.es5.d.ts +22 -24
- package/dist/lib.es6.d.ts +1 -3
- package/dist/lib.esnext.array.d.ts +1 -3
- package/dist/lib.esnext.collection.d.ts +20 -69
- package/dist/lib.esnext.d.ts +6 -8
- package/dist/lib.esnext.date.d.ts +21 -0
- package/dist/lib.esnext.decorators.d.ts +1 -3
- package/dist/lib.esnext.disposable.d.ts +1 -3
- package/dist/lib.esnext.error.d.ts +1 -3
- package/dist/lib.esnext.full.d.ts +1 -3
- package/dist/lib.esnext.intl.d.ts +89 -3
- package/dist/lib.esnext.sharedmemory.d.ts +1 -3
- package/dist/lib.esnext.temporal.d.ts +485 -0
- package/dist/lib.esnext.typedarrays.d.ts +90 -0
- package/dist/lib.scripthost.d.ts +1 -3
- package/dist/lib.webworker.asynciterable.d.ts +3 -26
- package/dist/lib.webworker.d.ts +3396 -940
- package/dist/lib.webworker.importscripts.d.ts +1 -3
- package/dist/lib.webworker.iterable.d.ts +3 -325
- package/dist/typescript.cjs +2589 -1826
- package/package.json +30 -3
- 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
|
|
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
|
|
6
|
-
`tsconfig.json
|
|
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
|
|
21
|
-
|
|
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
|
|
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
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
64
|
-
template attribute and supplied handler. All positions
|
|
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,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
the scan and preserve the previous complete map.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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.
|
|
80
|
-
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
A candidate also needs a
|
|
218
|
-
files belonging to that package, outside nested
|
|
219
|
-
inactive fixtures with a `.fixture` suffix
|
|
220
|
-
|
|
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.
|