Skip to content

Commit 20d773e

Browse files
authoredJun 5, 2024··
chore: updated packages, fixed build bugs and migrated packages (#6803)
* chore: updated all available packages * fix: fixed wrong usage of React attributes * chore: use direct package * fix: fixed shiki imports on nextjs 14.2 * chore: updated to sentrz 8.x * chore: downgrade prettier-plugin-tailwindcss due to recently introduced issue * chore: updated prettier and applied new rule * chore: updated turbo * chore: fix governance md change
1 parent 3ccaf03 commit 20d773e

12 files changed

+4564
-3468
lines changed
 

‎.prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"bracketSpacing": true,
99
"bracketSameLine": false,
1010
"arrowParens": "avoid",
11-
"plugins": ["prettier-plugin-tailwindcss"]
11+
"plugins": ["prettier-plugin-tailwindcss"],
12+
"tailwindPreserveWhitespace": true
1213
}

‎GOVERNANCE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Node.js Web Team (@nodejs/web) is a team in the Node.js Project that is composed by a set of subteams. Each containing specific responsibilities and goals.
44

5-
### TSC Oversight
5+
### TSC Oversight
66

77
Any website change that expresses a position about a global event or group of people requires explicit
88
[TSC](https://github.com/nodejs/TSC/blob/main/TSC-Charter.md#section-4-responsibilities-of-the-tsc)

‎components/Icons/Logos/NodejsDarkPride.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const NodejsDarkPride: FC<SVGProps<SVGSVGElement>> = props => (
99
xmlns="http://www.w3.org/2000/svg"
1010
{...props}
1111
>
12-
<g clip-path="url(#clip0_12_17)">
12+
<g clipPath="url(#clip0_12_17)">
1313
<mask
1414
id="mask0_12_17"
1515
style={{ maskType: 'luminance' }}
@@ -35,26 +35,26 @@ const NodejsDarkPride: FC<SVGProps<SVGSVGElement>> = props => (
3535
fill="#5FA04E"
3636
/>
3737
<path
38-
fill-rule="evenodd"
39-
clip-rule="evenodd"
38+
fillRule="evenodd"
39+
clipRule="evenodd"
4040
d="M43.6671 41.9478C43.6671 41.1144 43.2071 40.3275 42.4709 39.9107L23.007 28.5671C22.6849 28.3819 22.3167 28.2893 21.9486 28.2432C21.9026 28.2432 21.7647 28.2432 21.7647 28.2432C21.3965 28.2432 21.0284 28.3819 20.7063 28.5671L1.19636 39.8643C0.46014 40.2811 0 41.0684 0 41.9478L0.046014 72.3209C0.046014 72.7377 0.276084 73.1542 0.644196 73.3394C1.0123 73.5711 1.47245 73.5711 1.79455 73.3394L13.3901 66.6722C14.1263 66.2556 14.5864 65.4685 14.5864 64.6351V50.4208C14.5864 49.5875 15.0465 48.8002 15.7828 48.3837L20.7063 45.5131C21.0744 45.2814 21.4885 45.1888 21.9026 45.1888C22.3167 45.1888 22.7309 45.2814 23.053 45.5131L27.9764 48.3837C28.7126 48.8002 29.1729 49.5875 29.1729 50.4208V64.6351C29.1729 65.4685 29.6331 66.2556 30.3692 66.6722L41.8728 73.3394C42.2408 73.5711 42.7009 73.5711 43.0691 73.3394C43.4373 73.1542 43.6671 72.7377 43.6671 72.3209V41.9478Z"
4141
fill="#333333"
4242
/>
4343
<path
44-
fill-rule="evenodd"
45-
clip-rule="evenodd"
44+
fillRule="evenodd"
45+
clipRule="evenodd"
4646
d="M137.444 0.138901C137.076 -0.0463003 136.616 -0.0463003 136.293 0.138901C135.925 0.370401 135.696 0.740804 135.696 1.15751V31.2526C135.696 31.5304 135.557 31.8081 135.281 31.9936C135.005 32.1324 134.729 32.1324 134.453 31.9936L129.576 29.1691C128.84 28.7526 127.965 28.7526 127.229 29.1691L107.719 40.5127C106.983 40.9295 106.523 41.7165 106.523 42.5498V65.1906C106.523 66.0243 106.983 66.8112 107.719 67.228L127.229 78.5716C127.965 78.9882 128.84 78.9882 129.576 78.5716L149.086 67.228C149.822 66.8112 150.282 66.0243 150.282 65.1906V8.75077C150.282 7.87104 149.822 7.08394 149.086 6.66724L137.444 0.138901ZM135.65 57.7365C135.65 57.9678 135.557 58.153 135.374 58.2457L128.701 62.1351C128.517 62.2277 128.287 62.2277 128.103 62.1351L121.431 58.2457C121.247 58.153 121.155 57.9216 121.155 57.7365V49.9581C121.155 49.7265 121.247 49.5413 121.431 49.4487L128.103 45.5595C128.287 45.4669 128.517 45.4669 128.701 45.5595L135.374 49.4487C135.557 49.5413 135.65 49.7729 135.65 49.9581V57.7365Z"
4747
fill="#333333"
4848
/>
4949
<path
50-
fill-rule="evenodd"
51-
clip-rule="evenodd"
50+
fillRule="evenodd"
51+
clipRule="evenodd"
5252
d="M202.367 49.7725C203.105 49.3557 203.518 48.5688 203.518 47.7352V42.2255C203.518 41.3922 203.059 40.605 202.367 40.1885L182.996 28.8912C182.26 28.4744 181.386 28.4744 180.649 28.8912L161.14 40.2346C160.403 40.6514 159.943 41.4385 159.943 42.2719V64.9128C159.943 65.7461 160.403 66.5333 161.14 66.9498L180.511 78.0619C181.248 78.4786 182.122 78.4786 182.812 78.0619L194.546 71.4875C194.914 71.3023 195.144 70.8855 195.144 70.4686C195.144 70.0521 194.914 69.6354 194.546 69.4501L174.944 58.1064C174.576 57.8751 174.346 57.5048 174.346 57.088V50.0041C174.346 49.5873 174.576 49.1705 174.944 48.9853L181.064 45.4666C181.432 45.2352 181.892 45.2352 182.26 45.4666L188.38 48.9853C188.748 49.217 188.977 49.5873 188.977 50.0041V55.56C188.977 55.9768 189.208 56.3933 189.577 56.5786C189.944 56.8102 190.404 56.8102 190.772 56.5786L202.367 49.7725Z"
5353
fill="#333333"
5454
/>
5555
<path
56-
fill-rule="evenodd"
57-
clip-rule="evenodd"
56+
fillRule="evenodd"
57+
clipRule="evenodd"
5858
d="M181.524 48.7082C181.661 48.6155 181.846 48.6155 181.985 48.7082L185.711 50.8843C185.849 50.9768 185.941 51.1158 185.941 51.301V55.6532C185.941 55.8384 185.849 55.9774 185.711 56.07L181.985 58.2461C181.846 58.3387 181.661 58.3387 181.524 58.2461L177.797 56.07C177.659 55.9774 177.567 55.8384 177.567 55.6532V51.301C177.567 51.1158 177.659 50.9768 177.797 50.8843L181.524 48.7082Z"
5959
fill="#5FA04E"
6060
/>

‎components/Icons/Logos/NodejsLightPride.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const NodejsLightPride: FC<SVGProps<SVGSVGElement>> = props => (
99
xmlns="http://www.w3.org/2000/svg"
1010
{...props}
1111
>
12-
<g clip-path="url(#clip0_12_39)">
12+
<g clipPath="url(#clip0_12_39)">
1313
<mask
1414
id="mask0_12_39"
1515
style={{ maskType: 'luminance' }}
@@ -35,26 +35,26 @@ const NodejsLightPride: FC<SVGProps<SVGSVGElement>> = props => (
3535
fill="#5FA04E"
3636
/>
3737
<path
38-
fill-rule="evenodd"
39-
clip-rule="evenodd"
38+
fillRule="evenodd"
39+
clipRule="evenodd"
4040
d="M43.6671 41.9478C43.6671 41.1144 43.2071 40.3275 42.4709 39.9107L23.007 28.5671C22.6849 28.3819 22.3167 28.2893 21.9486 28.2432C21.9026 28.2432 21.7647 28.2432 21.7647 28.2432C21.3965 28.2432 21.0284 28.3819 20.7063 28.5671L1.19636 39.8643C0.46014 40.2811 0 41.0684 0 41.9478L0.046014 72.3209C0.046014 72.7377 0.276084 73.1542 0.644196 73.3394C1.0123 73.5711 1.47245 73.5711 1.79455 73.3394L13.3901 66.6722C14.1263 66.2556 14.5864 65.4685 14.5864 64.6351V50.4208C14.5864 49.5875 15.0465 48.8002 15.7828 48.3837L20.7063 45.5131C21.0744 45.2814 21.4885 45.1888 21.9026 45.1888C22.3167 45.1888 22.7309 45.2814 23.053 45.5131L27.9764 48.3837C28.7126 48.8002 29.1729 49.5875 29.1729 50.4208V64.6351C29.1729 65.4685 29.6331 66.2556 30.3692 66.6722L41.8728 73.3394C42.2408 73.5711 42.7009 73.5711 43.0691 73.3394C43.4373 73.1542 43.6671 72.7377 43.6671 72.3209V41.9478Z"
4141
fill="white"
4242
/>
4343
<path
44-
fill-rule="evenodd"
45-
clip-rule="evenodd"
44+
fillRule="evenodd"
45+
clipRule="evenodd"
4646
d="M137.444 0.138901C137.076 -0.0463003 136.616 -0.0463003 136.293 0.138901C135.925 0.370401 135.696 0.740804 135.696 1.15751V31.2526C135.696 31.5304 135.557 31.8081 135.281 31.9936C135.005 32.1324 134.729 32.1324 134.453 31.9936L129.576 29.1691C128.84 28.7526 127.965 28.7526 127.229 29.1691L107.719 40.5127C106.983 40.9295 106.523 41.7165 106.523 42.5498V65.1906C106.523 66.0243 106.983 66.8112 107.719 67.228L127.229 78.5716C127.965 78.9882 128.84 78.9882 129.576 78.5716L149.086 67.228C149.822 66.8112 150.282 66.0243 150.282 65.1906V8.75077C150.282 7.87104 149.822 7.08394 149.086 6.66724L137.444 0.138901ZM135.65 57.7365C135.65 57.9678 135.557 58.153 135.374 58.2457L128.701 62.1351C128.517 62.2277 128.287 62.2277 128.103 62.1351L121.431 58.2457C121.247 58.153 121.155 57.9216 121.155 57.7365V49.9581C121.155 49.7265 121.247 49.5413 121.431 49.4487L128.103 45.5595C128.287 45.4669 128.517 45.4669 128.701 45.5595L135.374 49.4487C135.557 49.5413 135.65 49.7729 135.65 49.9581V57.7365Z"
4747
fill="white"
4848
/>
4949
<path
50-
fill-rule="evenodd"
51-
clip-rule="evenodd"
50+
fillRule="evenodd"
51+
clipRule="evenodd"
5252
d="M202.367 49.7725C203.105 49.3557 203.518 48.5688 203.518 47.7352V42.2255C203.518 41.3922 203.059 40.605 202.367 40.1885L182.996 28.8912C182.26 28.4744 181.386 28.4744 180.649 28.8912L161.14 40.2346C160.403 40.6514 159.943 41.4385 159.943 42.2719V64.9128C159.943 65.7461 160.403 66.5333 161.14 66.9498L180.511 78.0619C181.248 78.4786 182.122 78.4786 182.812 78.0619L194.546 71.4875C194.914 71.3023 195.144 70.8855 195.144 70.4686C195.144 70.0521 194.914 69.6354 194.546 69.4501L174.944 58.1064C174.576 57.8751 174.346 57.5048 174.346 57.088V50.0041C174.346 49.5873 174.576 49.1705 174.944 48.9853L181.064 45.4666C181.432 45.2352 181.892 45.2352 182.26 45.4666L188.38 48.9853C188.748 49.217 188.977 49.5873 188.977 50.0041V55.56C188.977 55.9768 189.208 56.3933 189.577 56.5786C189.944 56.8102 190.404 56.8102 190.772 56.5786L202.367 49.7725Z"
5353
fill="white"
5454
/>
5555
<path
56-
fill-rule="evenodd"
57-
clip-rule="evenodd"
56+
fillRule="evenodd"
57+
clipRule="evenodd"
5858
d="M181.524 48.7082C181.661 48.6155 181.846 48.6155 181.985 48.7082L185.711 50.8843C185.849 50.9768 185.941 51.1158 185.941 51.301V55.6532C185.941 55.8384 185.849 55.9774 185.711 56.07L181.985 58.2461C181.846 58.3387 181.661 58.3387 181.524 58.2461L177.797 56.07C177.659 55.9774 177.567 55.8384 177.567 55.6532V51.301C177.567 51.1158 177.659 50.9768 177.797 50.8843L181.524 48.7082Z"
5959
fill="#5FA04E"
6060
/>

‎instrumentation.ts

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { init } from '@sentry/nextjs';
2+
3+
import {
4+
SENTRY_CAPTURE_RATE,
5+
SENTRY_DSN,
6+
SENTRY_ENABLE,
7+
} from '@/sentry.constants.mjs';
8+
9+
export function register() {
10+
if (process.env.NEXT_RUNTIME === 'nodejs') {
11+
init({
12+
// Only run Sentry on Vercel Environment
13+
enabled: SENTRY_ENABLE,
14+
// Provide Sentry's Secret Key
15+
dsn: SENTRY_DSN,
16+
// Percentage of events to send to Sentry (1% of them) (for performance metrics)
17+
tracesSampleRate: SENTRY_CAPTURE_RATE,
18+
});
19+
}
20+
}

‎next.config.mjs

+14-4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ const nextConfig = {
8686
// Tree-shakes modules from Sentry Bundle
8787
config.plugins.push(new webpack.DefinePlugin(SENTRY_EXTENSIONS));
8888

89+
// Ignore Sentry's Critical Dependency from Open Telemetry
90+
// (which is genuinely a cause of concern, but there is no work around at the moment)
91+
config.ignoreWarnings = [
92+
{
93+
module: /@opentelemetry\/instrumentation/,
94+
message: /Critical dependency/,
95+
},
96+
];
97+
8998
return config;
9099
},
91100
experimental: {
@@ -100,9 +109,12 @@ const nextConfig = {
100109
'@radix-ui/react-select',
101110
'@radix-ui/react-toast',
102111
'tailwindcss',
112+
'shiki',
103113
],
104114
// Removes the warning regarding the WebPack Build Worker
105115
webpackBuildWorker: false,
116+
// Enables Next.js's Instrumentation Hook
117+
instrumentationHook: true,
106118
},
107119
};
108120

@@ -139,10 +151,8 @@ const nextWithIntl = withNextIntl('./i18n.tsx')(nextConfig);
139151
const nextWithSentry = withSentryConfig(
140152
// Next.js Config with i18n Configuration
141153
nextWithIntl,
142-
// Default Sentry Settings
143-
sentrySettings,
144-
// Default Sentry Extension Configuration
145-
sentryConfig
154+
// Sentrz SDK and WebPack Settings
155+
{ ...sentrySettings, ...sentryConfig }
146156
);
147157

148158
// Decides whether enabling Sentry or not

‎package-lock.json

+4,478-3,383
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"type": "module",
33
"private": true,
4+
"name": "@nodejs/website",
45
"description": "Nodejs.org Website",
56
"homepage": "https://nodejs.org",
67
"repository": {
@@ -14,9 +15,10 @@
1415
"engines": {
1516
"node": "v20"
1617
},
18+
"packageManager": "npm@10.7.0",
1719
"scripts": {
1820
"scripts:release-post": "cross-env NODE_NO_WARNINGS=1 node scripts/release-post/index.mjs",
19-
"dev": "cross-env NODE_NO_WARNINGS=1 next dev --turbo",
21+
"dev": "cross-env NODE_NO_WARNINGS=1 next dev",
2022
"serve": "npm run dev",
2123
"build": "cross-env NODE_NO_WARNINGS=1 next build",
2224
"start": "cross-env NODE_NO_WARNINGS=1 next start",
@@ -54,28 +56,28 @@
5456
"@radix-ui/react-tabs": "^1.0.4",
5557
"@radix-ui/react-toast": "^1.1.5",
5658
"@savvywombat/tailwindcss-grid-areas": "~4.0.0",
57-
"@sentry/nextjs": "~7.107.0",
59+
"@sentry/nextjs": "~8.7.0",
5860
"@tailwindcss/container-queries": "~0.1.1",
59-
"@types/node": "20.13.0",
61+
"@types/node": "20.14.0",
6062
"@vcarl/remark-headings": "~0.1.0",
61-
"@vercel/analytics": "~1.2.2",
63+
"@vercel/analytics": "~1.3.1",
6264
"@vercel/speed-insights": "~1.0.10",
6365
"autoprefixer": "~10.4.18",
6466
"classnames": "~2.5.1",
6567
"cross-env": "7.0.3",
6668
"dedent": "1.5.3",
6769
"feed": "~4.2.2",
6870
"github-slugger": "~2.0.0",
69-
"glob": "~10.3.12",
71+
"glob": "~10.4.1",
7072
"gray-matter": "~4.0.3",
7173
"husky": "9.0.11",
72-
"lint-staged": "15.2.2",
73-
"next": "~14.1.4",
74-
"next-intl": "~3.10.0",
74+
"lint-staged": "15.2.5",
75+
"next": "~14.2.3",
76+
"next-intl": "~3.14.1",
7577
"next-themes": "~0.3.0",
7678
"postcss": "~8.4.38",
77-
"postcss-calc": "~9.0.1",
78-
"postcss-import": "~16.0.1",
79+
"postcss-calc": "~10.0.0",
80+
"postcss-import": "~16.1.0",
7981
"postcss-mixins": "~10.0.1",
8082
"postcss-simple-vars": "~7.0.1",
8183
"react": "^18.3.1",
@@ -85,30 +87,30 @@
8587
"remark-gfm": "~4.0.0",
8688
"remark-reading-time": "~2.0.1",
8789
"semver": "~7.6.0",
88-
"shiki": "~1.2.0",
90+
"shiki": "~1.6.2",
8991
"tailwindcss": "^3.4.3",
9092
"typescript": "~5.4.2",
9193
"unist-util-visit": "~5.0.0",
9294
"vfile": "~6.0.1",
9395
"vfile-matter": "~5.0.0"
9496
},
9597
"devDependencies": {
96-
"@storybook/addon-controls": "~8.0.9",
97-
"@storybook/addon-interactions": "~8.0.9",
98-
"@storybook/addon-themes": "~8.0.9",
99-
"@storybook/addon-viewport": "~8.0.9",
100-
"@storybook/nextjs": "~8.0.9",
98+
"@storybook/addon-controls": "~8.1.5",
99+
"@storybook/addon-interactions": "~8.1.5",
100+
"@storybook/addon-themes": "~8.1.5",
101+
"@storybook/addon-viewport": "~8.1.5",
102+
"@storybook/nextjs": "~8.1.5",
101103
"@testing-library/jest-dom": "~6.4.5",
102104
"@testing-library/react": "~15.0.7",
103105
"@testing-library/user-event": "~14.5.2",
104106
"@types/jest": "29.5.12",
105107
"@types/react": "^18.3.1",
106108
"@types/react-dom": "^18.3.0",
107109
"@types/semver": "~7.5.8",
108-
"@typescript-eslint/eslint-plugin": "7.5.0",
109-
"@typescript-eslint/parser": "7.5.0",
110+
"@typescript-eslint/eslint-plugin": "7.11.0",
111+
"@typescript-eslint/parser": "7.11.0",
110112
"eslint": "8.57.0",
111-
"eslint-config-next": "~14.1.4",
113+
"eslint-config-next": "~14.2.3",
112114
"eslint-config-prettier": "9.1.0",
113115
"eslint-plugin-mdx": "3.1.5",
114116
"eslint-plugin-no-relative-import-paths": "^1.5.3",
@@ -117,16 +119,16 @@
117119
"jest": "29.7.0",
118120
"jest-environment-jsdom": "29.7.0",
119121
"jest-junit": "16.0.0",
120-
"prettier": "3.2.5",
121-
"prettier-plugin-tailwindcss": "0.5.14",
122+
"prettier": "3.3.0",
123+
"prettier-plugin-tailwindcss": "0.6.1",
122124
"remark-frontmatter": "5.0.0",
123125
"remark-preset-lint-node": "5.0.2",
124-
"storybook": "~8.0.9",
125-
"stylelint": "16.3.1",
126+
"storybook": "~8.1.5",
127+
"stylelint": "16.6.1",
126128
"stylelint-config-standard": "36.0.0",
127129
"stylelint-order": "6.0.4",
128130
"stylelint-selector-bem-pattern": "4.0.0",
129-
"turbo": "1.13.2",
131+
"turbo": "2.0.1",
130132
"user-agent-data-types": "0.4.2"
131133
}
132134
}

‎sentry.edge.config.ts

-16
This file was deleted.

‎sentry.server.config.ts

-16
This file was deleted.

‎turbo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://turbo.build/schema.json",
33
"globalEnv": ["NODE_ENV"],
4-
"pipeline": {
4+
"tasks": {
55
"dev": {
66
"cache": false,
77
"persistent": true,

‎util/getHighlighter.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { getHighlighterCore } from 'shiki/core';
2-
import type { HighlighterCore } from 'shiki/core';
3-
import getWasm from 'shiki/wasm';
1+
import { getHighlighterCore } from '@shikijs/core';
2+
import type { HighlighterCore } from '@shikijs/core';
3+
import { getWasmInstance } from '@shikijs/core/wasm-inlined';
44

55
import { LANGUAGES, DEFAULT_THEME } from '@/shiki.config.mjs';
66

@@ -9,7 +9,7 @@ export const getShiki = () =>
99
getHighlighterCore({
1010
themes: [DEFAULT_THEME],
1111
langs: LANGUAGES,
12-
loadWasm: getWasm,
12+
loadWasm: getWasmInstance,
1313
});
1414

1515
export const highlightToHtml =

0 commit comments

Comments
 (0)
Please sign in to comment.