Skip to content

Commit 9101a49

Browse files
committed
Merge branch 'dev' into shadcn-get-eth
2 parents 6db7dd1 + 3bc62ca commit 9101a49

File tree

98 files changed

+2982
-1415
lines changed

Some content is hidden

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

98 files changed

+2982
-1415
lines changed

.all-contributorsrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12371,6 +12371,24 @@
1237112371
"contributions": [
1237212372
"content"
1237312373
]
12374+
},
12375+
{
12376+
"login": "Baystef",
12377+
"name": "Adebayo Steve",
12378+
"avatar_url": "https://avatars.githubusercontent.com/u/36106823?v=4",
12379+
"profile": "https://github.com/Baystef",
12380+
"contributions": [
12381+
"code"
12382+
]
12383+
},
12384+
{
12385+
"login": "sanjanaynvsdl",
12386+
"name": "Sanjana",
12387+
"avatar_url": "https://avatars.githubusercontent.com/u/142678317?v=4",
12388+
"profile": "https://github.com/sanjanaynvsdl",
12389+
"contributions": [
12390+
"bug"
12391+
]
1237412392
}
1237512393
],
1237612394
"contributorsPerLine": 7,

.env.example

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ BUILD_LOCALES=
3333

3434
# If resource constraints are being hit during builds, change LIMIT_CPUS to a
3535
# fixed number of CPUs (e.g. 2) to limit the demand during build time
36-
LIMIT_CPUS=
36+
LIMIT_CPUS=
37+
38+
# Sentry auth token required for error tracking
39+
SENTRY_AUTH_TOKEN=
40+
NEXT_PUBLIC_SENTRY_DSN=
41+
42+
# Enables the bundle analyzer
43+
ANALYZE=false

.storybook/i18next.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const ns = [
2121
"page-upgrades",
2222
"page-developers-index",
2323
"page-what-is-ethereum",
24+
"page-upgrades-index",
2425
] as const
2526
const supportedLngs = Object.keys(baseLocales)
2627

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ yarn dev
9696
- Pro Tip:
9797
- Explore scripts within `package.json` for more build options
9898
- Get **faster** production builds by building only one language. E.g. in your `.env` file, set `BUILD_LOCALES=en` to build the content only in English
99+
- To build the site in other selected languages too, you need to set them in `BUILD_LOCALES`, eg: `BUILD_LOCALES=en,es` if you also want to build only English (required) and Spanish.
100+
- To build all languages, simply comment this line out with a hash mark, eg: `# BUILD_LOCALES=`
99101

100102
By default the script will build all the languages (complete list in `i18n.config.json`).
101103

@@ -1890,6 +1892,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
18901892
<td align="center" valign="top" width="14.28%"><a href="https://github.com/0xV4L3NT1N3"><img src="https://avatars.githubusercontent.com/u/33112835?v=4?s=100" width="100px;" alt="0xV4L3NT1N3"/><br /><sub><b>0xV4L3NT1N3</b></sub></a><br /><a href="#tool-0xV4L3NT1N3" title="Tools">🔧</a></td>
18911893
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JoshDavisLight"><img src="https://avatars.githubusercontent.com/u/82784104?v=4?s=100" width="100px;" alt="Josh Davis"/><br /><sub><b>Josh Davis</b></sub></a><br /><a href="#content-JoshDavisLight" title="Content">🖋</a></td>
18921894
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tr1sm0s1n"><img src="https://avatars.githubusercontent.com/u/47410557?v=4?s=100" width="100px;" alt="Mobin Mohanan"/><br /><sub><b>Mobin Mohanan</b></sub></a><br /><a href="#content-tr1sm0s1n" title="Content">🖋</a></td>
1895+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Baystef"><img src="https://avatars.githubusercontent.com/u/36106823?v=4?s=100" width="100px;" alt="Adebayo Steve"/><br /><sub><b>Adebayo Steve</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Baystef" title="Code">💻</a></td>
1896+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sanjanaynvsdl"><img src="https://avatars.githubusercontent.com/u/142678317?v=4?s=100" width="100px;" alt="Sanjana"/><br /><sub><b>Sanjana</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Asanjanaynvsdl" title="Bug reports">🐛</a></td>
18931897
</tr>
18941898
</tbody>
18951899
</table>

instrumentation.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as Sentry from "@sentry/nextjs"
2+
3+
export async function register() {
4+
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN
5+
6+
if (!dsn) {
7+
console.warn("Sentry DSN not found, skipping")
8+
return
9+
}
10+
11+
const commonSentryOptions = {
12+
dsn,
13+
enabled: process.env.NODE_ENV === "production",
14+
tracesSampleRate: 1.0,
15+
}
16+
17+
if (process.env.NEXT_RUNTIME === "nodejs") {
18+
Sentry.init({
19+
...commonSentryOptions,
20+
})
21+
}
22+
23+
if (process.env.NEXT_RUNTIME === "edge") {
24+
Sentry.init({
25+
...commonSentryOptions,
26+
})
27+
}
28+
}

