@koopjs/winnow
Advanced tools
Comparing version 4.1.4 to 4.2.0
{ | ||
"name": "@koopjs/winnow", | ||
"version": "4.1.4", | ||
"version": "4.2.0", | ||
"description": "Apply sql-like filters to GeoJSON", | ||
@@ -58,5 +58,5 @@ "main": "src/index.js", | ||
"@types/geojson": "^7946.0.10", | ||
"alasql": "^4.1.4", | ||
"alasql": "^4.1.9", | ||
"classybrew": "0.0.3", | ||
"joi": "^17.10.1", | ||
"joi": "^17.10.2", | ||
"js-sql-parser": "^1.4.1", | ||
@@ -75,3 +75,3 @@ "lodash": "^4.17.21", | ||
"proxyquire": "^2.1.3", | ||
"sinon": "^15.0.0", | ||
"sinon": "^16.0.0", | ||
"tap-spec": "^5.0.0", | ||
@@ -78,0 +78,0 @@ "tape": "^5.6.6" |
@@ -13,8 +13,6 @@ const _ = require('lodash'); | ||
properties = injectObjectId({ properties, geometry }); | ||
} else if (requiresObjectId && shouldLogIdFieldWarning(properties[idField])) { | ||
logManager.logger.debug(`Unique-identifier (\`${idField}\`) has a value (${properties[idField]}) that is not a valid integer (0 to 2147483647); this may cause problems in some clients.`); | ||
} | ||
if (requiresObjectId && shouldLogIdFieldWarning(properties[idField])) { | ||
logManager.logger.debug(`OBJECTIDs created from provider's "idField" (${idField}: ${properties[idField]}) are not integers from 0 to 2147483647`); | ||
} | ||
return transformProperties(properties, dateFields); | ||
@@ -21,0 +19,0 @@ }; |
@@ -24,11 +24,7 @@ const { InvalidParameterError } = require('../errors'); | ||
function parseId(id) { | ||
const objectId = Number(id); | ||
const numericId = Number(id); | ||
if (Number.isInteger(objectId)) { | ||
return objectId; | ||
} | ||
throw new InvalidParameterError(`Non-integer objectId: ${id}`); | ||
return Number.isInteger(numericId) ? numericId : id; | ||
} | ||
module.exports = normalizeIds; |
@@ -140,5 +140,9 @@ const { InvalidWhereParameterError } = require('../../errors'); | ||
#addObjectIdsFilter() { | ||
const inValues = this.#options.objectIds.map(val => { | ||
return isNaN(val) ? `'${val}'` : val; | ||
}); | ||
const objectIdFilter = `${ | ||
this.#options.idField || 'OBJECTID' | ||
} IN (${this.#options.objectIds.join(',')})`; | ||
} IN (${inValues.join(',')})`; | ||
@@ -145,0 +149,0 @@ if (this.#where) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86918
2076
Updatedalasql@^4.1.9
Updatedjoi@^17.10.2