@sap/cds 8.9.3 → 8.9.4

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,15 @@
4
4
  - The format is based on [Keep a Changelog](https://keepachangelog.com/).
5
5
  - This project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## Version 8.9.4 - 2025-05-16
8
+
9
+ ### Fixed
10
+
11
+ - No longer require `@sap/cds-compiler` versions 6.x as these are not supported with CAP Java 3.
12
+ - Regression in view resolving with mixins
13
+ - View resolving for external service entities aborted too early
14
+ - `cds.Map` validation in action/function parameters
15
+
7
16
  ## Version 8.9.3 - 2025-05-06
8
17
 
9
18
  ### Fixed
@@ -147,6 +147,7 @@ class type extends any { is(kind) { return kind === 'type' || super.is(kind) }
147
147
  }
148
148
 
149
149
  class Map extends struct {
150
+ get '@open' () { return this.set('@open', true) }
150
151
  get elements() { return this.set('elements', new LinkedDefinitions) }
151
152
  }
152
153
 
@@ -47,6 +47,7 @@ class LinkedCSN {
47
47
  if (p.actions && !d.actions) _set (d,'actions',undefined) //> don't propagate .actions
48
48
  if (p.params && !d.params) _set (d,'params',undefined) //> don't propagate .params
49
49
  if (d.elements?.localized) _set (d,'texts', defs[d.elements.localized.target])
50
+ if (!Object.hasOwn(d,'_service')) _set (d,'_service',undefined) //> don't propagate ._service
50
51
  } else if (d.kind === 'element') {
51
52
  if (p.key && !d.key) _set (d,'key',undefined) //> don't propagate .key
52
53
  }
package/lib/ql/resolve.js CHANGED
@@ -8,6 +8,7 @@ const _isPersistenceTable = target =>
8
8
  // REVISIT revert after cds-dbs pr
9
9
  // REVISIT: Remove once we get rid of old db
10
10
  const _abortDB = resolve.abortDB = target => !!(_isPersistenceTable(target)|| !target.query?._target)
11
+ // _service seems to be inherited in projections, so do not consider prototype chain
11
12
  const _defaultAbort = tx => e => e._service?.name === tx.definition?.name
12
13
 
13
14
  function resolve(query, tx, abortCondition) {
@@ -32,7 +32,7 @@ const _inverseTransition = transition => {
32
32
  const ref0 = value.ref[0]
33
33
  if (value.ref.length > 1) {
34
34
  // ignore flattened columns like author.name
35
- if (transition.target.elements[ref0].isAssociation) continue
35
+ if (transition.target.elements[ref0]?.isAssociation) continue
36
36
 
37
37
  const nested = inverseTransition.mapping.get(ref0) || {}
38
38
  if (!nested.transition) nested.transition = { mapping: new Map() }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds",
3
- "version": "8.9.3",
3
+ "version": "8.9.4",
4
4
  "description": "SAP Cloud Application Programming Model - CDS for Node.js",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "node": ">=18"
34
34
  },
35
35
  "dependencies": {
36
- "@sap/cds-compiler": ">=5.1",
36
+ "@sap/cds-compiler": "^5",
37
37
  "@sap/cds-fiori": "^1",
38
38
  "@sap/cds-foss": "^5.0.0"
39
39
  },