Skip to content

Improve terminology and comments. - #57

Merged
davidlehn merged 3 commits into
fix/undici-consistent-fetchfrom
fix/undici-consistent-fetch-2
Jul 30, 2026
Merged

Improve terminology and comments.#57
davidlehn merged 3 commits into
fix/undici-consistent-fetchfrom
fix/undici-consistent-fetch-2

Conversation

@davidlehn

Copy link
Copy Markdown
Member
  • Uses installed/built-in vs bundled/runtime. Seems clearer to me. Other suggestions welcome.
  • The big comment was split up. Hopefully more understandable.

davidlehn and others added 2 commits July 28, 2026 23:09
The code used "bundled" for the npm-installed undici and "runtime"/"native"
for the one built into node, which reads backwards and made
`bundledMajor === runtimeMajor` hard to follow. Standardize on "installed"
and "built-in" throughout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comment above `builtinFetchCompatible` had grown to explain the
background, the constant, both branches, and the guarded version reads all
at once. Hoist the background to a module-level note, leave the constant
with only its own meaning, and move the note about `ky` forwarding
`dispatcher` to the branch that relies on it. Drop the `Request` rebuild
explanation, which `createFetch` already documents.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@davidlehn
davidlehn requested review from applesnort and dlongley July 29, 2026 00:42

@dlongley dlongley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with this. An alternative to built-in might be platform.

Rename `builtinFetchCompatible` to `platformFetchCompatible` and
`builtinMajor` to `platformMajor`, and update the comments to match. Also
update the 4.3.1 changelog entry, which still used the older "bundled" and
"runtime" wording for the same two things.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.85%. Comparing base (f465606) to head (8c845bb).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           fix/undici-consistent-fetch      #57      +/-   ##
===============================================================
- Coverage                        93.89%   93.85%   -0.05%     
===============================================================
  Files                                4        4              
  Lines                              295      293       -2     
===============================================================
- Hits                               277      275       -2     
  Misses                              18       18              
Files with missing lines Coverage Δ
lib/agentCompatibility.js 92.66% <100.00%> (-0.14%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f465606...8c845bb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidlehn
davidlehn merged commit 68b237c into fix/undici-consistent-fetch Jul 30, 2026
8 checks passed
@davidlehn
davidlehn deleted the fix/undici-consistent-fetch-2 branch July 30, 2026 21:11
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.

3 participants