next.config.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants")
3+
const { withSentryConfig } = require("@sentry/nextjs")
4+
5+
const withBundleAnalyzer = require("@next/bundle-analyzer")({
6+
enabled: process.env.ANALYZE === "true",
7+
})
38

49
const { i18n } = require("./next-i18next.config")
510

@@ -22,7 +27,7 @@ module.exports = (phase, { defaultConfig }) => {
2227
let nextConfig = {
2328
...defaultConfig,
2429
reactStrictMode: true,
25-
webpack: (config) => {
30+
webpack: (config, { webpack }) => {
2631
config.module.rules.push({
2732
test: /\.ya?ml$/,
2833
use: "yaml-loader",
@@ -53,13 +58,30 @@ module.exports = (phase, { defaultConfig }) => {
5358
// Modify the file loader rule to ignore *.svg, since we have it handled now.
5459
fileLoaderRule.exclude = /\.svg$/i
5560

61+
// Tree shake Sentry debug code
62+
// ref. https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/tree-shaking/#tree-shaking-with-nextjs
63+
config.plugins.push(
64+
new webpack.DefinePlugin({
65+
__SENTRY_DEBUG__: false,
66+
__RRWEB_EXCLUDE_IFRAME__: true,
67+
__RRWEB_EXCLUDE_SHADOW_DOM__: true,
68+
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,
69+
})
70+
)
71+
5672
return config
5773
},
5874
i18n,
5975
trailingSlash: true,
6076
images: {
6177
deviceSizes: [640, 750, 828, 1080, 1200, 1504, 1920],
6278
},
79+
env: {
80+
NEXT_PUBLIC_CONTEXT: process.env.CONTEXT,
81+
},
82+
experimental: {
83+
instrumentationHook: true,
84+
},
6385
}
6486

6587
if (phase !== PHASE_DEVELOPMENT_SERVER) {
@@ -88,5 +110,15 @@ module.exports = (phase, { defaultConfig }) => {
88110
}
89111
}
90112

91-
return nextConfig
113+
return withBundleAnalyzer(
114+
withSentryConfig(nextConfig, {
115+
// TODO: temp config, update this to the correct org & project
116+
org: "ethereumorg-ow",
117+
project: "javascript-nextjs",
118+
authToken: process.env.SENTRY_AUTH_TOKEN,
119+
release: `${process.env.BUILD_ID}_${process.env.REVIEW_ID}`,
120+
disableLogger: true,
121+
silent: true,
122+
})
123+
)
92124
}

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "8.8.0",
3+
"version": "8.9.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {
@@ -34,13 +34,16 @@
3434
"@emotion/react": "^11.11.1",
3535
"@emotion/styled": "^11.11.0",
3636
"@hookform/resolvers": "^3.8.0",
37+
"@next/bundle-analyzer": "^14.2.5",
3738
"@radix-ui/react-accordion": "^1.2.0",
3839
"@radix-ui/react-checkbox": "^1.1.1",
40+
"@radix-ui/react-dialog": "^1.1.1",
3941
"@radix-ui/react-navigation-menu": "^1.2.0",
4042
"@radix-ui/react-popover": "^1.1.1",
4143
"@radix-ui/react-radio-group": "^1.2.0",
4244
"@radix-ui/react-slot": "^1.1.0",
4345
"@radix-ui/react-visually-hidden": "^1.1.0",
46+
"@sentry/nextjs": "^8.19.0",
4447
"@socialgouv/matomo-next": "^1.8.0",
4548
"chart.js": "^4.4.2",
4649
"chartjs-plugin-datalabels": "^2.2.0",
@@ -76,6 +79,7 @@
7679
"remark-gfm": "^3.0.1",
7780
"tailwind-merge": "^2.3.0",
7881
"tailwindcss-animate": "^1.0.7",
82+
"usehooks-ts": "^3.1.0",
7983
"yaml-loader": "^0.8.0"
8084
},
8185
"devDependencies": {
@@ -124,11 +128,10 @@
124128
"tsconfig-paths-webpack-plugin": "4.1.0",
125129
"typescript": "^5.5.2",
126130
"unified": "^10.0.0",
127-
"unist-util-visit": "^5.0.0",
128-
"usehooks-ts": "^3.1.0"
131+
"unist-util-visit": "^5.0.0"
129132
},
130133
"resolutions": {
131134
"jackspeak": "2.1.1",
132135
"sharp": "0.32.6"
133136
}
134-
}
137+
}

public/content/developers/docs/apis/json-rpc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ An internal API is also used for inter-client communication within a node - that
2626

2727
## Execution client spec {#spec}
2828

29-
[Read the full JSON-RPC API spec on GitHub](https://github.com/ethereum/execution-apis).
29+
[Read the full JSON-RPC API spec on GitHub](https://github.com/ethereum/execution-apis). This API is documented on the [Execution API webpage](https://ethereum.github.io/execution-apis/api-documentation/) and includes an Inspector to try out all the available methods.
3030

3131
## Conventions {#conventions}
3232

0 commit comments

Comments
 (0)