vite-plugin-ai-auto-i18n 0.8.0 → 0.9.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.
- package/README.md +12 -5
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -566,6 +566,13 @@ The `prune` CLI options (`--directory`, `--retention-minutes`, `--debug`) are de
|
|
|
566
566
|
|
|
567
567
|
Every push to `main` runs [.github/workflows/release.yml](.github/workflows/release.yml): verify, then bump the version from [conventional commits](https://www.conventionalcommits.org/) since the last `v*` tag (`fix`/`perf` → patch, `feat` → minor, `!` or `BREAKING CHANGE:` → major), publish to npm, and create a GitHub Release whose notes list the changes since the previous tag. Pushes without a releasable commit do nothing. The release commit is `chore(release): vX.Y.Z [skip ci]`.
|
|
568
568
|
|
|
569
|
+
Test coverage in the release pipeline:
|
|
570
|
+
|
|
571
|
+
- The `verify` job runs `npm run test:coverage`, which runs the suite with V8 coverage on `src/**` and writes `coverage/coverage-summary.json`. That summary is uploaded as the `coverage-summary` artifact.
|
|
572
|
+
- The GitHub Release notes end with a `## Test coverage` section, generated from that summary by `node .github/scripts/release.mjs coverage`. It lists statements, branches, functions, and lines for the commit being released.
|
|
573
|
+
- No coverage threshold is enforced. A drop in coverage does not block a release.
|
|
574
|
+
- To check coverage before pushing to `main`, run the command in [Test coverage](#-test-coverage) locally.
|
|
575
|
+
|
|
569
576
|
## 🧪 Test coverage
|
|
570
577
|
|
|
571
578
|
Run the suite with coverage (V8 provider, `src/**`):
|
|
@@ -576,12 +583,12 @@ npx vitest run --coverage --coverage.include='src/**' --coverage.reporter=text
|
|
|
576
583
|
|
|
577
584
|
| Metric | Coverage |
|
|
578
585
|
|---|---|
|
|
579
|
-
| Statements |
|
|
580
|
-
| Branches |
|
|
581
|
-
| Functions |
|
|
582
|
-
| Lines |
|
|
586
|
+
| Statements | 89.4% (1100/1230) |
|
|
587
|
+
| Branches | 82.8% (564/681) |
|
|
588
|
+
| Functions | 91.1% (246/270) |
|
|
589
|
+
| Lines | 91.9% (874/951) |
|
|
583
590
|
|
|
584
|
-
|
|
591
|
+
Per module: the plugin hooks (`src/index.ts`) are at 95.9% statements, the translation pipeline (`src/translate.ts`) and runtime helpers (`src/runtime/`) at 100%, and the prune CLI (`src/cli/prune.ts`) at 96.5%. The stats CLI (`src/cli/stats.ts`) has no test coverage (0%), and the compiler's entity table (`src/compiler/entities.ts`) is at 28.6%.
|
|
585
592
|
|
|
586
593
|
## Known limitations
|
|
587
594
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-ai-auto-i18n",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Implicit, build-time AI localization for JSX applications",
|
|
6
6
|
"license": "ISC",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"example:build": "vite build example",
|
|
51
51
|
"preview": "vite build example && vite preview example --port 4173 --strictPort",
|
|
52
52
|
"test": "vitest run",
|
|
53
|
+
"test:coverage": "vitest run --coverage --coverage.include='src/**' --coverage.reporter=text --coverage.reporter=json-summary",
|
|
53
54
|
"typecheck": "tsc --noEmit"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|