Skip to content

Commit

Permalink
Address Security Issue via node-pre-gyp/tar (#266)
Browse files Browse the repository at this point in the history
Security Update: updated node-pre-gyp, removed tap
  • Loading branch information
pipobscure committed Apr 16, 2019
1 parent 6d47d4f commit 2e8bfd1
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ build/
node_modules/
lib/
package-lock.json
.vscode/
1 change: 1 addition & 0 deletions .npmignore
@@ -1,3 +1,4 @@
test/
build/
lib/binding/
.vscode/
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -11,8 +11,6 @@ env:
- NODE_VERSION="v8"
- NODE_VERSION="v7"
- NODE_VERSION="v6"
- NODE_VERSION="v5"
- NODE_VERSION="v4"

before_install:

Expand Down
11 changes: 4 additions & 7 deletions package.json
@@ -1,11 +1,11 @@
{
"name": "fsevents",
"version": "1.2.7",
"version": "1.2.8",
"description": "Native Access to Mac OS-X FSEvents",
"main": "fsevents.js",
"dependencies": {
"nan": "^2.12.1",
"node-pre-gyp": "^0.10.0"
"node-pre-gyp": "^0.12.0"
},
"os": [
"darwin"
Expand All @@ -16,7 +16,7 @@
"scripts": {
"install": "node install",
"prepublish": "if [ $(npm -v | head -c 1) -lt 3 ]; then exit 1; fi && npm dedupe",
"test": "tap ./test",
"test": "node ./test/fsevents.js && node ./test/function.js 2> /dev/null",
"node-pre-gyp": "node-pre-gyp"
},
"binary": {
Expand All @@ -42,8 +42,5 @@
"bundledDependencies": [
"node-pre-gyp"
],
"homepage": "https://github.com/strongloop/fsevents",
"devDependencies": {
"tap": "^12.1.1"
}
"homepage": "https://github.com/strongloop/fsevents"
}
2 changes: 1 addition & 1 deletion test/fsevents.js
Expand Up @@ -6,7 +6,7 @@
/* jshint node:true */
'use strict';

var test = require('tap').test;
var test = require('./utils/run').test;

test('checking main module', function(t) {
var mod = load('../');
Expand Down
2 changes: 1 addition & 1 deletion test/function.js
Expand Up @@ -8,7 +8,7 @@

var fs = require('fs');
var path = require('path');
var test = require('tap').test;
var test = require('./utils/run').test;

test('functionality testing', function(t) {
try {
Expand Down
39 changes: 39 additions & 0 deletions test/utils/run.js
@@ -0,0 +1,39 @@

var assert = require('assert');
var EventEmitter = require('events').EventEmitter;
exports.test = test;
function test(name, fn) {
console.log('TAP version 13');
var started = false;
var planned = -1;
var count = 0;
var timeout = null;
var tst = new EventEmitter();
tst.plan = function (cnt) { planned = cnt; };
tst.ok = function (cond, msg) {
if (!started) {
console.log('1..' + (planned > 0 ? planned : 'N'));
started = true;
}
if (timeout) clearTimeout(timeout);
count++;
if (cond) {
console.log('ok ' + count + ' ' + msg);
} else {
console.log('not ok ' + count + ' ' + msg);
}
planned--;
if (!planned) {
tst.emit('end');
} else {
timeout = setTimeout(function () {
process.exit(1);
}, 5000);
}
};
tst.end = function () {
if (timeout) clearTimeout(timeout);
tst.emit('end');
};
fn(tst);
}

0 comments on commit 2e8bfd1

Please sign in to comment.