-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only export core types from messaging #1188
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for content-scope-scripts failed.
|
Temporary Branch UpdateThe temporary branch has been updated with the latest changes. Below are the details:
Please use the above install command to update to the latest version. |
[Beta] Generated file diffTime updated: Sat, 02 Nov 2024 11:06:20 GMT Android
File has changed Chrome
File has changed Chrome-mv3
File has changed Firefox
File has changed Integration
File has changed Windows
File has changed Apple
File has changed |
@@ -82,7 +81,7 @@ describe('Android', () => { | |||
featureName, | |||
env: 'development' | |||
}) | |||
const messaging = new Messaging(messageContextA, config) | |||
const messaging = config.intoMessaging(messageContextA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By reversing the dependency here, it prevents the Messaging constructor from having to know about every transport
*/ | ||
export class Messaging { | ||
/** | ||
* @param {MessagingContext} messagingContext | ||
* @param {MessagingConfig} config | ||
* @param {MessagingTransport} transport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the significant change here, is that we directly take a transport now, preventing the core library needing to know about them all ahead of time
366aeb5
to
9c0d928
Compare
Asana Task/Github Issue: https://app.asana.com/0/1201614831475344/1208567543316316/f
Description
Alter the messaging API to prevent having to import all implementations (and them ending up in resulting bundles)
Note
This doesn't improve special pages just yet, but it is a big improvement for the injected side
Testing Steps
Checklist
Please tick all that apply: