@balena/odata-to-abstract-sql
Advanced tools
Comparing version 5.3.0 to 5.3.1-update-deps-cbf2e34206074ebf6ab18dbdec5b3280f6aa4d3a
@@ -7,2 +7,39 @@ # Change Log | ||
## 5.3.1 - 2020-11-25 | ||
<details> | ||
<summary> Update dependencies [Pagan Gazzard] </summary> | ||
> ### abstract-sql-compiler-7.0.4 - 2020-11-25 | ||
> | ||
> | ||
> <details> | ||
> <summary> Update sbvr-types and make use of `castType` [Pagan Gazzard] </summary> | ||
> | ||
>> #### sbvr-types-3.1.2 - 2020-11-25 | ||
>> | ||
>> * Add a `castType` property to type functions [Pagan Gazzard] | ||
>> | ||
>> #### sbvr-types-3.1.1 - 2020-11-25 | ||
>> | ||
>> * Update dependencies [Pagan Gazzard] | ||
>> | ||
> </details> | ||
> | ||
> | ||
> ### abstract-sql-compiler-7.0.3 - 2020-10-02 | ||
> | ||
> * Remove accidental `necessity` from the `AbstractSqlField` types [Pagan Gazzard] | ||
> | ||
> ### odata-parser-2.2.1 - 2020-11-25 | ||
> | ||
> * Update dependencies [Pagan Gazzard] | ||
> | ||
> ### odata-parser-2.2.0 - 2020-08-18 | ||
> | ||
> * Add support for metadata argument in $format [Pagan Gazzard] | ||
> | ||
</details> | ||
## 5.3.0 - 2020-07-21 | ||
@@ -9,0 +46,0 @@ |
@@ -102,3 +102,3 @@ "use strict"; | ||
}; | ||
exports.rewriteBinds = (definition, existingBinds, inc = 0) => { | ||
const rewriteBinds = (definition, existingBinds, inc = 0) => { | ||
inc += existingBinds.length; | ||
@@ -112,3 +112,4 @@ modifyAbstractSql('Bind', definition.abstractSqlQuery, (bind) => { | ||
}; | ||
exports.isBindReference = (maybeBind) => { | ||
exports.rewriteBinds = rewriteBinds; | ||
const isBindReference = (maybeBind) => { | ||
return (maybeBind != null && | ||
@@ -118,2 +119,3 @@ 'bind' in maybeBind && | ||
}; | ||
exports.isBindReference = isBindReference; | ||
const addBodyKey = (resourceName, fieldName, bind, bodyKeys, extraBodyVars) => { | ||
@@ -604,3 +606,4 @@ const qualifiedIDField = resourceName + '.' + fieldName; | ||
const field = this.Property(prop); | ||
const resourceField = field.resource.fields.find(({ fieldName }) => fieldName === field.name); | ||
const sqlName = exports.odataNameToSqlName(field.name); | ||
const resourceField = field.resource.fields.find(({ fieldName }) => fieldName === sqlName); | ||
return [field.resource, field.name, resourceField === null || resourceField === void 0 ? void 0 : resourceField.computed]; | ||
@@ -607,0 +610,0 @@ }); |
{ | ||
"name": "@balena/odata-to-abstract-sql", | ||
"version": "5.3.0", | ||
"version": "5.3.1-update-deps-cbf2e34206074ebf6ab18dbdec5b3280f6aa4d3a", | ||
"description": "A consumer of the OData parser, written in OMeta", | ||
@@ -20,8 +20,8 @@ "main": "out/odata-to-abstract-sql.js", | ||
"dependencies": { | ||
"@balena/abstract-sql-compiler": "^7.0.2", | ||
"@balena/odata-parser": "^2.1.0", | ||
"@types/lodash": "^4.14.157", | ||
"@types/memoizee": "^0.4.4", | ||
"@balena/abstract-sql-compiler": "^7.0.4", | ||
"@balena/odata-parser": "^2.2.1", | ||
"@types/lodash": "^4.14.165", | ||
"@types/memoizee": "^0.4.5", | ||
"@types/randomstring": "^1.1.6", | ||
"lodash": "^4.17.19", | ||
"lodash": "^4.17.20", | ||
"memoizee": "^0.4.14", | ||
@@ -31,14 +31,14 @@ "randomstring": "^1.1.5" | ||
"devDependencies": { | ||
"@balena/lf-to-abstract-sql": "^4.0.0", | ||
"@balena/lint": "^5.1.0", | ||
"@balena/sbvr-parser": "^1.0.1", | ||
"@balena/sbvr-types": "^3.1.0", | ||
"@balena/lf-to-abstract-sql": "^4.1.1", | ||
"@balena/lint": "^5.3.0", | ||
"@balena/sbvr-parser": "^1.1.1", | ||
"@balena/sbvr-types": "^3.1.2", | ||
"chai": "^4.2.0", | ||
"chai-things": "~0.2.0", | ||
"coffee-script": "~1.12.7", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.11", | ||
"mocha": "^7.2.0", | ||
"husky": "^4.3.0", | ||
"lint-staged": "^10.5.2", | ||
"mocha": "^8.2.1", | ||
"require-npm4-to-publish": "^1.0.0", | ||
"typescript": "^3.9.6" | ||
"typescript": "^4.1.2" | ||
}, | ||
@@ -49,3 +49,10 @@ "husky": { | ||
} | ||
}, | ||
"mocha": { | ||
"reporter": "spec", | ||
"recursive": true, | ||
"require": "coffeescript/register", | ||
"bail": true, | ||
"_": "test/resource_parsing.coffee" | ||
} | ||
} |
@@ -823,5 +823,5 @@ import * as _ from 'lodash'; | ||
AddSelectFields(path: any, query: Query, resource: Resource) { | ||
let odataFieldNames: Array<Parameters< | ||
OData2AbstractSQL['AliasSelectField'] | ||
>>; | ||
let odataFieldNames: Array< | ||
Parameters<OData2AbstractSQL['AliasSelectField']> | ||
>; | ||
if ( | ||
@@ -838,4 +838,5 @@ path.options && | ||
}; | ||
const sqlName = odataNameToSqlName(field.name); | ||
const resourceField = field.resource.fields.find( | ||
({ fieldName }) => fieldName === field.name, | ||
({ fieldName }) => fieldName === sqlName, | ||
); | ||
@@ -842,0 +843,0 @@ return [field.resource, field.name, resourceField?.computed]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
385785
2942
23
2
Updated@balena/odata-parser@^2.2.1
Updated@types/lodash@^4.14.165
Updated@types/memoizee@^0.4.5
Updatedlodash@^4.17.20