Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-08-21 20:55:16 +0400
committerisaacs <i@izs.me>2012-08-21 20:56:00 +0400
commitf47392e8f6ea854cc014c2ced66f108b43ea0cd8 (patch)
tree51315a665636c1fe10e07c98ebc3b817c5cfa794 /node_modules/mkdirp
parent7b573f7aefbc62a29f5e303193a854b9cffba3c1 (diff)
mkdirp update
Diffstat (limited to 'node_modules/mkdirp')
-rw-r--r--node_modules/mkdirp/.gitignore.orig2
-rw-r--r--node_modules/mkdirp/.gitignore.rej5
-rw-r--r--node_modules/mkdirp/examples/pow.js.orig6
-rw-r--r--node_modules/mkdirp/examples/pow.js.rej19
-rw-r--r--node_modules/mkdirp/index.js28
-rw-r--r--node_modules/mkdirp/package.json19
6 files changed, 13 insertions, 66 deletions
diff --git a/node_modules/mkdirp/.gitignore.orig b/node_modules/mkdirp/.gitignore.orig
deleted file mode 100644
index 9303c347e..000000000
--- a/node_modules/mkdirp/.gitignore.orig
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-npm-debug.log \ No newline at end of file
diff --git a/node_modules/mkdirp/.gitignore.rej b/node_modules/mkdirp/.gitignore.rej
deleted file mode 100644
index 69244ff87..000000000
--- a/node_modules/mkdirp/.gitignore.rej
+++ /dev/null
@@ -1,5 +0,0 @@
---- /dev/null
-+++ .gitignore
-@@ -0,0 +1,2 @@
-+node_modules/
-+npm-debug.log \ No newline at end of file
diff --git a/node_modules/mkdirp/examples/pow.js.orig b/node_modules/mkdirp/examples/pow.js.orig
deleted file mode 100644
index 774146221..000000000
--- a/node_modules/mkdirp/examples/pow.js.orig
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/node_modules/mkdirp/examples/pow.js.rej b/node_modules/mkdirp/examples/pow.js.rej
deleted file mode 100644
index 81e7f4311..000000000
--- a/node_modules/mkdirp/examples/pow.js.rej
+++ /dev/null
@@ -1,19 +0,0 @@
---- examples/pow.js
-+++ examples/pow.js
-@@ -1,6 +1,15 @@
--var mkdirp = require('mkdirp').mkdirp;
-+var mkdirp = require('../').mkdirp,
-+ mkdirpSync = require('../').mkdirpSync;
-
- mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
- if (err) console.error(err)
- else console.log('pow!')
- });
-+
-+try {
-+ mkdirpSync('/tmp/bar/foo/baz', 0755);
-+ console.log('double pow!');
-+}
-+catch (ex) {
-+ console.log(ex);
-+} \ No newline at end of file
diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js
index 874b31095..fda6de8a2 100644
--- a/node_modules/mkdirp/index.js
+++ b/node_modules/mkdirp/index.js
@@ -27,18 +27,10 @@ function mkdirP (p, mode, f, made) {
});
break;
- case 'EISDIR':
- case 'EPERM':
- // Operation not permitted or already is a dir.
- // This is the error you get when trying to mkdir('c:/')
- // on windows, or mkdir('/') on unix. Make sure it's a
- // dir by falling through to the EEXIST case.
- case 'EROFS':
- // a read-only file system.
- // However, the dir could already exist, in which case
- // the EROFS error will be obscuring a EEXIST!
- // Fallthrough to that case.
- case 'EEXIST':
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
fs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
@@ -46,10 +38,6 @@ function mkdirP (p, mode, f, made) {
else cb(null, made);
});
break;
-
- default:
- cb(er, made);
- break;
}
});
}
@@ -74,7 +62,10 @@ mkdirP.sync = function sync (p, mode, made) {
sync(p, mode, made);
break;
- case 'EEXIST' :
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
var stat;
try {
stat = fs.statSync(p);
@@ -84,9 +75,6 @@ mkdirP.sync = function sync (p, mode, made) {
}
if (!stat.isDirectory()) throw err0;
break;
- default :
- throw err0
- break;
}
}
diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json
index f77965837..0d1eb988b 100644
--- a/node_modules/mkdirp/package.json
+++ b/node_modules/mkdirp/package.json
@@ -1,7 +1,7 @@
{
"name": "mkdirp",
"description": "Recursively mkdir, like `mkdir -p`",
- "version": "0.3.3",
+ "version": "0.3.4",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
@@ -14,7 +14,7 @@
],
"repository": {
"type": "git",
- "url": "git://github.com/substack/node-mkdirp.git"
+ "url": "http://github.com/substack/node-mkdirp.git"
},
"scripts": {
"test": "tap test/*.js"
@@ -26,16 +26,7 @@
"engines": {
"node": "*"
},
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "_id": "mkdirp@0.3.3",
- "dependencies": {},
- "optionalDependencies": {},
- "_engineSupported": true,
- "_npmVersion": "1.1.24",
- "_nodeVersion": "v0.7.10-pre",
- "_defaultsLoaded": true,
- "_from": "mkdirp@0.3"
+ "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n",
+ "_id": "mkdirp@0.3.4",
+ "_from": "mkdirp@~0.3.3"
}