Skip to content

Commit 5c7b2d7

Browse files
committed
Update to Node.js 24
1 parent 4894c41 commit 5c7b2d7

File tree

11 files changed

+819
-67
lines changed

11 files changed

+819
-67
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
node-version: [18.x, 20.x, 22.x]
34+
node-version: [20.x, 22.x, 24.x]
3535
steps:
3636
- uses: actions/checkout@v4
3737

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22.17.1
1+
v24.6.0

app/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('@babel/core').ConfigFunction} */
22
const config = (api) => {
3-
api.cache(true);
3+
api.cache.forever();
44
return {
55
presets: ['babel-preset-expo'],
66
plugins: [['@react-universal/babel-plugin', { root: 'src' }]],

docs/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import type { NextConfig } from 'next';
12
import { build } from 'velite';
3+
import type { Compiler, WebpackPluginInstance } from 'webpack';
24

3-
/** @type {import('next').NextConfig} */
4-
const nextConfig = {
5+
const nextConfig: NextConfig = {
56
eslint: {
67
ignoreDuringBuilds: true,
78
},
@@ -17,18 +18,18 @@ const nextConfig = {
1718
...config,
1819
plugins: [
1920
...config.plugins,
20-
new (class {
21+
new (class WebpackPlugin implements WebpackPluginInstance {
2122
static started = false;
22-
apply(compiler) {
23+
apply(compiler: Compiler) {
2324
compiler.hooks.afterEnvironment.tap('@react-universal/webpack-plugin', () => {
2425
compiler.options.resolve.conditionNames = [
25-
...compiler.options.resolve.conditionNames,
26+
...(compiler.options.resolve.conditionNames ?? []),
2627
'source',
2728
];
2829
});
2930
compiler.hooks.beforeCompile.tapPromise('@react-universal/webpack-plugin', async () => {
30-
if (!this.started) {
31-
this.started = true;
31+
if (!WebpackPlugin.started) {
32+
WebpackPlugin.started = true;
3233
const dev = compiler.options.mode === 'development';
3334
await build({ watch: dev, clean: !dev });
3435
}

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
"@react-universal/elements": "workspace:*",
1818
"@react-universal/next": "workspace:*",
1919
"@shikijs/rehype": "^3.11.0",
20-
"@types/node": "^22.17.2",
20+
"@types/node": "^24.3.0",
2121
"@types/react": "~19.1.11",
2222
"@types/react-dom": "~19.1.7",
23+
"@types/webpack": "^5.28.5",
2324
"next": "^15.5.0",
2425
"react": "19.1.0",
2526
"react-dom": "19.1.0",
@@ -31,6 +32,6 @@
3132
"scule": "^1.3.0",
3233
"typescript": "~5.9.2",
3334
"unified": "^11.0.5",
34-
"velite": "^0.2.4"
35+
"velite": "^0.3.0"
3536
}
3637
}

docs/velite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const docs = defineCollection({
3737
? `${docsConfig.storybookUrl}/?path=/story/${data.links.storybook}`
3838
: undefined,
3939
},
40-
category: meta.path
40+
category: (meta.path as string)
4141
.replace(/.*\/content\//, '')
4242
.replace(/\/[^/]*$/, '')
4343
.replace(process.cwd(), ''),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@biomejs/biome": "^2.2.2",
25-
"@chialab/esbuild-plugin-babel": "^0.18.0",
25+
"@chialab/esbuild-plugin-babel": "^0.19.0",
2626
"@emotion/jest": "^11.13.0",
2727
"@react-native/normalize-colors": "0.81.0",
2828
"@storybook/addon-a11y": "^9.1.3",
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
/** @type {import('next').NextConfig} */
2-
const nextConfig = {
1+
import type { NextConfig } from 'next';
2+
import type { Compiler, WebpackPluginInstance } from 'webpack';
3+
4+
const nextConfig: NextConfig = {
35
transpilePackages: [
46
'@react-universal/components',
57
'@react-universal/core',
68
'@react-universal/elements',
9+
'@react-universal/next',
710
'@react-universal/svg',
811
'@react-universal/utils',
912
],
1013
webpack: (config) => ({
1114
...config,
1215
plugins: [
1316
...config.plugins,
14-
new (class {
15-
apply(compiler) {
17+
new (class implements WebpackPluginInstance {
18+
apply(compiler: Compiler) {
1619
compiler.hooks.afterEnvironment.tap('@react-universal/webpack-plugin', () => {
1720
compiler.options.resolve.conditionNames = [
18-
...compiler.options.resolve.conditionNames,
21+
...(compiler.options.resolve.conditionNames ?? []),
1922
'source',
2023
];
2124
});

sandbox/next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@react-universal/core": "workspace:*",
1414
"@react-universal/elements": "workspace:*",
1515
"@react-universal/next": "workspace:*",
16-
"@types/node": "^22.17.2",
16+
"@types/node": "^24.3.0",
1717
"@types/react": "~19.1.11",
1818
"@types/react-dom": "~19.1.7",
1919
"next": "^15.5.0",

0 commit comments

Comments
 (0)