Skip to content

Commit 722624e

Browse files
authored
Update dependencies + clean up (#922)
* Update dependencies + clean up * Simpler * Tweaks * Fix comment based on AK’s suggestion
1 parent 8ddd5d4 commit 722624e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+426
-738
lines changed

.github/workflows/website-integrity.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,8 @@ jobs:
2323
- name: Set up env
2424
uses: the-guild-org/shared-config/setup@v1
2525

26-
- name: Fetch remote docs
27-
run: cd website && pnpm fetch-remote-docs
28-
29-
- name: Fetch API reference
30-
run: cd website && pnpm fetch-api-reference
31-
32-
- name: Fix pages structure
33-
run: cd website && pnpm fix-pages-structure
26+
- name: Run pre-build scripts
27+
run: pnpm prebuild:ci
3428

3529
- name: Build
3630
run: pnpm build

Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ WORKDIR /app
1818
COPY . ./
1919

2020
RUN pnpm install --frozen-lockfile
21-
RUN cd website && pnpm fetch-remote-docs
22-
RUN cd website && pnpm fetch-api-reference
23-
RUN cd website && pnpm fix-pages-structure
21+
RUN pnpm prebuild:ci
2422
RUN pnpm build
2523

2624
FROM nginx:1.16.0-alpine

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "turbo run dev",
88
"build": "NODE_OPTIONS='--max_old_space_size=8192' turbo run build",
9+
"prebuild:ci": "turbo run prebuild:ci",
910
"check": "pnpm typecheck && pnpm lint && pnpm prettier:check",
1011
"check:fix": "pnpm lint:fix; pnpm prettier",
1112
"lint": "eslint . --ignore-path .gitignore --max-warnings 0",

packages/og-image/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"yoga-wasm-web": "^0.3.3"
1717
},
1818
"devDependencies": {
19-
"@cloudflare/workers-types": "^4.20250430.0",
19+
"@cloudflare/workers-types": "^4.20250502.0",
2020
"@types/react": "^18.3.20",
2121
"jest-image-snapshot": "^6.4.0",
2222
"tsx": "^4.19.4",

pnpm-lock.yaml

+24-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"outputs": ["dist/**"],
1111
"dependsOn": ["^build"]
1212
},
13+
"prebuild:ci": {
14+
"cache": false
15+
},
1316
"typecheck": {
1417
"dependsOn": ["^build"]
1518
},

website/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"predev": "tsup ./src/i18n.ts --format esm",
99
"build": "rm -rf .next && rm -rf out && next build",
1010
"prebuild": "pnpm predev",
11+
"prebuild:ci": "pnpm fetch-remote-docs && pnpm fetch-api-reference && pnpm fix-pages-structure",
1112
"postbuild": "next-sitemap --config next-sitemap.config.mjs && node scripts/sitemap-ci.js",
1213
"typecheck": "tsc",
1314
"fetch-remote-docs": "tsx scripts/fetch-remote-docs.ts",
@@ -19,7 +20,7 @@
1920
"@docsearch/react": "^3.9.0",
2021
"@edgeandnode/common": "^7.0.4",
2122
"@edgeandnode/gds": "^6.5.14",
22-
"@edgeandnode/go": "^9.4.14",
23+
"@edgeandnode/go": "^10.0.2",
2324
"@emotion/react": "^11.14.0",
2425
"@graphprotocol/contracts": "6.2.1",
2526
"@pinax/graph-networks-registry": "^0.6.7",

website/src/HomePage.tsx

+35-39
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { NetworkType } from '@pinax/graph-networks-registry'
2-
import { useData } from 'nextra/hooks'
3-
import type { ComponentPropsWithoutRef } from 'react'
42

