-
Notifications
You must be signed in to change notification settings - Fork 56
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
[SDK-3734] Make HTTP request implementations tree-shakable #1438
Merged
+554
−390
Conversation
This file contains 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
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
September 14, 2023 12:46
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
September 14, 2023 12:47
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
September 14, 2023 12:47
Inactive
lawrence-forooghian
force-pushed
the
1394-tree-shakable-transports
branch
from
September 14, 2023 12:54
14424f1
to
1feb6e3
Compare
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
September 14, 2023 12:54
d5a0f83
to
78941fe
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
September 14, 2023 12:54
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
September 14, 2023 12:55
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
September 14, 2023 12:55
Inactive
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
October 25, 2023 20:40
78941fe
to
61a75b0
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
October 25, 2023 20:41
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
October 25, 2023 20:42
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
October 25, 2023 20:42
Inactive
lawrence-forooghian
force-pushed
the
1394-tree-shakable-transports
branch
from
October 26, 2023 14:33
1feb6e3
to
23c83d9
Compare
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
October 26, 2023 16:24
61a75b0
to
d303cf3
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
October 26, 2023 16:24
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
October 26, 2023 16:25
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
October 26, 2023 16:25
Inactive
lawrence-forooghian
force-pushed
the
1394-tree-shakable-transports
branch
from
October 26, 2023 16:52
23c83d9
to
b66c87b
Compare
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
October 26, 2023 17:05
d303cf3
to
cd0390f
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
October 26, 2023 17:05
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
October 26, 2023 17:06
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
October 26, 2023 17:07
Inactive
lawrence-forooghian
force-pushed
the
1394-tree-shakable-transports
branch
3 times, most recently
from
October 26, 2023 18:00
d2d5199
to
1c61527
Compare
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
October 26, 2023 19:06
cd0390f
to
5115bd5
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
October 26, 2023 19:07
Inactive
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
October 26, 2023 19:15
5115bd5
to
768eb0c
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
October 26, 2023 19:15
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
October 26, 2023 19:16
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
November 8, 2023 17:51
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
November 8, 2023 17:51
Inactive
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
November 8, 2023 18:19
3d3edc0
to
08bc876
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
November 8, 2023 18:20
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
November 8, 2023 18:20
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
November 8, 2023 18:20
Inactive
owenpearson
approved these changes
Nov 14, 2023
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.
Looks good! I think we maybe ought to consider making fetch the default in v2 but that's a separate conversation anyway
lawrence-forooghian
force-pushed
the
1394-tree-shakable-transports
branch
from
November 14, 2023 18:50
d986ea2
to
d7f9bd5
Compare
(I’m also not sure why the compiler was accepting the code that described the `body` parameter as having type `any`, given that in BodyHandler it’s of type `unknown`.)
This fixes some compilation errors that were missed by the fact that it was a .d.ts file. (See #1445 for the issue that aims to convert all .d.ts files to .ts.) This improved type information introduced a compiler error resulting from us trying to directly access HTTP headers on DOM’s Headers object with header names as object property names. I can’t see how the existing code could have been working properly, so I’ve changed the response header handling in fetchrequest.ts.
Similar to that used for transports.
To correctly reflect the fact that the tests instantiate Platform.Http without any arguments.
Preparation for tree-shakable HTTP request implementations, which will be exposed via the client. The constructor needs access to the list of available request implementations so that it can populate the supportsAuthHeaders property.
We expose XHRRequest and FetchRequest modules. The user is required to provide an HTTP module, even for Realtime, since it’s used for the internet connectivity check and for making a token request to the authUrl. Resolves #1395.
lawrence-forooghian
force-pushed
the
1395-http-tree-shaking
branch
from
November 14, 2023 18:51
08bc876
to
674e88a
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1438/features
November 14, 2023 18:51
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/typedoc
November 14, 2023 18:52
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1438/bundle-report
November 14, 2023 18:52
Inactive
In preparation for #1397 (making MessageFilter functionality tree-shakable).
We expose a MessageIteractions module which allows users to pass a MessageFilter object to RealtimeChannel’s `subscribe` and `unsubscribe`. Resolves #1397.
…ions [SDK-3736] Make `MessageFilter` subscription filtering tree-shakable
Base automatically changed from
1394-tree-shakable-transports
to
integration/v2
November 21, 2023 00:14
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.
Note: This PR is based on top of #1432; please review that one first.
This exposes tree-shakable
XHRRequest
andFetchRequest
modules.The user is required to provide an HTTP module, even for Realtime, since it’s used for the internet connectivity check and for making a token request to the
authUrl
.See commit messages for more details.
Resolves #1395.