Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.6k
[nodejs] Call writeFileSync with base64 directly#16542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:trunk
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Encoding option can take `base64`And this might be optimized
CLAassistant commentedNov 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
qodo-code-reviewbot commentedNov 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label | ||||||||||||||||||||||||
qodo-code-reviewbot commentedNov 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
PR Code Suggestions ✨Explore these optional code suggestions:
| ||||||||||||||
Uh oh!
There was an error while loading.Please reload this page.
User description
writeFileSyncencoding option can take'base64'And this might be optimized at some point
PR Type
Enhancement
Description
Simplify base64 file writing using native encoding option
Remove unnecessary Buffer.from() conversion overhead
Leverage fs.writeFileSync() built-in base64 support
Diagram Walkthrough
File Walkthrough
webdriver.js
Simplify base64 encoding in file write operationjavascript/selenium-webdriver/lib/webdriver.js
Buffer.from(base64Content, 'base64')with direct encodingparameter
'base64'as third argument tofs.writeFileSync()