[Snyk] Upgrade @clickhouse/client from 1.0.2 to 1.6.0 #5
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.
Snyk has created this PR to upgrade @clickhouse/client from 1.0.2 to 1.6.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 7 versions ahead of your current version.
The recommended version was released on 2 months ago.
Release notes
Package name: @clickhouse/client
New features
real_time_microseconds
field to theClickHouseSummary
interface (see ClickHouse/ClickHouse#69032)Bug fixes
ResultSet.json
if the response data was not, in fact, a valid JSON. (#311)New features
exec
method. SeeExecParams.decompress_response_stream
for more details. (#298).Improvements
ClickHouseClient
is now exported as a value from@ clickhouse/client
and@ clickhouse/client-web
packages, allowing for better integration in dependency injection frameworks that rely on IoC (e.g., Nest.js, tsyringe) (@ mathieu-bour, #292).Bug fixes
New features
exec
method now accepts an optionalvalues
parameter, which allows you to pass the request body as aStream.Readable
. This can be useful in the case of custom insert streaming with arbitrary ClickHouse data formats (which might not be explicitly supported and allowed by the client in theinsert
method yet). NB: in this case, you are expected to serialize the data in the stream in the required input format yourself. See #290 for more details.Improvements
drainStream
New features
It is now possible to get the entire response headers object from the
query
/insert
/command
/exec
methods. Withquery
, you can access theResultSet.response_headers
property; other methods (insert
/command
/exec
) return it as parts of their response objects as well.For example:
This will print:
application/x-ndjson; charset=UTF-8
. It can be used in a similar way with the other methods.Improvements
Re-exported several constants from the
@ clickhouse/client-common
package for convenience:SupportedJSONFormats
SupportedRawFormats
StreamableFormats
StreamableJSONFormats
SingleDocumentJSONFormats
RecordsJSONFormats
New features
(Experimental) Added an option to provide a custom HTTP Agent in the client configuration via the
http_agent
option (#283, related: #278). The following conditions apply if a custom HTTP Agent is provided:max_open_connections
andtls
options will have no effect and will be ignored by the client, as those are part of the underlying HTTP Agent configuration.keep_alive.enabled
will only regulate the default value of theConnection
header (true
->Connection: keep-alive
,false
->Connection: close
).keep_alive.idle_socket_ttl
value to0
.(Experimental) Added a new client configuration option:
set_basic_auth_header
, which controls whether theAuthorization
header should be set for every outgoing HTTP request (enabled by default). One of the possible scenarios when it is necessary to disable this header is when a custom HTTPS agent is used, and the server requires TLS with certificates. For example:NB: It is currently not possible to set the
set_basic_auth_header
option via the URL params.See the doc entry regarding custom HTTP(s) Agent usage with code samples.
If you have feedback on these experimental features, please let us know by creating an issue in the repository or send a message in the Community Slack (
#clickhouse-js
channel).New features
query
/command
/exec
/insert
request via theBaseQueryParams.auth
setting; when set, the credentials will be taken from there instead of the username/password provided during the client instantiation (#278).session_id
for a particularquery
/command
/exec
/insert
request via theBaseQueryParams.session_id
setting; when set, it will be used instead of the session id provided during the client instantiation (@ holi0317, #271).Bug fixes
ResponseJSON<T>.totals
TypeScript type. Now it correctly matches the shape of the data (T
, default =unknown
) instead of the formerRecord<string, number>
definition (#274).Bug fixes
command
method now drains the response stream properly, as the previous implementation could cause theKeep-Alive
socket to close after each request.ResultSet.stream
method if the request was aborted or the result set was closed (#263).Improvements
ResultSet.stream
logs an error via theLogger
instance if the stream emits an error event instead of a simpleconsole.error
call.DefaultLogger
log messages.rows_before_limit_at_least
to the ResponseJSON type (@ 0237h, #267).Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: