vite-plugin-ai-auto-i18n 0.8.0 → 0.9.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 +16 -5
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -566,6 +566,17 @@ 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 `verify` job also runs `npm pack --dry-run --json` after the build and uploads the report as the `package-pack` artifact.
|
|
573
|
+
- The GitHub Release notes end with three generated sections:
|
|
574
|
+
- `## Test coverage`, from the coverage summary, with statements, branches, functions, and lines for the commit being released.
|
|
575
|
+
- `## Package`, with tarball size, unpacked size, and file count, plus distribution by location and by type.
|
|
576
|
+
- `## Dependencies`, with runtime and peer dependencies from `package.json`. Dependencies are not bundled into `dist/`.
|
|
577
|
+
- No coverage threshold is enforced and no size limit is checked. A drop in coverage or an increase in package size does not block a release.
|
|
578
|
+
- To check coverage before pushing to `main`, run the command in [Test coverage](#-test-coverage) locally.
|
|
579
|
+
|
|
569
580
|
## 🧪 Test coverage
|
|
570
581
|
|
|
571
582
|
Run the suite with coverage (V8 provider, `src/**`):
|
|
@@ -576,12 +587,12 @@ npx vitest run --coverage --coverage.include='src/**' --coverage.reporter=text
|
|
|
576
587
|
|
|
577
588
|
| Metric | Coverage |
|
|
578
589
|
|---|---|
|
|
579
|
-
| Statements |
|
|
580
|
-
| Branches |
|
|
581
|
-
| Functions |
|
|
582
|
-
| Lines |
|
|
590
|
+
| Statements | 89.4% (1100/1230) |
|
|
591
|
+
| Branches | 82.8% (564/681) |
|
|
592
|
+
| Functions | 91.1% (246/270) |
|
|
593
|
+
| Lines | 91.9% (874/951) |
|
|
583
594
|
|
|
584
|
-
|
|
595
|
+
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
596
|
|
|
586
597
|
## Known limitations
|
|
587
598
|
|
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.1",
|
|
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": {
|