What version of Bun is running?
1.3.1+89fa0f343
What platform is your computer?
Linux 6.8.0-86-generic x86_64 x86_64
What steps can reproduce the bug?
- Create a file
test.mjs with the following content:
import url from 'node:url';
const myURL = new URL('https://a:b@example.org/');
console.log(url.format(myURL));
- Run the file like
bun test.mjs
What is the expected behavior?
https://a:b@example.org/ is the output of Node.js
What do you see instead?
https://example.org/ is Bun output
Additional information
Hello,
From #24233 it seems like the options parameter is simply disregarded in url.format. However, even when no options parameter is specified, the default behaviour of url.format is different than how it is supposed to be. In fact, username:password is simply stripped out.
What version of Bun is running?
1.3.1+89fa0f343
What platform is your computer?
Linux 6.8.0-86-generic x86_64 x86_64
What steps can reproduce the bug?
test.mjswith the following content:bun test.mjsWhat is the expected behavior?
https://a:b@example.org/is the output of Node.jsWhat do you see instead?
https://example.org/is Bun outputAdditional information
Hello,
From #24233 it seems like the
optionsparameter is simply disregarded inurl.format. However, even when nooptionsparameter is specified, the default behaviour ofurl.formatis different than how it is supposed to be. In fact,username:passwordis simply stripped out.