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

custompatch

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custompatch - npm Package Compare versions

Comparing version
1.0.26
to
1.0.27
+19
-3
index.js

@@ -376,5 +376,11 @@ #!/usr/bin/env node

const oldName = path.join(curDir, 'node_modules', pathNormalize(info.index));
if(!fs.existsSync(oldName)) fs.writeFileSync(oldName, '');
// read the original file
fs.readFile(oldName, 'utf8', callback);
if(fs.existsSync(oldName))
{
// read the original file
fs.readFile(oldName, 'utf8', callback);
}
else
{
callback(null, ''); // old file does not exist - i.e. it is empty
}
}

@@ -444,2 +450,12 @@

chunk.success = false;
const oldName = path.join(curDir, 'node_modules', pathNormalize(chunk.chunkInfo.index));
if(!fs.existsSync(oldName))
{
const folder = path.dirname(oldName);
if (!fs.existsSync(folder))
{
echo(startColor('yellowBright') + 'WARNING: Folder ' + stopColor() + startColor('redBright') + path.dirname(pathNormalize(chunk.chunkInfo.index)) + stopColor() + startColor('yellowBright') + ' does not exist - the patch is probably for older version');
return;
}
}
echo(startColor('yellowBright') + 'WARNING: ' + stopColor() + 'Chunk failed - ' + startColor('redBright') + ' either already applied or for different version' + stopColor());

@@ -446,0 +462,0 @@ }

+1
-1
{
"name": "custompatch",
"version": "1.0.26",
"version": "1.0.27",
"description": "Tool for patching buggy NPM packages instead of forking them",

@@ -5,0 +5,0 @@ "author": "IVO GELOV",