Skip to content

fix: use @kikobeats/got to support Node.js 24.20 - #25

Merged
Kikobeats merged 3 commits into
masterfrom
Kikobeats/kikobeats-got-f8fa318b
Sep 16, 2026
Merged

Kikobeats merged 3 commits into
masterfrom
Kikobeats/kikobeats-got-f8fa318b

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

got@11 is unmaintained and crashes on Node.js 24.20+ (nodejs/node#64847): a retried connection error rejects with ERR_SOCKET_CLOSED_BEFORE_CONNECTION and then throws uncaught exceptions, killing the process. @kikobeats/got is got@11.8.6 with that fix backported (upstream declined a v11 release), plus fixes for stream.pipeline(), the cache option and uploads on modern Node.js.

Changes

  • package.json: got → @kikobeats/got ~11.8.8
  • require("got") → require("@kikobeats/got")

The API is identical: @kikobeats/got is the same got@11 with fixes, so no call sites change.

Testing

Suite run on Node.js 24.20.0 (CI lts/*) and 24.16.0, plus standard.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VZiY7VMgg1nEMkCezwMXEC


Note

Medium Risk
Swaps the HTTP client used for all URL fetches; behavior should match got@11, but any fork divergence could affect content-length resolution in production.

Overview
Replaces the unmaintained got dependency with @kikobeats/got (~11.8.8) in package.json, src/index.js, and test/index.js so HTTP streaming for URL-based content-length checks works on Node.js 24.20+ without the ERR_SOCKET_CLOSED_BEFORE_CONNECTION crash. The public API is unchanged—only the require target and a one-line formatting tweak in fromHeaders.

Adds pnpm-workspace.yaml with allowBuilds for simple-git-hooks and spawn-sync, and extends .gitignore to ignore install.log and pnpm-lock.yaml.

Reviewed by Cursor Bugbot for commit e80f409. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Refactor

    • Updated the underlying HTTP request handling while preserving existing request and response behavior.
    • Header processing continues to support both iterable headers and standard object formats.
  • Tests

    • Existing HTTP response coverage remains in place, confirming unchanged behavior across supported response scenarios.
  • Chores

    • Installation logs and workspace-generated lockfiles are now excluded from version control.
    • Build scripts required by the workspace are explicitly permitted to run.

got@11 is unmaintained and breaks on Node.js 24.20 (nodejs/node#64847):
a retried connection error rejects with ERR_SOCKET_CLOSED_BEFORE_CONNECTION
and then crashes the process with uncaught exceptions. @kikobeats/got is
got@11 with that fix backported.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZiY7VMgg1nEMkCezwMXEC
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e731a065-8fbb-40a4-b404-ac347a7eca40

📥 Commits

Reviewing files that changed from the base of the PR and between 1c7cce1 and e80f409.

📒 Files selected for processing (2)
  • .gitignore
  • pnpm-workspace.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The project replaces got with @kikobeats/got version ~11.8.8. Runtime and test imports use the new package. Existing HTTP options and header normalization remain unchanged. The repository updates ignore rules and build permissions.

Changes

HTTP client dependency update

Layer / File(s) Summary
Dependency and HTTP client integration
package.json, src/index.js, test/index.js
The dependency and imports now use @kikobeats/got. The throwHttpErrors: false option remains. fromHeaders keeps the same normalization logic in a condensed expression. Tests continue to use the existing HTTP client API.
Workspace installation configuration
.gitignore, pnpm-workspace.yaml
The repository excludes install.log and pnpm-lock.yaml. Build scripts for simple-git-hooks and spawn-sync are allowed.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e80f4

The dependency and installation changes introduce no established merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing got with @kikobeats/got to support Node.js 24.20.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Kikobeats/kikobeats-got-f8fa318b

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fec63fe. Configure here.

Comment thread install.log Outdated
Kikobeats and others added 2 commits September 16, 2026 17:39
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZiY7VMgg1nEMkCezwMXEC
pnpm 12 fails the install when a package with a build script is not approved,
and CI hits it through the implicit install that precedes every script:

  Error: ERR_PNPM_IGNORED_BUILDS
  Ignored build scripts: simple-git-hooks@2.14.0, spawn-sync@1.0.15

pnpm 12 reads the approval from allowBuilds in pnpm-workspace.yaml.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZiY7VMgg1nEMkCezwMXEC
@Kikobeats
Kikobeats merged commit 3804330 into master Sep 16, 2026
4 checks passed
@Kikobeats
Kikobeats deleted the Kikobeats/kikobeats-got-f8fa318b branch September 16, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant