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

albatross

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

albatross - npm Package Compare versions

Comparing version 3.6.0 to 3.7.0

9

index.d.ts

@@ -29,2 +29,6 @@ import * as mongodb from 'mongodb'

interface FindOneAndDeleteOption<T> extends Omit<mongodb.FindOneAndDeleteOption<T>, 'hint'> {
hint?: string | object
}
declare function albatross (uri: string): albatross.Albatross

@@ -75,2 +79,7 @@

findOneAndDelete (filter: mongodb.FilterQuery<TSchema>, options?: WithoutProjection<FindOneAndDeleteOption<TSchema>>): Promise<TSchema | null>
findOneAndDelete<TKey extends keyof TSchema> (filter: mongodb.FilterQuery<TSchema>, options: SpecificProjection<FindOneAndDeleteOption<TSchema>, { [key in TKey]: 1 | true } & { _id: 0 | false }>): Promise<Pick<TSchema, TKey> | null>
findOneAndDelete<TKey extends keyof TSchema> (filter: mongodb.FilterQuery<TSchema>, options: SpecificProjection<FindOneAndDeleteOption<TSchema>, { [key in TKey]: 1 | true } & { _id?: 1 | true }>): Promise<Pick<TSchema, '_id' | TKey> | null>
findOneAndDelete (filter: mongodb.FilterQuery<TSchema>, options?: FindOneAndDeleteOption<TSchema>): Promise<object | null>
aggregate (pipeline: object[], options?: mongodb.CollectionAggregationOptions): Promise<object[]>

@@ -77,0 +86,0 @@

@@ -193,2 +193,16 @@ const debug = require('debug')

async findOneAndDelete (filter, opts) {
const db = await this.parent.db()
try {
this[kDebug]('findOneAndDelete(%o)', filter)
const res = await db.collection(this.name).findOneAndDelete(filter, opts)
this[kDebug](`reply OK ${res.value == null ? 0 : 1}`)
return res.value
} catch (err) {
this[kDebug]('reply ERR')
throw err
}
}
async aggregate (pipeline, opts) {

@@ -195,0 +209,0 @@ const db = await this.parent.db()

2

package.json
{
"name": "albatross",
"version": "3.6.0",
"version": "3.7.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Linus Unnebäck <linus@folkdatorn.se>",

@@ -188,2 +188,6 @@ # ![Albatross](/header.png?raw=true "Albatross")

#### `findOneAndDelete(filter[, opts]): Promise<object>`
Finds a document and deletes it in one atomic operation.
#### `aggregate(pipeline[, opts]): Promise<object[]>`

@@ -190,0 +194,0 @@

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