@ankhorage/zora 25.8.1 → 25.8.2
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 +6 -0
- package/README.md +1 -1
- package/package.json +4 -2
- package/src/nativePeerContract.test.ts +53 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/zora
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "25.8.
|
|
4
|
+
"version": "25.8.2",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@react-native-vector-icons/fontawesome5": "^13.1.3",
|
|
31
31
|
"@react-native-vector-icons/fontawesome6": "^13.1.4",
|
|
32
32
|
"@react-native-vector-icons/ionicons": "^13.1.3",
|
|
33
|
+
"@react-native-vector-icons/material-design-icons": "^13.1.3",
|
|
33
34
|
"react": "19.2.3",
|
|
34
35
|
"react-native": "0.86.x",
|
|
35
36
|
"react-native-gesture-handler": "~2.32.0",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"@ankhorage/grid-view": "^0.5.0",
|
|
49
50
|
"@ankhorage/reader": "^0.1.0",
|
|
50
51
|
"@ankhorage/runtime": "^4.1.1",
|
|
51
|
-
"@ankhorage/surface": "^9.4.
|
|
52
|
+
"@ankhorage/surface": "^9.4.5",
|
|
52
53
|
"@ankhorage/utility": "^1.9.85",
|
|
53
54
|
"chess.js": "^1.4.0",
|
|
54
55
|
"expo-document-picker": "~57.0.3",
|
|
@@ -139,6 +140,7 @@
|
|
|
139
140
|
"@react-native-vector-icons/fontawesome5": "^13.1.4",
|
|
140
141
|
"@react-native-vector-icons/fontawesome6": "^13.1.4",
|
|
141
142
|
"@react-native-vector-icons/ionicons": "^13.1.4",
|
|
143
|
+
"@react-native-vector-icons/material-design-icons": "^13.1.4",
|
|
142
144
|
"@types/bun": "^1.4.2",
|
|
143
145
|
"@types/node": "^26.6.5",
|
|
144
146
|
"@types/react": "^19.3.0",
|
|
@@ -2,6 +2,22 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
|
|
3
3
|
import { expect, test } from 'bun:test';
|
|
4
4
|
|
|
5
|
+
const EXPO_57_NATIVE_PEER_VERSIONS = {
|
|
6
|
+
'@react-native-vector-icons/fontawesome': '13.1.4',
|
|
7
|
+
'@react-native-vector-icons/fontawesome5': '13.1.4',
|
|
8
|
+
'@react-native-vector-icons/fontawesome6': '13.1.4',
|
|
9
|
+
'@react-native-vector-icons/ionicons': '13.1.4',
|
|
10
|
+
'@react-native-vector-icons/material-design-icons': '13.1.4',
|
|
11
|
+
react: '19.2.3',
|
|
12
|
+
'react-native': '0.86.3',
|
|
13
|
+
'react-native-gesture-handler': '2.32.0',
|
|
14
|
+
'react-native-reanimated': '4.5.1',
|
|
15
|
+
'react-native-safe-area-context': '5.7.0',
|
|
16
|
+
'react-native-svg': '15.15.4',
|
|
17
|
+
'react-native-web': '0.21.3',
|
|
18
|
+
'react-native-worklets': '0.10.1',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
5
21
|
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
6
22
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
7
23
|
}
|
|
@@ -20,3 +36,40 @@ test('root-entry native imports expose only required portable peers', async () =
|
|
|
20
36
|
expect(isRecord(peerDependencies) && peerDependencies['expo-font']).toBeUndefined();
|
|
21
37
|
expect(isRecord(peerDependencies) && peerDependencies['@expo/vector-icons']).toBeUndefined();
|
|
22
38
|
});
|
|
39
|
+
|
|
40
|
+
test('declares a jointly satisfiable Expo 57 native peer contract with Surface', async () => {
|
|
41
|
+
const packageJson = JSON.parse(
|
|
42
|
+
await readFile(new URL('../package.json', import.meta.url), 'utf8'),
|
|
43
|
+
) as unknown;
|
|
44
|
+
if (!isRecord(packageJson)) throw new Error('Expected package.json to contain an object.');
|
|
45
|
+
|
|
46
|
+
const { dependencies, peerDependencies } = packageJson;
|
|
47
|
+
if (!isRecord(dependencies) || !isRecord(peerDependencies)) {
|
|
48
|
+
throw new Error('Expected package.json dependency sections to contain objects.');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
expect(dependencies['@ankhorage/surface']).toBe('^9.4.5');
|
|
52
|
+
|
|
53
|
+
const surfacePackageJson = JSON.parse(
|
|
54
|
+
await readFile(
|
|
55
|
+
new URL('../node_modules/@ankhorage/surface/package.json', import.meta.url),
|
|
56
|
+
'utf8',
|
|
57
|
+
),
|
|
58
|
+
) as unknown;
|
|
59
|
+
if (!isRecord(surfacePackageJson) || !isRecord(surfacePackageJson.peerDependencies)) {
|
|
60
|
+
throw new Error('Expected Surface to expose peer dependencies.');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const zoraPeers = new Map(Object.entries(peerDependencies));
|
|
64
|
+
const surfacePeers = new Map(Object.entries(surfacePackageJson.peerDependencies));
|
|
65
|
+
|
|
66
|
+
for (const [name, version] of Object.entries(EXPO_57_NATIVE_PEER_VERSIONS)) {
|
|
67
|
+
const zoraRange = zoraPeers.get(name);
|
|
68
|
+
const surfaceRange = surfacePeers.get(name);
|
|
69
|
+
|
|
70
|
+
expect(typeof zoraRange).toBe('string');
|
|
71
|
+
expect(typeof surfaceRange).toBe('string');
|
|
72
|
+
expect(Bun.semver.satisfies(version, zoraRange as string)).toBe(true);
|
|
73
|
+
expect(Bun.semver.satisfies(version, surfaceRange as string)).toBe(true);
|
|
74
|
+
}
|
|
75
|
+
});
|