Skip to content

Commit 66d30ef

Browse files
authored
preload and cache fonts, bump dependencies (#2148)
1 parent 5c0dc7d commit 66d30ef

File tree

8 files changed

+67
-39
lines changed

8 files changed

+67
-39
lines changed

.oxfmtrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"experimentalSortImports": {
2424
"groups": [
2525
["side-effect"],
26-
["builtin"],
27-
["external", "external-type"],
26+
["builtin", "external", "external-type"],
2827
["internal", "internal-type"],
2928
["parent", "parent-type"],
3029
["sibling", "sibling-type"],

bun.lock

Lines changed: 32 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export default withPlugins([withExpo, withImages, withFonts, withBundleAnalyzer]
4949
{ key: 'Access-Control-Allow-Methods', value: 'GET,HEAD' },
5050
],
5151
},
52+
{
53+
source: '/fonts/:path*',
54+
headers: [{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' }],
55+
},
5256
];
5357
},
5458
} satisfies NextConfig);

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@
2626
"@radix-ui/react-tooltip": "^1.2.8",
2727
"@react-native-async-storage/async-storage": "^2.2.0",
2828
"@react-native-picker/picker": "^2.11.4",
29-
"@sentry/react": "^10.35.0",
29+
"@sentry/react": "^10.36.0",
3030
"@visx/gradient": "^3.12.0",
3131
"@visx/responsive": "^3.12.0",
3232
"@visx/xychart": "^3.12.0",
3333
"crypto-js": "^4.2.0",
3434
"es-toolkit": "^1.44.0",
35-
"expo": "54.0.31",
35+
"expo": "54.0.32",
3636
"expo-font": "^14.0.11",
3737
"next": "^16.1.4",
3838
"node-emoji": "^2.2.0",
3939
"postcss": "^8.5.6",
4040
"react": "19.2.3",
41-
"react-content-loader": "^7.1.1",
41+
"react-content-loader": "^7.1.2",
4242
"react-dom": "19.2.3",
4343
"react-easy-linkify": "^1.0.8",
4444
"react-native": "0.83.1",
@@ -65,7 +65,7 @@
6565
"@vercel/blob": "^0.27.3",
6666
"ajv-cli": "^5.0.0",
6767
"browserslist": "^4.28.1",
68-
"cheerio": "^1.1.2",
68+
"cheerio": "^1.2.0",
6969
"dotenv": "^17.2.3",
7070
"lint-staged": "^16.2.7",
7171
"next-compose-plugins": "^2.2.1",

pages/_document.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,28 @@ function DirectoryWebsite() {
2626
<meta property="og:type" content="website" />
2727
<meta property="og:url" content="https://reactnative.directory" />
2828

29+
<link
30+
rel="preload"
31+
href="/fonts/Optimistic-Display-Regular.woff2"
32+
as="font"
33+
type="font/woff2"
34+
crossOrigin="anonymous"
35+
/>
36+
<link
37+
rel="preload"
38+
href="/fonts/Optimistic-Display-Light.woff2"
39+
as="font"
40+
type="font/woff2"
41+
crossOrigin="anonymous"
42+
/>
43+
<link
44+
rel="preload"
45+
href="/fonts/Optimistic-Display-Bold.woff2"
46+
as="font"
47+
type="font/woff2"
48+
crossOrigin="anonymous"
49+
/>
50+
2951
<StructuredData
3052
data={{
3153
'@context': 'https://schema.org',

pages/packages.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { type ParsedUrlQuery } from 'node:querystring';
2-
31
import { type NextPageContext } from 'next';
42
import { useRouter } from 'next/router';
3+
import { type ParsedUrlQuery } from 'node:querystring';
54

65
import ContentContainer from '~/components/ContentContainer';
76
import Libraries from '~/components/Libraries';

scripts/build-and-score-data.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import fs from 'node:fs';
2-
import path from 'node:path';
3-
41
import { BlobAccessError, list, put } from '@vercel/blob';
52
import { fetch } from 'bun';
63
import { chunk } from 'es-toolkit';
4+
import fs from 'node:fs';
5+
import path from 'node:path';
76

87
import debugGithubRepos from '~/debug-github-repos.json';
98
import githubRepos from '~/react-native-libraries.json';

scripts/cleanup-libraries-json.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { identity, omit, pickBy } from 'es-toolkit';
12
import fs from 'node:fs';
23
import path from 'node:path';
34

4-
import { identity, omit, pickBy } from 'es-toolkit';
5-
65
import libraries from '~/react-native-libraries.json';
76
import { type LibraryDataEntryType } from '~/types';
87
import { VALID_ENTRY_KEYS } from '~/util/Constants';

0 commit comments

Comments
 (0)