Releases: Sitecore/jss
Releases · Sitecore/jss
21.6.2
20.3.0
20.3.0
🎉 New Features & Improvements
[sitecore-jss]
Retry policy to handle transient network errors. Users can passretryStrategy
to configure custom retry config to the services. They can customize the error codes and the number of retries. It consist of two functionsshouldRetry
andgetDelay
. To determine the back-off time, we employ an exponential strategy with a default factor of 2.(#1731) (#1733)
21.6.1
21.6.1
🐛 Bug Fixes
[sitecore-jss-nextjs]
Internal link in RichText is broken when nested tags are added (#1718)[sitecore-jss-nextjs]
Remove custom loader function i.e.sitecoreLoader
to enable NextImage to use built-in image optimization from vercel. Also add default image remotePatterns in next.config.js for whitelisting remote image hostnames (#1726) (#1732)
v21.6.0
21.6.0
🎉 New Features & Improvements
[templates/react]
[templates/angular]
[templates/vue]
[templates/node-headless-ssr-proxy]
[templates/node-headless-ssr-experience-edge]
(#1647) (#1672) Switch from using JSS_APP_NAME to SITECORE_SITE_NAME - environment and config variables in React, Vue, Angular templates as well as ssr node proxy apps templates have been renamed.[templates/nextjs]
[sitecore-jss-nextjs]
[sitecore-jss]
(#1640) (#1662)(#1661) (#1672) (#1675) (#1710) Sitecore Edge Platform and Context support:- Introducing the clientFactory property. This property can be utilized by GraphQL-based services, the previously used endpoint and apiKey properties are deprecated. The clientFactory serves as the central hub for executing GraphQL requests within the application.
- New SITECORE_EDGE_CONTEXT_ID environment variable has been added.
- The JSS_APP_NAME environment variable has been updated and is now referred to as SITECORE_SITE_NAME.
[templates/nextjs]
Enable client-only BYOC component imports. Client-only components can be imported through src/byoc/index.client.ts. Hybrid (server render with client hydration) components can be imported through src/byoc/index.hybrid.ts. BYOC scaffold logic is also moved from nextjs-sxa addon into base template (#1628#1636)[templates/nextjs]
Import SitecoreForm component into sample nextjs app (#1628)[sitecore-jss-nextjs]
(Vercel/Sitecore) Deployment Protection Bypass support for editing integration. (#1634)[sitecore-jss]
Support for both 'published' and 'staged' revisions of FEAAS stylesheets/themes based on Sitecore Edge Platform and Context (#1644) (#1645) (#1666)[sitecore-jss-nextjs]
The GraphQLRequestClient import from @sitecore-jss/sitecore-jss-nextjs is deprecated, use import from @sitecore-jss/sitecore-jss-nextjs/graphql submodule instead (#1650 #1648)[create-sitecore-jss]
Introducednextjs-xmcloud
initializer template. This will include all base XM Cloud features, including Personalize, FEaaS, BYOC, Sitecore Edge Platform and Context support. (#1653) (#1657) (#1658)[sitecore-jss-nextjs]
[templates/nextjs-xmcloud]
Page state (preview, edit, normal) is available through shared context. This allows access to the state for integrations such as CloudSDK and FEAAS. (#1703)
🐛 Bug Fixes
[templates/nextjs]
[sitecore-jss-nextjs]
Fix making a fetch to a nextjs api route in an editing environment, by adding additional variable publicUrl in runtime config (#1656)[templates/nextjs-multisite]
Fix site info fetch errors (now skipped) on XM Cloud rendering/editing host builds. (#1649) (#1653)[templates/nextjs-xmcloud]
Fix double registration of BYOC components (#1707) (#1709)[sitecore-jss-nextjs] [templates/nextjs-xmcloud]
SDK initialization rejections are now correctly handled. Errors should no longer occur after getSDK() promises resolve when they shouldn't (for example, getting Events SDK in development environment) (#1712 #1715 #1716)
🛠 Breaking Changes
[create-sitecore-jss]
Thenextjs-personalize
initializer add-on template has been removed and is replaced by thenextjs-xmcloud
initializer template. You can use the interactive prompts or the--xmcloud
argument to include this template. (#1653)[templates/nextjs]
[sitecore-jss-nextjs]
CloudSDK Integration (#1652) (#1659):- Removed the following properties from PersonalizeMiddleware: getPointOfSale, clientKey, endpoint. You now need to provide sitecoreEdgeContextId as a replacement.
- PersonalizeMiddleware has transitioned to utilizing the CloudSDK package, replacing the previous dependency on Engage.
- Introduced Context class, that is used to initialize the application Context and shared Software Development Kits (SDKs). Accessible within the @sitecore-jss/sitecore-jss-nextjs/context submodule.
- Point of Sale resolution is fully removed, now it's handled by Sitecore Edge Proxy
[templates/nextjs]
[sitecore-jss-nextjs]
The behavior of getPublicUrl() function has been changed - empty string is now considered valid value for PUBLIC_URL environment variable and, if defined, PUBLIC_URL will take precedence over the Vercel/Netlify env variables; the values of these variables should be adjusted as needed; PUBLIC_URL is commented out by default in .env; (#1656);[templates/angular]
[sitecore-jss-angular]
Update Angular to version 16 (#1690) (#1697):- Updated Angular to ~16.2.10
- Updated Typescript to ~4.9.5
- @angular-eslint/ng-cli-compat eslint rules are deprecated. Use @angular-eslint/recommended rules instead.
- outputPath is not needed in angular.json for the build target since we provide it via CLI.
- Added more properties to server buld angular.json:
- deleteOutputPath: false,
- outputHashing: none
To don't provide them via CLI.
- Replaced deprecated --deploy-url with --base-href ng build option.
- Output server build to dist instead of dist/server, in order to don't move artifacts to the root folder (JSS convention requires to keep all the server artifacts in the dist folder and have server.bundle.js file as an entrypoint)
- TransferState, makeStateKey now imported from @angular/core instead of @angular/platform-browser.
- BrowserModule.withServerTransition is deprecated, APP_ID is used instead.
- Removed deprecated lib entryComponents property.
- Exported ImageFieldValue and LinkFieldValue interfaces.
- See more information about the upgrade in the Angular 16 Migration Guide
🧹 Chores
21.5.3
21.5.2
21.5.2
🎉 New Features & Improvements
[sitecore-jss]
[templates/nextjs]
Load the content styles for the RichText component #1678
🐛 Bug Fixes
[sitecore-jss-react]
[templates/nextjs-xmcloud]
Static (rendering params and datasource) and dynamic (fetched) props are now both passed into BYOC components. Previously dynamic fetched props would completely override data from Sitecore items (#1667)(#1682)(#1688)[sitecore-jss-react]
[templates/nextjs-xmcloud]
Ensure FEAAS and BYOC components can correctly use item datasources (#1694)
21.5.1
21.5.1
🐛 Bug Fixes
[sitecore-jss-react]
Fix PlaceholderCommon with using two and more dynamic placeholders. (#1641)[templates/nextjs]
Fix custom headers. Now in cors-header plugin extends custom headers from next.config.js file. (#1637)[sitecore-jss-nextjs]
Fix redirect middleware to match pattern when uses param trailingSlash in next.config.js (#1676)
20.2.2
20.2.2
🧹 Chores
[create-sitecore-jss]
This is a maintenance release to fix package versioning in JSS templates.
20.2.1
20.2.1
🧹 Chores
[create-sitecore-jss]
This is a maintenance release to fix package versioning in JSS templates.
20.2.0
20.2.0
🎉 New Features & Improvements
[sitecore-jss]
[templates/nextjs]
GraphQL Layout and Dictionary services can handle endpoint rate limits through retryer functionality in GraphQLClient. To prevent SSG builds from failing and enable multiple retries, set retry amount in lib/dictionary-service-factory and lib/layout-service-factory (commit)(#1631)[sitecore-jss-nextjs]
Reduce the amount of Edge API calls during fetch getStaticPaths (commit)(#1631)
🐛 Bug Fixes
[sitecore-jss-proxy]
Setting "followRedirects" to "true" breaks HEAD requests (#1630)