Socket
Socket
Sign inDemoInstall

@google-cloud/firestore

Package Overview
Dependencies
Maintainers
1
Versions
145
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 6.4.1 to 6.4.2

7

build/src/index.d.ts

@@ -394,2 +394,9 @@ /*!

* properties of type `undefined`.
* @param {boolean=} settings.preferRest Whether to force the use of HTTP/1.1 REST
* transport until a method that requires gRPC is called. When a method requires gRPC,
* this Firestore client will load dependent gRPC libraries and then use gRPC transport
* for communication from that point forward. Currently the only operation
* that requires gRPC is creating a snapshot listener with the method
* `DocumentReference<T>.onSnapshot()`, `CollectionReference<T>.onSnapshot()`, or
* `Query<T>.onSnapshot()`.
*/

@@ -396,0 +403,0 @@ constructor(settings?: firestore.Settings);

@@ -372,2 +372,9 @@ "use strict";

* properties of type `undefined`.
* @param {boolean=} settings.preferRest Whether to force the use of HTTP/1.1 REST
* transport until a method that requires gRPC is called. When a method requires gRPC,
* this Firestore client will load dependent gRPC libraries and then use gRPC transport
* for communication from that point forward. Currently the only operation
* that requires gRPC is creating a snapshot listener with the method
* `DocumentReference<T>.onSnapshot()`, `CollectionReference<T>.onSnapshot()`, or
* `Query<T>.onSnapshot()`.
*/

@@ -374,0 +381,0 @@ constructor(settings) {

@@ -104,2 +104,13 @@ /*!

/**
* The currently active clients.
*
* @return The currently active clients.
* @private
* @internal
*/
get _activeClients(): Map<T, {
activeRequestCount: number;
grpcEnabled: boolean;
}>;
/**
* Runs the provided operation in this pool. This function may create an

@@ -106,0 +117,0 @@ * additional client if all existing clients already operate at the concurrent

17

build/src/pool.js

@@ -82,2 +82,6 @@ "use strict";

let selectedClientRequestCount = -1;
// Transition to grpc when we see the first operation that requires grpc.
this.grpcEnabled = this.grpcEnabled || requiresGrpc;
// Require a grpc client for this operation if we have transitioned to grpc.
requiresGrpc = requiresGrpc || this.grpcEnabled;
for (const [client, metadata] of this.activeClients) {

@@ -90,3 +94,3 @@ // Use the "most-full" client that can still accommodate the request

metadata.activeRequestCount < this.concurrentOperationLimit &&
(!requiresGrpc || metadata.grpcEnabled)) {
(metadata.grpcEnabled || !requiresGrpc)) {
selectedClient = client;

@@ -189,2 +193,13 @@ selectedClientRequestCount = metadata.activeRequestCount;

/**
* The currently active clients.
*
* @return The currently active clients.
* @private
* @internal
*/
// Visible for testing.
get _activeClients() {
return this.activeClients;
}
/**
* Runs the provided operation in this pool. This function may create an

@@ -191,0 +206,0 @@ * additional client if all existing clients already operate at the concurrent

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

import { Readable } from 'stream';
import { GoogleError } from 'google-gax';
import * as protos from '../protos/firestore_v1_proto_api';

@@ -1091,2 +1092,3 @@ import { DocumentSnapshot, QueryDocumentSnapshot } from './document';

private toStructuredQuery;
_isPermanentRpcError(err: GoogleError, methodName: string): boolean;
/**

@@ -1093,0 +1095,0 @@ * Internal streaming method that accepts an optional transaction ID.

10

package.json
{
"name": "@google-cloud/firestore",
"description": "Firestore Client Library for Node.js",
"version": "6.4.1",
"version": "6.4.2",
"license": "Apache-2.0",

@@ -57,3 +57,3 @@ "author": "Google Inc.",

"functional-red-black-tree": "^1.0.1",
"google-gax": "^3.5.1",
"google-gax": "^3.5.2",
"protobufjs": "^7.0.0"

@@ -68,3 +68,3 @@ },

"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",
"@types/node": "^18.0.0",
"@types/sinon": "^10.0.0",

@@ -79,3 +79,3 @@ "@types/through2": "^2.0.34",

"gts": "^3.1.0",
"jsdoc": "^3.6.2",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^2.0.0",

@@ -88,3 +88,3 @@ "jsdoc-region-tag": "^2.0.0",

"proxyquire": "^2.1.3",
"sinon": "^13.0.0",
"sinon": "^15.0.0",
"through2": "^4.0.0",

@@ -91,0 +91,0 @@ "ts-node": "^10.0.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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