@firebase/firestore 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,18 +8,13 @@ var logger = require('@firebase/logger');
8
8
  var util = require('util');
9
9
  var util$1 = require('@firebase/util');
10
10
  var crypto = require('crypto');
11
- var module$1 = require('module');
12
11
  var grpcJs = require('@grpc/grpc-js');
13
12
  var path = require('path');
14
13
  var url = require('url');
15
14
  var protoLoader = require('@grpc/proto-loader');
16
15
 
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var module__default = /*#__PURE__*/_interopDefaultLegacy(module$1);
20
-
21
16
  const name = "@firebase/firestore";
22
- const version$1 = "3.4.0";
17
+ const version$1 = "3.4.1";
23
18
 
24
19
  /**
25
20
  * @license
@@ -72,7 +67,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
72
67
  User.FIRST_PARTY = new User('first-party-uid');
73
68
  User.MOCK_USER = new User('mock-user');
74
69
 
75
- const version = "9.6.0";
70
+ const version = "9.6.1";
76
71
 
77
72
  /**
78
73
  * @license
@@ -14320,11 +14315,9 @@ function nodePromise(action) {
14320
14315
  * See the License for the specific language governing permissions and
14321
14316
  * limitations under the License.
14322
14317
  */
14323
- // This is a hack fix for Node ES modules to use `require`.
14324
- // @ts-ignore To avoid using `--module es2020` flag.
14325
- const require$1 = module__default["default"].createRequire(new (require('url').URL)('file:' + __filename).href);
14326
- // eslint-disable-next-line @typescript-eslint/no-require-imports
14327
- const { version: grpcVersion } = require$1('@grpc/grpc-js/package.json');
14318
+ // TODO: Fetch runtime version from grpc-js/package.json instead
14319
+ // when there's a cleaner way to dynamic require JSON in both Node ESM and CJS
14320
+ const grpcVersion = '1.3.7';
14328
14321
  const LOG_TAG$9 = 'Connection';
14329
14322
  const X_GOOG_API_CLIENT_VALUE = `gl-node/${process.versions.node} fire/${SDK_VERSION} grpc/${grpcVersion}`;
14330
14323
  function createMetadata(databasePath, authToken, appCheckToken, appId) {
@@ -14491,8 +14484,8 @@ class GrpcConnection {
14491
14484
  */
14492
14485
  // __filename and __dirname globals are unavailable in ES modules
14493
14486
  // @ts-ignore To avoid using `--module es2020` flag.
14494
- const __filename$1 = url.fileURLToPath(new (require('url').URL)('file:' + __filename).href);
14495
- const __dirname$1 = path.dirname(__filename$1);
14487
+ const __filenameInESM = url.fileURLToPath(new (require('url').URL)('file:' + __filename).href);
14488
+ const __dirnameInESM = path.dirname(__filenameInESM);
14496
14489
  /** Used by tests so we can match @grpc/proto-loader behavior. */
14497
14490
  const protoLoaderOptions = {
14498
14491
  longs: String,
@@ -14506,7 +14499,7 @@ const protoLoaderOptions = {
14506
14499
  * @returns The GrpcObject representing our protos.
14507
14500
  */
14508
14501
  function loadProtos() {
14509
- const root = path.resolve(__dirname$1, "src/protos" );
14502
+ const root = path.resolve(__dirnameInESM, "src/protos" );
14510
14503
  const firestoreProtoFile = path.join(root, 'google/firestore/v1/firestore.proto');
14511
14504
  const packageDefinition = protoLoader.loadSync(firestoreProtoFile, Object.assign(Object.assign({}, protoLoaderOptions), { includeDirs: [root] }));
14512
14505
  return grpcJs.loadPackageDefinition(packageDefinition);
@@ -20919,7 +20912,7 @@ function registerFirestore(variant, useFetchStreams = true) {
20919
20912
  settings = Object.assign({ useFetchStreams }, settings);
20920
20913
  firestoreInstance._setSettings(settings);
20921
20914
  return firestoreInstance;
20922
- }, "PUBLIC" /* PUBLIC */));
20915
+ }, 'PUBLIC'));
20923
20916
  app.registerVersion(name, version$1, variant);
20924
20917
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
20925
20918
  app.registerVersion(name, version$1, 'cjs2017');