0.3.0
🎉 New Features & Improvements
[create-content-sdk-app]: Refactoring/Cleanup for scss files in SXA components (#119)(#122)[core][nextjs][DesignLibrary] Include metadata in the Design Library rendering mechanism (#118)[core][nextjs][cli]Add automatic component map generation (#124)(#128)(#130)[create-sitecore-jss]Remove graphql introspection sample and scripts folder from next starter application (#135)[core][Content SDK] Update environment variable naming and associated config property (#143)
🛠 Breaking Changes
-
[create-content-sdk-app]Renamed package from@sitecore-content-sdk/create-apptocreate-content-sdk-app(unscoped package)- Users can now run
npx create-content-sdk-appinstead ofnpx @sitecore-content-sdk/create-app - Follows the same pattern as other popular initializers like
create-react-appandcreate-next-app
- Users can now run
-
[all]Renamed all JSS references to Content SDK across the codebase: (#131)- The create-sitecore-jss package has been renamed to create-content-sdk-app (unscoped package)
- Component types and props renamed:
ReactJssComponent→ReactContentSdkComponentNextJssComponent→NextjsContentSdkComponent
-
[react][nextjs]RefactorSitecoreContextnaming toSitecoreProvider(95):We've revisited and improved the
SitecoreContextnaming for clarity and consistency. This affects component names, types, hook, and HOC.Component Renames
-
Component:
SitecoreContext→SitecoreProvider
-
Properties:
contextproperty renamed topageContextto clarify that it holds page-specific data only
-
Interfaces:
SitecoreContextValue→SitecoreProviderPageContextSitecoreContextReactContext→SitecoreProviderReactContextSitecoreContextState→SitecoreProviderStateSitecoreContextProps→SitecoreProviderProps
Hook and HOC Renames
-
Functions:
withSitecoreContext→withSitecoreuseSitecoreContext→useSitecore
-
Properties:
updateSitecoreContextproperty ->updateContextsitecoreContextproperty ->pageContext
-
Interfaces:
WithSitecoreContextOptions→WithSitecoreOptionsWithSitecoreContextProps→WithSitecorePropsWithSitecoreContextHocProps→WithSitecoreHocProps
-
-
[nextjs]Component-levelgetServerSidePropsandgetStaticPropsmethods have been replaced by a singlegetComponentServerPropsmethod for simplicity.- In case a separate logic is needed depending on SSR/SSG context, an
isServerSidePropsContexthelper method from@sitecore-content-sdk/nextjs/utilscan now be used.
- In case a separate logic is needed depending on SSR/SSG context, an
-
[nextjs][DesignLibrary] Script is requested from production even when a custom Edge URL is set (#98):- The
EditingScriptscomponent doesn't acceptsitecoreEdgeUrlproperty anymore. - The custom Edge URL is now accessed via the
apiproperty of theSitecoreProvidercomponent.
- The
-
[nextjs]defineCliConfigimport has been moved to@sitecore-content-sdk/nextjs/config-clisubmodule (#128). -
[core][nextjs][cli]Re-introduce component map generation logic (#124)(#139) -
[create-content-sdk-app]Remove SXA components and style files from defaultnextjstemplate (#139) -
[core][nextjs][templates/nextjs]Environment variables' naming has been updated (#143)JSS_EDITING_SECRET→SITECORE_EDITING_SECRETNEXT_PUBLIC_SITECORE_SITE_NAME→NEXT_PUBLIC_DEFAULT_SITE_NAMEDISABLE_SSG_FETCH→GENERATE_STATIC_PATHSdisableStaticPathsconfig property →generateStaticPaths(with inverted logic for clarity)
-
[core][nextjs][templates/nextjs]Refactor site resolution logic across packages (#141)- Removed
sitesparameter fromSitecoreClientInittype - Removed
SiteResolverdependency andresolveSite()fromSitecoreClient - Removed support for passing a custom siteResolver to
SitecoreClient - Updated
SitecoreClientto construct thePageusingsiteNameinstead of the fullSiteInfo. - Updated SitecoreClient's
getPagePaths()to accept asitesparameter - Modified the
getPagePathsmethod inSitecoreClientto accept asitesparameter. - Updated Next.js
SitemapMiddlewareandRobotsMiddlewareto use their own instance ofSiteResolverand accept asitesparameter via the constructor.
- Removed
🐛 Bug Fixes
[core]Fix for enabling debug logs previously not appearing during build execution (#137)[core]Fix for making clientContextId optional for client-side execution to avoid runtime errors (#121)[core][sitecore.config]Fallback values are not respected when framework specific value is empty & validate resolved config instead of base (#97)[nextjs]Improve device detection and prevent false prefetch handling in Personalize middleware and also ensure personalized responses are not served from prefetch cache and proper personalization was applied during client side navigation. (#129)[react]Suspense in ErrorBoundary component is not rendered when it is wrapping a BYOCWrapper to prevent client side hydration errors (#132)[nextjs]Fix component-level data fetching method is exposed in client bundle (#134)[react]Add an optionaldisableSuspenseflag to the Placeholder component to prevent error boundaries from rendering Suspense which helps contain errors for components. This can help avoid hydration issues in connected mode. (#96)
🧹 Chores
[react]Update feaas dependencies (#149)