New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-kpc

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-kpc - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

.npmignore

39

index.js

@@ -5,5 +5,13 @@ var kpc = require('node-kpc');

var path = require('path');
var util = require('util');
var fs = require('fs');
module.exports = gulpKpc;
function pad(n, width, z) {
z = z || '0';
n = n + '';
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
}
function gulpKpc(options) {

@@ -58,6 +66,33 @@

msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
msg = msg + '\n ' + e.filename + ':' + e.lineNumber;
var lines = fs.readFileSync(e.filename, 'utf8').split('\n');
var currentLine = lines[e.lineNumber-1]+'\n';
var prevLine = lines[e.lineNumber-2]+'\n' || '';
var nextLine = lines[e.lineNumber] + '\n' || '';
var padWidth = (e.lineNumber+1).toString().length;
if (prevLine) {
prevLine = pad(e.lineNumber-1, padWidth) + prevLine;
}
if (currentLine) {
currentLine = pad(e.lineNumber, padWidth) + currentLine;
}
if (nextLine) {
nextLine = pad(e.lineNumber+1, padWidth) + nextLine;
}
var textArrow = '';
var n = 0;
do {
textArrow += ' ';
n+=1;
} while(n < e.column - 1 + padWidth);
textArrow += '^';
msg = util.format('%s\n-> %s:%s\n\n%s%s%s\n%s\n', msg, e.filename, e.lineNumber, prevLine, currentLine, textArrow, nextLine);
}
throw new gUtil.PluginError('gulp-kpc', msg || e, {showStack: false});
callback(new gUtil.PluginError('gulp-kpc', msg || e, {showStack: false}));
return;
}

@@ -64,0 +99,0 @@

8

package.json
{
"name": "gulp-kpc",
"version": "0.4.3",
"version": "0.4.4",
"description": "kpc plugin for gulp",

@@ -20,6 +20,6 @@ "main": "index.js",

"dependencies": {
"through2": "~0.4.1",
"gulp-util": "~2.2.14",
"node-kpc": "^0.3.11"
"gulp-util": "^2.2.20",
"node-kpc": "^0.3.11",
"through2": "~0.4.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc