Removes the Hash base class that is only used in Sha1 in @firebase/util. It only has a single property and only one class extends from it, so I think it's fair to say that it's not very useful.
The actual reason of me doing this is that Rollup doesn't realize that extended classes that are transpiled to ES5 don't have side effects. Without this change, any package using Rollup that imports anything from @firebase/util (like FirebaseError or ErrorFactory) will also get Sha1 and Hash classes included in their bundle. I suspect that Webpack does something similar but I haven't checked.
After this change, using Rollup, an iife build of a package that only exports ErrorFactory and FirebaseError from @firebase/util went from 1478 bytes to 544 bytes (minified + gzipped).
This option is `false` by default, so there is no need to set it to `false` explicitly.
Also because of this, when a package enables the `strict` option, they also need to enable `noImplicitAny` explicitly, even though it is already a part of the `strict` option.
Prevents sending messages to Chrome Extension background pages, which are always considered visible in Chrome. That causes our SDK try to send the message to the background page and to not show the notification.
I'll also investigate if background page being considered a visible client is a bug in Chrome itself, and try to get it fixed if I can. But for now this seems like a good workaround.
* Use isArrayBufferEqual to compare VAPID keys
Fixes#860.
* Create a new VAPID key object instead of using the imported object in tests.
This should be close enough to storing and retrieving it from IndexedDB and should prevent === comparison from working.
Fixes firebase.messaging() method being optional in TS types.
Modifies isSupported so it is a namespace export and not a property on the factory function, which is not actually exported.
* Fix variable and class names
Fixes abbreviations in variable and class names to match Google TypeScript style guide, which follows the Java style guide: https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
Also changes some variable names in tests.
* [AUTOMATED]: Prettier Code Styling
* Combine Observer and PartialObserver types
Uses Partial from TS to create a PartialObserver from Observer.
* Fix Observer types in messaging
* Fix Observer types in app-types
* [AUTOMATED]: Prettier Code Styling
* Enable messaging tests on multi-browsers.
* optional: add karma-safari-launcher
* Modify messaging tests to be enabled on Safari.
* Fix issues
* Skip maxAction test on browsers that do not support actions
* Check browser support before instantiating controllers
Prevents issues such as #658 by making sure we don't call any unsupported methods by accident.
Also adds some tests for index.ts.
* Skip tests on unsupported browsers
* Ignore 'unsupported-browser' errors in namespace validation
* Check browser support within SW
* Implement isSupported static method
* [AUTOMATED]: Prettier Code Styling
* Update grpc in firestore
Fixes#515
* Fix tests
Not sure how, but updating grpc made the test start using [email protected], which has some extra properties (https://github.com/dcodeIO/long.js/commit/bc96a70758cf1e431af6956e56d70dd181943162) that broke the deep equals check.
In any case, all dependencies that are referenced should be added to package.json explicitly. I added the relevant tslint rules and also added other missing deps.
* Revert TSLint changes
* Enable TSLint rule "no-any" in src/
* Enable noImplicitAny
* Use the same ErrorFactory object in all of messaging
* Enable TSLint variable-name rule
* Move all testing utils to testing-utils/
* Async/await fixes
* Enable TSLint no-redundant-jsdoc rule
* Use any instead of ts-ignore
* Remove any types from messaging-types
* Add better types for Message Payload
* Remove another any
Makes sure that we use only one type of TokenDetails object, both in the code and in the database.
Updates DB and adds a function to fix the old values.
Fixes and adds tests.
* Reenable --strict in messaging/
* Revert "Remove some assertions that are no longer needed as --strict is disabled"
This reverts commit 6ea7e54640ea3c19942a1881a3f738d89b51dafe.
* Fix strict issues in messaging/
* Fix type errors in app/
* Fix errors
* Fix errors
* Refactor IndexedDb operations
Simplifies a lot of IndexedDb operations and removes most of the duplicated code. Also refactors tests.
* [AUTOMATED]: Prettier Code Styling
* [AUTOMATED]: License Headers
* Fix failing tests
* Address comments
* Address comments
* Add TSLint and (mostly uncontroversial) rules
Fixed lint errors. Added running TSLint to the test command in package.json.
* Remove some assertions that are no longer needed as --strict is disabled
* [AUTOMATED]: Prettier Code Styling
* Add a few more rules from Google TS style that are already passing
* Fix tests
* Add types to @firebase/messaging
This makes src/ compatible with --noImplicitAny. test/ still needs work.
* [AUTOMATED]: License Headers
* Remove casts
* Add --strict flag to TSConfig and fix resulting errors
This doesn't really fix anything, but explicit "any"s are still better than implicit "any"s.
* Remove unnecessary 'use strict's
* Add a type-check command and run it as part of tests
* [AUTOMATED]: Prettier Code Styling