Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap/cds-compiler

Package Overview
Dependencies
Maintainers
1
Versions
109
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 1.49.2 to 1.50.0

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # ChangeLog for cdx compiler and backends

## Version 1.50.0 - 2021-02-25
### Added
- Introduce annotation `@cds.redirection.target`.
With value `false`, the projection is not considered an implicit redirection target;
with value `true`, is is considered a “preferred” redirection target.
## Version 1.49.2 - 2021-02-16

@@ -11,0 +19,0 @@

33

lib/api/main.js

@@ -217,6 +217,6 @@ /** @module API */

*
* @param {CSN.Model} csn A clean input CSN representing the desired "after-image"
* @param {CSN.Model} beforeImage A HANA-transformed CSN representing the "before-image", or null in case no such image
* @param {CSN.Model} csn A clean input CSN representing the desired "after-image"
* @param {hdiOptions} options Options
* @param {CSN.Model} beforeImage A HANA-transformed CSN representing the "before-image", or null in case no such image
* is known, i.e. for the very first migration step
* @param {hdiOptions} [options={}] Options
* @returns {object} - afterImage: The desired after-image in HANA-CSN format

@@ -234,3 +234,28 @@ * - definitions: An array of objects with all artifacts in the after-image. Each object specifies

*/
function hdiMigration(csn, beforeImage, options = {}) {
function hdiMigration(csn, options, beforeImage) {
/**
* Swap arguments in case of inverted argument order.
* This is for backward compatibility with @sap/cds@4.5.(2…3).
*
* @todo Remove in cds-compiler@2.x
* @param {hdiOptions|CSN.Model} inputOptions Options or CSN image
* @param {CSN.Model|hdiOptions} inputBeforeImage CSN image or options
* @returns {Array} Array where the real options come first
*/
function backwardCompatible(inputOptions, inputBeforeImage) {
/**
* Check wether the given argument is a CSN
*
* @param {object} arg Argument to verify
* @returns {boolean} True if it is a CSN
*/
function isBeforeImage(arg) {
return arg === null || [ 'definitions', 'meta', '$version' ].some(key => key in arg);
}
return isBeforeImage(inputBeforeImage)
? [ inputOptions, inputBeforeImage ]
: [ inputBeforeImage, inputOptions ];
}
[ options, beforeImage ] = backwardCompatible(options, beforeImage);
const internalOptions = prepareOptions.to.hdi(options);

@@ -237,0 +262,0 @@ internalOptions.toSql.csn = true;

@@ -22,2 +22,3 @@ //

'@cds.autoexposed': never, // in case people set it themselves
'@cds.redirection.target': never,
'@fiori.draft.enabled': onlyViaArtifact,

@@ -24,0 +25,0 @@ '@': withKind, // always except in 'returns' and 'items'

4

package.json
{
"name": "@sap/cds-compiler",
"version": "1.49.2",
"version": "1.50.0",
"description": "CDS (Core Data Services) compiler and backends",
"homepage": "https://cap.cloud.sap/",
"author": "SAP SE (https://www.sap.com)",
"license": "See LICENSE file",
"license": "SEE LICENSE IN LICENSE",
"bin": {

@@ -9,0 +9,0 @@ "cdsc": "bin/cdsc.js",

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