You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use TypeScript instead of separate types, publish them together.
I don't think we should add fetch support but instead just decouple from the HTTP interface entirely.
Remove buffer entirely so it can be used in any environment
Related but not a major is doing performance optimization. Both the base64 conversion (str -> buffer -> str) and removing regex checks could provide some speed improvements when also considering the proper RFC compliance.
After reviewing your feedback, I decided to start with a TypeScript rewrite of the current codebase in #93 as you suggested, and then apply the other changes incrementally.
Planned follow-ups after the TS rewrite is merged:
Remove the default method accepting Node.js IncomingMessage. I think we should only expose a parse and a format method.
Hey @blakeembrey, hope you had a great time off! When you’re ready, it would be great to get #93 reviewed and merged so I can start applying the follow-up changes.
@Phillip9587 Would you want to switch this package to ESM only? I don't think there's an immediate need to land our changes in upstream packages so it might be a simple opportunity to switch over with the release.
@blakeembrey Yes I think it is an opportunity. I'm not sure it aligns with the expressjs standards which currently define that commonjs is needed. If you prefer we can also make it a dual-package but i don't think it is needed as require(ESM) is stable now.
I confirmed in a call with a subset of the members on my intent to ship ESM only if they target Express.js 6 and it seemed like they were onboard. If it's intended for 5 I won't, but these changes don't seem needed immediately in any express dependency.
Use TypeScript instead of separate types, publish them together.
I don't think we should add fetch support but instead just decouple from the HTTP interface entirely.
Remove buffer entirely so it can be used in any environment
Related but not a major is doing performance optimization. Both the base64 conversion (str -> buffer -> str) and removing regex checks could provide some speed improvements when also considering the proper RFC compliance.
Activity
blakeembrey commentedon Jan 27, 2026
A few notes on what we could do:
fetchsupport but instead just decouple from the HTTP interface entirely.bufferentirely so it can be used in any environmentRelated but not a major is doing performance optimization. Both the base64 conversion (str -> buffer -> str) and removing regex checks could provide some speed improvements when also considering the proper RFC compliance.
Phillip9587 commentedon Feb 26, 2026
Hey @blakeembrey , I just cycled back to this.
After reviewing your feedback, I decided to start with a TypeScript rewrite of the current codebase in #93 as you suggested, and then apply the other changes incrementally.
Planned follow-ups after the TS rewrite is merged:
IncomingMessage. I think we should only expose aparseand aformatmethod.parse.Bufferand useUint8Array.fromBase64()(with fallback if not available).formatmethod (similar to feat: addauth.formatfor formatting credentials #65) with proper input validation, usingUint8Array.toBase64()where available (with fallback).format.user-idandpasswordto be RFC-compliant. #55blakeembrey commentedon Feb 27, 2026
Just a quick heads up that I'll be unavailable for the next two weeks but I took a quick look at the PRs and it seems like it's great work, thanks!
Phillip9587 commentedon Mar 28, 2026
Hey @blakeembrey, hope you had a great time off! When you’re ready, it would be great to get #93 reviewed and merged so I can start applying the follow-up changes.
blakeembrey commentedon Apr 23, 2026
@Phillip9587 Would you want to switch this package to ESM only? I don't think there's an immediate need to land our changes in upstream packages so it might be a simple opportunity to switch over with the release.
Phillip9587 commentedon Apr 23, 2026
@blakeembrey Yes I think it is an opportunity. I'm not sure it aligns with the expressjs standards which currently define that commonjs is needed. If you prefer we can also make it a dual-package but i don't think it is needed as require(ESM) is stable now.
blakeembrey commentedon Apr 23, 2026
I confirmed in a call with a subset of the members on my intent to ship ESM only if they target Express.js 6 and it seemed like they were onboard. If it's intended for 5 I won't, but these changes don't seem needed immediately in any express dependency.
XinGOfCloude18 commentedon Aug 12, 2026
A few notes on what we could do:
fetchsupport but instead just decouple from the HTTP interface entirely.bufferentirely so it can be used in any environmentRelated but not a major is doing performance optimization. Both the base64 conversion (str -> buffer -> str) and removing regex checks could provide some speed improvements when also considering the proper RFC compliance.
Phillip9587 commentedon Aug 12, 2026
@XinGOfCloude18 Already done in https://github.com/jshttp/basic-auth/releases/tag/v3.0.0. We just forgot to close the issue