@eventra_dev/cli-plugin-vue 0.2.1 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@eventra_dev/cli-plugin-vue"><img alt="npm version" src="https://img.shields.io/npm/v/@eventra_dev/cli-plugin-vue.svg?style=flat-square&color=blue"></a>
9
9
  <a href="https://www.npmjs.com/package/@eventra_dev/cli-plugin-vue"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@eventra_dev/cli-plugin-vue.svg?style=flat-square&color=blue"></a>
10
- <img alt="tests passing" src="https://img.shields.io/badge/tests-15%20passing-brightgreen?style=flat-square&logo=vitest&logoColor=white">
10
+ <img alt="tests passing" src="https://img.shields.io/badge/tests-16%20passing-brightgreen?style=flat-square&logo=vitest&logoColor=white">
11
11
  <img alt="node" src="https://img.shields.io/node/v/@eventra_dev/cli-plugin-vue?style=flat-square&color=darkgreen&logo=node.js&logoColor=white">
12
12
  <a href="https://www.typescriptlang.org/"><img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-ready-blue?style=flat-square&logo=typescript&logoColor=white"></a>
13
13
  <img alt="license" src="https://img.shields.io/npm/l/@eventra_dev/cli-plugin-vue?style=flat-square&color=lightgrey">
@@ -95,7 +95,7 @@ The expression is copied as-is into the same module scope as the script. If it r
95
95
 
96
96
  Nuxt pages, layouts, and components are ordinary `.vue` SFCs — parsed identically, no extra configuration needed.
97
97
 
98
- Composables auto-imported without an explicit `import` statement (Nuxt's own composables, or your own from `composables/`/`utils/`) resolve correctly **once the project has run `nuxt prepare`/`nuxt dev`** (so `.nuxt/` exists and is wired into `tsconfig.json` — the CLI analyzes the project's real `tsconfig.json`, so Nuxt's generated ambient types are visible to it like any other TypeScript project). This includes the case where a wrapper function that calls `track()` is only reachable via auto-import: the CLI understands the `declare const x: typeof import("./module")["name"]` shape Nuxt/`unplugin-auto-import` generate for these bindings.
98
+ Composables auto-imported without an explicit `import` statement (Nuxt's own composables, or your own from `composables/`/`utils/`) are intended to resolve **once the project has run `nuxt prepare`/`nuxt dev`** (so `.nuxt/` exists and is wired into `tsconfig.json` — the CLI analyzes the project's real `tsconfig.json`, so Nuxt's generated ambient types are visible to it like any other TypeScript project). The CLI's resolver understands the `declare const x: typeof import("./module")["name"]` shape Nuxt/`unplugin-auto-import` generate for these bindings, and this is covered by a unit test that hand-writes that ambient shape (`@eventra_dev/eventra-cli`'s `nuxtAutoImportCompat.test.ts`) — but running a real `nuxt prepare`/`nuxt build` end-to-end has not been verified in this environment (blocked by a sandbox GLIBC incompatibility with Nuxt's native build tooling), so this is not confirmed against a real generated `.nuxt/imports.d.ts`.
99
99
 
100
100
  ---
101
101
 
@@ -133,18 +133,18 @@ No dependency on `@eventra_dev/eventra-cli` — the CLI adapts this shape intern
133
133
 
134
134
  ## Test Coverage
135
135
 
136
- **15 unit tests** (vitest), covering:
136
+ **16 unit tests** (vitest), covering:
137
137
 
138
138
  | Area | Covers |
139
139
  |---|---|
140
140
  | SFC parsing | Script + script-setup merge order, comment safety, `src=` external files |
141
141
  | Template — literal | Nested elements, `v-if`/`v-for`, slots, multiple template roots |
142
142
  | Template — dynamic | Raw expression passthrough, resolution through the merged script scope |
143
- | Script-setup macros | `defineProps`/`defineEmits` pass through without special-casing |
143
+ | Script-setup macros | All five compiler macros (`defineProps`/`defineEmits`/`defineExpose`/`defineOptions`/`withDefaults`) pass through without special-casing |
144
144
  | Virtual module output | Single combined `.vue.ts`, export stub when script/template are empty |
145
145
  | Plugin contract | `match()`, `includeGlobs`, `staticSinks`, `transform()` |
146
146
 
147
- Also validated end-to-end against real Vue and Nuxt projects (including Nuxt's own generated `.nuxt/` ambient types) as part of `@eventra_dev/eventra-cli`'s test suite.
147
+ The Nuxt ambient auto-import shape (`declare const x: typeof import(...)`) is covered by a unit test in `@eventra_dev/eventra-cli` (`nuxtAutoImportCompat.test.ts`) that hand-writes that shape — this is not the same as an end-to-end run against a real `nuxt prepare`/`nuxt build`, which has not been verified in this environment (see the [Nuxt](#nuxt) section above).
148
148
 
149
149
  Run locally:
150
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventra_dev/cli-plugin-vue",
3
- "version": "0.2.1",
3
+ "version": "1.0.1",
4
4
  "description": "Eventra CLI plugin — extract track() calls from Vue SFC (.vue) files",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",