You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

imgconvert-cli

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imgconvert-cli - npm Package Compare versions

Comparing version
1.7.6
to
1.7.7
+2
-2
package.json
{
"name": "imgconvert-cli",
"version": "1.7.6",
"version": "1.7.7",
"description": "A CLI tool for compressing and converting images",
"main": "src/index.js",
"bin": {
"imgconvert": "./index.js"
"imgconvert": "index.js"
},

@@ -9,0 +9,0 @@ "engines": {

@@ -460,3 +460,16 @@ /**

fs.renameSync(tempOutputFile, finalOutputFile);
// Try to rename (move) the temp file to the final destination
// If cross-device link error (EXDEV), use copy+unlink instead
try {
fs.renameSync(tempOutputFile, finalOutputFile);
} catch (renameErr) {
if (renameErr.code === 'EXDEV') {
// Cross-device link: source and dest are on different filesystems
// Use copy+unlink as fallback
fs.copyFileSync(tempOutputFile, finalOutputFile);
fs.unlinkSync(tempOutputFile);
} else {
throw renameErr;
}
}

@@ -463,0 +476,0 @@ const { size: newSize } = fs.statSync(finalOutputFile);