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 3.4.1 to 3.5.0

6

build/src/index.d.ts

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

export { FirestoreDataConverter, UpdateData, DocumentData, Settings, Precondition, SetOptions, } from './types';
export { Status as GrpcStatus } from 'google-gax';
/**

@@ -74,4 +75,5 @@ * Document data (e.g. for use with

*
* @property {string} lastUpdateTime The update time to enforce (specified as
* an ISO 8601 string).
* @property {Timestamp} lastUpdateTime The update time to enforce. If set,
* enforces that the document was last updated at lastUpdateTime. Fails the
* operation if the document was last updated at a different time.
* @typedef {Object} Precondition

@@ -78,0 +80,0 @@ */

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

exports.setLogFunction = logger_2.setLogFunction;
var google_gax_1 = require("google-gax");
exports.GrpcStatus = google_gax_1.Status;
const libVersion = require('../../package.json').version;

@@ -148,4 +150,5 @@ logger_1.setLibVersion(libVersion);

*
* @property {string} lastUpdateTime The update time to enforce (specified as
* an ISO 8601 string).
* @property {Timestamp} lastUpdateTime The update time to enforce. If set,
* enforces that the document was last updated at lastUpdateTime. Fails the
* operation if the document was last updated at a different time.
* @typedef {Object} Precondition

