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

grunt-time-bomb

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-time-bomb - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "grunt-time-bomb",
"description": "Detect time bombs in source code comments.",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/tobiashennig/grunt-time-bomb",

@@ -6,0 +6,0 @@ "author": {

@@ -14,13 +14,22 @@ var acorn = require('acorn');

var comments = [], options = {};
files.forEach(function(file) {
comments = options.onComment = [];
acorn.parse(grunt.file.read(file.src), options);
this.parseComments(file, comments);
files.forEach(function(file) {
file.src.filter(function(filepath) {
// Remove nonexistent files (it's up to you to filter or warn here).
if (!grunt.file.exists(filepath)) {
grunt.log.warn('Source file "' + filepath + '" not found.');
return false;
}
return true;
}).map(function(filepath){
comments = options.onComment = [];
acorn.parse(grunt.file.read(filepath), options);
this.parseComments(filepath, comments);
}, this);
}, this);
};
BombDetector.prototype.parseComments = function(file, comments) {
BombDetector.prototype.parseComments = function(filepath, comments) {
comments.forEach(function(comment) {
if (this.isTimer(comment)) {
this.timers.add(file.src, this.getDateFromTimer(comment));
this.timers.add(filepath, this.getDateFromTimer(comment));
}

@@ -27,0 +36,0 @@ }, this);

@@ -17,3 +17,3 @@ /*

bd.parse(this.files);
var timers = bd.timers.get(), bombs = timers.bombs();
var timers = bd.timers.get(), bombs = bd.timers.bombs();

@@ -20,0 +20,0 @@ if (timers.length === 0) {

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