@firebase/util 1.7.0 → 1.7.1-20221010190246

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @firebase/util
2
2
 
3
+ ## 1.7.1-20221010190246
4
+
5
+ ### Patch Changes
6
+
7
+ - [`29d034072`](https://github.com/firebase/firebase-js-sdk/commit/29d034072c20af394ce384e42aa10a37d5dfcb18) [#6665](https://github.com/firebase/firebase-js-sdk/pull/6665) (fixes [#6660](https://github.com/firebase/firebase-js-sdk/issues/6660)) - Remove `__FIREBASE_DEFAULTS_PATH__` option for now, as the current implementation causes Webpack warnings. Also fix `process.env` check to work in environments where `process` exists but `process.env` does not.
8
+
3
9
  ## 1.7.0
4
10
 
5
11
  ### Minor Changes
@@ -645,30 +645,13 @@ const getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;
645
645
  * process.env.__FIREBASE_DEFAULTS_PATH__
646
646
  */
647
647
  const getDefaultsFromEnvVariable = () => {
648
- if (typeof process === 'undefined') {
648
+ if (typeof process === 'undefined' || typeof process.env === 'undefined') {
649
649
  return;
650
650
  }
651
651
  const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;
652
- const defaultsJsonPath = process.env.__FIREBASE_DEFAULTS_PATH__;
653
652
  if (defaultsJsonString) {
654
- if (defaultsJsonPath) {
655
- console.warn(`Values were provided for both __FIREBASE_DEFAULTS__ ` +
656
- `and __FIREBASE_DEFAULTS_PATH__. __FIREBASE_DEFAULTS_PATH__ ` +
657
- `will be ignored.`);
658
- }
659
653
  return JSON.parse(defaultsJsonString);
660
654
  }
661
- if (defaultsJsonPath && typeof require !== 'undefined') {
662
- try {
663
- // eslint-disable-next-line @typescript-eslint/no-require-imports
664
- const json = require(defaultsJsonPath);
665
- return json;
666
- }
667
- catch (e) {
668
- console.warn(`Unable to read defaults from file provided to ` +
669
- `__FIREBASE_DEFAULTS_PATH__: ${defaultsJsonPath}`);
670
- }
671
- }
672
655
  };
673
656
  const getDefaultsFromCookie = () => {
674
657
  if (typeof document === 'undefined') {