-
Notifications
You must be signed in to change notification settings - Fork 27
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
Generic client, Browser + Node.js connections #165
Conversation
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.
LGTM overall. What are our next steps?
There are a few follow-ups to address, at least a simple browser test for memory leaks, update docs, release beta versions, and gather feedback. Did I miss anything?
@mshustov, I added several follow-ups to reduce the scope of this one (sorted by priority). Before releasing the first beta (0.2.0-beta1):
After the first beta: After "stable" 0.2.0: Please let me know if I am missing something. |
packages/client-browser/__tests__/integration/browser_abort_request.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Mikhail Shustov <mikhail.shustov@clickhouse.com>
Summary
Further efforts after #163 (different approach).
Introduce browser connection (using native fetch) with no Node.js modules in the common interfaces. No polyfills are required. It will also be possible to write new connections on top of
@clickhouse/client-common
if necessary.The client was refactored into three packages:
@clickhouse/client-common
: all possible platform-independent code, types and interfaces@clickhouse/client-browser
: new "browser" (or non-Node.js env) connection, uses native fetch. Depends on the common package.@clickhouse/client
: Node.js connection as it was before. Depends on the common package.Related issues:
http
#153Additionally, resolves #2, #17
Jest was replaced with jasmine + jasmine-expect, cause it's easier to maintain the tests that way - Karma does not like Jest very much; however, one of few downsides of that approach is that
retryOnFailure
does not work anymore as jasmine matchers do not throw an exception, thus in some tests I had to use janky hardcodedsleep
calls.Current browser connection limitations:
Checklist