Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/firestore

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/firestore - npm Package Compare versions

Comparing version 4.9.2 to 4.9.3

8

build/src/bulk-writer.d.ts

@@ -38,3 +38,2 @@ /*!

private readonly type;
private readonly op;
private readonly sendFn;

@@ -48,4 +47,2 @@ private readonly errorFn;

* @param type The type of operation that created this write.
* @param op A closure that encapsulates the API call which adds this write to
* a BulkCommitBatch.
* @param sendFn A callback to invoke when the operation should be sent.

@@ -55,5 +52,4 @@ * @param errorFn The user provided global error callback.

*/
constructor(ref: firestore.DocumentReference<unknown>, type: 'create' | 'set' | 'update' | 'delete', op: (bulkCommitBatch: BulkCommitBatch) => void, sendFn: (op: BulkWriterOperation) => void, errorFn: (error: BulkWriterError) => boolean, successFn: (ref: firestore.DocumentReference<unknown>, result: WriteResult) => void);
constructor(ref: firestore.DocumentReference<unknown>, type: 'create' | 'set' | 'update' | 'delete', sendFn: (op: BulkWriterOperation) => void, errorFn: (error: BulkWriterError) => boolean, successFn: (ref: firestore.DocumentReference<unknown>, result: WriteResult) => void);
get promise(): Promise<WriteResult>;
run(batch: BulkCommitBatch): void;
onError(error: GoogleError): void;

@@ -387,4 +383,4 @@ onSuccess(result: WriteResult): void;

*/
_sendFn(op: BulkWriterOperation): void;
_sendFn(enqueueOnBatchCallback: (bulkCommitBatch: BulkCommitBatch) => void, op: BulkWriterOperation): void;
}
export {};

@@ -45,4 +45,2 @@ "use strict";

* @param type The type of operation that created this write.
* @param op A closure that encapsulates the API call which adds this write to
* a BulkCommitBatch.
* @param sendFn A callback to invoke when the operation should be sent.

@@ -52,6 +50,5 @@ * @param errorFn The user provided global error callback.

*/
constructor(ref, type, op, sendFn, errorFn, successFn) {
constructor(ref, type, sendFn, errorFn, successFn) {
this.ref = ref;
this.type = type;
this.op = op;
this.sendFn = sendFn;

@@ -66,5 +63,2 @@ this.errorFn = errorFn;

}
run(batch) {
this.op(batch);
}
onError(error) {

@@ -584,5 +578,5 @@ ++this.failedAttempts;

*/
_enqueue(ref, type, op) {
const bulkWriterOp = new BulkWriterOperation(ref, type, op, this._sendFn.bind(this), this._errorFn.bind(this), this._successFn.bind(this));
this._sendFn(bulkWriterOp);
_enqueue(ref, type, enqueueOnBatchCallback) {
const bulkWriterOp = new BulkWriterOperation(ref, type, this._sendFn.bind(this, enqueueOnBatchCallback), this._errorFn.bind(this), this._successFn.bind(this));
this._sendFn(enqueueOnBatchCallback, bulkWriterOp);
return bulkWriterOp.promise;

@@ -596,3 +590,3 @@ }

*/
_sendFn(op) {
_sendFn(enqueueOnBatchCallback, op) {
if (this._bulkCommitBatch.has(op.ref)) {

@@ -606,3 +600,3 @@ // Create a new batch since the backend doesn't support batches with two

// current write resolves.
op.run(this._bulkCommitBatch);
enqueueOnBatchCallback(this._bulkCommitBatch);
this._bulkCommitBatch.processLastOperation(op);

@@ -609,0 +603,0 @@ this._lastOp = this._lastOp.then(() => util_1.silencePromise(op.promise));

@@ -136,3 +136,3 @@ "use strict";

}
if (val instanceof Array) {
if (Array.isArray(val)) {
const array = {

@@ -139,0 +139,0 @@ arrayValue: {},

@@ -7,2 +7,9 @@ # Changelog

### [4.9.3](https://www.github.com/googleapis/nodejs-firestore/compare/v4.9.2...v4.9.3) (2021-02-09)
### Bug Fixes
* use `Array.isArray` instead of an `instanceof` check ([#1417](https://www.github.com/googleapis/nodejs-firestore/issues/1417)) ([4a8c3cf](https://www.github.com/googleapis/nodejs-firestore/commit/4a8c3cfcaf57ed600da094ab0275a5f32fb1ea30))
### [4.9.2](https://www.github.com/googleapis/nodejs-firestore/compare/v4.9.1...v4.9.2) (2021-02-05)

@@ -9,0 +16,0 @@

{
"name": "@google-cloud/firestore",
"description": "Firestore Client Library for Node.js",
"version": "4.9.2",
"version": "4.9.3",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Google Inc.",

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