vitest-native 0.4.1 → 0.5.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/CHANGELOG.md +52 -0
- package/README.md +270 -180
- package/dist/helpers.cjs +13 -0
- package/dist/helpers.mjs +13 -0
- package/dist/{index-DEB7OFaJ.d.cts → index-DCSgnSj4.d.cts} +14 -8
- package/dist/{index-CJIhukN_.d.mts → index-EZmVLfjU.d.mts} +14 -8
- package/dist/index.cjs +104 -38
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +101 -35
- package/dist/jest-compat.cjs +1 -1
- package/dist/native/boundary.mjs +82 -32
- package/dist/native/globals.mjs +1 -0
- package/dist/native/hooks.mjs +16 -7
- package/dist/native/loader.mjs +18 -5
- package/dist/native/reset.mjs +79 -43
- package/dist/native/resolve.mjs +25 -7
- package/dist/native/setup.mjs +89 -4
- package/dist/native/transform.mjs +15 -9
- package/dist/native/worker.mjs +15 -3
- package/dist/{pool-oPTZiSXU.mjs → pool-B7LBfcMQ.mjs} +10 -1
- package/dist/{pool-B4mWN3N5.cjs → pool-p54QV1dQ.cjs} +11 -2
- package/dist/{presets-DOGXQzYT.mjs → presets-C9SvIaG-.mjs} +25 -21
- package/dist/{presets-2I68Ipyl.cjs → presets-E0yIUMJP.cjs} +27 -23
- package/dist/presets.cjs +1 -1
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.mts +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/setup.cjs +35 -8
- package/dist/setup.mjs +33 -6
- package/docs/migrating-from-jest.md +6 -4
- package/docs/migrating-from-vitest-react-native.md +6 -3
- package/docs/release-readiness.md +52 -0
- package/package.json +28 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# vitest-native
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Native engine
|
|
6
|
+
|
|
7
|
+
- Propagate the configured iOS/Android platform through native resolution,
|
|
8
|
+
transformation caches, Babel caller metadata, and native boundary constants.
|
|
9
|
+
- Bring assets, helper controls, native-module injection, animated matchers, and
|
|
10
|
+
snapshot serialization to the native engine contract.
|
|
11
|
+
- Reject mock-only `mocks` overrides under the native engine instead of silently
|
|
12
|
+
ignoring them.
|
|
13
|
+
|
|
14
|
+
### Mock engine
|
|
15
|
+
|
|
16
|
+
- Block `onPress` on disabled `Pressable`/`Touchable*`/`Button` under
|
|
17
|
+
`@testing-library/react-native` v14. RNTL 14 resolves press handlers by walking
|
|
18
|
+
the composite fiber, which re-finds `onPress` on the wrapping `forwardRef` mock,
|
|
19
|
+
so the earlier host-prop stripping no longer blocked the press; disabled hosts
|
|
20
|
+
are now marked `pointerEvents: "none"` so RNTL's `isEventEnabled` rejects it
|
|
21
|
+
(no-op under RNTL ≤13). Thanks @jakeboone02.
|
|
22
|
+
- Stop passing the `hostComponentNames` option to `configure()` on RNTL ≥14,
|
|
23
|
+
which removed it in favor of auto-detection; this silences an "Unknown
|
|
24
|
+
option(s) passed to configure" warning while preserving the option for
|
|
25
|
+
RNTL ≤13.
|
|
26
|
+
|
|
27
|
+
### Reliability
|
|
28
|
+
|
|
29
|
+
- Fix hot-runtime cross-file leaks from import-time globals, direct environment
|
|
30
|
+
mutations, and app-owned RN event listeners.
|
|
31
|
+
- Add a dedicated one-worker hot-isolation gate, a generated 100-file soak,
|
|
32
|
+
end-to-end memory-triggered worker recycling, and Android platform-resolution
|
|
33
|
+
coverage.
|
|
34
|
+
- Validate plugin and hot-runtime options eagerly with actionable errors.
|
|
35
|
+
- Fail configuration for unsupported required Vite, Vitest, and React peers
|
|
36
|
+
instead of continuing after a console error.
|
|
37
|
+
|
|
38
|
+
### Compatibility and release engineering
|
|
39
|
+
|
|
40
|
+
- Validate packed release tarballs in bare RN 0.83/RNTL 12, Expo 56/RNTL 13,
|
|
41
|
+
Vite 8 monorepo/RNTL 14, RN 0.86 Android, and a mock-engine RNTL 14 consumer
|
|
42
|
+
(the combination that guards the disabled-press fix above).
|
|
43
|
+
- Support Vite 8's Oxc JSX configuration without the deprecated `esbuild`
|
|
44
|
+
option, while retaining Vite 6–7 support.
|
|
45
|
+
- Load RNTL matchers across the public, `build`, and `dist` layouts used by
|
|
46
|
+
RNTL 12–14, and expose Vitest's `expect` for RNTL matcher registration without
|
|
47
|
+
enabling all Vitest globals.
|
|
48
|
+
- Upgrade the validated baseline to Vitest 4.1.8, RN 0.85.3, and React 19.2,
|
|
49
|
+
with exact peer upper bounds for unsupported future majors.
|
|
50
|
+
- Require patched Vite floors (^6.4.2, ^7.3.2, or ^8.0.5) and refresh build
|
|
51
|
+
tooling/transitive resolutions to remove known high-severity advisories.
|
|
52
|
+
- Make Linux Node 20/22, macOS, Windows, packed consumers, the example app,
|
|
53
|
+
soak tests, cross-checks, and package export analysis blocking release gates.
|
|
54
|
+
|
|
3
55
|
## 0.4.1
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|