[Snyk] Upgrade @clickhouse/client from 0.2.7 to 0.2.9 #1172

Closed
opened 2026-04-05 16:25:47 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @simlarsen on 2/28/2024

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade @clickhouse/client from 0.2.7 to 0.2.9.

ℹ️ 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 2 versions ahead of your current version.
  • The recommended version was released a month ago, on 2024-01-19.
Release notes
Package name: @clickhouse/client
  • 0.2.9 - 2024-01-19

    New features

    • It is now possible to set additional HTTP headers for outgoing ClickHouse requests. This might be useful if, for example, you have a reverse proxy with authorization. (@ teawithfruit)
    const client = createClient({
      additional_headers: {
        'X-ClickHouse-User': 'clickhouse_user',
        'X-ClickHouse-Key': 'clickhouse_password',
      },
    })
  • 0.2.8 - 2024-01-12

    New features

    • (Web only) Allow to modify Keep-Alive setting (previously always disabled). Keep-Alive setting is now enabled by default for the Web version.
    import { createClient } from '@ clickhouse/client-web'
    const client = createClient({ keep_alive: { enabled: true } })
    • (Node.js & Web) It is now possible to either specify a list of columns to insert the data into or a list of excluded columns:
    // Generated query: INSERT INTO mytable (* EXCEPT (message)) FORMAT JSONEachRow
    await client.insert({
    table: 'mytable',
    format: 'JSONEachRow',
    values: [{ id: 42 }],
    columns: { except: ['message'] },
    })">
    // Generated query: INSERT INTO mytable (message) FORMAT JSONEachRow
    await client.insert({
    table: 'mytable',
    format: 'JSONEachRow',
    values: [{ message: 'foo' }],
    columns: ['message'],
    })

    // Generated query: INSERT INTO mytable (* EXCEPT (message)) FORMAT JSONEachRow
    await client.insert({
    table: 'mytable',
    format: 'JSONEachRow',
    values: [{ id: 42 }],
    columns: { except: ['message'] },
    })

    See also the new examples:

  • 0.2.7 - 2023-12-13

    New features

    • (Node.js only) X-ClickHouse-Summary response header is now parsed when working with insert/exec/command methods. See the related test for more details.
      NB: it is guaranteed to be correct only for non-streaming scenarios.
      The web version does not currently support this due to CORS limitations. (#210)

    Bug fixes

    • Drain insert response stream in Web version - required to properly work with async_insert, especially in the Cloudflare Workers context.
from @clickhouse/client GitHub release notes
Commit messages
Package name: @clickhouse/client
  • 8b3d134 Prepare 0.2.9; Cleanup tests and restrict the headers type to string only
  • 9b358ea Allow to specify additional HTTP headers for ClickHouse requests (#224)
  • 67a2fac Update insert into a different database example
  • 6c1904f Add an example on inserts into a different database
  • 6104a1e Additional issue templates (#223)
  • aafc649 Allow to specify or exclude insert columns (#218)
  • 927ca27 Add read-only user examples
  • eaa0713 Make keep_alive configurable in the Web version (#220)
  • df4839d Add JS Date test/example

Compare


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:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

*Originally created by @simlarsen on 2/28/2024* <p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to upgrade @clickhouse/client from 0.2.7 to 0.2.9.</h3> :information_source: 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. <hr/> - The recommended version is **2 versions** ahead of your current version. - The recommended version was released **a month ago**, on 2024-01-19. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@clickhouse/client</b></summary> <ul> <li> <b>0.2.9</b> - <a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/releases/tag/0.2.9">2024-01-19</a></br><h3>New features</h3> <ul> <li>It is now possible to set additional HTTP headers for outgoing ClickHouse requests. This might be useful if, for example, you have a reverse proxy with authorization. (<a href="https://snyk.io/redirect/github/teawithfruit">@ teawithfruit</a>)</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const client = createClient({ additional_headers: { 'X-ClickHouse-User': 'clickhouse_user', 'X-ClickHouse-Key': 'clickhouse_password', }, })"><pre><span class="pl-k">const</span> <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-en">createClient</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">additional_headers</span>: <span class="pl-kos">{</span> <span class="pl-s">'X-ClickHouse-User'</span>: <span class="pl-s">'clickhouse_user'</span><span class="pl-kos">,</span> <span class="pl-s">'X-ClickHouse-Key'</span>: <span class="pl-s">'clickhouse_password'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> </li> <li> <b>0.2.8</b> - <a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/releases/tag/0.2.8">2024-01-12</a></br><h3>New features</h3> <ul> <li>(Web only) Allow to modify Keep-Alive setting (previously always disabled). Keep-Alive setting <strong>is now enabled by default</strong> for the Web version.</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { createClient } from '@ clickhouse/client-web' const client = createClient({ keep_alive: { enabled: true } })"><pre><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">createClient</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@ clickhouse/client-web'</span> <span class="pl-k">const</span> <span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-en">createClient</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">keep_alive</span>: <span class="pl-kos">{</span> <span class="pl-c1">enabled</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <ul> <li>(Node.js &amp; Web) It is now possible to either specify a list of columns to insert the data into or a list of excluded columns:</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Generated query: INSERT INTO mytable (message) FORMAT JSONEachRow await client.insert({ table: 'mytable', format: 'JSONEachRow', values: [{ message: 'foo' }], columns: ['message'], }) // Generated query: INSERT INTO mytable (* EXCEPT (message)) FORMAT JSONEachRow await client.insert({ table: 'mytable', format: 'JSONEachRow', values: [{ id: 42 }], columns: { except: ['message'] }, })"><pre><span class="pl-c">// Generated query: INSERT INTO mytable (message) FORMAT JSONEachRow</span> <span class="pl-k">await</span> <span class="pl-s1">client</span><span class="pl-kos">.</span><span class="pl-en">insert</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">table</span>: <span class="pl-s">'mytable'</span><span class="pl-kos">,</span> <span class="pl-c1">format</span>: <span class="pl-s">'JSONEachRow'</span><span class="pl-kos">,</span> <span class="pl-c1">values</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">message</span>: <span class="pl-s">'foo'</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">columns</span>: <span class="pl-kos">[</span><span class="pl-s">'message'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c">// Generated query: INSERT INTO mytable (* EXCEPT (message)) FORMAT JSONEachRow</span> <span class="pl-k">await</span> <span class="pl-s1">client</span><span class="pl-kos">.</span><span class="pl-en">insert</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">table</span>: <span class="pl-s">'mytable'</span><span class="pl-kos">,</span> <span class="pl-c1">format</span>: <span class="pl-s">'JSONEachRow'</span><span class="pl-kos">,</span> <span class="pl-c1">values</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-c1">42</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">columns</span>: <span class="pl-kos">{</span> <span class="pl-c1">except</span>: <span class="pl-kos">[</span><span class="pl-s">'message'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p>See also the new examples:</p> <ul> <li><a href="/ClickHouse/clickhouse-js/blob/0.2.8/examples/insert_exclude_columns.ts">Including specific columns or excluding certain ones instead</a></li> <li><a href="/ClickHouse/clickhouse-js/blob/0.2.8/examples/insert_ephemeral_columns.ts">Leveraging this feature</a> when working with <a href="https://clickhouse.com/docs/en/sql-reference/statements/create/table#ephemeral" rel="nofollow">ephemeral columns</a> (<a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/issues/217" data-hovercard-type="issue" data-hovercard-url="/ClickHouse/clickhouse-js/issues/217/hovercard">#217</a>)</li> </ul> </li> <li> <b>0.2.7</b> - <a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/releases/tag/0.2.7">2023-12-13</a></br><h3>New features</h3> <ul> <li>(Node.js only) <code>X-ClickHouse-Summary</code> response header is now parsed when working with <code>insert</code>/<code>exec</code>/<code>command</code> methods. See the <a href="/ClickHouse/clickhouse-js/blob/0.2.7/packages/client-node/__tests__/integration/node_summary.test.ts">related test</a> for more details.<br> NB: it is guaranteed to be correct only for non-streaming scenarios.<br> The web version does not currently support this due to CORS limitations. (<a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/issues/210" data-hovercard-type="issue" data-hovercard-url="/ClickHouse/clickhouse-js/issues/210/hovercard">#210</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Drain insert response stream in Web version - required to properly work with <code>async_insert</code>, especially in the Cloudflare Workers context.</li> </ul> </li> </ul> from <a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/releases">@clickhouse/client GitHub release notes</a> </details> </details> <details> <summary><b>Commit messages</b></summary> </br> <details> <summary>Package name: <b>@clickhouse/client</b></summary> <ul> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/8b3d1349fb5f769c0e1fbf80abf5e0f4e84d3dc8">8b3d134</a> Prepare 0.2.9; Cleanup tests and restrict the headers type to string only</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/9b358ea37ab25ef7dbfe226e9eaa4c573ff0b032">9b358ea</a> Allow to specify additional HTTP headers for ClickHouse requests (#224)</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/67a2facd2553d4e0a1e7a08ef0fd05ce1ef9d70f">67a2fac</a> Update insert into a different database example</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/6c1904fba10a0d6b3319b563088e9d8a8672a619">6c1904f</a> Add an example on inserts into a different database</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/6104a1e04591fd70ff5a37f1b5fb7036b4ed4c9a">6104a1e</a> Additional issue templates (#223)</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/aafc649261acda914245cebcd3ac7ee4d7038b10">aafc649</a> Allow to specify or exclude insert columns (#218)</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/927ca276d4d41d44e6b36b4315c5143a3467258a">927ca27</a> Add read-only user examples</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/eaa07137d0d6640833ad5e88a3d4e2e21b3591cb">eaa0713</a> Make keep_alive configurable in the Web version (#220)</li> <li><a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/commit/df4839d1e48a38d66865f90e673d20cc2ae6d54d">df4839d</a> Add JS Date test/example</li> </ul> <a href="https://snyk.io/redirect/github/ClickHouse/clickhouse-js/compare/152b89a4a5faf91782acae149d1c7693f962a97f...8b3d1349fb5f769c0e1fbf80abf5e0f4e84d3dc8">Compare</a> </details> </details> <hr/> **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: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIyODkyZmEzMy00YzU0LTQ5NzQtODEyNy0wZTc3Zjg1YzI3NjkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjI4OTJmYTMzLTRjNTQtNDk3NC04MTI3LTBlNzdmODVjMjc2OSJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/a2fb4fe1-f25f-4ff9-a58c-e78277b0a7fa?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr) 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/a2fb4fe1-f25f-4ff9-a58c-e78277b0a7fa/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr) 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/a2fb4fe1-f25f-4ff9-a58c-e78277b0a7fa/settings/integration?pkg&#x3D;@clickhouse/client&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades) <!--- (snyk:metadata:{"prId":"2892fa33-4c54-4974-8127-0e77f85c2769","prPublicId":"2892fa33-4c54-4974-8127-0e77f85c2769","dependencies":[{"name":"@clickhouse/client","from":"0.2.7","to":"0.2.9"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/a2fb4fe1-f25f-4ff9-a58c-e78277b0a7fa?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"a2fb4fe1-f25f-4ff9-a58c-e78277b0a7fa","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2024-01-19T17:42:08.311Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]}) --->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1172