Comparing version 1.0.0 to 1.0.1
@@ -1,7 +0,7 @@ | ||
var gulp = require('gulp'); | ||
var rimraf = require('rimraf'); | ||
const gulp = require('gulp'); | ||
const rimraf = require('rimraf'); | ||
gulp.task('clean', function(cb) { | ||
gulp.task('clean', cb => { | ||
rimraf('./coverage', cb); | ||
}); | ||
@@ -1,5 +0,5 @@ | ||
var gulp = require('gulp'); | ||
var codeclimate = require('gulp-codeclimate-reporter'); | ||
const gulp = require('gulp'); | ||
const codeclimate = require('gulp-codeclimate-reporter'); | ||
gulp.task('codeclimate', function() { | ||
gulp.task('codeclimate', () => { | ||
if (process.version.indexOf('v4') > -1) { | ||
@@ -6,0 +6,0 @@ gulp.src('coverage/lcov.info', { read: false }) |
module.exports = { | ||
tests: ['test/**/*.coffee', '!test/helpers/**/*.coffee'], | ||
helpers: ['test/helpers/**/*.coffee'], | ||
lib: ['lib/**/*.js'] | ||
}; |
@@ -1,7 +0,7 @@ | ||
var gulp = require('gulp'); | ||
var config = require('./config'); | ||
var mocha = require('gulp-mocha'); | ||
var istanbul = require('gulp-istanbul'); | ||
const gulp = require('gulp'); | ||
const config = require('./config'); | ||
const mocha = require('gulp-mocha'); | ||
const istanbul = require('gulp-istanbul'); | ||
gulp.task('cover', ['clean', 'instrument'], function() { | ||
gulp.task('cover', ['clean', 'instrument'], () => { | ||
return gulp.src(config.tests, { read: false }) | ||
@@ -8,0 +8,0 @@ .pipe(mocha({ |
@@ -1,6 +0,6 @@ | ||
var gulp = require('gulp'); | ||
var istanbul = require('gulp-istanbul'); | ||
var config = require('./config'); | ||
const gulp = require('gulp'); | ||
const istanbul = require('gulp-istanbul'); | ||
const config = require('./config'); | ||
gulp.task('instrument', function() { | ||
gulp.task('instrument', () => { | ||
gulp.src(config.lib) | ||
@@ -7,0 +7,0 @@ .pipe(istanbul({ |
@@ -1,11 +0,11 @@ | ||
var gulp = require('gulp'); | ||
var config = require('./config'); | ||
var jshint = require('gulp-jshint'); | ||
const gulp = require('gulp'); | ||
const config = require('./config'); | ||
const jshint = require('gulp-jshint'); | ||
gulp.task('lint', function() { | ||
gulp.task('lint', () => { | ||
return gulp.src(config.lib) | ||
.pipe(jshint({ | ||
esversion: 6, | ||
lookup: false, | ||
eqeqeq: true, | ||
es3: true, | ||
indent: 2, | ||
@@ -12,0 +12,0 @@ newcap: true, |
@@ -1,5 +0,5 @@ | ||
var gulp = require('gulp'); | ||
var open = require('gulp-open'); | ||
const gulp = require('gulp'); | ||
const open = require('gulp-open'); | ||
gulp.task('open', function() { | ||
gulp.task('open', () => { | ||
return gulp.src('./coverage/lcov-report/index.html') | ||
@@ -6,0 +6,0 @@ .pipe(open()); |
@@ -1,6 +0,6 @@ | ||
var gulp = require('gulp'); | ||
var config = require('./config'); | ||
var mocha = require('gulp-mocha'); | ||
const gulp = require('gulp'); | ||
const config = require('./config'); | ||
const mocha = require('gulp-mocha'); | ||
gulp.task('unit', function() { | ||
gulp.task('unit', () => { | ||
return gulp.src(config.tests, { read: false }) | ||
@@ -7,0 +7,0 @@ .pipe(mocha({ |
@@ -1,7 +0,7 @@ | ||
var gulp = require('gulp'); | ||
var config = require('./config'); | ||
const gulp = require('gulp'); | ||
const config = require('./config'); | ||
gulp.task('watch', function() { | ||
gulp.task('watch',() => { | ||
gulp.watch(config.lib.concat(config.tests), ['unit']); | ||
}); | ||
@@ -1,6 +0,6 @@ | ||
var isRelative = require('is-relative'); | ||
var stackTrace = require('stack-trace'); | ||
var path = require('path'); | ||
const isRelative = require('is-relative'); | ||
const stackTrace = require('stack-trace'); | ||
const path = require('path'); | ||
var getFileName = function(file) { | ||
const getFileName = file => { | ||
if (isRelative(file)) { | ||
@@ -20,7 +20,7 @@ var stack = stackTrace.get(); | ||
exports.get = function(file) { | ||
exports.get = file => { | ||
file = getFileName(file); | ||
if (require.cache[file]) { | ||
var list = []; | ||
var recurse = function(cacheObj) { | ||
var recurse = cacheObj => { | ||
list.push(cacheObj.id); | ||
@@ -36,6 +36,6 @@ cacheObj.children.forEach(recurse); | ||
exports.walk = function(file, fn) { | ||
exports.walk = (file, fn) => { | ||
file = getFileName(file); | ||
if (require.cache[file]) { | ||
var recurse = function(cacheObj) { | ||
var recurse = cacheObj => { | ||
fn(cacheObj.id); | ||
@@ -48,7 +48,5 @@ cacheObj.children.forEach(recurse); | ||
exports['delete'] = function(file) { | ||
exports['delete'] = exports.del = file => { | ||
var list = exports.get(file); | ||
list.forEach(function(id) { | ||
delete require.cache[id]; | ||
}); | ||
list.forEach(id => delete require.cache[id]); | ||
}; |
{ | ||
"name": "cache-walk", | ||
"description": "Walk a require tree for a cached module", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "lib/cache-walk.js", | ||
"scripts": { | ||
"test": "gulp" | ||
"test": "gulp", | ||
"travis": "gulp travis" | ||
}, | ||
@@ -36,20 +37,24 @@ "repository": { | ||
"devDependencies": { | ||
"coffee-script": "^1.10.0", | ||
"file-manifest": "^2.0.0", | ||
"gulp": "^3.9.0", | ||
"coffee-script": "^1.12.2", | ||
"file-manifest": "^2.0.4", | ||
"gulp": "^3.9.1", | ||
"gulp-cli": "^1.2.2", | ||
"gulp-codeclimate-reporter": "^1.2.0", | ||
"gulp-debug": "^2.1.2", | ||
"gulp-istanbul": "^0.10.3", | ||
"gulp-jshint": "^2.0.0", | ||
"gulp-mocha": "^2.2.0", | ||
"gulp-open": "^1.0.0", | ||
"gulp-sequence": "^0.4.4", | ||
"gulp-spawn-mocha": "^2.2.2", | ||
"jshint": "^2.8.0", | ||
"jshint-stylish": "^2.1.0", | ||
"mocha": "^2.3.4", | ||
"gulp-debug": "^3.0.0", | ||
"gulp-istanbul": "^1.1.1", | ||
"gulp-jshint": "^2.0.4", | ||
"gulp-mocha": "^3.0.1", | ||
"gulp-open": "^2.0.0", | ||
"gulp-sequence": "^0.4.6", | ||
"gulp-spawn-mocha": "^3.1.0", | ||
"jshint": "^2.9.4", | ||
"jshint-stylish": "^2.2.1", | ||
"mocha": "^3.2.0", | ||
"mocha-given": "^0.1.3", | ||
"rimraf": "^2.5.0", | ||
"should": "^8.0.2" | ||
"rimraf": "^2.5.4", | ||
"should": "^11.1.2" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15825
18
139