@ankhorage/zora 21.0.19 → 21.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 +12 -0
- package/README.md +1 -1
- package/package.json +4 -4
- package/src/expo57Migration.test.ts +27 -26
- package/src/features/bottom-sheet/public.test.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 21.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8f976a0: Update Ankhorage dependencies: `@ankhorage/contracts`, `@ankhorage/surface`.
|
|
8
|
+
|
|
9
|
+
## 21.0.20
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 66948c6: Update Ankhorage dependencies: `@ankhorage/utility`.
|
|
14
|
+
|
|
3
15
|
## 21.0.19
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
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": "21.0.
|
|
4
|
+
"version": "21.0.21",
|
|
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": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@ankhorage/color-theory": "^0.3.1",
|
|
44
|
-
"@ankhorage/contracts": "^22.8.
|
|
45
|
-
"@ankhorage/surface": "^9.1.
|
|
46
|
-
"@ankhorage/utility": "^1.
|
|
44
|
+
"@ankhorage/contracts": "^22.8.2",
|
|
45
|
+
"@ankhorage/surface": "^9.1.6",
|
|
46
|
+
"@ankhorage/utility": "^1.8.0",
|
|
47
47
|
"expo-document-picker": "~57.0.1",
|
|
48
48
|
"expo-image-picker": "~57.0.16"
|
|
49
49
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
|
|
4
|
+
import { SEMVER_PATTERNS } from '@ankhorage/utility/semver';
|
|
4
5
|
import { describe, expect, test } from 'bun:test';
|
|
5
6
|
|
|
6
7
|
const ROOT = process.cwd();
|
|
@@ -28,10 +29,6 @@ const RNVI_PLUGINS = [
|
|
|
28
29
|
'@react-native-vector-icons/fontawesome6',
|
|
29
30
|
'@react-native-vector-icons/ionicons',
|
|
30
31
|
] as const;
|
|
31
|
-
const CARET_SEMVER_RANGE = /^\^\d+\.\d+\.\d+$/u;
|
|
32
|
-
const EXACT_SEMVER_VERSION = /^\d+\.\d+\.\d+$/u;
|
|
33
|
-
const MINOR_WILDCARD_SEMVER_RANGE = /^\d+\.\d+\.x$/u;
|
|
34
|
-
const TILDE_SEMVER_RANGE = /^~\d+\.\d+\.\d+$/u;
|
|
35
32
|
|
|
36
33
|
function readJson(path: string): Record<string, unknown> {
|
|
37
34
|
const value: unknown = JSON.parse(readFileSync(path, 'utf8'));
|
|
@@ -64,17 +61,17 @@ describe('portable ZORA package boundary', () => {
|
|
|
64
61
|
const peers = readRecord(packageJson, 'peerDependencies');
|
|
65
62
|
const development = readRecord(packageJson, 'devDependencies');
|
|
66
63
|
|
|
67
|
-
expect(readValue(dependencies, '@ankhorage/surface')).toMatch(
|
|
68
|
-
expect(readValue(dependencies, '@ankhorage/contracts')).toMatch(
|
|
69
|
-
expect(peers.react).toMatch(
|
|
70
|
-
expect(readValue(peers, 'react-native')).toMatch(
|
|
64
|
+
expect(readValue(dependencies, '@ankhorage/surface')).toMatch(SEMVER_PATTERNS.caret);
|
|
65
|
+
expect(readValue(dependencies, '@ankhorage/contracts')).toMatch(SEMVER_PATTERNS.caret);
|
|
66
|
+
expect(peers.react).toMatch(SEMVER_PATTERNS.exact);
|
|
67
|
+
expect(readValue(peers, 'react-native')).toMatch(SEMVER_PATTERNS.minorWildcard);
|
|
71
68
|
expect(readValue(peers, 'react-native-svg')).toBe('15.15.4');
|
|
72
69
|
expect(readValue(development, 'react-native-svg')).toBe('15.15.4');
|
|
73
|
-
expect(readValue(peers, 'react-native-web')).toMatch(
|
|
74
|
-
expect(readValue(peers, 'react-native-gesture-handler')).toMatch(
|
|
75
|
-
expect(readValue(peers, 'react-native-reanimated')).toMatch(
|
|
76
|
-
expect(readValue(peers, 'react-native-worklets')).toMatch(
|
|
77
|
-
expect(development.typescript).toMatch(
|
|
70
|
+
expect(readValue(peers, 'react-native-web')).toMatch(SEMVER_PATTERNS.tilde);
|
|
71
|
+
expect(readValue(peers, 'react-native-gesture-handler')).toMatch(SEMVER_PATTERNS.tilde);
|
|
72
|
+
expect(readValue(peers, 'react-native-reanimated')).toMatch(SEMVER_PATTERNS.exact);
|
|
73
|
+
expect(readValue(peers, 'react-native-worklets')).toMatch(SEMVER_PATTERNS.exact);
|
|
74
|
+
expect(development.typescript).toMatch(SEMVER_PATTERNS.tilde);
|
|
78
75
|
|
|
79
76
|
for (const expoPackage of ['@expo/vector-icons', 'expo-font', 'expo-linear-gradient']) {
|
|
80
77
|
expect(readValue(peers, expoPackage)).toBeUndefined();
|
|
@@ -109,15 +106,17 @@ describe('Expo 57 example boundary', () => {
|
|
|
109
106
|
const development = readRecord(packageJson, 'devDependencies');
|
|
110
107
|
const expoVersion = readValue(dependencies, 'expo');
|
|
111
108
|
|
|
112
|
-
expect(readValue(dependencies, '@ankhorage/zora')).toMatch(
|
|
113
|
-
expect(expoVersion).toMatch(
|
|
114
|
-
expect(dependencies.react).toMatch(
|
|
115
|
-
expect(readValue(dependencies, 'react-native')).toMatch(
|
|
116
|
-
expect(readValue(dependencies, 'react-native-gesture-handler')).toMatch(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
expect(readValue(dependencies, 'react-native-
|
|
120
|
-
expect(
|
|
109
|
+
expect(readValue(dependencies, '@ankhorage/zora')).toMatch(SEMVER_PATTERNS.caret);
|
|
110
|
+
expect(expoVersion).toMatch(SEMVER_PATTERNS.exact);
|
|
111
|
+
expect(dependencies.react).toMatch(SEMVER_PATTERNS.exact);
|
|
112
|
+
expect(readValue(dependencies, 'react-native')).toMatch(SEMVER_PATTERNS.exact);
|
|
113
|
+
expect(readValue(dependencies, 'react-native-gesture-handler')).toMatch(
|
|
114
|
+
SEMVER_PATTERNS.tilde,
|
|
115
|
+
);
|
|
116
|
+
expect(readValue(dependencies, 'react-native-reanimated')).toMatch(SEMVER_PATTERNS.exact);
|
|
117
|
+
expect(readValue(dependencies, 'react-native-worklets')).toMatch(SEMVER_PATTERNS.exact);
|
|
118
|
+
expect(readValue(dependencies, 'react-native-web')).toMatch(SEMVER_PATTERNS.tilde);
|
|
119
|
+
expect(development.typescript).toMatch(SEMVER_PATTERNS.tilde);
|
|
121
120
|
expect(readValue(dependencies, '@expo/vector-icons')).toBeUndefined();
|
|
122
121
|
|
|
123
122
|
if (typeof expoVersion === 'string') {
|
|
@@ -147,7 +146,7 @@ describe('Expo 57 example boundary', () => {
|
|
|
147
146
|
'utf8',
|
|
148
147
|
);
|
|
149
148
|
|
|
150
|
-
expect(readValue(dependencies, '@ankhorage/navigator')).toMatch(
|
|
149
|
+
expect(readValue(dependencies, '@ankhorage/navigator')).toMatch(SEMVER_PATTERNS.caret);
|
|
151
150
|
expect(layoutSource).toContain("from '@ankhorage/navigator/tabs/native-icons'");
|
|
152
151
|
expect(layoutSource).toContain("from 'expo-router/unstable-native-tabs'");
|
|
153
152
|
expect(layoutSource).toContain("Platform.OS === 'web'");
|
|
@@ -167,9 +166,11 @@ describe('Expo 57 example boundary', () => {
|
|
|
167
166
|
const gestureRootPosition = source.indexOf('<GestureHandlerRootView');
|
|
168
167
|
const zoraProviderPosition = source.indexOf('<ZoraProvider');
|
|
169
168
|
|
|
170
|
-
expect(readValue(dependencies, 'react-native-gesture-handler')).toMatch(
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
expect(readValue(dependencies, 'react-native-gesture-handler')).toMatch(
|
|
170
|
+
SEMVER_PATTERNS.tilde,
|
|
171
|
+
);
|
|
172
|
+
expect(readValue(dependencies, 'react-native-reanimated')).toMatch(SEMVER_PATTERNS.exact);
|
|
173
|
+
expect(readValue(dependencies, 'react-native-worklets')).toMatch(SEMVER_PATTERNS.exact);
|
|
173
174
|
expect(source).toContain("from 'react-native-gesture-handler'");
|
|
174
175
|
expect(gestureRootPosition).toBeGreaterThan(-1);
|
|
175
176
|
expect(zoraProviderPosition).toBeGreaterThan(gestureRootPosition);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SEMVER_PATTERNS } from '@ankhorage/utility/semver';
|
|
1
2
|
import { describe, expect, test } from 'bun:test';
|
|
2
3
|
|
|
3
4
|
describe('ZORA BottomSheet public contract', () => {
|
|
@@ -10,7 +11,7 @@ describe('ZORA BottomSheet public contract', () => {
|
|
|
10
11
|
const source = await Bun.file('src/features/bottom-sheet/public.ts').text();
|
|
11
12
|
|
|
12
13
|
expect(packageJson.exports['./bottom-sheet']).toBeDefined();
|
|
13
|
-
expect(packageJson.dependencies['@ankhorage/surface']).toMatch(
|
|
14
|
+
expect(packageJson.dependencies['@ankhorage/surface']).toMatch(SEMVER_PATTERNS.caret);
|
|
14
15
|
expect(source).toContain("from '@ankhorage/surface/bottom-sheet'");
|
|
15
16
|
for (const name of [
|
|
16
17
|
'BottomSheetFlatList',
|