@cloudbase/node-sdk
Advanced tools
Comparing version 2.9.0 to 2.9.1
{ | ||
"name": "@cloudbase/node-sdk", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"description": "tencent cloud base server sdk for node.js", | ||
@@ -32,3 +32,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@cloudbase/database": "1.4.0", | ||
"@cloudbase/database": "1.4.1", | ||
"@cloudbase/signature-nodejs": "1.0.0-beta.0", | ||
@@ -35,0 +35,0 @@ "@types/retry": "^0.12.0", |
@@ -691,2 +691,25 @@ import * as assert from 'power-assert' | ||
}) | ||
it('geoNear with distance limit', async () => { | ||
const $ = db.command.aggregate | ||
const _ = db.command | ||
const res = await db | ||
.collection('attractions') | ||
.aggregate() | ||
.geoNear({ | ||
distanceField: 'distance', | ||
spherical: true, | ||
near: new db.Geo.Point(113.3089506, 23.0968251), | ||
query: { | ||
city: /zhou/ | ||
}, | ||
key: 'location', | ||
includeLocs: 'location', | ||
maxDistance: 5000 | ||
}) | ||
.end() | ||
assert.strictEqual(res.data.length === 1 && res.data[0].city === 'Guangzhou', true) | ||
assert.strictEqual(res.data[0].distance === 4384.68131486958, true) | ||
}) | ||
}) | ||
@@ -693,0 +716,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
911308
13122
4
+ Added@cloudbase/database@1.4.1(transitive)
- Removed@cloudbase/database@1.4.0(transitive)
Updated@cloudbase/database@1.4.1