Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the Sugcon2024 headapp to Sitecore Content SDK v2, aligning analytics/events initialization and request-time Edge behavior with the v2 API and configuration conventions.
Changes:
- Migrates browser analytics/events initialization from CloudSDK v1 to
initContentSdk+ plugins. - Replaces the previous Content SDK middleware integration with the new proxy-based integration and updated env var names.
- Updates Next.js/TypeScript config and dependency versions to support the new SDK and framework version.
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| headapps/Sugcon2024/tsconfig.json | Updates TS resolution/JSX settings for the upgraded Next.js/SDK stack. |
| headapps/Sugcon2024/src/proxy.ts | Introduces the new Content SDK v2 proxy pipeline (locale/multisite/redirects/personalize). |
| headapps/Sugcon2024/src/middleware.ts | Removes the prior middleware-based implementation. |
| headapps/Sugcon2024/src/components/content-sdk/CdpPageView.tsx | Switches page view event import to the new events package. |
| headapps/Sugcon2024/src/components/basic-components/content-block/ContentBlock.tsx | Changes export to remove withDatasourceCheck wrapper. |
| headapps/Sugcon2024/src/byoc/index.tsx | Updates events import to the new events package. |
| headapps/Sugcon2024/src/Bootstrap.tsx | Migrates SDK initialization to initContentSdk with analytics/events plugins. |
| headapps/Sugcon2024/sitecore.config.ts.example | Updates env var names and Personalize timeout keys for v2. |
| headapps/Sugcon2024/package.json | Upgrades Next.js and switches dependencies to Content SDK v2 packages. |
| headapps/Sugcon2024/package-lock.json | Locks the upgraded dependency tree for Content SDK v2/Next 16. |
| headapps/Sugcon2024/next-env.d.ts | Changes how route types are referenced (now via .next/dev/...). |
| headapps/Sugcon2024/.sitecore/component-map.ts | Adjusts component map metadata for client/server component behavior (Form marked client). |
| headapps/Sugcon2024/.env.remote.example | Renames/adds env vars for Edge hostname + Personalize proxy timeouts. |
Files not reviewed (1)
- headapps/Sugcon2024/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
headapps/Sugcon2024/src/components/basic-components/content-block/ContentBlock.tsx
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 17 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- headapps/Sugcon2024/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the Sugcon2024 headapp from Sitecore Content SDK v1.x to v2.0,
following the official upgrade guide.
Breaking changes addressed
@sitecore-cloudsdk/core+@sitecore-cloudsdk/events@sitecore-content-sdk/analytics-core+events+personalizeCloudSDK().addEvents().initialize()initContentSdk({ config, plugins })src/middleware.ts(named exportmiddleware)src/proxy.ts(default exportproxy)*Middleware(e.g.LocaleMiddleware)*Proxy(e.g.LocaleProxy)SITECORE_EDGE_URLNEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAMEPERSONALIZE_MIDDLEWARE_*PERSONALIZE_PROXY_*^15.5.9^16.1.1^22^24Files changed
package.json— dependency updatessrc/Bootstrap.tsx— newinitContentSdkinitialisationsrc/middleware.ts→src/proxy.ts— renamed + updatedsrc/components/content-sdk/CdpPageView.tsx— updated importsrc/byoc/index.tsx— updated events importsitecore.config.ts.example— updated env var names.env.remote.example— added new env vars, renamed existing onesTesting
tsc --noEmitpasses with zero errorsbuild-breaking issue (
BotTrackingProxyfrom unreleased SDK branch)and one env var misalignment were caught and resolved