@@ -836,3 +839,2 @@ */

}
backendStream.on('data', () => streamReady());
function streamEnded() {

@@ -844,6 +846,3 @@ logger_1.logger('Firestore._initializeStream', requestTag, 'Received stream end');

}
backendStream.on('end', () => streamEnded());
backendStream.on('close', () => streamEnded());
backendStream.on('finish', () => streamEnded());
backendStream.on('error', err => {
function streamFailed(err) {
if (!streamInitialized) {

@@ -865,9 +864,19 @@ // If we receive an error before we were able to receive any data,

}
});
}
backendStream.on('data', () => streamReady());
backendStream.on('error', err => streamFailed(err));
backendStream.on('end', () => streamEnded());
backendStream.on('close', () => streamEnded());
backendStream.on('finish', () => streamEnded());
backendStream.pipe(resultStream);
if (request) {
logger_1.logger('Firestore._initializeStream', requestTag, 'Sending request: %j', request);
backendStream.write(request, 'utf-8', () => {
logger_1.logger('Firestore._initializeStream', requestTag, 'Marking stream as healthy');
streamReady();
backendStream.write(request, 'utf-8', err => {
if (err) {
streamFailed(err);
}
else {
logger_1.logger('Firestore._initializeStream', requestTag, 'Marking stream as healthy');
streamReady();
}
});

@@ -874,0 +883,0 @@ }

@@ -157,3 +157,3 @@ /// <reference types="node" />

/**
* Return a fully-qualified collectiongroup resource name string.
* Return a fully-qualified collectionGroup resource name string.
*

@@ -169,23 +169,23 @@ * @param {string} project

*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the project.
*/
matchProjectFromCollectionGroupName(collectiongroupName: string): string;
matchProjectFromCollectionGroupName(collectionGroupName: string): string;
/**
* Parse the database from CollectionGroup resource.
*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the database.
*/
matchDatabaseFromCollectionGroupName(collectiongroupName: string): string;
matchDatabaseFromCollectionGroupName(collectionGroupName: string): string;
/**
* Parse the collection from CollectionGroup resource.
*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the collection.
*/
matchCollectionFromCollectionGroupName(collectiongroupName: string): string;
matchCollectionFromCollectionGroupName(collectionGroupName: string): string;
/**

@@ -192,0 +192,0 @@ * Return a fully-qualified index resource name string.

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

/**
* Return a fully-qualified collectiongroup resource name string.
* Return a fully-qualified collectionGroup resource name string.
*

@@ -708,3 +708,3 @@ * @param {string} project

collectionGroupPath(project, database, collection) {
return this._pathTemplates.collectiongroupPathTemplate.render({
return this._pathTemplates.collectionGroupPathTemplate.render({
project,

@@ -718,8 +718,8 @@ database,

*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the project.
*/
matchProjectFromCollectionGroupName(collectiongroupName) {
return this._pathTemplates.collectiongroupPathTemplate.match(collectiongroupName).project;
matchProjectFromCollectionGroupName(collectionGroupName) {
return this._pathTemplates.collectionGroupPathTemplate.match(collectionGroupName).project;
}

@@ -729,8 +729,8 @@ /**

*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the database.
*/
matchDatabaseFromCollectionGroupName(collectiongroupName) {
return this._pathTemplates.collectiongroupPathTemplate.match(collectiongroupName).database;
matchDatabaseFromCollectionGroupName(collectionGroupName) {
return this._pathTemplates.collectionGroupPathTemplate.match(collectionGroupName).database;
}

@@ -740,8 +740,8 @@ /**

*
* @param {string} collectiongroupName
* @param {string} collectionGroupName
* A fully-qualified path representing CollectionGroup resource.
* @returns {string} A string representing the collection.
*/
matchCollectionFromCollectionGroupName(collectiongroupName) {
return this._pathTemplates.collectiongroupPathTemplate.match(collectiongroupName).collection;
matchCollectionFromCollectionGroupName(collectionGroupName) {
return this._pathTemplates.collectionGroupPathTemplate.match(collectionGroupName).collection;
}

@@ -748,0 +748,0 @@ /**

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

## [3.5.0](https://www.github.com/googleapis/nodejs-firestore/compare/v3.4.1...v3.5.0) (2020-02-07)
### Features
* add google-gax status to exports ([#912](https://www.github.com/googleapis/nodejs-firestore/issues/912)) ([7d97384](https://www.github.com/googleapis/nodejs-firestore/commit/7d9738456525b99507b8819d86a8634b0a1d04c3))
### Bug Fixes
* add missing generics on query ([#917](https://www.github.com/googleapis/nodejs-firestore/issues/917)) ([c5b9442](https://www.github.com/googleapis/nodejs-firestore/commit/c5b9442e6620e59e5563ffaf210ad493ec5ed9b2))
* better parameter naming in path template helpers ([aac02f4](https://www.github.com/googleapis/nodejs-firestore/commit/aac02f463ba13c385a6dc5a4d96e281e0801cc93))
* retry streaming methods if initial write errored ([#897](https://www.github.com/googleapis/nodejs-firestore/issues/897)) ([2ec0489](https://www.github.com/googleapis/nodejs-firestore/commit/2ec0489127faea88dca95e6dc169efe6e55d330d))
### [3.4.1](https://www.github.com/googleapis/nodejs-firestore/compare/v3.4.0...v3.4.1) (2020-01-22)

@@ -9,0 +23,0 @@

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

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

"@types/extend": "^3.0.0",
"@types/mocha": "^5.2.3",
"@types/mocha": "^7.0.0",
"@types/moment": "^2.13.0",

@@ -75,4 +75,2 @@ "@types/node": "^12.12.17",

"gts": "^1.1.2",
"hard-rejection": "^2.0.0",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.6.2",

@@ -83,6 +81,4 @@ "jsdoc-fresh": "^1.0.2",

"mocha": "^7.0.0",
"power-assert": "^1.6.1",
"protobufjs": "^6.8.6",
"proxyquire": "^2.1.3",
"source-map-support": "^0.5.16",
"ts-node": "^8.5.4",

@@ -89,0 +85,0 @@ "typescript": "3.6.4"

@@ -1025,3 +1025,3 @@ /**

*/
get(): Promise<QuerySnapshot>;
get(): Promise<QuerySnapshot<T>>;

@@ -1045,3 +1045,3 @@ /*

*/
onSnapshot(onNext: (snapshot: QuerySnapshot) => void,
onSnapshot(onNext: (snapshot: QuerySnapshot<T>) => void,
onError?: (error: Error) => void) : () => void;

@@ -1055,3 +1055,3 @@

*/
isEqual(other: Query): boolean;
isEqual(other: Query<T>): boolean;

@@ -1458,2 +1458,25 @@ /**

export const v1: {FirestoreClient: any, FirestoreAdminClient: any};
/**
* Status codes returned by Firestore's gRPC calls.
*/
export enum GrpcStatus {
OK = 0,
CANCELLED = 1,
UNKNOWN = 2,
INVALID_ARGUMENT = 3,
DEADLINE_EXCEEDED = 4,
NOT_FOUND = 5,
ALREADY_EXISTS = 6,
PERMISSION_DENIED = 7,
RESOURCE_EXHAUSTED = 8,
FAILED_PRECONDITION = 9,
ABORTED = 10,
OUT_OF_RANGE = 11,
UNIMPLEMENTED = 12,
INTERNAL = 13,
UNAVAILABLE = 14,
DATA_LOSS = 15,
UNAUTHENTICATED = 16
}
}

@@ -1460,0 +1483,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