vitest-auto-spy 3.9.0 β†’ 3.10.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 (2) hide show
  1. package/README.md +10 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -60,7 +60,7 @@ identical API, with **RxJS** spies and **Angular / NestJS / React / VueΒ·Pinia /
60
60
  - 🧩 Module mocks that prove they applied β€” `assertMocked`, `moduleNamespace`, for a `vi.mock()` a bundler quietly ignored
61
61
  - 🧾 Fixtures without casts β€” deep-partial `createMock`, `narrow()`, `withOverrides()`, `asInstances()`, `captureArg()`
62
62
  - 🚚 A migration you can verify β€” `compareTestRuns` on the two JSON reports, `diffByField` for the assertion the reporter collapses
63
- - πŸ“ Lint rules and one-line test-run hygiene β€” thirteen rules in `vitest-auto-spy/eslint-plugin` (two `--fix`, six suggestions), `setupAutoSpy()`
63
+ - πŸ“ Lint rules and one-line test-run hygiene β€” fourteen rules in `vitest-auto-spy/eslint-plugin` (two `--fix`, six suggestions), `setupAutoSpy()`
64
64
  - 🩺 [Editor diagnostics](#editor-diagnostics--webstorm--vs-code) β€” the same anti-patterns underlined while you type: native ESLint inspections in **WebStorm** and the other JetBrains IDEs, the ESLint extension in **VS Code**, no extra plugin either way
65
65
  - πŸ”Ž [`npx vitest-auto-spy doctor`](#the-cli--doctor-codemod-and-init) β€” suite-level defects **that never fail a run**: a `tsconfig` `include` matching no file, a production module importing a spec, a `@jest-environment` pragma the runner never reads, config left behind for a runner that is gone. Read-only, no config, exits 1 in CI
66
66
  - 🚚 [`npx vitest-auto-spy codemod`](#codemod--migrating-a-suite-off-jest-auto-spies) β€” seven transforms that move a suite off `jest-auto-spies` and Jest, dry-run by default, with a `--verify` pass that also checks a file somebody edited by hand
@@ -2207,12 +2207,13 @@ export can never be.
2207
2207
  | `no-overridden-provider` | `error` | suggest | two providers for one token in one array β†’ the earlier one never runs; the exact duplicate can be deleted |
2208
2208
  | `no-inject-before-override` | `warn` | β€” | `TestBed.inject()` in a hook, in a suite that still calls `override*` |
2209
2209
  | `no-import-time-spread` | `error` | suggest | `export const x = [...Imported]` at module scope β†’ a `TypeError` while the bundle loads |
2210
+ | `no-unregistered-inject-spy` | `warn` | β€” | `injectSpy(X)` for a token this file never registered β†’ the real instance, whose spy helpers exist only for the compiler |
2210
2211
 
2211
2212
  Every message ends with a link to the matching [recipe](#how-to-mock): a rule that only says
2212
2213
  "don't" moves the problem rather than solving it. Rules travel with the API they recommend, so they
2213
2214
  are versioned together and stop being re-written in every project that installs the package.
2214
2215
 
2215
- **Two of the thirteen fix on their own, six offer suggestions**, and the split is not about how hard
2216
+ **Two of the fourteen fix on their own, six offer suggestions**, and the split is not about how hard
2216
2217
  the rewrite is. `no-mocked-for-spy` touches a _declaration_: get it wrong and the file stops
2217
2218
  compiling, which is the loudest, cheapest failure there is β€” so `--fix` rewrites the type, adds
2218
2219
  `import type { Spy } from 'vitest-auto-spy'` and drops the `Mocked` import once nothing else uses
@@ -2462,11 +2463,13 @@ Releases are automated: merging a PR into `master` bumps the version from the
2462
2463
  Conventional Commit types and publishes to npm β€” see
2463
2464
  [CONTRIBUTING.md β†’ Releasing](./CONTRIBUTING.md#releasing).
2464
2465
 
2465
- `auto-release.yml` is the **only** workflow that publishes `vitest-auto-spy`, and it authenticates
2466
- with npm **Trusted Publishing (OIDC)** β€” no npm token, and provenance attached by the registry.
2467
- A hand-pushed `v*` tag runs `release.yml`, which now only creates the GitHub Release; it does not
2468
- publish. The `vitest-auto-spies` alias package is a second npm package with its own publish, and it
2469
- still authenticates with `NPM_TOKEN` β€” npm allows one trusted-publisher workflow per package.
2466
+ `auto-release.yml` is the **only** entry point that publishes either package, and it authenticates
2467
+ with npm **Trusted Publishing (OIDC)** β€” no npm token anywhere in the repository, and provenance
2468
+ attached by the registry. A hand-pushed `v*` tag runs `release.yml`, which now only creates the
2469
+ GitHub Release; it does not publish. The `vitest-auto-spies` alias is a second npm package with its
2470
+ own publish (`publish-alias.yml`), but it is `workflow_call`-only and reached through
2471
+ `auto-release.yml`, because npm validates the workflow that *entered* the run, not the reusable one
2472
+ that runs `npm publish`.
2470
2473
 
2471
2474
  If this package saved you time, a ⭐ on [GitHub](https://github.com/ASDAlexey/vitest-auto-spy)
2472
2475
  helps others find it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-auto-spy",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "Auto-generate fully-typed test spies from a class β€” across Vitest, Bun and node:test, with Angular/NestJS/React/Vue/Svelte recipes. Drop-in replacement for jest-auto-spies.",
5
5
  "keywords": [
6
6
  "auto-mock",