Releases: Sitecore/content-sdk
2.1.0
🎉 New Features & Improvements
[events][nextjs]Lightweight Tracking (#414)(#435)(#438)(#443)(#444)- Introduced
BotTrackingProxyNext.js proxy to capture bot tracking events.
- Introduced
[nextjs]Upgrade to Next.js 16.2 (#429)[create-content-sdk-app]Use native flat ESLint config for App Router templates (#431)[nextjs]Support for redirect items redirects in redirect proxy (#433) (#439)[search]Pass CDP session id in the queries to the search service (#445)
🐛 Bug Fixes
[nextjs][App Router]searchParams empty on statically generated pages when Draft Mode is enabled (Vercel only) (#448)searchParamsare not expected to be accessible indraftMode(this is a known Next.js issue). By design, preview data should be passed via request headers. To support this, we introduced theclient.getPreviewDatahelper method. At the same time, preview data continues to be available via searchParams for backward compatibility. See more details in 'What's New' section of the release notes.
[nextjs][Internal Host]Preview allows users to access pages without proper permissions (#448)(#455)(#456)- App Router & Pages Router: Import and use
PreviewProxyto gate preview requests. See more details in 'What's New' section of the release notes.
- App Router & Pages Router: Import and use
- Preview mode shows unpublishable content (#410)(416)
[core] [content]Fix GraphQL client factory ignoring customfetchand related options (#418)[nextjs]AppRouter - NextLink is throwing Locale error in dev mode (#427)[react]Form component loses interactivity and state between rerenders (#447)
✨ Chores
[create-content-sdk-app]Update outdated documentation links (#440)
2.0.2
1.5.2
2.0.1
✨ Bug fixes
- Fix wrong versions and samples appearing when running
create-content-sdk-appcommand.angularsample no longer appearsnextjssamples use correct content-sdk dependencies for analytics when scaffolded
2.0.0
2.0.0
🎉 New Features & Improvements
-
Add Skills.md with capability groupings for AI tools and developers (#382)
- Add
.agents/skills/with Agent Skills (SKILL.md) per capability for universal AI tooling (agentskills.io); each skill includes when-to-use, hard rules, and stop conditions [create-content-sdk-app]Add Skills.md and.agents/skills/to Next.js (Pages Router) and Next.js App Router templates so scaffolded apps include capability groupings and template-specific Agent Skills
- Add
-
Rework AI coding assistance guides around AGENTS.md (#368)(#390)
-
[nextjs][create-content-sdk-app]Enable Next.js 16 Cache Components and Turbopack File System Caching (#334) -
Search integration (#295)
[search]New@sitecore-content-sdk/searchpackage providing search functionalitySearchServiceclass for performing search queries with support for pagination, sorting, request cancellation.- Type-safe search parameters and responses with support for generic fields.
[react]Added React hooks for search functionalityuseSearchhook for paginated search queries with automatic state management, request cancellation, request status tracking.useInfiniteSearchhook for infinite scroll/search patterns withloadMorefunctionality, request cancellation, request status tracking.
-
[nextjs][Pages Router]Adjust static path generation when multisite is disabled (#345) -
[nextjs]Allow to pass custom query parameters to /api/editing/render handlers (#381) -
[nextjs][Pages Router]Add explicitContent-Type: text/html; charset=utf-8to the editing render route response for proper response handling (#386) -
[analytics-core][events][personalize][core][create-content-sdk-app][nextjs][react]Introduce Analytics packages (#340)(#341)(#357)(#363)- Migrated the
core,eventsandpersonalizepackages fromCloudSDKtoanalytics-core,eventsandpersonalizepackages inContentSDK - Reworked the initialization functionality introducing the new
initContentSdkfunction
- Migrated the
🛠 Breaking Changes
-
[core][content][nextjs]Support custom Edge hostnames viaSITECORE_EDGE_PLATFORM_HOSTNAME(Next.js:NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME) (#359)- New
rewriteMediaUrlsoption: whentrue, rewrites layout media URLs to the custom Edge hostname; when a function, applies a custom string transformer. - The old
SITECORE_EDGE_URLenvironment variable is no longer used
- New
-
Decouple
@sitecore-content-sdk/contentfrom@sitecore-content-sdk/core(#351(#383)):- See a detailed upgrade guide for migration instructions
-
[nextjs][create-content-sdk-app]Upgrade to Next.js 16 (#334)(#343)(#353)- Next.js 16 is now required (minimum version
^16.0.0) middleware.tsrenamed toproxy.tswith updated function signature- Removed deprecated
images.domainsusage (useremotePatternsinstead)
- Next.js 16 is now required (minimum version
-
[nextjs]Expand SXA redirects logic with support for isLanguagePreserved flag. This provides an option to preserve current locale when target redirect URL does not have a locale prefix (#305)- This changes the default redirects behavior out of the box.
- Previously,
/da/source -> /targetrule would redirect to/da/targetpath when default locale is notda - Now,
/da/source -> /targetrule would redirect to/targetpath, using default locale, unless theShall language be preserved upon redirect?checkbox is enabled in Redirect Map.
- Previously,
- This changes the default redirects behavior out of the box.
-
Upgrade to Node.js 24.x (#332)
-
Remove deprecated api's (#360)
sitecore.cli.config:- The
configproperty is now required; a reference tositecore.configmust be provided. - Build-time functions defined in the build array no longer accept the scConfig argument in their constructor. However, the function implementation must receive scConfig, which is passed internally by the CLI command.
- The
renderEmptyPlaceholdermethod ofPlaceholderComponenthas been removed; instead importrenderEmptyPlaceholderfromreact/nextpackageDesignLibrarycomponent now does not accept any propsSitecoreProvider'sloadImportMapis now required
-
[react] [nextjs] Major revamp of components in the react package (#371):
PlaceholderandAppPlaceholder,passThroughComponentPropsprop has been added to fill make passing props to child components easiercomponentMapandloadImportMaphave been added to the context shared viaSitecoreProvideruseLoadImportMap,useComponentMapHOCs have been removed. The Sitecore context data can be accessed viauseSitecorehook.withSitecore'supdatePageprop has been renamed tosetPage. This HOC has also been marked deprecated, and will eventually be removed in favor ofuseSitecorehook.- Old
withPlaceholderHOC implementation has been reworked into slot-like logic with server and client implementations.withAppPlaceholdercan be used in server RSC context, andwithPlaceholderin client one. - Other components and HOCs in
reactpackage were refactored and should not have an effect on end user apps.
-
[react]Placeholder suspense causes longer JavaScript Scripting execution time (#384)- The default value of
disableSuspenseproperty is set totrueto avoid forcing Suspense usage across all components which could negatively impact performance metrics. Suspense can now be enabled explicitly when needed.
- The default value of
🐛 Bug Fixes
[core][search][analytics]Pass Sitecore Context ID only in headers (#336)[core][DesignLibrary]Fix faux-extentions being stripped from 3rd party modules' names in import-map (#358)[react][nextjs][template/nextjs-app-router]Fix not-found page forcing[[...path]]route to dynamic rendering; use cached page params to preserve SSG (#399)(#402)[rect][nextjs][DesignStudio]Component does not re-render during editing (#400)[nextjs][DesignLibrary]In variant generation mode prevent additional re-render for Server Components (#403)
1.5.1
1.5.0
1.4.1
1.4.0
1.4.0
🎉 New Features & Improvements
[nextjs][AI Component Generation]Enable CLI command to add a new component (#346)
🐛 Bug Fixes
[nextjs][App Router]Form component throws a Server component error (#333)[nextjs]Add "use client" directive to import-map.ts for React hooks compatibility (#326)[nextjs][template/nextjs][template/nextjs-app-router]Fix middleware initialization errors when API configuration is missing (#325)[nextjs]Fixes Server Transfer (rewrite) redirects (#329)[nextjs]PreservebasePathwhen doing redirects in redirects-middleware (#344)[nextjs][react]Fix fields becoming uneditable in Pages when running Editing Host in dev mode (#339)[nextjs][Pages Router]Adjust static path generation when multisite is disabled (#345)
1.3.2
✨ Chores
- Apply caret (
^) verisoning to content-sdk packages, ensuring the latest patch versions are used by them.