@altano/vitest-plugins 1.1.3 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altano/vitest-plugins",
3
- "version": "1.1.3",
3
+ "version": "2.0.0",
4
4
  "description": "Custom matchers and snapshot serializers to enhance vitest",
5
5
  "homepage": "https://github.com/altano/npm-packages/tree/main/packages/vitest-plugins",
6
6
  "repository": {
@@ -32,24 +32,24 @@
32
32
  "dependencies": {
33
33
  "@prettier/sync": "^0.6.1",
34
34
  "exifr": "^7.1.3",
35
- "serialize-error": "^13.0.1",
35
+ "serialize-error": "^13.0.2",
36
36
  "vfile": "^6.0.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/node": "^26.1.1",
40
- "@vitest/coverage-v8": "^4.1.10",
41
- "@vitest/expect": "^4.1.10",
39
+ "@types/node": "^26.6.4",
40
+ "@vitest/coverage-v8": "^5.0.3",
41
+ "@vitest/expect": "^5.0.3",
42
42
  "depcheck": "^1.4.7",
43
- "eslint": "^9.39.5",
44
- "prettier": "3.9.6",
43
+ "eslint": "^10.12.0",
44
+ "prettier": "3.9.9",
45
45
  "typescript": "^6.0.3",
46
- "vite": "^8.1.5",
47
- "vitest": "^4.1.10",
46
+ "vite": "^8.3.2",
47
+ "vitest": "^5.0.3",
48
48
  "@altano/tsconfig": "0.0.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "prettier": "3.x.x",
52
- "vitest": "4.x.x"
52
+ "vitest": "5.x.x"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  // Have to import these to get declaration merging.
2
2
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
- import type { Assertion, AsymmetricMatchersContaining } from "vitest";
3
+ import type { Matchers } from "vitest";
4
4
 
5
5
  interface CustomMatchers<R = unknown> {
6
6
  /**
@@ -52,9 +52,10 @@ interface ResponseMatchers<R = unknown> {
52
52
  toHaveStatus(expectedStatus: number): R;
53
53
  }
54
54
 
55
- /* eslint-disable @typescript-eslint/no-empty-object-type */
56
55
  declare module "vitest" {
57
- interface Assertion<T> extends CustomMatchers<T> {}
58
- interface Assertion<T> extends ResponseMatchers<T> {}
59
- interface AsymmetricMatchersContaining extends CustomMatchers {}
56
+ // Type parameters must match the original declaration exactly, so the
57
+ // unused `T` has to stay.
58
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
59
+ interface Matchers<R extends void | Promise<void>, T>
60
+ extends CustomMatchers<R>, ResponseMatchers<R> {}
60
61
  }