vitest-native 0.9.0 → 0.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 (53) hide show
  1. package/CHANGELOG.md +731 -0
  2. package/README.md +32 -1
  3. package/dist/cli.cjs +163 -27
  4. package/dist/cli.mjs +162 -26
  5. package/dist/{ecosystem-EFtHnKS9.mjs → ecosystem-CO5vqExO.mjs} +77 -15
  6. package/dist/{ecosystem-BIWaVwYL.cjs → ecosystem-IuZ-Gv0R.cjs} +78 -16
  7. package/dist/errors-Dm5yLNTF.mjs +64 -0
  8. package/dist/errors-flXDIeWk.cjs +75 -0
  9. package/dist/errors.d.mts +46 -0
  10. package/dist/errors.mjs +78 -0
  11. package/dist/helpers.cjs +6 -23
  12. package/dist/helpers.d.cts +0 -6
  13. package/dist/helpers.d.mts +0 -6
  14. package/dist/helpers.mjs +6 -23
  15. package/dist/{index-CEgRDdhd.d.cts → index-BJL4cQ-l.d.cts} +9 -4
  16. package/dist/{index-j-0tueBr.d.mts → index-CvCU0cLl.d.mts} +9 -4
  17. package/dist/index.d.mts +8 -6
  18. package/dist/index.mjs +245 -59
  19. package/dist/jest-compat/interop.mjs +15 -0
  20. package/dist/jest-compat/setup.mjs +102 -7
  21. package/dist/matchers.cjs +16 -7
  22. package/dist/matchers.mjs +16 -7
  23. package/dist/native/hooks.mjs +75 -1
  24. package/dist/native/loader.mjs +26 -6
  25. package/dist/native/module-reset.mjs +63 -0
  26. package/dist/native/registry.mjs +80 -11
  27. package/dist/native/resolve.d.mts +22 -0
  28. package/dist/native/resolve.mjs +21 -13
  29. package/dist/native/runner.mjs +21 -0
  30. package/dist/native/setup.mjs +4 -2
  31. package/dist/native/transform.mjs +108 -3
  32. package/dist/native/worker.mjs +59 -16
  33. package/dist/{pool-CJmjRgsB.mjs → pool-Bcxp4Qrg.mjs} +2 -1
  34. package/dist/{pool-DzsEo9vv.cjs → pool-CFND7plG.cjs} +2 -1
  35. package/dist/{preset-map-CNsZKfvu.mjs → preset-map-BpDG_D5m.mjs} +0 -1
  36. package/dist/{preset-map-CG4FMtsl.cjs → preset-map-DxilQ4pI.cjs} +0 -1
  37. package/dist/{presets-C4faM3ds.cjs → presets-BGTqVH6C.cjs} +94 -50
  38. package/dist/{presets-CuDrNA_W.mjs → presets-CK85x8ey.mjs} +94 -50
  39. package/dist/presets.d.mts +1 -1
  40. package/dist/presets.mjs +1 -1
  41. package/dist/rntl-matchers.d.ts +35 -0
  42. package/dist/serializer.cjs +33 -3
  43. package/dist/serializer.mjs +33 -3
  44. package/dist/setup.mjs +234 -71
  45. package/docs/release-readiness.md +22 -5
  46. package/docs/versioning.md +133 -0
  47. package/package.json +25 -35
  48. package/dist/index.cjs +0 -788
  49. package/dist/index.d.cts +0 -14
  50. package/dist/presets.cjs +0 -18
  51. package/dist/presets.d.cts +0 -2
  52. package/dist/setup.cjs +0 -2702
  53. package/dist/setup.d.cts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-native",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "Run real React Native tests under Vitest. One install, zero config.",
6
6
  "license": "MIT",
@@ -24,19 +24,13 @@
24
24
  "expo",
25
25
  "react"
26
26
  ],
27
- "main": "./dist/index.cjs",
27
+ "main": "./dist/index.mjs",
28
28
  "module": "./dist/index.mjs",
29
29
  "types": "./dist/index.d.mts",
