fix: replace deprecated trimRight() with trimEnd()#7265
Conversation
LinusU
left a comment
There was a problem hiding this comment.
trimEnd was added in Node.js 10.0.0, so this should be safe 👍
(trimRight have been available since at least Node.js 0.10)
|
okay so am i approved to merge? |
|
CI is green, but will wait for one other maintainer to look at it as well 🚀 |
|
Okay. Thanks for the quick response.
…On Tue, May 19, 2026 at 9:20 PM Linus Unnebäck ***@***.***> wrote:
*LinusU* left a comment (expressjs/express#7265)
<#7265 (comment)>
CI is green, but will wait for one other maintainer to look at it as well
🚀
—
Reply to this email directly, view it on GitHub
<#7265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIUIVMWETHJ6ZRUJBMENZCT43R7E7AVCNFSM6AAAAACZD5WMIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DIOBZGUZTGOBYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
All changes are approved, so will it get merged, or there's anything to be done from my side. |
|
Great! I appreciate the consideration. I'd like to keep moving forward with my PR. My focus is on a clean, focused fix: replacing the deprecated trimRight() with I noticed #7047 also addresses this but adds .split() which seems like a separate This keeps the changes focused and reviewable: one fix per PR. I'm committed to Let me know if you'd like me to make any adjustments! 🙌 |
Description
The
hostgetter inlib/request.js:427uses the deprecatedtrimRight()method, which is an Annex B legacy alias fortrimEnd().Why This Matters
trimRight()is deprecated and may emit warnings in future Node.js/V8 versionstrimEnd()is the ES2019 standard equivalent with identical behaviorChanges
.trimRight()with.trimEnd()in the host getterTesting
npm test)Closes #XXXX (only if linking to an existing issue)