Skip to content

Commit cb45e9c

Browse files
committed
feat: add Horizon OS and Vega OS compatibility info
1 parent 5bd5eec commit cb45e9c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export type PackageData = {
1717
fireos?: boolean;
1818
tvos?: boolean;
1919
visionos?: boolean;
20+
horizon?: boolean;
21+
vegaos?: boolean | string;
2022
unmaintained?: boolean;
2123
dev?: boolean;
2224
template?: boolean;

src/utils.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export const VALID_KEYWORDS_MAP = {
4040
ios: 'ios',
4141
macos: 'macos',
4242
fireos: 'fireos',
43+
horizon: 'horizon',
4344
tvos: 'tvos',
4445
visionos: 'visionos',
46+
vegaos: 'vegaos',
4547
web: 'web',
4648
windows: 'windows',
4749
hasexample: 'hasExample',
@@ -134,11 +136,21 @@ export function getPlatformsList(item: PackageData): string[] {
134136
}
135137

136138
export function getCompatibilityList(item: PackageData): string[] {
137-
return [item.expoGo ? 'Expo Go' : null, item.fireos ? 'FireOS' : null].filter((entry) => entry !== null);
139+
return [
140+
item.expoGo ? 'Expo Go' : null,
141+
item.fireos ? 'FireOS' : null,
142+
item.horizon ? 'Meta Horizon OS' : null,
143+
item.vegaos ? 'Vega OS' : null
144+
].filter((entry) => entry !== null);
138145
}
139146

140147
export function formatAsSearchParams(list: string[]) {
141-
return list.map((entry) => `:${entry.replace(' ', '')}`);
148+
return list.map((entry) => {
149+
if (entry === 'Meta Horizon OS') {
150+
return ':horizon';
151+
}
152+
return `:${entry.replaceAll(' ', '')}`;
153+
});
142154
}
143155

144156
export function deduplicateSearchTokens(query: string, tokens: string[]) {

0 commit comments

Comments
 (0)