30
30
  "exports": {
31
31
  ".": {
32
- "import": {
33
- "types": "./dist/index.d.mts",
34
- "default": "./dist/index.mjs"
35
- },
36
- "require": {
37
- "types": "./dist/index.d.cts",
38
- "default": "./dist/index.cjs"
39
- }
32
+ "types": "./dist/index.d.mts",
33
+ "default": "./dist/index.mjs"
40
34
  },
41
35
  "./helpers": {
42
36
  "import": {
@@ -49,14 +43,8 @@
49
43
  }
50
44
  },
51
45
  "./setup": {
52
- "import": {
53
- "types": "./dist/setup.d.mts",
54
- "default": "./dist/setup.mjs"
55
- },
56
- "require": {
57
- "types": "./dist/setup.d.cts",
58
- "default": "./dist/setup.cjs"
59
- }
46
+ "types": "./dist/setup.d.mts",
47
+ "default": "./dist/setup.mjs"
60
48
  },
61
49
  "./serializer": {
62
50
  "import": {
@@ -69,14 +57,8 @@
69
57
  }
70
58
  },
71
59
  "./presets": {
72
- "import": {
73
- "types": "./dist/presets.d.mts",
74
- "default": "./dist/presets.mjs"
75
- },
76
- "require": {
77
- "types": "./dist/presets.d.cts",
78
- "default": "./dist/presets.cjs"
79
- }
60
+ "types": "./dist/presets.d.mts",
61
+ "default": "./dist/presets.mjs"
80
62
  },
81
63
  "./matchers": {
82
64
  "import": {
@@ -109,6 +91,9 @@
109
91
  "./jest-compat/extend-expect-noop": {
110
92
  "types": "./dist/jest-compat/noop.d.mts",
111
93
  "import": "./dist/jest-compat/noop.mjs"
94
+ },
95
+ "./rntl-matchers": {
96
+ "types": "./dist/rntl-matchers.d.ts"
112
97
  }
113
98
  },
114
99
  "files": [
@@ -118,10 +103,9 @@
118
103
  "CHANGELOG.md"
119
104
  ],
120
105
  "engines": {
121
- "node": ">=20"
106
+ "node": ">=20.19.0"
122
107
  },
123
108
  "sideEffects": [
124
- "./dist/setup.cjs",
125
109
  "./dist/setup.mjs",
126
110
  "./dist/jest-compat/setup.mjs",
127
111
  "./dist/native/*.mjs"
@@ -160,36 +144,41 @@
160
144
  "@testing-library/react-native": "14.0.0",
161
145
  "@types/node": "25.3.5",
162
146
  "@types/react": "19.2.14",
163
- "@vitest/coverage-v8": "4.1.8",
147
+ "@vitest/coverage-v8": "4.1.9",
164
148
  "expo-constants": "56.0.16",
165
149
  "expo-status-bar": "56.0.4",
166
150
  "ext-platform-lib": "file:./tests-native/fixtures/ext-platform-lib",
167
151
  "ext-rn-named-lib": "file:./tests-native/fixtures/ext-rn-named-lib",
168
152
  "generic-mainfield-lib": "file:./tests-native/fixtures/generic-mainfield-lib",
169
- "react": "^19.2.3",
153
+ "react": "^19.2.8",
170
154
  "react-native": "^0.86.0",
171
155
  "react-native-gesture-handler": "3.0.0",
172
156
  "react-native-keyboard-controller": "1.21.11",
173
157
  "react-native-reanimated": "4.3.1",
174
158
  "react-native-safe-area-context": "5.8.0",
175
159
  "react-native-worklets": "0.9.1",
176
- "react-test-renderer": "^19.2.3",
160
+ "react-test-renderer": "^19.2.8",
161
+ "resident-singleton": "file:./tests-native/fixtures/resident-singleton",
177
162
  "rn-condition-lib": "file:./tests-native/fixtures/rn-condition-lib",
178
163
  "rn-ecosystem-lib": "file:./tests-native/fixtures/rn-ecosystem-lib",
179
164
  "rn-mainfield-lib": "file:./tests-native/fixtures/rn-mainfield-lib",
165
+ "rn-platform-flow-lib": "file:./tests-native/fixtures/rn-platform-flow-lib",
166
+ "rn-singleton-lib": "file:./tests-native/fixtures/rn-singleton-lib",
180
167
  "test-renderer": "^1.2.0",
181
168
  "tsdown": "0.21.10",
182
169
  "typescript": "6.0.3",
183
170
  "untranspiled-jsx-lib": "file:./tests-native/fixtures/untranspiled-jsx-lib",
184
171
  "vite": "^8.0.5",
185
- "vitest": "^4.1.8"
172
+ "vitest": "4.1.9"
186
173
  },
187
174
  "scripts": {
188
- "build": "tsdown",
175
+ "build": "tsdown && node scripts/copy-static-types.mjs",
189
176
  "test": "vitest run",
190
177
  "test:native": "vitest run --config tests-native/vitest.config.mts",
178
+ "test:native:forks": "vitest run --config tests-native/vitest.forks.config.mts",
191
179
  "test:native:navigation": "vitest run --config tests-native/vitest.navigation.config.mts",
192
180
  "test:native:android": "vitest run --config tests-native/vitest.android.config.mts",
181
+ "test:native:advice": "vitest run --config tests-native/vitest.advice.config.mts",
193
182
  "test:native:hot": "vitest run --config tests-native/vitest.hot.config.mts",
194
183
  "test:native:hot:isolation": "vitest run --config tests-native/vitest.hot-isolation.config.mts",
195
184
  "test:native:hot:soak": "node scripts/test-hot-soak.mjs",
@@ -199,9 +188,10 @@
199
188
  "format:check": "oxfmt --check src/ tests/ consumer-tests/ scripts/",
200
189
  "check-compat": "bun scripts/check-compat.ts",
201
190
  "check:size": "node scripts/check-package-size.mjs",
191
+ "check:exports": "node scripts/check-exports.mjs",
202
192
  "typecheck": "tsc --noEmit",
203
193
  "clean": "rm -rf dist",
204
- "prepublishOnly": "bun run build && bun run check:size && bun run test && bun run test:native && bun run test:native:navigation && bun run test:native:android && bun run test:native:hot && bun run test:native:hot:isolation && bun run test:native:hot:soak && bun run fidelity:check && bun run test:consumers && bun run lint && bun run typecheck",
194
+ "prepublishOnly": "bun run build && bun run check:size && bun run test && bun run test:native && bun run test:native:forks && bun run test:native:navigation && bun run test:native:android && bun run test:native:advice && bun run test:native:hot && bun run test:native:hot:isolation && bun run test:native:hot:soak && bun run validate:hot-parity && bun run fidelity:check && bun run test:consumers && bun run lint && bun run typecheck",
205
195
  "crosscheck": "node scripts/crosscheck.mjs",
206
196
  "fidelity:report": "node scripts/fidelity-report.mjs",
207
197
  "fidelity:check": "node scripts/fidelity-report.mjs --check && node scripts/fidelity-matrix.mjs --check",
@@ -209,7 +199,7 @@
209
199
  },
210
200
  "dependencies": {
211
201
  "flow-remove-types": "^2.322.0",
212
- "magic-string": "^0.30.21"
202
+ "magic-string": "^1.1.0"
213
203
  },
214
204
  "bin": {
215
205
  "vitest-native": "./dist/cli.mjs"