@granite-js/vitest 1.0.20 → 1.0.21

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 ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 1.0.21
4
+
5
+ ### Patch Changes
6
+
7
+ - abce9e2: feat: vitest
8
+ - e2f5dee: feat: remove dependency(@react-native/js-polyfill)
9
+
10
+ ## 1.0.20
11
+
12
+ - Initial release.
@@ -1,4 +1,3 @@
1
- import "@react-native/js-polyfills/error-guard";
2
1
  import * as react from "react";
3
2
 
4
3
  //#region src/reactNativeRuntime.d.ts
@@ -3,7 +3,6 @@ import { n as installNativeModuleProxy, r as installReactNativeGlobals, t as def
3
3
  import Module, { createRequire } from "node:module";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
- import "@react-native/js-polyfills/error-guard";
7
6
  import { vi } from "vitest";
8
7
 
9
8
  //#region src/reactNativeRuntime.ts
@@ -1702,6 +1701,7 @@ function patchReactNativeResolution() {
1702
1701
  };
1703
1702
  runtimeGlobals.__rntlVitestRnResolverPatched__ = true;
1704
1703
  }
1704
+ runtimeRequire(path.join(reactNativeMirrorRoot, "@react-native", "js-polyfills", "error-guard.js"));
1705
1705
  vi.mock("react-native", () => getSharedReactNativeExports());
1706
1706
  installReactNativeGlobals(runtimeGlobals);
1707
1707
  installNativeModuleProxy(runtimeGlobals);
package/package.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "name": "@granite-js/vitest",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "type": "module",
5
5
  "description": "Vitest helpers for React Native",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
6
  "types": "./dist/index.d.ts",
9
7
  "repository": {
10
8
  "type": "git",
@@ -12,21 +10,9 @@
12
10
  "directory": "packages/vitest"
13
11
  },
14
12
  "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "import": "./dist/index.js",
18
- "default": "./dist/index.js"
19
- },
20
- "./setup": {
21
- "types": "./dist/setup.d.ts",
22
- "import": "./dist/setup.js",
23
- "default": "./dist/setup.js"
24
- },
25
- "./react-native-runtime": {
26
- "types": "./dist/reactNativeRuntime.d.ts",
27
- "import": "./dist/reactNativeRuntime.js",
28
- "default": "./dist/reactNativeRuntime.js"
29
- },
13
+ ".": "./dist/index.js",
14
+ "./reactNativeRuntime": "./dist/reactNativeRuntime.js",
15
+ "./setup": "./dist/setup.js",
30
16
  "./package.json": "./package.json"
31
17
  },
32
18
  "files": [
@@ -40,16 +26,15 @@
40
26
  "build": "tsdown"
41
27
  },
42
28
  "dependencies": {
43
- "@react-native/js-polyfills": "0.84.0",
44
29
  "fast-flow-transform": "0.0.3"
45
30
  },
46
31
  "devDependencies": {
47
- "@types/node": "catalog:tools",
48
- "@types/react": "catalog:react-native",
49
- "react": "catalog:react-native",
50
- "react-native": "catalog:react-native",
51
- "tsdown": "catalog:tools",
52
- "typescript": "catalog:tools",
32
+ "@types/node": "24.10.12",
33
+ "@types/react": "19.2.0",
34
+ "react": "19.2.3",
35
+ "react-native": "0.84.0",
36
+ "tsdown": "0.20.3",
37
+ "typescript": "5.9.3",
53
38
  "vitest": "4.1.3"
54
39
  },
55
40
  "peerDependencies": {
@@ -61,4 +46,4 @@
61
46
  "./dist/reactNativeRuntime.js",
62
47
  "./dist/setup.js"
63
48
  ]
64
- }
49
+ }