Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.68.0"
".": "0.68.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.68.1 (2026-06-17)

Full Changelog: [v0.68.0...v0.68.1](https://github.com/kernel/kernel-node-sdk/compare/v0.68.0...v0.68.1)

### Bug Fixes

* **client:** send content-type header for requests with an omitted optional body ([2cde4eb](https://github.com/kernel/kernel-node-sdk/commit/2cde4eb8a2469ffe31bad3462e9c3e3339d9bd7c))

## 0.68.0 (2026-06-15)

Full Changelog: [v0.67.0...v0.68.0](https://github.com/kernel/kernel-node-sdk/compare/v0.67.0...v0.68.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onkernel/sdk",
"version": "0.68.0",
"version": "0.68.1",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
10 changes: 9 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,19 @@ export class Kernel {
return () => controller.abort();
}

private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
private buildBody({ options }: { options: FinalRequestOptions }): {
bodyHeaders: HeadersLike;
body: BodyInit | undefined;
} {
const { body, headers: rawHeaders } = options;
if (!body) {
// A resource method always passes a `body` key when its operation defines a
// request body, even if the caller omitted an optional body param. Keep the
// content-type for those, and only elide it for operations with no body at
// all (e.g. GET/DELETE).
if (body == null && 'body' in options) {
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Null body sends JSON null

Low Severity

The new optional-body branch uses body == null, so an explicit null body (e.g. apiKeys.rotate(id, null)) runs through #encoder and JSON.stringify(null) becomes the string "null", which is attached to the fetch. Omitted optional bodies are undefined and correctly get Content-Type without a body; null now sends a literal JSON null entity, which differs from pre-change behavior and from the stated fix for omitted params.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 224b078. Configure here.

}
return { bodyHeaders: undefined, body: undefined };
}
const headers = buildHeaders([rawHeaders]);
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.68.0'; // x-release-please-version
export const VERSION = '0.68.1'; // x-release-please-version
Loading