@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 +5 -0
- package/lib/compiler/generate.js +1 -1
- package/lib/compiler/resolve.js +1 -1
- package/package.json +1 -1
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.
|
package/lib/compiler/generate.js
CHANGED
|
@@ -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;
|
package/lib/compiler/resolve.js
CHANGED
|
@@ -924,7 +924,7 @@ function resolve( model ) {
|
|
|
924
924
|
} );
|
|
925
925
|
}
|
|
926
926
|
else {
|
|
927
|
-
const noTruthyAllowed = [ '
|
|
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),
|