@sap/cds 7.8.0 → 7.8.1

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,13 @@
4
4
  - The format is based on [Keep a Changelog](http://keepachangelog.com/).
5
5
  - This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## Version 7.8.1 - 2024-04-11
8
+
9
+ ### Fixed
10
+
11
+ - In some cases, `<entity>.drafts` erroneously pointed to a CSN entity stub.
12
+ - Feature vectors including falsy values like `{ ft1: true, ft2: true, ft3: false }`
13
+
7
14
  ## Version 7.8.0 - 2024-03-25
8
15
 
9
16
  ### Added
@@ -23,6 +23,7 @@ class entity extends struct {
23
23
  }
24
24
 
25
25
  get drafts() {
26
+ if (cds.env.fiori.lean_draft) return null
26
27
  // Remove this getter when old draft is removed
27
28
  return this.own('_drafts') || this.set('_drafts', this.elements?.HasDraftEntity && {
28
29
  name: this.name + '_drafts', keys: this.keys,
@@ -192,7 +192,7 @@ class Features {
192
192
  if (x == null) return
193
193
  if (x === '*') return this.all
194
194
  if (Array.isArray(x)) ; //> go on below
195
- else if (typeof x === 'object') x = Object.keys(x)
195
+ else if (typeof x === 'object') x = Object.keys(x).filter(k => x[k])
196
196
  else if (typeof x === 'string') x = x.split(',')
197
197
  if (x.length) return Object.assign (new this, x.reduce((o,f)=>{o[f]=true;return o},{}))
198
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds",
3
- "version": "7.8.0",
3
+ "version": "7.8.1",
4
4
  "description": "SAP Cloud Application Programming Model - CDS for Node.js",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [