Releases: bloomreach/spa-sdk
22.0.3 - Vue3 SDK types & Docs updates
We fixed a particular problem with import of types for the Vue 3 SDK for more modern projects.
22.0.2 SDK Documentation Portal
We have a new documentation portal! We hope we will be able to serve developers better by providing an integrated documentation portal. For now it includes a combination of all the content found in the readme's, a migration guide and links to the release notes and changelog, to be expanded on in the future. You can find it here: https://bloomreach.github.io/spa-sdk/docs/
We welcome any feedback on it and requests to add content.
We also removed the OnPush changedetection from the angular components, fixing this issue.
22.0.0 - Relevance module in SSR
We discovered that there was a problem with the bundling of the relevance module on the node.js side of things.
We have done 2 things:
- Output the CommonJS bundle as the main .js file
- correct the path to the spa-sdk output folder to align with the rest of the projects, from
lib
todist
BREAKING CHANGE
The import path to the relevance module must be updated from @bloomreach/spa-sdk/lib/express
to @bloomreach/spa-sdk/dist/express
Other
We have changed the way the monorepo links its dependencies internally. This solves a big problem for us where we were unable to properly add new framework versions due to endless transitive dependency clashes because npm workspaces did not allow for a proper way to avoid hoisting in combination with overrides (one of the gripes of the many package managers we tried).
21.0.0 - Async & Performance
TLDR;
- Reverted async behavior in methods so we can fully render HTML on the server again, go SSR!
- Removed
sanitize
,prepareHTML
methods anduseHTML
hook - Make sure you preserve
data-type
attributes on links when you sanitize the content from rich text fields with the sanitize library of your choosing
Changes
In this release, we have focused on streamlining the API and reducing the size of the @bloomreach/spa-sdk. We have reverted some of the changes introduced in versions 18.0.0 and 18.0.1, removed the page.sanitize
method to allow for making the library lighter, and removed some dependencies to significantly reduce the bundle size. We have also ensured compatibility with server-side rendering (SSR) in React and Vue.
(BREAKING) REVERTED CHANGES:
Reverted the changes introduced in 18.0.0:
- Page.rewriteLinks now returns string instead of Promise
- Removed the prepareHTML method and the useHTML React hook as they were created to easily combine the sanitize method with the rewriteLinks method. With the removal of the sanitize method, they are no longer useful additions.
Reverted the changes introduced in 18.0.1:
- initialize now returns Page | Promise instead of Promise
The reason for reverting these changes is to support SSR in React and Vue. The asynchronous nature of the previously introduced changes conflicted with the synchronous nature of the React and Vue SSR APIs.
OTHER BREAKING CHANGES:
- Removed the
sanitize
method from thePage
object to reduce the size of the library
RECOMMENDATIONS:
We strongly recommend that you sanitize any HTML content returned in the page model. Before the removal of the sanitize method, we used the sanitize-html
package in the SDK for this purpose. You can now use your preferred sanitation libraries or techniques based on your project requirements. Make sure to preserve the data-type
attribute on links in the rich content fields when sanitizing as it lets the SDK determine which links are external and which are internal when using the rewriteLinks
method.
ADDITIONAL NOTES:
- We have removed the '@xmldom/xmldom' and 'sanitize-html' dependencies, reducing the bundle size by about 50% compared to version 17 of the SDK. This results in faster load times and improved performance for your applications.
- We have added a CJS bundle output for the relevance express.js module
As always, we appreciate your feedback and suggestions for improving the @bloomreach/spa-sdk. Please feel free to reach out to us with any questions or concerns.
20.0.0 - Vue 3 SDK
Vue 3 SDK
We have released a new SDK for Vue 3! 🔥 🎉
Important notes
- Since Vue 2 and Vue 3 have incompatibilities and we did not yet want to remove support for Vue 2 we have decided to release a new SDK
@bloomreach/vue3-sdk
for Vue 3. Vue 2 SDK support will end when Vue 2 is EOL (December 31th 2023). This should allow customers some time to upgrade their web apps. - This is a major release of the SDK series due to the size of the new feature, not due to backwards incompatibility for the other SDKs
- We are still investigating solutions for SSR not fully rendering the component html when using
page.prepareHTML()
to render rich text fields for all SDKs. This also affects the new Vue 3 SDK - Nuxt support is still in progress, we are still creating a new Nuxt 3 example. While we would expect the SDK to simply work with Nuxt 3 we do not want to give any guarantee's until fully testing it ourselves. Feel free to try it out and give us feedback, its always welcome.
Other notes
- We have removed the personalization example implementations from the example apps and moved it to the Reference SPA.
- We have updated the Readme's with links to the proper documentations and typedoc.
19.0.2
This release adds support to the BrPageService to render multiple br-pages at the same time.
19.0.1 - Angular 15
19.0.1
Note: 19.0.0 is DEPRECATED due to faulty packaging of @bloomreach/ng-sdk
This release of the SDK brings Angular 15 to the Angular SDK. Both the Angular SDK and the example app have been updated to use Angular 15. There are no changes to any of the previous API’s related to the Angular SDK.
BREAKING CHANGES:
Angular 14+ is required to use this new Angular SDK version. Any previous version lower than Angular 14, will result in compilation errors.
This is a result of the switch to the Ivy compiler by the angular cli, supporting versions <= 13 would require having two different codebases, which we have decided to not do since it lead to considerable maintenance effort which has limited time value since angular 12 and 13 are no longer actively supported.
The Page Delivery apiVersion
is no longer set by default because it always required a second HTTP request. The result is that for Bloomreach customers that use version brxm 14.7
will need to explicitly set apiVersion
to PDA 1.0 in the SDK configuration
if they want to use / were using 1.0 (PDA 0.9 is used by default in brxm 14.7
). For more information see the brxm documentation.
ADDITIONAL NOTES:
One small change concerning the directives in Angular 13+, its that they no longer add a CSS class based on their name to their template:
// before
class="br-container-unordered-list hst-container"
// now
class="hst-container"
That’s because entryComponents is no longer need it in Angular 13+. Other than that, the rest remains pretty much the same.
18.0.1 - Code splitting revisited
As mentioned in 18.0.0 the release broke the integration with the Experience Manager preview. We discovered that there were async behavior oddities in the logic code that were exposed now that we were using dynamic loading of the preview code chunks.
As a result the initialize
function now always returns a Promise<Page>
instead of Page | Promise<Page>
. This breaking change means that whomever uses this initialize
function needs to take into account that the synchronous usage is no longer valid.
BREAKING CHANGES:
The API for some functions has changed:
initialize
now returns Promise<Page>
instead of Page | Promise<Page>
ADDITIONAL NOTES:
It was brought to our attention that when using React SSR, but not Next.js, async rendering is not possible. We are investigating this and are looking to provide a guide on how to use the prepareHTML method in combination with pure React SSR. If you are using pure react SSR do let us know and any suggestions are always welcome.
[DEPRECATED] 18.0.0 - Split bundles to increase performance
[DEPRECATION NOTICE]
This release unfortunately contained problems that broke the preview integration with the Experience Manager. Fixes are coming up shortly, in the mean time please use 17.x.x.
The SDK build now uses code splitting and generates multiple bundles. Code chunks will be loaded dynamically when required. This means that the initial loaded assets are about 30% smaller then before. If you want to take advantage of these split bundles you have to make sure your build tool does not load the UMD bundle (which does not allow for code splitting) but rather the ES modules directly.
BREAKING CHANGES:
The API for some functions has changed:
- Page.rewriteLinks now returns
Promise<string>
instead ofstring
- Page.sanitize now returns
Promise<string>
instead ofstring
ADDED FEATURES:
- We have added a
prepareHTML
method to the Page object which takes a document reference and a document field name and will sanitize and rewrite the links of that document field which is expected to be a rich text field (html). There is an additional react hookuseHTML
available that uses this API. We hope that using this new API you will be able to write less code and repeat it less throughout your components.
17.1.1
- Upgrade next and react example apps to react18
- Migrate from enzyme to react-testing-library in react-sdk
- Security fix(bump @xmldom/xmldom to patched 0.7.9)
Full Changelog: spa-sdk-17.1.0...spa-sdk-17.1.1