Technical Articles
We proudly present: Version 2.0 of the SAP Cloud SDK for JavaScript
We put a lot of effort in the next major version since we announced the beta state. We built all announced features and finally released the new major versions of the generated clients and underlying open-source libraries on the 10th of February 🎉.
How Do I Upgrade?
We tried to make the upgrade experience as smooth as possible for you and created a detailed upgrade guide. This document guides you through the changes most projects will face when updating to version 2.0 of the SAP Cloud SDK for JavaScript. If you cannot upgrade right away, have a look at our release policy to learn more about our timelines with respect to major and minor versions. Note that we will not maintain version 1.0 of the SAP Cloud SDK anymore.
What’s New?
We mentioned many of the planned changes coming with version 2.0 in our release announcement already.
But we would like to point out some highlights of the things we’ve created:
- We split the big core package into multiple smaller packages. So if you just need the connectivity functionality, you can install this now individually reducing the dependency size by approximately 50%.
- We realized that moment.js is a huge dependency and not actively maintained anymore. In the long term, we expect that temporal will become the default way to handle time and date in JavaScript. Since temporal is not yet part of ECMAScript standard yet, we introduced custom (de-)serializers.
These make it possible to switch to temporal easily or use other simple custom (de-)serializers, if you want to. - We introduced a way to register named destinations from code. This functionality comes in handy in microservice scenarios where a detour over the destination service would be a big overhead.
- We introduced a samples repository which will give you tested sample applications or code samples showcasing functionality of the SAP Cloud SDK.
What if I Face Issues During the Upgrade?
First of all it is great that you are interested in the new features and want to upgrade to version 2.0. Of course it can happen that you are facing a problem not covered by our upgrade guide. If you hit such a blocker please create an issue in our repository. We will help you resolve the issue and your case will help us improve the documentation and also help other developers with the same problem.
Hello Frank. I am running the CAP application on BAS and while building the app (using mbt build command) i am getting error "Version 1 of SAP Cloud SDK is no longer maintained. Check the upgrade guide for switching to version 2: https://sap.github.io/cloud-sdk/docs/js/guides/upgrade-to-version-2.
npm ERR! code E404". I followed the guide but not sure where i have to make the changes in CAP Application.
BAS is running on node version 16. I am not sure where I have to upgrade the version of cloud sdk in my project. Can you suggest?
Hi Rohit,
Thanks for raising up.
As far as I know, CAP version 5 (or lower) is still using SDK version 1, which is the major reason why you got "Version 1 of SAP Cloud SDK is no longer maintained". In general, the upgrade guide won't work for CAP users, as they are not our direct users. If you want to completely solve the issue, you have to switch to CAP version 6, as it uses SDK version 2.
In case you have further questions, please open an issue here, as the official SDK support channel.
Thanks, Junjie. Any idea how to upgrade the CAP project version? I do not find any documentation for the same.
Here is CAP doc, and you should also find the support channel there.
Thanks a lot, Junjie.