Release Notes
2.15.0 [Core Modules] - February 28, 2023
Compatibility Notes
- [connectivity] When making a request to a destination that has a certificate in its defintion, the certificate is only added, if it is needed for the according authentication type. That way,
ClientCertificateAuthentication
will have a certificate in the request, whileOAuth2SAMLBearerAssertion
does not. Previously, the certificate would be added regardless. (5bad86c70)
Fixed Issues
- [connectivity] Stop adding certificates when sending requests to a destination, if the authentication type does not require a certificate. (5bad86c70)
2.14.0 [Core Modules] - January 13, 2023
Fixed Issues
- [connectivity] Fix the combination of providing the
iss
together withOnPremise
basic destinations. (20f550efd)
2.13.0 [Core Modules] - January 06, 2023
Compatibility Notes
- [generator] The SAP Cloud SDK does not differentiate between function imports and action imports anymore. Therefore the
actionImports
andfunctionImports
exposed in generated services are now deprecated and replaced byoptions
. (aa0cf4820) - [openapi-generator] The options
licenseInPackageJson
andversionInPackageJson
are deprecated. If you want to set the license or version in your generatedpackage.json
file, use theinclude
option to add a custompackage.json
instead. (aa0cf4820)
Fixed Issues
- [odata-v2] Allow to update OData v2 entities to
null
. Fixes 3204.- @sap-cloud-sdk/connectivity@2.13.0
- @sap-cloud-sdk/http-client@2.13.0
- @sap-cloud-sdk/odata-common@2.13.0
- @sap-cloud-sdk/util@2.13.0 (83eee1a3b)
2.12.1 [Core Modules] - January 03, 2023
Improvements
-
[connectivity] Update
jsonwebtoken
to 9.0.0 due to several security vulnerabilities:- CVE-2022-23529 (CVSS 9.8)
- CVE-2022-23539 (CVSS 8.1)
- CVE-2022-23540 (CVSS 9.8)
- CVE-2022-23541 (CVSS 9.8)
- @sap-cloud-sdk/util@2.12.1 (466cbec36)
2.12.0 [Core Modules] - December 07, 2022
Compatibility Notes
- [generator] Deprecate the
processesJsGeneration
option. (0f1056817) - [generator] Deprecate the
generatePackageJson
option. UsepackageJson
instead. (0f1056817) - [generator] Make options in
GeneratorOptions
optional, if they are not mandatory. (0f1056817) - [generator] Deprecate
generateCSN
option. (0f1056817) - [generator] Deprecate the
licenseInPackageJson
option. Useinclude
instead. (0f1056817) - [generator] Deprecate the
forceOverwrite
option. Useoverwrite
instead. (0f1056817)
Improvements
- [generator] Show warnings for deprecated options only if options where used.
- @sap-cloud-sdk/generator-common@2.12.0
- @sap-cloud-sdk/odata-common@2.12.0
- @sap-cloud-sdk/odata-v2@2.12.0
- @sap-cloud-sdk/odata-v4@2.12.0
- @sap-cloud-sdk/util@2.12.0 (0f1056817)
Fixed Issues
- [generator] Allow OData service to contain an entity name 'Service'. (0f1056817)
2.11.0 [Core Modules] - November 16, 2022
New Functionalities
- [odata-common] Add
getBatchReference()
andsetBatchId()
in request builders to use the batch ID as a reference to an entity in a batch request changeset. Batch reference are available increate
,delete
,getByKey
,update
andactions/functions
request builder. (79e0fe811) - [odata-v4, generator] Support parsing and generating OData bound functions and actions in OData v4 (8ea28151b)
- [generator, openapi-generator, generator-common] Generated sources are formatted using prettier with default config. Use the CLI option
prettierConfigPath
to provide a custom config. (74e14427a)
Improvements
- [odata-common] Change the place where batch ID is generated from on serialization to request creation. (79e0fe811)
2.10.0 [Core Modules] - November 02, 2022
Compatibility Notes
- [odata-common, odata-v2, odata-v4] Changed constructor argument of class
EntityBase
fromschema
to_entityApi
. (144ff66f4)
Improvements
- [openapi-generator] Add
force
option torm
commands, when settingclearOutputDir
to true. (f76da3060)
Fixed Issues
- [odata-v2, odata-v4] Fix the "entity generic type" of the "delete request builder". (f76da3060)
- [generator, openapi-generator] Show detailed error message of compilation errors instead of
[object Object]
. (f76da3060) - [generator-common] Show detailed error message of compilation errors instead of
[object Object]
.- @sap-cloud-sdk/util@2.10.0 (f76da3060)
2.9.0 [Core Modules] - September 20, 2022
New Functionalities
- [connectivity] Support fetching all subaccount- and service instance destinations from the destination service simultaneously. (24029503)
- [mail-client] Expose SMTP transport options of
nodemailer
. (d1bf2dee) - [util] Add method
setGlobalTransports
to support setting custom transport globally. (4c51d3dc)
Improvements
- [odata-common] Set
orderBy()
to ascending order by default. (f62eb0d3)
2.8.0 [Core Modules] - September 06, 2022
Compatibility Notes
- [eslint-config] Activated the eslint rule 'check-tag-names' to allowed jsdoc tags. If you use custom tags add them via the 'definedTags' in the eslint options. (15e9ef4b)
- [generator] Deprecated
generateNpmrc
cli option. This option was only used to configure the now defunct npm registry hosted by SAP. It now has no effect anymore and should be removed in all invocations of the generator cli. (15e9ef4b) - [generator, openapi-generator, generator-common] Description for package.json in a generated client has changed. (15e9ef4b)
New Functionalities
- [mail-client] Support defining the strategy of sending emails. By default, the emails are sent "in parallel" and can be set to "in sequential". (15e9ef4b)
- [odata-common, generator] Allow function imports using
GET
http method in batch requests. (15e9ef4b)
Improvements
- [connectivity] Reduce default logs for failing requests in @sap-cloud-sdk/http-client.
- @sap-cloud-sdk/util@2.8.0 (15e9ef4b)
Fixed Issues
- [connectivity] Remove last explicit references to 'VCAP_SERVICES' and replace them with '@sap/xsenv'. (15e9ef4b)
- [connectivity] Fix that unparsable destinations in the subaccount prevent other destinations from beeing fetched. (15e9ef4b)
2.7.1 [Core Modules] - August 12, 2022
Fixed Issues
- [mail-client] Fix proxy authorization for sending emails.
2.7.0 [Core Modules] - August 10, 2022
New Functionalities
- [openapi-generator] Support globs in the
input
option. (3f70b0c9)
Improvements
- [connectivity] Support consumption of the XSUAA API via destinations. (010a46fa)
Fixed Issues
- [connectivity] Fix a breaking change of
serviceToken
introduced in 2.0, so it acceptsXsuaaServiceCredentials
again as an option. (3bff42e1)
2.6.0 [Core Modules] - July 15, 2022
Compatibility Notes
- [odata-v4, temporal-de-serializers] Adjust parsing of
Edm.Date
,Edm.DateTimeOffset
,Edm.Time
, andEdm.Duration
to be closer to the OData v4 specification. There may be loss of precision if using the default (de-)serializers with high-precision fractional seconds. (de851289) - [generator] Deprecate generator option
versionInPackageJson
. If you need to set the version, use the newinclude
option to add your ownpackage.json
file instead. (069aa168) - [generator] The hidden generator option
additionalFiles
is renamed toinclude
. (069aa168) - [connectivity] Rename
transformationFn
intoserviceBindingTransformFn
inDestinationForServiceBindingsOptions
to avoid ambiguity and make the function async. (8fdfebd6)
New Functionalities
- [connectivity] Support JWTs without a
JKU
property. (cb598c16) - [connectivity] Add interface
DestinationCacheInterface
and methodsetDestinationCache
to support implementation of custom destination cache. (09094607) - [connectivity] Fetch client credential token for destinations created by service bindings. (93d41281)
- [generator] New generator option
include
which allows to add files to generated packages. (069aa168)
Improvements
- [http-client] Make
requestConfig
ofOriginOptions
optional. (e46bb51d)
Fixed Issues
- [connectivity] Fix
getDestination()
to allow passing an async transform functionserviceBindingTransformFn
inoptions
. The transform function can also be passed byexecute()
,executeHttpRequest()
,executeRaw()
, etc. - [http-client] Fix the
executeHttpRequest
/executeHttpRequestWithOrigin
function, so the warning is only shown when overwriting headers by using custom headers. (e44c214a) - [odata-common, odata-v4, temporal-de-serializers] Fix parsing of
Edm.DateTimeOffset
with high-precision fractional seconds and edge-cases like 5-digit years. (de851289) - [odata-common, generator] Allow OData service to contain an entity name 'entity'. (0675ee3b)
- [odata-v2] Support negative epoch timestamps in serialization. (9ffe0824)
2.5.0 [Core Modules] - June 13, 2022
Compatibility Notes
- [odata-common, generator] Change
Edm.String
,Edm.Boolean
andEdm.Guid
to be orderable to supportlt
/lessThan()
,le
/lessOrEqual()
,gt
/greaterThan()
, andge
/greaterOrEqual
operators. Re-generate odata services to adopt the changes. (c3166ff6) - [util] Stop using
VCAP_SERVICES
to determine the log format. UsesetLogFormat
andsetGlobalLogFormat
to specify the log format. By default, the log format is set tokibana
forNODE_ENV=production
andlocal
otherwise. (89f1c423)
Fixed Issues
- [http-client] Fix the
executeHttpRequest
function, so it accepts the same parameters as in version 1. [Compatibility Note] Deprecate one overload of theexecuteHttpRequest
function, that acceptsHttpRequestConfigWithOrigin
as a parameter. Use the new functionexecuteHttpRequestWithOrigin
as replacement. [New Functionality] Support defining header options and query parameter options with origins. (9481ec69)
2.4.0 [Core Modules] - May 20, 2022
Compatibility Notes
- [connectivity] Mark the function
noDestinationErrorMessage()
as internal API. - [odata-v4] Mark the function
uriConverter
as internal API. - [eslint-config] Switch the following
jsdoc
related levels fromwarn
toerror
:jsdoc/check-param-names
jsdoc/require-description-complete-sentence
jsdoc/require-jsdoc
jsdoc/require-param
jsdoc/require-returns
- [connectivity, http-client] Only log the successful retrieval of destinations on the
info
log level, log everything else asdebug
orwarn
.
New Functionality
- [connectivity] Support self-signed certificate using the
trustStore
property of the destination object.
Improvements
- [connectivity, http-client] Reduce default log output on the
info
level significantly.
Fixed Issues
- [util] Fix a bug in the implementation of the trim method.
2.3.0 [Core Modules] - Apr 22, 2022
Compatibility Notes
- [odata-common, odata-v2, odata-v4] Remove all
$format=json
query parameters since headerAccept: application/json
is sent by default.
New Functionality
- [odata-common] Generate mandatory
Content-Id
headers for changeset parts in batch request payloads (see OData Spec). - [odata-common] Support transforming response data for function and action imports before deserialization. #682.
Improvements
- [generator] Change log level from
warn
toerror
if service path cannot be determined from the service specification (VALUE_IS_UNDEFINED
). - [generator] Reduce memory usage of
schema
in API classes (e.g.,BusinessPartnerAPI
).
Fixed Issues
- [openapi-generator, openapi] Support path parameters that are not separated by '/', e.g.,
/path/{param}:{param}
.
2.2.0 [Core Modules] - Apr 6, 2022
Compatibility Notes
- [eslint-config] Replace
valid-jsdoc
witheslint-plugin-jsdoc
plugin for checking JSDoc comments, since thevalid-jsdoc
rule is deprecated in ESLint. To stop your project from using a specific rule, turn it off by setting the rule ID tooff
under therules
key inside your configuration file. - [generator] Stop exporting service classes (e.g.,
BusinessPartnerService
) from generated clients, usebusinessPartnerService()
instead. - [generator] Stop exporting API classes (e.g.,
BusinessPartnerAPI
) from generated clients, usebusinessPartnerService().businessPartnerApi
instead.
New Functionality
- [http-client] Introduce the
parameterEncoder
option to the request configuration of thehttp-client
to allow custom parameter encoding. - [http-client] Remove
method
fromdefaultDisallowedKeys
to not filter out custom http method when usingfilterCustomRequestConfig
. - [odata-common] Support adding custom http method in
addCustomRequestConfiguration
to overwrite the default http method. - [openapi] Support adding custom http method in
addCustomRequestConfiguration
to overwrite the default http method.
Improvements
- [generator] Remove unused imports (e.g,
moment
,bignumber.js
andEdmTypeField
) in API classes (e.g.,BusinessPartnerAPI
) to reduce memory usage. - [http-client] Introduce consistent query parameter encoding for all non custom parameters.
2.1.0 [Core Modules] - Feb 18, 2022
Improvements
- [connectivity] Add details to error message for missing "URL" properties in destinations.
- [util] Add
sanitizeRecord
function tocloud-sdk-logger
which replaces potentially sensitive information in aRecord<string, any>
based on a list of sensitive keys. - [generator] The new CLI option
licenceInPackageJson
offers the possibility to specify the license property in a generatedpackage.json
.
Fixed Issues
- [openapi-generator] Add
@sap-cloud-sdk/openapi
as a dependency to the OpenAPI generator to fix errors during generation with--transpile
enabled. - [connectivity] Fix an issue when using registering destinations with a JWT but without XSUAA service binding.
- [connectivity] Fix a missing export
DestinationSelectionStrategies
. - [odata-common] Fix URL encoding for
getByKey
2.0.0 [Core Modules] - Feb 03, 2022
We released version 2 :partying_face: Be mindful of breaking changes when upgrading. Enjoy multiple improvements and new features. Check the upgrade guide.
Compatibility Notes
- Upgrade the ES version to
es2019
.
New Functionality
- [connectivity] Create a new package with minimal API.
- [connectivity] Add
registerDestination
function to create destinations in thedestinations
environment variable. - [connectivity] Support the
SamlAssertion
flow in destination retrieval. - [http-client] Create a new package with minimal API.
Removed functionality
- [generator] Remove the option:
aggregatorDirectoryName
andaggregatorNpmPackageName
- [generator] Remove the option:
generateTypedocJson
- [generator] Remove
packageJson
function from aggregator-package - [core] Remove some functions
- [analytics] Remove the
@sap-cloud-sdk/analytics
package
New module structure
- [core] We have split the
core
package into smaller packages, so functions are moved to the target package.
Changed signatures
- [core]
EdmTypeField
only support EDM types, no field types in generics
Changed implementation
- [generator] changed the following implementations
ServiceNameFormatter
deprecated constructor removed, reserverdName parameter from typeNameToFactoryName method removedVdmNavigationpropety
multiplicity, isMultiLink removedVdmFunctionImportReturnType
isMulti removed
- [openapi] changed the following implementations
execute
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.executeRaw
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
- [odata-common] changed the following implementations
ComplexTypeField
deprecated constructors removedConstructable
Selectable removedCreateRequestBuilderBase
prepare removedEntityBase
getCurrentMapKey, initializeCustomFields removedEnumField
edmType removedFilter
_fieldName property removedFilterFunction
toString, transformParameter removedLink
clone, selects removedMethodRequestBuilder
withCustomHeaders, withCustomQueryParameters, withCustomServicePath removed, build protectedODataRequestConfig
contentType, deprecated constructor removedODataBatchRequestConfig
batchId, content_type_prefix removedOneToOneLink
clone removedUpdateRequestBuilderBase
prepare, requiredFields, ignoredFields, withCustomVersionIdentifier removedexecute
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions..executeRaw
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
- [odata-v2] changed the following implementations
execute
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.executeRaw
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
- [odata-v4] changed the following implementations
execute
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.executeRaw
Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
- [connectivity] changed the following implementations
getDestination
changed to use DestinationFetchOptions as single parameter.getProxyRelatedAuthHeaders
legacyNoAuthOnPremiseProxy case removedserviceToken
usesJWT
instead of userJwt now.jwtBearerToken
usesJWT
instead of userJwt now.fetchVerificationKeys
merged withexecuteFetchVerificationKeys
, now only accepts URL as parameter
- [http-client] changed the following implementations
executeHttpRequest
fetches CsrfToken for non-GET
requests by default.