From 000cd8b52104942ac3404f0ad0651d82f573da37 Mon Sep 17 00:00:00 2001 From: Forrest L Norvell Date: Thu, 30 Apr 2015 19:44:51 -0700 Subject: rimraf@2.3.3 More useful error messages when failing to validate parameters passed in. --- node_modules/rimraf/package.json | 27 +++++++++++++-------------- node_modules/rimraf/rimraf.js | 16 +++++++++------- 2 files changed, 22 insertions(+), 21 deletions(-) (limited to 'node_modules/rimraf') diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 9f836e930..7b28e7302 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.3.2", + "version": "2.3.3", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -31,19 +31,23 @@ "LICENSE", "README.md" ], - "gitHead": "9d5ab4a8b6986ec909af04f6d91315e98f5893e8", + "gitHead": "ad4efe8102a72c77bf2b13165ecc2229a9a68955", "bugs": { "url": "https://github.com/isaacs/rimraf/issues" }, "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.3.2", - "_shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9", - "_from": "rimraf@>=2.3.2 <2.4.0", - "_npmVersion": "2.7.0", - "_nodeVersion": "1.4.2", + "_id": "rimraf@2.3.3", + "_shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06", + "_from": "rimraf@>=2.3.3 <2.4.0", + "_npmVersion": "2.7.6", + "_nodeVersion": "1.7.1", "_npmUser": { "name": "isaacs", - "email": "i@izs.me" + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d0073d8b3010611e8f3ad377b08e9a3c18b98f06", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz" }, "maintainers": [ { @@ -51,11 +55,6 @@ "email": "i@izs.me" } ], - "dist": { - "shasum": "7304bd9275c401b89103b106b3531c1ef0c02fe9", - "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz" - }, "directories": {}, - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.3.3.tgz" } diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js index c189d5444..8d420d251 100644 --- a/node_modules/rimraf/rimraf.js +++ b/node_modules/rimraf/rimraf.js @@ -42,13 +42,14 @@ function rimraf (p, options, cb) { cb = options options = {} } - assert(p) - assert(options) - assert(typeof cb === 'function') - defaults(options) + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') - if (!cb) throw new Error("No callback passed to rimraf()") + defaults(options) var busyTries = 0 var errState = null @@ -254,8 +255,9 @@ function rimrafSync (p, options) { options = options || {} defaults(options) - assert(p) - assert(options) + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') var results -- cgit v1.2.3