diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-05-01 05:44:51 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-05-01 05:46:52 +0300 |
commit | 000cd8b52104942ac3404f0ad0651d82f573da37 (patch) | |
tree | 43e8183a659b28f18c691260245fe84e7910f911 | |
parent | 530a2e369128270f3e098f0e9be061533003b0eb (diff) |
rimraf@2.3.3
More useful error messages when failing to validate parameters passed
in.
-rw-r--r-- | node_modules/rimraf/package.json | 27 | ||||
-rw-r--r-- | node_modules/rimraf/rimraf.js | 16 | ||||
-rw-r--r-- | package.json | 2 |
3 files changed, 23 insertions, 22 deletions
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 diff --git a/package.json b/package.json index dd8571d7c..7696c7210 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "realize-package-specifier": "~3.0.0", "request": "~2.55.0", "retry": "~0.6.1", - "rimraf": "~2.3.2", + "rimraf": "~2.3.3", "semver": "~4.3.3", "sha": "~1.3.0", "slide": "~1.1.6", |