@cap-js/change-tracking 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
6
6
 
7
+ ## Version 1.0.5 - 15.01.24
8
+
9
+ ### Fixed
10
+
11
+ - Error on HANA when logging Boolean or Numeric Data
12
+
7
13
  ## Version 1.0.4 - 08.01.24
8
14
 
9
15
  ### Added
package/lib/change-log.js CHANGED
@@ -301,8 +301,8 @@ function _trackedChanges4 (srv, target, diff) {
301
301
  entity: getDBEntity(element.parent).name,
302
302
  serviceEntity: element.parent.name,
303
303
  attribute: element["@odata.foreignKey4"] || key,
304
- valueChangedFrom: from || '',
305
- valueChangedTo: to || '',
304
+ valueChangedFrom: from?? '',
305
+ valueChangedTo: to?? '',
306
306
  valueDataType: element.type,
307
307
  modification: row._op,
308
308
  keys,
@@ -367,7 +367,11 @@ async function track_changes (req) {
367
367
  entity: dbEntity.name,
368
368
  entityKey: entityKey,
369
369
  serviceEntity: target.name,
370
- changes: changes.filter(c => c.valueChangedFrom || c.valueChangedTo),
370
+ changes: changes.filter(c => c.valueChangedFrom || c.valueChangedTo).map((c) => ({
371
+ ...c,
372
+ valueChangedFrom: `${c.valueChangedFrom ?? ''}`,
373
+ valueChangedTo: `${c.valueChangedTo ?? ''}`,
374
+ })),
371
375
  })
372
376
  }
373
377
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-js/change-tracking",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "CDS plugin providing out-of-the box support for automatic capturing, storing, and viewing of the change records of modeled entities.",
5
5
  "repository": "cap-js/change-tracking",
6
6
  "author": "SAP SE (https://www.sap.com)",