Hahn-Solo Product Management
  • Dashboard
  • Technologies
  • Competitors
  • Tasks
Theme
Basic Information
Status
Open
Priority
Now
Category
Version Update
Repo
SCB PM
Effort
Significant
Task ID
T-72A39898
Details
Upgrade All Next.js Starters to Content SDK v2.0.1
Upgrade `@sitecore-content-sdk/nextjs` from `^1.0.0` to `^2.0.1` across all 5 enabled Next.js starters (skate-park, basic-nextjs, article, location, product). This requires simultaneously upgrading Next.js from `^15.5.10` to `^16.2.x`, Node.js from 22 to 24 (in `xmcloud.build.json` and root `package.json` engines), renaming `middleware.ts` to `proxy.ts`, replacing `images.domains` with `remotePatterns` in all `next.config` files, and migrating HOCs to `useSitecore` hook / `SitecoreProvider`.
Why
Content SDK v1.0 is one major version behind the latest stable. v2.0 adds agent skills, search, analytics, and hooks that are core to Sitecore's forward direction. New adopters using the starter get a dependency chain that will require immediate upgrade.
Evidence
Open issues #403, #397, #407; Content SDK v2.0.1 on npm; Sitecore research report § Releases
Details
Context: Content SDK v2.0.0 was released on March 19, 2026, followed by v2.0.1 patch. This is a major version with breaking changes including Next.js 16 requirement, middleware-to-proxy rename, new hooks API, and Node.js 24 minimum. The starters currently ship Content SDK v1.0.0 with Next.js 15.5.10, meaning every new project scaffolded from the starter starts one major SDK version behind. Three open issues (#403, #397, #407) track this work but none have been merged. This is the single highest-priority task because it affects every downstream adopter.

Steps:
1. Start with `examples/basic-nextjs` as the reference upgrade — it has the simplest component set.
2. Update `package.json`: change `@sitecore-content-sdk/nextjs` from `^1.0.0` to `^2.0.1`, `@sitecore-content-sdk/cli` from `^1.0.0` to `^2.0.1`, `next` from `^15.5.10` to `^16.2.1`.
3. Rename `middleware.ts` to `proxy.ts` and update the exported function signature per Content SDK v2 migration guide.
4. Replace `images.domains` with `remotePatterns` in `next.config.ts` / `next.config.mjs`.
5. Migrate any HOC usage (e.g., `withSitecoreContext`) to `useSitecore` hook and `SitecoreProvider`.
6. Update environment variable references: replace `SITECORE_EDGE_URL` with `SITECORE_EDGE_PLATFORM_HOSTNAME` if used.
7. Run `npm install`, `npm run build`, `npm run lint`, `npm run type-check`, `npm test` — fix all failures.
8. Repeat for each remaining starter: skate-park, article, location, product.
9. Update `xmcloud.build.json` `nodeVersion` entries to `24.14.1`.
10. Update root `package.json` engines to `>=24.0.0`.
11. Update `.env.remote.example` files if environment variable names changed.
12. Update README.md if setup steps changed.

Acceptance criteria:
All 5 enabled Next.js starters depend on `@sitecore-content-sdk/nextjs@^2.0.1` and `next@^16.2.x`
All starters build, lint, type-check, and pass tests on Node.js 24
`xmcloud.build.json` specifies `nodeVersion: "24.14.1"` for all rendering hosts
No references to deprecated `middleware.ts` or `images.domains` remain

Risks: This is the largest single change. Content SDK v2.0 has multiple breaking changes that compound. The proxy.ts rename may require editing host configuration updates in XM Cloud Deploy. Sitecore Cloud SDK (`@sitecore-cloudsdk`) compatibility with Content SDK v2 needs verification. Recommend upgrading one starter first, validating end-to-end in a deployed XM Cloud environment, then rolling to the remaining starters.
Source Report
reports/product-management/scb/2026-04-05-scb-pm.md
Report date: Apr 5, 2026