5-
import { classNames, ExperimentalLink, Tooltip } from '@edgeandnode/gds'
3+
import { ButtonOrLink, ExperimentalLink, Tooltip } from '@edgeandnode/gds'
64
import {
7-
Clock,
85
Firehose,
96
GraphExplorer,
107
GraphNode,
@@ -17,9 +14,9 @@ import { NetworkIcon } from '@edgeandnode/go'
1714

1815
import { Card, Heading, TimeIcon } from '@/components'
1916
import { useI18n } from '@/i18n'
20-
import { getSupportedNetworks } from '@/supportedNetworks'
17+
import { type SupportedNetwork } from '@/supportedNetworks'
2118

22-
export default function HomePage() {
19+
export default function HomePage({ supportedNetworks }: { supportedNetworks: SupportedNetwork[] }) {
2320
const { t } = useI18n()
2421

2522
return (
@@ -141,7 +138,38 @@ export default function HomePage() {
141138
</ExperimentalLink>,
142139
])}
143140
</p>
144-
<SupportedNetworks className="mt-8" />
141+
<div className="graph-docs-not-markdown mt-8 overflow-clip rounded-8 border border-space-1500">
142+
<ul className="grid grid-cols-auto-fill-16 gap-px text-space-500">
143+
{supportedNetworks
144+
// TODO: Don't filter out testnets that don't have a mainnet
145+
.filter((network) => network.networkType === NetworkType.Mainnet)
146+
// Filter out networks that are either duplicates (same logo, same or similar short name) or irrelevant in this view
147+
.filter(
148+
(network) =>
149+
!network.caip2Id.startsWith('beacon:') &&
150+
!['boba-bnb', 'eos-evm', 'polygon-zkevm', 'solana-accounts'].includes(network.id),
151+
)
152+
// Filter out networks that don't have a proper monochrome logo
153+
.filter((network) => {
154+
return network.id !== 'zora'
155+
})
156+
.map((network) => (
157+
<li key={network.id} className="-mb-px -mr-px">
158+
<Tooltip content={network.shortName}>
159+
<ButtonOrLink
160+
href={`/supported-networks/${network.id}`}
161+
className={`
162+
flex aspect-square items-center justify-center border-b border-r border-space-1500 -outline-offset-1 transition
163+
hover:bg-space-1600
164+
`}
165+
>
166+
<NetworkIcon network={network} size={6} />
167+
</ButtonOrLink>
168+
</Tooltip>
169+
</li>
170+
))}
171+
</ul>
172+
</div>
145173
</section>
146174

147175
<hr />
@@ -247,35 +275,3 @@ export default function HomePage() {
247275
</>
248276
)
249277
}
250-
251-
function SupportedNetworks({ className, ...props }: ComponentPropsWithoutRef<'div'>) {
252-
const { supportedNetworks } = useData() as { supportedNetworks: Awaited<ReturnType<typeof getSupportedNetworks>> }
253-
254-
return (
255-
<div
256-
className={classNames(['graph-docs-not-markdown overflow-clip rounded-8 border border-space-1500', className])}
257-
{...props}
258-
>
259-
<ul className="grid grid-cols-auto-fill-16 gap-px text-space-500">
260-
{supportedNetworks
261-
// TODO: Don't filter out testnets that don't have a mainnet
262-
.filter((network) => network.networkType === NetworkType.Mainnet)
263-
// Filter out networks that are either duplicates (same logo, same or similar short name) or irrelevant in this view
264-
.filter(
265-
(network) =>
266-
!network.caip2Id.startsWith('beacon:') &&
267-
!['boba-bnb', 'eos-evm', 'polygon-zkevm', 'solana-accounts'].includes(network.id),
268-
)
269-
// TODO: Fix Zora mono logo in web3icons
270-
.filter((network) => network.id !== 'zora')
271-
.map((network) => (
272-
<Tooltip key={network.id} content={network.shortName}>
273-
<li className="-mb-px -mr-px flex aspect-square items-center justify-center border-b border-r border-space-1500 transition hover:bg-space-1600">
274-
<NetworkIcon caip2Id={network.caip2Id as any} size={6} />
275-
</li>
276-
</Tooltip>
277-
))}
278-
</ul>
279-
</div>
280-
)
281-
}

website/src/components/Callout.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ export const Callout = ({
4545
className={classNames([
4646
`flex gap-2 rounded-8 border p-4 ps-3
4747
data-[variant=important]:border-solar-500/50
48-
data-[variant=info]:border-astro-500/50
48+
data-[variant=info]:border-galactic-500/50
4949
data-[variant=important]:bg-solar-500/10
50-
data-[variant=info]:bg-astro-500/10
50+
data-[variant=info]:bg-galactic-500/10
5151
--:my-8 --:last:mb-0 -:is-[li>*]:my-4`,
5252
className,
5353
])}
5454
{...(props as ComponentPropsWithoutRef<'div'>)}
5555
>
5656
<div className="flex size-6 shrink-0 items-center justify-center">
5757
{variant === 'info' ? (
58-
<Lightbulb size={4} color="astro-500" alt={!title ? t('global.content.callout.note') : ''} />
58+
<Lightbulb size={4} color="galactic-500" alt={!title ? t('global.content.callout.note') : ''} />
5959
) : (
6060
<ExclamationMark size={4} color="solar-500" alt={!title ? t('global.content.callout.important') : ''} />
6161
)}

website/src/pages/[locale]/[...404].mdx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { translate } from '@edgeandnode/gds'
2-
import { RemoteContent } from 'nextra/components'
32
import { buildDynamicMDX } from 'nextra/remote'
43

54
import { supportedLocales, translations } from '@/i18n'
@@ -22,8 +21,7 @@ hideTableOfContents: true
2221
hideContentHeader: true
2322
hideContentFooter: true
2423
unwrapContent: true
25-
---
26-
<PageNotFound />`
24+
---`
2725
const mdx = await buildDynamicMDX(rawMdx, { codeHighlight: false })
2826
const { pageMap } = await import(`.next/static/chunks/nextra-page-map-${locale}.mjs`)
2927
return {
@@ -34,4 +32,4 @@ unwrapContent: true
3432
}
3533
}
3634

37-
<RemoteContent components={{ PageNotFound }} />
35+
<PageNotFound />

0 commit comments

Comments
 (0)