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

@balena/odata-to-abstract-sql

Package Overview
Dependencies
Maintainers
1
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/odata-to-abstract-sql - npm Package Compare versions

Comparing version 5.4.11 to 5.4.12-nullish-coalescing-c69dff4d46792c4c858f869646adca9272210364

6

CHANGELOG.md

@@ -7,4 +7,8 @@ # Change Log

## 5.4.11 - 2022-05-20
## 5.4.12 - 2022-06-03
* Use nullish coalescing when sensible [Pagan Gazzard]
## 5.4.11 - 2022-05-19
* Improve support for computed fields by respecting them in more places [Pagan Gazzard]

@@ -11,0 +15,0 @@

22

out/odata-to-abstract-sql.js

@@ -323,5 +323,6 @@ "use strict";

resource.fields.map((field) => {
var _a;
const alias = field.fieldName;
const bindVar = bindVars === null || bindVars === void 0 ? void 0 : bindVars.find((v) => v[0] === alias);
const value = bindVar ? bindVar[1] : 'Null';
const value = (_a = bindVar === null || bindVar === void 0 ? void 0 : bindVar[1]) !== null && _a !== void 0 ? _a : 'Null';
return ['Alias', ['Cast', value, field.dataType], alias];

@@ -582,5 +583,4 @@ }),

ResourceMapping(resource) {
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
var _a;
const tableAlias = (_a = resource.tableAlias) !== null && _a !== void 0 ? _a : resource.name;
const resourceMappings = {};

@@ -662,2 +662,3 @@ for (const { fieldName } of resource.fields) {

ReferencedField(resource, resourceField) {
var _a;
const mapping = this.ResourceMapping(resource);

@@ -673,5 +674,3 @@ if (mapping[resourceField]) {

const relationshipMapping = this.ResolveRelationship(resource, resourceField);
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
const tableAlias = (_a = resource.tableAlias) !== null && _a !== void 0 ? _a : resource.name;
if (relationshipMapping.length > 1 &&

@@ -1097,10 +1096,7 @@ relationshipMapping[0] === resource.idField) {

NavigateResources(resource, navigation) {
var _a, _b;
const relationshipMapping = this.ResolveRelationship(resource, navigation);
const linkedResource = this.Resource(navigation, resource);
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
const linkedTableAlias = linkedResource.tableAlias
? linkedResource.tableAlias
: linkedResource.name;
const tableAlias = (_a = resource.tableAlias) !== null && _a !== void 0 ? _a : resource.name;
const linkedTableAlias = (_b = linkedResource.tableAlias) !== null && _b !== void 0 ? _b : linkedResource.name;
return {

@@ -1107,0 +1103,0 @@ resource: linkedResource,

{
"name": "@balena/odata-to-abstract-sql",
"version": "5.4.11",
"version": "5.4.12-nullish-coalescing-c69dff4d46792c4c858f869646adca9272210364",
"description": "A consumer of the OData parser, written in OMeta",

@@ -57,4 +57,4 @@ "main": "out/odata-to-abstract-sql.js",

"versionist": {
"publishedAt": "2022-05-20T11:32:25.760Z"
"publishedAt": "2022-06-03T15:44:57.040Z"
}
}

@@ -224,3 +224,3 @@ import * as _ from 'lodash';

if (typeof bind[1] === 'number') {
(bind[1] as any) += inc;
bind[1] += inc;
}

@@ -501,3 +501,3 @@ },

const bindVar = bindVars?.find((v) => v[0] === alias);
const value = bindVar ? bindVar[1] : 'Null';
const value = bindVar?.[1] ?? 'Null';
return ['Alias', ['Cast', value, field.dataType], alias];

@@ -819,5 +819,3 @@ }),

ResourceMapping(resource: Resource): _.Dictionary<[string, string]> {
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
const tableAlias = resource.tableAlias ?? resource.name;
const resourceMappings: _.Dictionary<[string, string]> = {};

@@ -939,5 +937,3 @@ for (const { fieldName } of resource.fields) {

);
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
const tableAlias = resource.tableAlias ?? resource.name;
if (

@@ -1419,8 +1415,4 @@ relationshipMapping.length > 1 &&

const linkedResource = this.Resource(navigation, resource);
const tableAlias = resource.tableAlias
? resource.tableAlias
: resource.name;
const linkedTableAlias = linkedResource.tableAlias
? linkedResource.tableAlias
: linkedResource.name;
const tableAlias = resource.tableAlias ?? resource.name;
const linkedTableAlias = linkedResource.tableAlias ?? linkedResource.name;
return {

@@ -1427,0 +1419,0 @@ resource: linkedResource,

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