Skip to content

Commit 6b1f418

Browse files
committed
update deps and fix turbopack build? (#5345)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on updating various package dependencies and adjusting import paths in multiple files, ensuring compatibility and improvements in the application. ### Detailed summary - Updated `@cloudflare/workers-types` to version `4.20241106.0`. - Adjusted import paths in `engine-list.tsx` and `publish-submit.tsx`. - Updated several dependencies in `package.json` files across multiple apps: - `@aws-sdk` packages to version `3.687.0`. - `@tanstack/react-query` to version `5.59.20`. - `next` to version `15.0.3`. - `eslint-config-next` to version `15.0.3`. - Modified scripts in `dashboard/package.json` for build optimizations. - Updated `@next/mdx` to version `15.0.3`. - Various other minor dependency updates across packages. > The following files were skipped due to too many changes: `pnpm-lock.yaml` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 9910a02 commit 6b1f418

File tree

12 files changed

+1357
-1612
lines changed

12 files changed

+1357
-1612
lines changed

apps/dashboard/next.config.js renamed to apps/dashboard/next.config.ts

Lines changed: 88 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
1+
import type { SentryBuildOptions } from "@sentry/nextjs";
2+
import type { NextConfig } from "next";
3+
import type { RemotePattern } from "next/dist/shared/lib/image-config";
4+
import FRAMER_PATHS from "./framer-rewrites";
5+
import getRedirects from "./redirects";
26

37
const ContentSecurityPolicy = `
48
default-src 'self';
@@ -37,15 +41,9 @@ const securityHeaders = [
3741
},
3842
];
3943

40-
const redirects = require("./redirects");
41-
const FRAMER_PATHS = require("./framer-rewrites");
42-
43-
/**
44-
* @returns {import('next').RemotePattern[]}
45-
*/
4644
function determineIpfsGateways() {
4745
// add the clientId ipfs gateways
48-
const remotePatterns = [];
46+
const remotePatterns: RemotePattern[] = [];
4947
if (process.env.API_ROUTES_CLIENT_ID) {
5048
remotePatterns.push({
5149
protocol: "https",
@@ -84,23 +82,39 @@ function determineIpfsGateways() {
8482
return remotePatterns;
8583
}
8684

87-
/** @type {import('next').NextConfig} */
88-
const moduleExports = {
89-
webpack: (config, { dev }) => {
90-
if (config.cache && !dev) {
91-
config.cache = Object.freeze({
92-
type: "memory",
93-
});
94-
config.cache.maxMemoryGenerations = 0;
95-
}
96-
config.externals.push("pino-pretty");
97-
config.module = {
98-
...config.module,
99-
exprContextCritical: false,
100-
};
101-
// Important: return the modified config
102-
return config;
103-
},
85+
const SENTRY_OPTIONS: SentryBuildOptions = {
86+
// For all available options, see:
87+
// https://github.com/getsentry/sentry-webpack-plugin#options
88+
89+
org: "thirdweb-dev",
90+
project: "dashboard",
91+
// An auth token is required for uploading source maps.
92+
authToken: process.env.SENTRY_AUTH_TOKEN,
93+
// Suppresses source map uploading logs during build
94+
silent: true,
95+
// For all available options, see:
96+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
97+
98+
// Upload a larger set of source maps for prettier stack traces (increases build time)
99+
widenClientFileUpload: true,
100+
101+
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
102+
tunnelRoute: "/err",
103+
104+
// Hides source maps from generated client bundles
105+
hideSourceMaps: true,
106+
107+
// Automatically tree-shake Sentry logger statements to reduce bundle size
108+
disableLogger: true,
109+
110+
// Enables automatic instrumentation of Vercel Cron Monitors.
111+
// See the following for more information:
112+
// https://docs.sentry.io/product/crons/
113+
// https://vercel.com/docs/cron-jobs
114+
automaticVercelMonitors: false,
115+
};
116+
117+
const baseNextConfig: NextConfig = {
104118
async headers() {
105119
return [
106120
{
@@ -117,7 +131,7 @@ const moduleExports = {
117131
];
118132
},
119133
async redirects() {
120-
return redirects();
134+
return getRedirects();
121135
},
122136
async rewrites() {
123137
return [
@@ -151,74 +165,57 @@ const moduleExports = {
151165
...determineIpfsGateways(),
152166
],
153167
},
154-
reactStrictMode: true,
155-
experimental: {
156-
scrollRestoration: true,
157-
webpackBuildWorker: true,
158-
serverSourceMaps: false,
159-
},
160-
cacheMaxMemorySize: 0,
161168
compiler: {
162169
emotion: true,
163170
},
164-
productionBrowserSourceMaps: false,
171+
reactStrictMode: true,
165172
};
166173

167-
const { withSentryConfig } = require("@sentry/nextjs");
168-
const { withPlausibleProxy } = require("next-plausible");
169-
170-
// we only want sentry on production environments
171-
const wSentry =
172-
process.env.NODE_ENV === "production" ? withSentryConfig : (x) => x;
173-
174-
const withBundleAnalyzer = require("@next/bundle-analyzer")({
175-
enabled: process.env.ANALYZE === "true",
176-
});
177-
178-
module.exports = withBundleAnalyzer(
179-
withPlausibleProxy({
180-
customDomain: "https://pl.thirdweb.com",
181-
scriptName: "pl",
182-
})(
183-
wSentry(moduleExports, {
184-
// For all available options, see:
185-
// https://github.com/getsentry/sentry-webpack-plugin#options
186-
187-
org: "thirdweb-dev",
188-
project: "dashboard",
189-
// An auth token is required for uploading source maps.
190-
authToken: process.env.SENTRY_AUTH_TOKEN,
191-
// Suppresses source map uploading logs during build
192-
silent: true,
193-
// For all available options, see:
194-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
195-
196-
// Upload a larger set of source maps for prettier stack traces (increases build time)
197-
widenClientFileUpload: true,
198-
199-
// Transpiles SDK to be compatible with IE11 (increases bundle size)
200-
transpileClientSDK: false,
201-
202-
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
203-
tunnelRoute: "/err",
204-
205-
// Hides source maps from generated client bundles
206-
hideSourceMaps: true,
207-
208-
// Automatically tree-shake Sentry logger statements to reduce bundle size
209-
disableLogger: true,
210-
211-
// Enables automatic instrumentation of Vercel Cron Monitors.
212-
// See the following for more information:
213-
// https://docs.sentry.io/product/crons/
214-
// https://vercel.com/docs/cron-jobs
215-
automaticVercelMonitors: false,
174+
function getConfig(): NextConfig {
175+
if (process.env.NODE_ENV === "production") {
176+
// eslint-disable-next-line @typescript-eslint/no-var-requires
177+
const withBundleAnalyzer = require("@next/bundle-analyzer")({
178+
enabled: process.env.ANALYZE === "true",
179+
});
180+
// eslint-disable-next-line @typescript-eslint/no-var-requires
181+
const { withPlausibleProxy } = require("next-plausible");
182+
// eslint-disable-next-line @typescript-eslint/no-var-requires
183+
const { withSentryConfig } = require("@sentry/nextjs");
184+
return withBundleAnalyzer(
185+
withPlausibleProxy({
186+
customDomain: "https://pl.thirdweb.com",
187+
scriptName: "pl",
188+
})(
189+
withSentryConfig(
190+
{
191+
...baseNextConfig,
192+
experimental: {
193+
webpackBuildWorker: true,
194+
},
195+
// @ts-expect-error - this is a valid option
196+
webpack: (config, { dev }) => {
197+
if (config.cache && !dev) {
198+
config.cache = Object.freeze({
199+
type: "filesystem",
200+
maxMemoryGenerations: 0,
201+
});
202+
}
203+
config.externals.push("pino-pretty");
204+
config.module = {
205+
...config.module,
206+
exprContextCritical: false,
207+
};
208+
// Important: return the modified config
209+
return config;
210+
},
211+
},
212+
SENTRY_OPTIONS,
213+
),
214+
),
215+
);
216+
}
217+
// otherwise return the base
218+
return baseNextConfig;
219+
}
216220

217-
/**
218-
* Disables the Sentry Webpack plugin on the server.
219-
* See: https://github.com/getsentry/sentry-javascript/issues/10468#issuecomment-2004710692
220-
*/
221-
disableServerWebpackPlugin: true,
222-
}),
223-
),
224-
);
221+
export default getConfig();

apps/dashboard/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"scripts": {
66
"preinstall": "npx only-allow pnpm",
7-
"dev": "next dev",
8-
"build": "next build",
7+
"dev": "next dev --turbopack",
8+
"build": "NODE_OPTIONS=--max-old-space-size=6144 next build",
99
"start": "next start",
1010
"format": "biome format ./src --write",
1111
"lint": "biome check ./src && knip && eslint ./src",
@@ -50,7 +50,7 @@
5050
"@shazow/whatsabi": "^0.16.0",
5151
"@stripe/react-stripe-js": "^2.8.1",
5252
"@stripe/stripe-js": "^3.5.0",
53-
"@tanstack/react-query": "5.59.19",
53+
"@tanstack/react-query": "5.59.20",
5454
"@tanstack/react-table": "^8.17.3",
5555
"@thirdweb-dev/service-utils": "workspace:*",
5656
"@vercel/functions": "^1.4.2",
@@ -70,7 +70,7 @@
7070
"ipaddr.js": "^2.2.0",
7171
"lottie-react": "^2.4.0",
7272
"lucide-react": "0.454.0",
73-
"next": "15.0.2",
73+
"next": "15.0.3",
7474
"next-plausible": "^3.12.3",
7575
"next-seo": "^6.5.0",
7676
"next-themes": "^0.4.3",
@@ -107,8 +107,8 @@
107107
"devDependencies": {
108108
"@chakra-ui/cli": "^2.4.1",
109109
"@chromatic-com/storybook": "3.2.2",
110-
"@next/bundle-analyzer": "15.0.2",
111-
"@next/eslint-plugin-next": "15.0.2",
110+
"@next/bundle-analyzer": "15.0.3",
111+
"@next/eslint-plugin-next": "15.0.3",
112112
"@playwright/test": "1.48.2",
113113
"@storybook/addon-essentials": "8.4.2",
114114
"@storybook/addon-interactions": "8.4.2",
@@ -137,7 +137,7 @@
137137
"eslint-config-biome": "1.9.3",
138138
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
139139
"eslint-plugin-storybook": "^0.9.0",
140-
"knip": "5.36.2",
140+
"knip": "5.36.3",
141141
"next-sitemap": "^4.2.3",
142142
"postcss": "8.4.47",
143143
"storybook": "8.4.2",

apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(general)/overview/engine-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from "lucide-react";
1414
import Image from "next/image";
1515
import Link from "next/link";
16-
import emptyStateHeaderImage from "/public/assets/engine/empty-state-header.png";
16+
import emptyStateHeaderImage from "../../../../../../../../../public/assets/engine/empty-state-header.png";
1717
import { EngineInstancesTable } from "./engine-instances-table";
1818

1919
export const EngineInstancesList = (props: {

apps/dashboard/src/components/explore/upsells/publish-submit.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Button } from "@/components/ui/button";
22
import { TrackedLinkTW } from "@/components/ui/tracked-link";
33
import Image from "next/image";
4-
import exploreFeatureImage from "/public/assets/landingpage/explore-featured.png";
5-
import heroIcon1 from "/public/assets/product-pages/publish/hero-icon-1.png";
6-
import heroIcon2 from "/public/assets/product-pages/publish/hero-icon-2.png";
4+
import exploreFeatureImage from "../../../../public/assets/landingpage/explore-featured.png";
5+
import heroIcon1 from "../../../../public/assets/product-pages/publish/hero-icon-1.png";
6+
import heroIcon2 from "../../../../public/assets/product-pages/publish/hero-icon-2.png";
77

88
export const PublishUpsellCard: React.FC = () => {
99
return (

apps/dashboard/src/components/product-pages/common/nav/data.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import connectIcon from "/public/assets/landingpage/connect-icon.png";
2-
import contractsIcon from "/public/assets/landingpage/contracts-icon.png";
3-
import engineIcon from "/public/assets/landingpage/engine-icon.png";
4-
import authIcon from "/public/assets/product-icons/auth.png";
5-
import cliIcon from "/public/assets/product-icons/cli.svg";
6-
import contractsProductIcon from "/public/assets/product-icons/contracts.png";
7-
import dashboardProductIcon from "/public/assets/product-icons/dashboard.svg";
8-
import deployIcon from "/public/assets/product-icons/deploy.png";
9-
import embeddedWalletIcon from "/public/assets/product-icons/embedded-wallet.png";
10-
import engineProductIcon from "/public/assets/product-icons/engine.png";
11-
import extensionIcon from "/public/assets/product-icons/extensions.png";
12-
import netIcon from "/public/assets/product-icons/net.svg";
13-
import payIcon from "/public/assets/product-icons/pay.svg";
14-
import publishIcon from "/public/assets/product-icons/publish.png";
15-
import reactIcon from "/public/assets/product-icons/react.svg";
16-
import rpcEdgeIcon from "/public/assets/product-icons/rpc-edge.png";
17-
import smartWalletIcon from "/public/assets/product-icons/smart-wallet.png";
18-
import solidityIcon from "/public/assets/product-icons/solidity.svg";
19-
import storageIcon from "/public/assets/product-icons/storage.png";
20-
import typescriptIcon from "/public/assets/product-icons/typescript.svg";
21-
import unityIcon from "/public/assets/product-icons/unity.svg";
22-
import walletSdkIcon from "/public/assets/product-icons/wallet-sdk.png";
23-
import chainsIcon from "/public/assets/solutions-icons/chains.svg";
24-
import gamingIcon from "/public/assets/solutions-icons/gaming.svg";
25-
import datastoreIcon from "/public/assets/tw-icons/datastore.png";
26-
import docsIcon from "/public/assets/tw-icons/docs.svg";
27-
import guidesIcon from "/public/assets/tw-icons/guides.svg";
28-
import missionIcon from "/public/assets/tw-icons/mission.svg";
29-
import opensourceIcon from "/public/assets/tw-icons/opensource.svg";
30-
import templatesIcon from "/public/assets/tw-icons/templates.svg";
1+
import connectIcon from "../../../../../public/assets/landingpage/connect-icon.png";
2+
import contractsIcon from "../../../../../public/assets/landingpage/contracts-icon.png";
3+
import engineIcon from "../../../../../public/assets/landingpage/engine-icon.png";
4+
import authIcon from "../../../../../public/assets/product-icons/auth.png";
5+
import cliIcon from "../../../../../public/assets/product-icons/cli.svg";
6+
import contractsProductIcon from "../../../../../public/assets/product-icons/contracts.png";
7+
import dashboardProductIcon from "../../../../../public/assets/product-icons/dashboard.svg";
8+
import deployIcon from "../../../../../public/assets/product-icons/deploy.png";
9+
import embeddedWalletIcon from "../../../../../public/assets/product-icons/embedded-wallet.png";
10+
import engineProductIcon from "../../../../../public/assets/product-icons/engine.png";
11+
import extensionIcon from "../../../../../public/assets/product-icons/extensions.png";
12+
import netIcon from "../../../../../public/assets/product-icons/net.svg";
13+
import payIcon from "../../../../../public/assets/product-icons/pay.svg";
14+
import publishIcon from "../../../../../public/assets/product-icons/publish.png";
15+
import reactIcon from "../../../../../public/assets/product-icons/react.svg";
16+
import rpcEdgeIcon from "../../../../../public/assets/product-icons/rpc-edge.png";
17+
import smartWalletIcon from "../../../../../public/assets/product-icons/smart-wallet.png";
18+
import solidityIcon from "../../../../../public/assets/product-icons/solidity.svg";
19+
import storageIcon from "../../../../../public/assets/product-icons/storage.png";
20+
import typescriptIcon from "../../../../../public/assets/product-icons/typescript.svg";
21+
import unityIcon from "../../../../../public/assets/product-icons/unity.svg";
22+
import walletSdkIcon from "../../../../../public/assets/product-icons/wallet-sdk.png";
23+
import chainsIcon from "../../../../../public/assets/solutions-icons/chains.svg";
24+
import gamingIcon from "../../../../../public/assets/solutions-icons/gaming.svg";
25+
import datastoreIcon from "../../../../../public/assets/tw-icons/datastore.png";
26+
import docsIcon from "../../../../../public/assets/tw-icons/docs.svg";
27+
import guidesIcon from "../../../../../public/assets/tw-icons/guides.svg";
28+
import missionIcon from "../../../../../public/assets/tw-icons/mission.svg";
29+
import opensourceIcon from "../../../../../public/assets/tw-icons/opensource.svg";
30+
import templatesIcon from "../../../../../public/assets/tw-icons/templates.svg";
3131
import type { SectionItemProps, SectionProps } from "./types";
3232

3333
export const PRODUCT_SECTIONS: SectionProps[] = [

apps/playground-web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
"@radix-ui/react-switch": "^1.1.1",
2828
"@radix-ui/react-tabs": "^1.1.1",
2929
"@radix-ui/react-tooltip": "1.1.3",
30-
"@tanstack/react-query": "5.59.19",
30+
"@tanstack/react-query": "5.59.20",
3131
"class-variance-authority": "^0.7.0",
3232
"clsx": "^2.1.1",
3333
"lucide-react": "0.454.0",
34-
"next": "15.0.2",
34+
"next": "15.0.3",
3535
"next-themes": "^0.4.3",
3636
"prettier": "^3.3.2",
3737
"react": "19.0.0-rc-69d4b800-20241021",
@@ -48,7 +48,7 @@
4848
"@types/react": "npm:[email protected]",
4949
"@types/react-dom": "npm:[email protected]",
5050
"eslint": "8.57.0",
51-
"eslint-config-next": "15.0.2",
51+
"eslint-config-next": "15.0.3",
5252
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
5353
"postcss": "8.4.47",
5454
"tailwindcss": "3.4.14",

0 commit comments

Comments
 (0)