Repository navigation
feat(realtime): load transport SDKs through a configurable importModule - #13
Merged
Merged
Conversation
…tainer binding logic fix(testsSetup): enhance config retrieval logic for better defaults chore(tsdown): update build configuration for improved output handling fix(fs): optimize findUpConfig and exists functions for better error handling chore(vitest): refine test configuration and setup for improved clarity chore(prettier): add configuration and ignore files for consistent code formatting
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…nd enhance configuration for dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@arkstack/realtimeloadedpusher-jsand thefirebase/*modules with a bare dynamicimport(). A bundler resolves that, but a page without one can't, such as a plain<script>embed. In that case the transports failed and the app lost live updates.RealtimeConfig.importModule(b029de20)'pusher-js','firebase/app', …) to the module. It defaults to the existing dynamicimport(), so current apps are unaffected.deviceToken()when it falls back to thefirebaseconfig.createPusherTransport,createFirebaseTransport,createFirebaseDatabaseTransportandrequestDeviceTokenaccept it as an optional last argument.Motivation: the Arkyc verification widget ships a standalone IIFE build that doesn't bundle the SDKs and loads them from jsDelivr. This lets it use
@arkstack/realtimewithout losing live updates in plain embeds.Also included
052ec3f7: maintainer refactor of the Express integration tests and container binding, plus Prettier configuration and formatting.Test plan
pusher-jsand every Firebase module the database transport and device tokens need are loaded only through the supplied importer;pnpm lint,pnpm build,pnpm docs:buildvitest run: 580 passed, 5 skipped