Skip to content

docs: use event.url.pathname in lifecycle hook examples - #4442

Merged
pi0 merged 1 commit into
nitrojs:mainfrom
BTF-Kabir-2020:docs/fix-event-path-lifecycle
Jul 17, 2026
Merged

pi0 merged 1 commit into
nitrojs:mainfrom
BTF-Kabir-2020:docs/fix-event-path-lifecycle

Conversation

@BTF-Kabir-2020

Copy link
Copy Markdown
Contributor

Summary

The request and response hooks receive an HTTPEvent, which does not have a path property.
Update the lifecycle docs examples to use event.url.pathname instead.

Fixes #4375

Notes

@BTF-Kabir-2020
BTF-Kabir-2020 requested a review from pi0 as a code owner July 17, 2026 03:03
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

@BTF-Kabir-2020 is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Run ID: bf257689-bfc2-4778-9c43-cc151fae246a

📥 Commits

Reviewing files that changed from the base of the PR and between 17d4981 and a99fd8c.

📒 Files selected for processing (1)
  • docs/1.docs/50.lifecycle.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/1.docs/50.lifecycle.md

📝 Walkthrough

Walkthrough

Updated lifecycle documentation examples to log request and response paths using event.url.pathname instead of event.path.

Changes

Lifecycle documentation

Layer / File(s) Summary
Update lifecycle hook examples
docs/1.docs/50.lifecycle.md
The request and response hook examples now use event.url.pathname when logging paths.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses a valid conventional-commit style prefix and accurately describes the docs example update.
Description check ✅ Passed The description is clearly related to the lifecycle docs fix and matches the documented scope.
Linked Issues check ✅ Passed The change fixes the incorrect HTTPEvent path usage in the lifecycle hook examples as requested by #4375.
Out of Scope Changes check ✅ Passed The PR stays within the docs-only lifecycle example update and introduces no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@BTF-Kabir-2020
BTF-Kabir-2020 force-pushed the docs/fix-event-path-lifecycle branch from 17d4981 to a99fd8c Compare July 17, 2026 03:25
@pi0
pi0 merged commit bfc2f5e into nitrojs:main Jul 17, 2026
3 of 4 checks passed
@BTF-Kabir-2020
BTF-Kabir-2020 deleted the docs/fix-event-path-lifecycle branch July 17, 2026 17:44
@pi0 pi0 mentioned this pull request Aug 21, 2026
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.

doc: Usage .path in HTTPEvent is not correct

2 participants