@sap/cds-compiler
Advanced tools
Comparing version 4.4.0 to 4.4.2
@@ -10,2 +10,12 @@ # ChangeLog for cds compiler and backends | ||
## Version 4.4.2 - 2023-11-17 | ||
### Fixed | ||
- for.odata: Fix crash when using a projection with associations as action parameter type. | ||
- to.edm(x): `Edm.AnyPropertyPath` is hard to `Edm.PropertyPath`. As there is no dynamic path evaluation, | ||
`Edm.NavigationPropertyPath` must be enforced via `$edmJson`. | ||
`Edm.AnyPropertyPath` has been used in `@Aggregation.ApplySupported.GroupableProperties` for the first | ||
time after vocabulary update with [4.4.0](#version-440---2023-11-09). | ||
## Version 4.4.0 - 2023-11-09 | ||
@@ -12,0 +22,0 @@ |
@@ -34,4 +34,19 @@ // Extend | ||
// Array.prototype.spread = 42; // prototype-polluted JS classes | ||
const draftElements = [ | ||
'IsActiveEntity', | ||
'HasActiveEntity', | ||
'HasDraftEntity', | ||
'DraftAdministrativeData', | ||
'SiblingEntity', | ||
]; | ||
const draftBoundActions = [ | ||
'draftPrepare', | ||
'draftActivate', | ||
'draftEdit', | ||
]; | ||
function canBeDraftMember( name, parent, draftMembers ) { | ||
return parent?.kind === 'entity' && parent._service && draftMembers.includes( name ); | ||
} | ||
function extend( model ) { | ||
@@ -722,3 +737,5 @@ // Get simplified "resolve" functionality and the message function: | ||
case 'actions': | ||
// TODO: use extra text variant and location of dictionary | ||
if (canBeDraftMember( name, parent, draftBoundActions )) | ||
return true; | ||
// TODO: use extra text variant and location of dictionary - no | ||
notFound( 'ext-undefined-action', ext.name.location, ext, | ||
@@ -739,2 +756,4 @@ { '#': 'action', art: parent, name } ); | ||
case 'elements': | ||
if (canBeDraftMember( name, parent, draftElements )) | ||
break; | ||
notFound( 'ext-undefined-element', ext.name.location, ext, | ||
@@ -755,2 +774,4 @@ { '#': (inReturns ? 'returns' : 'element'), art, name }, | ||
case 'actions': | ||
if (canBeDraftMember( name, parent, draftBoundActions )) | ||
break; | ||
notFound( 'ext-undefined-action', ext.name.location, ext, | ||
@@ -757,0 +778,0 @@ { '#': 'action', art: parent, name }, |
@@ -249,5 +249,13 @@ 'use strict'; | ||
}; | ||
const EdmPathTypeMap = { | ||
'Edm.AnnotationPath': 1, | ||
'Edm.PropertyPath': 1, | ||
'Edm.NavigationPropertyPath': 1, | ||
'Edm.AnyPropertyPath': 1, | ||
'Edm.ModelElementPath': 1, | ||
'Edm.Path': 1, | ||
}; | ||
module.exports = { | ||
EdmTypeFacetMap, EdmTypeFacetNames, EdmPrimitiveTypeMap, | ||
EdmTypeFacetMap, EdmTypeFacetNames, EdmPrimitiveTypeMap, EdmPathTypeMap, | ||
}; |
@@ -101,3 +101,5 @@ 'use strict'; | ||
effectiveType, | ||
getFinalTypeInfo | ||
getFinalTypeInfo, | ||
dropDefinitionCache, | ||
initDefinition, | ||
} = csnUtils; | ||
@@ -151,2 +153,4 @@ | ||
def.query = { SELECT: def.projection }; | ||
dropDefinitionCache(def); | ||
initDefinition(def); | ||
} | ||
@@ -153,0 +157,0 @@ }], |
{ | ||
"name": "@sap/cds-compiler", | ||
"version": "4.4.0", | ||
"version": "4.4.2", | ||
"description": "CDS (Core Data Services) compiler and backends", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cap.cloud.sap/", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4666326
95206