Socket
Socket
Sign inDemoInstall

@sap/cds-compiler

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/cds-compiler - npm Package Compare versions

Comparing version 2.11.0 to 2.11.2

7

lib/transform/db/constraints.js

@@ -297,10 +297,5 @@ 'use strict';

// up_ association
if (element.$selfOnCondition && element.targetAspect) {
if (element.$selfOnCondition && element.targetAspect)
assignPropOnBacklinkIfPossible(SKIP_FOR_UP, true);
return true;
}
if (element.type === 'cds.Composition')
return false;
return true;

@@ -307,0 +302,0 @@ }

20

lib/transform/transformUtilsNew.js

@@ -1097,12 +1097,12 @@ 'use strict';

'on': (parent, name, on, path) => {
parent.on = expand(parent.on, path);
parent.on = expand(parent.on, path.concat(name));
},
'having': (parent, name, having, path) => {
parent.having = expand(parent.having, path);
parent.having = expand(parent.having, path.concat(name));
},
'where': (parent, name, where, path) => {
parent.where = expand(parent.where, path);
parent.where = expand(parent.where, path.concat(name));
},
'xpr': (parent, name, xpr, path) => {
parent.xpr = expand(parent.xpr, path);
parent.xpr = expand(parent.xpr, path.concat(name));
}

@@ -1125,6 +1125,10 @@ }, undefined, undefined, options);

const [lhs, op, rhs] = expr.slice(i);
// we might have to ad-hoc resolve a ref, since handleExists is run before hand and generates new refs.
const lhsArt = lhs._art || lhs.ref && !lhs.$scope && inspectRef(location.concat(i)).art;
const rhsArt = rhs._art || rhs.ref && !rhs.$scope && inspectRef(location.concat(i+2)).art;
// lhs & rhs must be expandable types (structures or managed associations)
if(lhs._art && rhs._art &&
if(lhsArt && rhsArt &&
lhs.ref && rhs.ref &&
isExpandable(lhs._art) && isExpandable(rhs._art) &&
isExpandable(lhsArt) && isExpandable(rhsArt) &&
['=', '<', '>', '>=', '<=', '!=', '<>'].includes(op) &&

@@ -1135,4 +1139,4 @@ !(isDollarSelfOrProjectionOperand(lhs) || isDollarSelfOrProjectionOperand(rhs))) {

// only do the expansion on (managed) assocs and (items.)elements, array of check in ON cond is done elsewhere
const lhspaths = /*isScalarOrNoType(lhs._art) ? [ lhs ] : */ flattenPath({ _art: lhs._art, ref: lhs.ref }, false, true );
const rhspaths = /*isScalarOrNoType(rhs._art) ? [ rhs ] : */ flattenPath({ _art: rhs._art, ref: rhs.ref }, false, true );
const lhspaths = /*isScalarOrNoType(lhs._art) ? [ lhs ] : */ flattenPath({ _art: lhsArt, ref: lhs.ref }, false, true );
const rhspaths = /*isScalarOrNoType(rhs._art) ? [ rhs ] : */ flattenPath({ _art: rhsArt, ref: rhs.ref }, false, true );

@@ -1139,0 +1143,0 @@ // mapping dict for lhs/rhs for mismatch check

{
"name": "@sap/cds-compiler",
"version": "2.11.0",
"version": "2.11.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

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