@firebase/util 1.9.1 → 1.9.2-canary.36558bd2e

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.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d071bd1ac`](https://github.com/firebase/firebase-js-sdk/commit/d071bd1acaa0583b4dd3454387fc58eafddb5c30) [#7007](https://github.com/firebase/firebase-js-sdk/pull/7007) (fixes [#7005](https://github.com/firebase/firebase-js-sdk/issues/7005)) - Move exports.default fields to always be the last field. This fixes a bug caused in 9.17.0 that prevented some bundlers and frameworks from building.
8
+
3
9
  ## 1.9.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -304,7 +304,7 @@ const base64 = {
304
304
  const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
305
305
  ++i;
306
306
  if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
307
- throw Error();
307
+ throw new DecodeBase64StringError();
308
308
  }
309
309
  const outByte1 = (byte1 << 2) | (byte2 >> 4);
310
310
  output.push(outByte1);
@@ -345,6 +345,15 @@ const base64 = {
345
345
  }
346
346
  }
347
347
  };
348
+ /**
349
+ * An error encountered while decoding base64 string.
350
+ */
351
+ class DecodeBase64StringError extends Error {
352
+ constructor() {
353
+ super(...arguments);
354
+ this.name = 'DecodeBase64StringError';
355
+ }
356
+ }
348
357
  /**
349
358
  * URL-safe base64 encoding
350
359
  */
@@ -2104,6 +2113,7 @@ function getModularInstance(service) {
2104
2113
  }
2105
2114
 
2106
2115
  exports.CONSTANTS = CONSTANTS;
2116
+ exports.DecodeBase64StringError = DecodeBase64StringError;
2107
2117
  exports.Deferred = Deferred;
2108
2118
  exports.ErrorFactory = ErrorFactory;
2109
2119
  exports.FirebaseError = FirebaseError;