@ankhorage/zora 21.0.19 → 21.0.20

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 21.0.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 66948c6: Update Ankhorage dependencies: `@ankhorage/utility`.
8
+
3
9
  ## 21.0.19
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/zora
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v21.0.19](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v21.0.20](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
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.19",
4
+ "version": "21.0.20",
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": {
@@ -43,7 +43,7 @@
43
43
  "@ankhorage/color-theory": "^0.3.1",
44
44
  "@ankhorage/contracts": "^22.8.1",
45
45
  "@ankhorage/surface": "^9.1.5",
46
- "@ankhorage/utility": "^1.6.0",
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(CARET_SEMVER_RANGE);
68
- expect(readValue(dependencies, '@ankhorage/contracts')).toMatch(CARET_SEMVER_RANGE);
69
- expect(peers.react).toMatch(EXACT_SEMVER_VERSION);
70
- expect(readValue(peers, 'react-native')).toMatch(MINOR_WILDCARD_SEMVER_RANGE);
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(TILDE_SEMVER_RANGE);
74
- expect(readValue(peers, 'react-native-gesture-handler')).toMatch(TILDE_SEMVER_RANGE);
75
- expect(readValue(peers, 'react-native-reanimated')).toMatch(EXACT_SEMVER_VERSION);
76
- expect(readValue(peers, 'react-native-worklets')).toMatch(EXACT_SEMVER_VERSION);
77
- expect(development.typescript).toMatch(TILDE_SEMVER_RANGE);
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(CARET_SEMVER_RANGE);
113
- expect(expoVersion).toMatch(EXACT_SEMVER_VERSION);
114
- expect(dependencies.react).toMatch(EXACT_SEMVER_VERSION);
115
- expect(readValue(dependencies, 'react-native')).toMatch(EXACT_SEMVER_VERSION);
116
- expect(readValue(dependencies, 'react-native-gesture-handler')).toMatch(TILDE_SEMVER_RANGE);
117
- expect(readValue(dependencies, 'react-native-reanimated')).toMatch(EXACT_SEMVER_VERSION);
118
- expect(readValue(dependencies, 'react-native-worklets')).toMatch(EXACT_SEMVER_VERSION);
119
- expect(readValue(dependencies, 'react-native-web')).toMatch(TILDE_SEMVER_RANGE);
120
- expect(development.typescript).toMatch(TILDE_SEMVER_RANGE);
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(CARET_SEMVER_RANGE);
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(TILDE_SEMVER_RANGE);
171
- expect(readValue(dependencies, 'react-native-reanimated')).toMatch(EXACT_SEMVER_VERSION);
172
- expect(readValue(dependencies, 'react-native-worklets')).toMatch(EXACT_SEMVER_VERSION);
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(/^\^\d+\.\d+\.\d+$/u);
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',