Skip to content
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

Remove callbacks part 1 #1541

Merged
merged 44 commits into from
Jan 31, 2024
Merged

Conversation

lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Dec 11, 2023

This removes the internal use of callbacks in the codebase, except for the HTTP clients and the realtime functionality. I'll do these in subsequent PRs. See commit messages for more details.

Resolves #1527, resolves #1531, resolves #1532, resolves #1530, resolves #1528.

Jira links:

@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 11, 2023 14:10 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 11, 2023 14:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 11, 2023 14:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 11, 2023 18:35 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 11, 2023 18:36 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 11, 2023 18:36 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 11, 2023 19:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 11, 2023 19:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 11, 2023 19:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 12, 2023 12:51 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 12, 2023 12:52 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 12, 2023 12:52 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 12, 2023 13:56 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 12, 2023 13:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 12, 2023 13:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 12, 2023 13:59 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 12, 2023 13:59 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 12, 2023 13:59 Inactive
@lawrence-forooghian lawrence-forooghian changed the base branch from integration/v2 to 2023-12-11-merge-main-into-v2 December 15, 2023 02:21
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 15, 2023 02:21 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/bundle-report December 15, 2023 02:22 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/typedoc December 15, 2023 02:22 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1541/features December 15, 2023 02:35 Inactive
The `throwError` parameter here is to handle the fact that, when using
an HttpPaginatedResponse, PaginatedResource wishes to have access to
both the error that comes from the HTTP client _and_ the response body,
before deciding how to handle an error (see the `returnErrOnly`
function).

I’ve converted Resource.do to return a promise here, but I’ll do the
full conversion of that method in a separate commit for readability’s
sake.
The changes to the `connectionQueuing` test are because the test assumed
that the message would get marked as `sendAttempted` synchronously as
soon as `publish` was called. This relied on the fact that when no
encryption is required, the Message `encode` function called its
callback synchronously. However, this was an implementation detail (this
function has an asynchronous signature), and one which is no longer true
now that promises are used.
I’ve removed the redundant upfront generation of the IV and just kept
the generation in `getIv`; this makes it consistent with the web crypto
code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants