Skip to content

Releases: ClickHouse/clickhouse-js

1.16.0

Choose a tag to compare

@peter-leonov-ch peter-leonov-ch released this 07 Jan 11:44
78960f6

New features

async function main() {
  await using client = await client.query();

  // some code that can throw
  // but thanks to `using` the client will still get closed

  // client is also automatically closed here by calling [Symbol.disaposeAsync]
}

Without the new using keyword it is required to wrap the code that might leak expensive resources like sockets and big buffers in try / finally

async function main() {
  let client
  try {
    client = await createClient();
    // some code that can throw
  } finally {
    if (client) {
      await client.close()
    }
  }
}

1.15.0

Choose a tag to compare

@peter-leonov-ch peter-leonov-ch released this 07 Jan 11:25
3572448

New features

1.14.0

Choose a tag to compare

@slvrtrn slvrtrn released this 20 Nov 16:46
3dc58b7

New features

  • It is now possible to specify custom parse and stringify functions that will be used instead of the standard JSON.parse and JSON.stringify methods for JSON serialization/deserialization when working with JSON* family formats. See ClickHouseClientConfigOptions.json, and a new custom_json_handling example for more details. (#481, looskie)
  • (Node.js only) Added an ignore_error_response param to ClickHouseClient.exec, which allows callers to manually handle request errors on the application side. (#483, Kinzeng)

1.13.0

Choose a tag to compare

@slvrtrn slvrtrn released this 12 Nov 23:51

New features

  • Server-side exceptions that occur in the middle of the HTTP stream are now handled correctly. This requires ClickHouse 25.11+. Previous ClickHouse versions are unaffected by this change. (#478)

Improvements

  • TupleParam constructor now accepts a readonly array to permit more usages. (#465, Malien)

Bug fixes

  • Fixed boolean value formatting in query parameters. Boolean values within Array, Tuple, and Map types are now correctly formatted as TRUE/FALSE instead of 1/0 to ensure proper type compatibility with ClickHouse. (#475, baseballyama)

1.12.1

Choose a tag to compare

@slvrtrn slvrtrn released this 15 Aug 12:02
f9108d0

Improvements

  • Improved performance of toSearchParams. (#449, twk)

Other

  • Added Node.js 24.x to the CI matrix. Node.js 18.x was removed from the CI due to EOL.

1.12.0

Choose a tag to compare

@slvrtrn slvrtrn released this 24 Jul 09:17

Types

  • Add missing allow_experimental_join_condition to ClickHouseSettings typing. (#430, looskie)
  • Fixed JSONEachRowWithProgress TypeScript flow after the breaking changes in ClickHouse 25.1. RowOrProgress<T> now has an additional variant: SpecialEventRow<T>. The library now additionally exports the parseError method, and newly added isRow / isException type guards. See the updated JSONEachRowWithProgress example (#443)
  • Added missing allow_experimental_variant_type (24.1+), allow_experimental_dynamic_type (24.5+), allow_experimental_json_type (24.8+), enable_json_type (25.3+), enable_time_time64_type (25.6+) to ClickHouseSettings typing. (#445)

Improvements

  • Add a warning on a socket closed without fully consuming the stream (e.g., when using query or exec method). (#441)
  • (Node.js only) An option to use a simple SELECT query for ping checks instead of /ping endpoint. See the new optional argument to the ClickHouseClient.ping method and PingParams typings. Note that the Web version always used a SELECT query by default, as the /ping endpoint does not support CORS, and that cannot be changed. (#442)

Other

  • The project now uses Codecov instead of SonarCloud for code coverage reports. (#444)

1.11.2 (Common, Node.js)

Choose a tag to compare

@slvrtrn slvrtrn released this 06 Jun 16:56
f889046

A minor release to allow further investigation regarding uncaught error issues with #410.

Types

Improvements (Node.js)

  • Added a new configuration option: capture_enhanced_stack_trace; see the JS doc in the Node.js client package. Note that it is disabled by default due to a possible performance impact. (#427)
  • Added more try-catch blocks to the Node.js connection layer. (#427)

1.11.1 (Common, Node.js, Web)

Choose a tag to compare

@slvrtrn slvrtrn released this 17 Apr 12:27
5688648

Bug fixes

  • Fixed an issue with URLEncoded special characters in the URL configuration for username or password. (#407)

Improvements

  • (Node.js only) Added support for streaming on 32-bit platforms. (#403, shevchenkonik)

1.11.0 (Common, Node.js, Web)

Choose a tag to compare

@slvrtrn slvrtrn released this 17 Mar 19:51

New features

  • It is now possible to provide custom HTTP headers when calling the query/insert/command/exec methods using the http_headers option. NB: http_headers specified this way will override http_headers set on the client instance level. (#394, @DylanRJohnston)
  • (Web only) It is now possible to provide a custom fetch implementation to the client. (#315, @lucacasonato)

1.10.1

Choose a tag to compare

@slvrtrn slvrtrn released this 16 Jan 18:52

Bug fixes

  • Fixed NULL parameter binding with Tuple, Array, and Map types. (#374)

Improvements

  • ClickHouseSettings typings now include session_timeout and session_check settings. (#370)