@sap-ux/edmx-parser
Advanced tools
Comparing version 0.8.2 to 0.9.0
# @sap-ux/edmx-parser | ||
## 0.9.0 | ||
### Minor Changes | ||
- d581d62: **BREAKING CHANGE**: parser and writeback no longer incorrectly convert string Collections entries as `string`. Now returned values correctly match the `StringExpression` type and function signatures. | ||
## 0.8.2 | ||
@@ -4,0 +10,0 @@ |
@@ -486,3 +486,6 @@ "use strict"; | ||
else if (isExpressionOfType(collection, 'String')) { | ||
const stringArray = (0, utils_1.ensureArray)(collection.String).map((stringValue) => stringValue._text); | ||
const stringArray = (0, utils_1.ensureArray)(collection.String).map((stringValue) => ({ | ||
type: 'String', | ||
String: stringValue._text | ||
})); | ||
stringArray.type = 'String'; | ||
@@ -489,0 +492,0 @@ return stringArray; |
{ | ||
"name": "@sap-ux/edmx-parser", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"description": "SAP Fiori OData - EDMX File parser", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"devDependencies": { | ||
"@sap-ux/vocabularies-types": "0.11.6" | ||
"@sap-ux/vocabularies-types": "0.12.1" | ||
}, | ||
@@ -23,0 +23,0 @@ "scripts": { |
@@ -7,2 +7,3 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference | ||
AnnotationRecord, | ||
ArrayWithType, | ||
Expression, | ||
@@ -709,5 +710,10 @@ FullyQualifiedName, | ||
} else if (isExpressionOfType<EDMX.StringCollectionWrapper>(collection, 'String')) { | ||
const stringArray = ensureArray(collection.String).map((stringValue) => stringValue._text); | ||
(stringArray as any).type = 'String'; | ||
return stringArray as unknown as StringExpression[]; | ||
const stringArray: ArrayWithType<StringExpression, 'String'> = ensureArray(collection.String).map( | ||
(stringValue): StringExpression => ({ | ||
type: 'String', | ||
String: stringValue._text | ||
}) | ||
); | ||
stringArray.type = 'String'; | ||
return stringArray; | ||
} else if (isExpressionOfType<EDMX.AnnotationPathCollectionWrapper>(collection, 'AnnotationPath')) { | ||
@@ -714,0 +720,0 @@ const annotationPathArray = ensureArray(collection.AnnotationPath).map( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
261355
4827