File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Native Hosting
22
33on :
44 push :
5- branches : [canary]
5+ branches : [canary, TRAC-668/security-bump-nextjs-react ]
66
77jobs :
88 build-and-deploy :
2626 run : pnpm install --frozen-lockfile
2727
2828 - name : Install Catalyst CLI
29- run : pnpm add @bigcommerce/catalyst@alpha @opennextjs/cloudflare@1.17.3
29+ # Uses a local patched build of @opennextjs/cloudflare that adds a perf-hooks shim
30+ # required for Next.js 16.2.x compatibility. Revert to @opennextjs/cloudflare@1.19.x
31+ # once https://github.com/opennextjs/opennextjs-cloudflare/pull/XXXX is released.
32+ run : pnpm add @bigcommerce/catalyst@alpha ../.github/patches/opennextjs-cloudflare-1.19.8-perf-hooks.tgz
3033 working-directory : core
3134
3235 - name : Convert proxy.ts to middleware.ts
Original file line number Diff line number Diff line change 1- import { registerOTel } from '@vercel/otel' ;
2-
31// eslint-disable-next-line valid-jsdoc
42/**
53 * Initializes OpenTelemetry instrumentation for the Next.js application.
@@ -50,9 +48,17 @@ import { registerOTel } from '@vercel/otel';
5048 * - OPENTELEMETRY.md in this directory
5149 * - Official Next.js guide: https://nextjs.org/docs/app/guides/open-telemetry
5250 */
53- export function register ( ) {
54- // Service name is pulled from the OTEL_SERVICE_NAME env var.
55- // If you wish to manually set it, you can remove the env var and set it here:
56- // registerOTel({ serviceName: 'catalyst-storefront' });
57- registerOTel ( ) ;
51+ export async function register ( ) {
52+ // @vercel /otel uses node:perf_hooks which is unavailable in Cloudflare Workers.
53+ // opennext-cloudflare defines __NEXT_RUNTIME_IS_CLOUDFLARE_WORKERS at build time so
54+ // esbuild dead-code-eliminates this branch entirely, keeping @vercel/otel out of the
55+ // worker bundle.
56+ if ( process . env . NEXT_RUNTIME === 'nodejs' && ! process . env . __NEXT_RUNTIME_IS_CLOUDFLARE_WORKERS ) {
57+ const { registerOTel } = await import ( '@vercel/otel' ) ;
58+
59+ // Service name is pulled from the OTEL_SERVICE_NAME env var.
60+ // If you wish to manually set it, you can remove the env var and set it here:
61+ // registerOTel({ serviceName: 'catalyst-storefront' });
62+ registerOTel ( ) ;
63+ }
5864}
Original file line number Diff line number Diff line change 6060 "lodash.debounce" : " ^4.0.8" ,
6161 "lru-cache" : " ^11.1.0" ,
6262 "lucide-react" : " ^0.474.0" ,
63- "next" : " ~16.1 .6" ,
63+ "next" : " ~16.2 .6" ,
6464 "next-auth" : " 5.0.0-beta.30" ,
6565 "next-intl" : " ^4.6.1" ,
6666 "nuqs" : " ^2.4.3" ,
6767 "p-lazy" : " ^5.0.0" ,
68- "react" : " 19.1.5 " ,
68+ "react" : " 19.1.7 " ,
6969 "react-day-picker" : " ^9.7.0" ,
70- "react-dom" : " 19.1.5 " ,
70+ "react-dom" : " 19.1.7 " ,
7171 "react-google-recaptcha" : " ^3.1.0" ,
7272 "react-headroom" : " ^3.2.1" ,
7373 "schema-dts" : " ^1.1.5" ,
You can’t perform that action at this time.
0 commit comments