@sap/cds-compiler 5.9.6 → 5.9.8

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
@@ -7,6 +7,11 @@
7
7
  Note: `beta` fixes, changes and features are usually not listed in this ChangeLog but [here](doc/CHANGELOG_BETA.md).
8
8
  The compiler behavior concerning `beta` features can change at any time without notice.
9
9
 
10
+
11
+ ## Version 5.9.8 - 2025-07-14
12
+
13
+ - compiler: Calculated elements can now have a localized type
14
+
10
15
  ## Version 5.9.6 - 2025-06-18
11
16
 
12
17
  - to.sql: Fix error when calculated element refers to a localized element.
@@ -209,7 +209,7 @@ function generate( model ) {
209
209
  conflictingElements.push( elem );
210
210
 
211
211
  const isKey = elem.key && elem.key.val;
212
- const isLocalized = hasTruthyProp( elem, 'localized' );
212
+ const isLocalized = elem.$syntax !== 'calc' && hasTruthyProp( elem, 'localized' );
213
213
 
214
214
  if (isKey) {
215
215
  keys += 1;
@@ -924,7 +924,7 @@ function resolve( model ) {
924
924
  } );
925
925
  }
926
926
  else {
927
- const noTruthyAllowed = [ 'localized', 'key', 'virtual' ];
927
+ const noTruthyAllowed = [ 'key', 'virtual' ];
928
928
  for (const prop of noTruthyAllowed) {
929
929
  if (art[prop]?.val) {
930
930
  // probably better than a parse error (which is good for DEFAULT vs calc),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-compiler",
3
- "version": "5.9.6",
3
+ "version": "5.9.8",
4
4
  "description": "CDS (Core Data Services) compiler and backends",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "author": "SAP SE (https://www.sap.com)",