New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/annotation-converter

Package Overview
Dependencies
Maintainers
3
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/annotation-converter - npm Package Compare versions

Comparing version 0.5.10 to 0.5.11

6

CHANGELOG.md
# @sap-ux/annotation-converter
## 0.5.11
### Patch Changes
- a5b4df9: Make sure annotations object is defined like the type says
## 0.5.10

@@ -4,0 +10,0 @@

20

dist/converter.js

@@ -170,2 +170,5 @@ "use strict";

}
if (pathPart === '$' && currentValue._type === 'EntitySet') {
return currentValue;
}
if ((pathPart === '@$ui5.overload' || pathPart === '0') && currentValue._type === 'Action') {

@@ -200,2 +203,6 @@ return currentValue;

}
else if (currentValue._type === 'EntitySet' && pathPart === '$NavigationPropertyBinding') {
currentValue = currentValue.navigationPropertyBinding;
return currentValue;
}
else if (currentValue._type === 'EntitySet' && currentValue.entityType) {

@@ -464,3 +471,4 @@ currentPath = combinePath(currentValue.entityTypeName, pathPart);

$Type: targetType,
fullyQualifiedName: currentFQN
fullyQualifiedName: currentFQN,
annotations: {}
};

@@ -865,3 +873,7 @@ const annotationContent = {};

if (resolveDirectly) {
const targetResolution = _resolveTarget(objectMap, convertedOutput, '/' + sPath, false, true);
let targetPath = sPath;
if (!sPath.startsWith('/')) {
targetPath = `/${sPath}`;
}
const targetResolution = _resolveTarget(objectMap, convertedOutput, targetPath, false, true);
if (targetResolution.target) {

@@ -943,2 +955,6 @@ targetResolution.visitedObjects.push(targetResolution.target);

}
if (typeof currentTarget.annotations[vocAlias][vocTermWithQualifier] === 'object' &&
!currentTarget.annotations[vocAlias][vocTermWithQualifier].annotations) {
currentTarget.annotations[vocAlias][vocTermWithQualifier].annotations = {};
}
if (currentTarget.annotations[vocAlias][vocTermWithQualifier] !== null &&

@@ -945,0 +961,0 @@ typeof currentTarget.annotations[vocAlias][vocTermWithQualifier] === 'object') {

4

dist/writeback.js

@@ -197,3 +197,3 @@ "use strict";

}
else if (collectionKey === 'annotations') {
else if (collectionKey === 'annotations' && Object.keys(collectionItem[collectionKey]).length > 0) {
outItem.annotations = [];

@@ -239,3 +239,3 @@ revertAnnotationsToRawType(references, collectionItem[collectionKey], outItem.annotations);

// Collection
if (annotation.hasOwnProperty('annotations')) {
if (annotation.hasOwnProperty('annotations') && Object.keys(annotation.annotations).length > 0) {
// Annotation on a collection itself, not sure when that happens if at all

@@ -242,0 +242,0 @@ baseAnnotation.annotations = [];

{
"name": "@sap-ux/annotation-converter",
"version": "0.5.10",
"version": "0.5.11",
"description": "SAP Fiori OData - Annotation converter",

@@ -5,0 +5,0 @@ "repository": {

@@ -217,2 +217,5 @@ import type {

}
if (pathPart === '$' && currentValue._type === 'EntitySet') {
return currentValue;
}
if ((pathPart === '@$ui5.overload' || pathPart === '0') && currentValue._type === 'Action') {

@@ -245,2 +248,5 @@ return currentValue;

return currentValue;
} else if (currentValue._type === 'EntitySet' && pathPart === '$NavigationPropertyBinding') {
currentValue = currentValue.navigationPropertyBinding;
return currentValue;
} else if (currentValue._type === 'EntitySet' && currentValue.entityType) {

@@ -551,3 +557,4 @@ currentPath = combinePath(currentValue.entityTypeName, pathPart);

$Type: targetType,
fullyQualifiedName: currentFQN
fullyQualifiedName: currentFQN,
annotations: {}
};

@@ -1074,3 +1081,7 @@ const annotationContent: any = {};

if (resolveDirectly) {
const targetResolution: any = _resolveTarget(objectMap, convertedOutput, '/' + sPath, false, true);
let targetPath = sPath;
if (!sPath.startsWith('/')) {
targetPath = `/${sPath}`;
}
const targetResolution: any = _resolveTarget(objectMap, convertedOutput, targetPath, false, true);
if (targetResolution.target) {

@@ -1158,2 +1169,3 @@ targetResolution.visitedObjects.push(targetResolution.target);

);
switch (typeof currentTarget.annotations[vocAlias][vocTermWithQualifier]) {

@@ -1177,2 +1189,8 @@ case 'string':

if (
typeof currentTarget.annotations[vocAlias][vocTermWithQualifier] === 'object' &&
!currentTarget.annotations[vocAlias][vocTermWithQualifier].annotations
) {
currentTarget.annotations[vocAlias][vocTermWithQualifier].annotations = {};
}
if (
currentTarget.annotations[vocAlias][vocTermWithQualifier] !== null &&

@@ -1179,0 +1197,0 @@ typeof currentTarget.annotations[vocAlias][vocTermWithQualifier] === 'object'

@@ -210,3 +210,3 @@ import type {

});
} else if (collectionKey === 'annotations') {
} else if (collectionKey === 'annotations' && Object.keys(collectionItem[collectionKey]).length > 0) {
outItem.annotations = [];

@@ -250,3 +250,3 @@ revertAnnotationsToRawType(references, collectionItem[collectionKey], outItem.annotations);

// Collection
if (annotation.hasOwnProperty('annotations')) {
if (annotation.hasOwnProperty('annotations') && Object.keys((annotation as any).annotations).length > 0) {
// Annotation on a collection itself, not sure when that happens if at all

@@ -253,0 +253,0 @@ baseAnnotation.annotations = [];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc