Skip to content

Commit

Permalink
Master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Jul 13, 2018
2 parents b3da6b6 + 9552c32 commit e13acbe
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 198 deletions.
160 changes: 10 additions & 150 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -61,6 +61,7 @@
"google-proto-files": "^0.16.1",
"is": "^3.2.1",
"lodash.merge": "^4.6.1",
"pkg-up": "^2.0.0",
"through2": "^2.0.3"
},
"devDependencies": {
Expand Down
12 changes: 3 additions & 9 deletions src/index.js
Expand Up @@ -20,17 +20,11 @@ const assert = require('assert');
const bun = require('bun');
const extend = require('extend');
const is = require('is');
const pkgUp = require('pkg-up');
const through = require('through2');
const util = require('util');

let libVersion;

// Allow Firestore to be run both from 'src' and 'build/src'.
try {
libVersion = require('../package.json').version;
} catch (err) {
libVersion = require('../../package.json').version;
}
const libVersion = require(pkgUp.sync()).version;

const path = require('./path');
const convert = require('./convert');
Expand Down Expand Up @@ -135,7 +129,7 @@ const MAX_REQUEST_RETRIES = 5;
/*!
* The maximum number of concurrent requests supported by a single GRPC channel,
* as enforced by Google's Frontend. If the SDK issues more than 100 concurrent
* operations, we need to use more than one GAPIC client since these client
* operations, we need to use more than one GAPIC client since these clients
* multiplex all requests over a single channel.
*
* @type {number}
Expand Down
10 changes: 2 additions & 8 deletions src/v1beta1/firestore_client.js
Expand Up @@ -18,15 +18,9 @@ const gapicConfig = require('./firestore_client_config');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const pkgUp = require('pkg-up');

let VERSION;

// Allow Firestore to be run both from 'src' and 'build/src'.
try {
VERSION = require('../../../package.json').version;
} catch (e) {
VERSION = require('../../package.json').version;
}
const VERSION = require(pkgUp.sync()).version;

/**
* The Cloud Firestore service.
Expand Down
9 changes: 2 additions & 7 deletions system-test/firestore.js
Expand Up @@ -18,18 +18,13 @@

let assert = require('power-assert');
let is = require('is');
let pkgUp = require('pkg-up');

let DocumentReference = require('../src/reference').DocumentReference;
let DocumentSnapshot =
require('../src/document')(DocumentReference).DocumentSnapshot;

let version;
try {
version = require('../../package.json').version;
} catch (e) {
version = require('../package.json').version;
}

let version = require(pkgUp.sync()).version;
let Firestore = require('../src');

if (process.env.NODE_ENV === 'DEBUG') {
Expand Down

0 comments on commit e13acbe

Please sign in to comment.