Skip to content

docs: point request.hostname URL link at current Node.js docs - #1994

Open
FirmaSpring wants to merge 1 commit into
koajs:masterfrom
FirmaSpring:docs/point-hostname-url-link-at-current-node-docs
Open

docs: point request.hostname URL link at current Node.js docs#1994
FirmaSpring wants to merge 1 commit into
koajs:masterfrom
FirmaSpring:docs/point-hostname-url-link-at-current-node-docs

Conversation

@FirmaSpring

@FirmaSpring FirmaSpring commented Aug 17, 2026

Copy link
Copy Markdown

Problem

docs/api/request.md (request.hostname) links the WHATWG URL API at

https://nodejs.org/dist/latest-v8.x/docs/api/url.html#url_the_whatwg_url_api

That is the Node.js 8 documentation snapshot. Node 8 has been EOL since 2019, and Koa itself requires node >= 18 (package.json engines). New WHATWG URL features referenced by current Koa behavior (e.g. URL available globally, url.URL parsing used for IPv6 hostnames) are documented in the current docs, not the Node 8 snapshot.

Solution

Link to the current WHATWG URL API section:

https://nodejs.org/api/url.html#the-whatwg-url-api

Verification

  • curl -L -o /dev/null -w "%{http_code}" returns 200 for the new URL.
  • The anchor #the-whatwg-url-api exists on the page (section "The WHATWG URL API").
  • grep -n "engines" -A2 package.json shows "node": ">= 18".

Summary by Sourcery

Documentation:

  • Update the WHATWG URL API link in request.hostname docs to point to the current Node.js documentation.

Summary by CodeRabbit

  • Documentation
    • Updated the request.hostname documentation link to reference the current Node.js URL API documentation.

The link targeted the Node 8 docs snapshot (nodejs.org/dist/latest-v8.x/...), but Koa requires node >= 18 per package.json engines, and Node 8 is EOL. Link the WHATWG URL API section of the current docs instead.

Co-authored-by: FirmamentalSpring <287222957+FirmaSpring@users.noreply.github.com>
@sourcery-ai

sourcery-ai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates Koa request.hostname documentation to link to the current Node.js WHATWG URL API instead of an outdated Node 8 snapshot.

File-Level Changes

Change Details Files
Update documentation link for WHATWG URL API to point at the current Node.js docs that align with Koa’s supported Node versions.
  • Replace the outdated Node 8 WHATWG URL API URL with the canonical current Node.js WHATWG URL API section URL.
  • Ensure the anchor in the new URL points directly to the "The WHATWG URL API" section.
docs/api/request.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: edd4683c-f9b7-400e-9eb2-40ed90520171

📥 Commits

Reviewing files that changed from the base of the PR and between e145325 and a4ca5ee.

📒 Files selected for processing (1)
  • docs/api/request.md

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The request.hostname documentation now links to the current Node.js URL API reference instead of the obsolete Node.js v8 URL reference. No exported or public declarations changed.

Merge Risk: ⚪ Minimal · up to a4ca5

This is a localized documentation-only link update with no runtime or product behavior change, so no actionable merge-blocking risk remains after normal checks and review.

🚥 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 documentation link update for request.hostname.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (e145325) to head (a4ca5ee).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1994   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files           9        9           
  Lines        2109     2109           
=======================================
  Hits         2107     2107           
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@yowainwright

Copy link
Copy Markdown
Member

Copied from human-written text in #1995

The link update change and summation are correct! 👍

Tested: There is no change in webkit based browsers
by switching to the current linking mechanism vs what is there today.
so I'm unsure if the juice is worth the squeeze. 🤔

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.

2 participants