@ankhorage/zora 0.16.0 → 0.16.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 +13 -0
- package/package.json +3 -2
- package/src/showcaseCoverage.test.ts +114 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f47005a: Refresh Expo showcase coverage and add a policy test for app-facing ZORA imports.
|
|
8
|
+
- 5765554: Add the standard package tooling baseline script and workflow files.
|
|
9
|
+
|
|
10
|
+
## 0.16.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0d09c8f: Update SURFACE
|
|
15
|
+
|
|
3
16
|
## 0.16.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.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": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@ankhorage/surface": "^0.2.
|
|
46
|
+
"@ankhorage/surface": "^0.2.3",
|
|
47
47
|
"culori": "^4.0.2"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"lint": "eslint . --max-warnings=0",
|
|
76
76
|
"lint:fix": "eslint . --fix --max-warnings=0",
|
|
77
77
|
"format": "prettier --write .",
|
|
78
|
+
"format:check": "prettier --check .",
|
|
78
79
|
"prepack": "bun run build",
|
|
79
80
|
"test": "bun test src",
|
|
80
81
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { describe, expect, test } from 'bun:test';
|
|
5
|
+
|
|
6
|
+
const SHOWCASE_ROOT = join(process.cwd(), 'examples', 'expo-showcase');
|
|
7
|
+
|
|
8
|
+
const REQUIRED_SHOWCASE_COVERAGE = {
|
|
9
|
+
components: [
|
|
10
|
+
'Badge',
|
|
11
|
+
'Button',
|
|
12
|
+
'Card',
|
|
13
|
+
'Checkbox',
|
|
14
|
+
'CheckboxGroup',
|
|
15
|
+
'Drawer',
|
|
16
|
+
'Form',
|
|
17
|
+
'FormActions',
|
|
18
|
+
'FormError',
|
|
19
|
+
'FormField',
|
|
20
|
+
'Heading',
|
|
21
|
+
'Icon',
|
|
22
|
+
'IconButton',
|
|
23
|
+
'Input',
|
|
24
|
+
'Modal',
|
|
25
|
+
'Radio',
|
|
26
|
+
'RadioGroup',
|
|
27
|
+
'Select',
|
|
28
|
+
'Tabs',
|
|
29
|
+
'Text',
|
|
30
|
+
'Textarea',
|
|
31
|
+
'Toolbar',
|
|
32
|
+
'ToolbarAction',
|
|
33
|
+
],
|
|
34
|
+
foundation: [
|
|
35
|
+
'Box',
|
|
36
|
+
'Center',
|
|
37
|
+
'Container',
|
|
38
|
+
'Divider',
|
|
39
|
+
'Grid',
|
|
40
|
+
'Inline',
|
|
41
|
+
'Show',
|
|
42
|
+
'Spacer',
|
|
43
|
+
'Stack',
|
|
44
|
+
'Surface',
|
|
45
|
+
],
|
|
46
|
+
layouts: [
|
|
47
|
+
'AppShell',
|
|
48
|
+
'AuthLayout',
|
|
49
|
+
'Page',
|
|
50
|
+
'PageHeader',
|
|
51
|
+
'PageSection',
|
|
52
|
+
'SettingsLayout',
|
|
53
|
+
'SidebarLayout',
|
|
54
|
+
'TopbarLayout',
|
|
55
|
+
],
|
|
56
|
+
patterns: [
|
|
57
|
+
'ForgotPasswordForm',
|
|
58
|
+
'OtpForm',
|
|
59
|
+
'SignInForm',
|
|
60
|
+
'SignUpForm',
|
|
61
|
+
'CollectionEditor',
|
|
62
|
+
'ConfirmDialog',
|
|
63
|
+
'DisclosureSection',
|
|
64
|
+
'EmptyState',
|
|
65
|
+
'InspectorField',
|
|
66
|
+
'Notice',
|
|
67
|
+
'Panel',
|
|
68
|
+
'ResponsivePanel',
|
|
69
|
+
'SectionHeader',
|
|
70
|
+
'SettingsRow',
|
|
71
|
+
'SwitchField',
|
|
72
|
+
'ThemeComposer',
|
|
73
|
+
'PaletteItem',
|
|
74
|
+
'TileGrid',
|
|
75
|
+
'TreeItem',
|
|
76
|
+
'TreeView',
|
|
77
|
+
],
|
|
78
|
+
} as const;
|
|
79
|
+
|
|
80
|
+
function listFiles(root: string): string[] {
|
|
81
|
+
return readdirSync(root, { withFileTypes: true }).flatMap((entry) => {
|
|
82
|
+
const absolutePath = join(root, entry.name);
|
|
83
|
+
if (entry.isDirectory()) {
|
|
84
|
+
return listFiles(absolutePath);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return entry.isFile() && /\.[cm]?tsx?$/.test(entry.name) ? [absolutePath] : [];
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function readShowcaseSource(): string {
|
|
92
|
+
return listFiles(SHOWCASE_ROOT)
|
|
93
|
+
.map((filePath) => readFileSync(filePath, 'utf8'))
|
|
94
|
+
.join('\n');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
describe('expo showcase coverage policy', () => {
|
|
98
|
+
test('does not import Surface directly from the showcase app', () => {
|
|
99
|
+
for (const filePath of listFiles(SHOWCASE_ROOT)) {
|
|
100
|
+
const source = readFileSync(filePath, 'utf8');
|
|
101
|
+
expect(source).not.toContain("from '@ankhorage/surface'");
|
|
102
|
+
expect(source).not.toContain('from "@ankhorage/surface"');
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test('documents public ZORA API coverage in the showcase source', () => {
|
|
107
|
+
const source = readShowcaseSource();
|
|
108
|
+
const requiredNames = Object.values(REQUIRED_SHOWCASE_COVERAGE).flat();
|
|
109
|
+
|
|
110
|
+
for (const requiredName of requiredNames) {
|
|
111
|
+
expect(source).toContain(requiredName);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|