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-03-20 05:29:46 +0400
committerisaacs <i@izs.me>2012-03-20 05:29:46 +0400
commit530114db7809150cf67828683cb2bb5f6d87a07f (patch)
treeea397295bb387410129de6ade92667acd80c74cf /node_modules/fstream
parent9d99897762ed2393f9260e642ab40b9981e7e10b (diff)
update fstream
Diffstat (limited to 'node_modules/fstream')
-rw-r--r--node_modules/fstream/.npmignore4
-rw-r--r--node_modules/fstream/LICENCE25
-rw-r--r--node_modules/fstream/lib/dir-writer.js3
-rw-r--r--node_modules/fstream/lib/proxy-reader.js3
-rw-r--r--node_modules/fstream/lib/writer.js9
-rw-r--r--node_modules/fstream/package.json15
6 files changed, 51 insertions, 8 deletions
diff --git a/node_modules/fstream/.npmignore b/node_modules/fstream/.npmignore
index 66880db1a..494272a81 100644
--- a/node_modules/fstream/.npmignore
+++ b/node_modules/fstream/.npmignore
@@ -1,3 +1,5 @@
.*.swp
-examples/deep-copy
node_modules/
+examples/deep-copy/
+examples/path/
+examples/filter-copy/
diff --git a/node_modules/fstream/LICENCE b/node_modules/fstream/LICENCE
new file mode 100644
index 000000000..74489e2e2
--- /dev/null
+++ b/node_modules/fstream/LICENCE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/fstream/lib/dir-writer.js b/node_modules/fstream/lib/dir-writer.js
index 11b6654bf..26338bd99 100644
--- a/node_modules/fstream/lib/dir-writer.js
+++ b/node_modules/fstream/lib/dir-writer.js
@@ -123,6 +123,9 @@ DirWriter.prototype._process = function () {
// get rid of any ../../ shenanigans
props.path = path.join(me.path, path.join("/", p))
+ // if i have a filter, the child should inherit it.
+ props.filter = me.filter
+
// all the rest of the stuff, copy over from the source.
Object.keys(entry.props).forEach(function (k) {
if (!props.hasOwnProperty(k)) {
diff --git a/node_modules/fstream/lib/proxy-reader.js b/node_modules/fstream/lib/proxy-reader.js
index f99b28fe5..f5ddfc3f5 100644
--- a/node_modules/fstream/lib/proxy-reader.js
+++ b/node_modules/fstream/lib/proxy-reader.js
@@ -59,6 +59,9 @@ ProxyReader.prototype._addProxy = function (proxy) {
, "close"
, "linkpath"
, "entry"
+ , "entryEnd"
+ , "child"
+ , "childEnd"
, "warn"
].forEach(function (ev) {
// console.error("~~ proxy event", ev, me.path)
diff --git a/node_modules/fstream/lib/writer.js b/node_modules/fstream/lib/writer.js
index dde29fd7b..b7cd261bf 100644
--- a/node_modules/fstream/lib/writer.js
+++ b/node_modules/fstream/lib/writer.js
@@ -98,6 +98,8 @@ function Writer (props, current) {
me._buffer = []
me.ready = false
+ me.filter = typeof props.filter === "function" ? props.filter: null
+
// start the ball rolling.
// this checks what's there already, and then calls
// me._create() to call the impl-specific creation stuff.
@@ -126,6 +128,13 @@ Writer.prototype._stat = function (current) {
else fs[stat](me._path, statCb)
function statCb (er, current) {
+ if (me.filter && !me.filter.call(me._proxy || me, current)) {
+ me._aborted = true
+ me.emit("end")
+ me.emit("close")
+ return
+ }
+
// if it's not there, great. We'll just create it.
// if it is there, then we'll need to change whatever differs
if (er || !current) {
diff --git a/node_modules/fstream/package.json b/node_modules/fstream/package.json
index ee1378e74..2ad0c6cba 100644
--- a/node_modules/fstream/package.json
+++ b/node_modules/fstream/package.json
@@ -6,14 +6,14 @@
},
"name": "fstream",
"description": "Advanced file system stream things",
- "version": "0.1.13",
+ "version": "0.1.14",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
},
"main": "fstream.js",
"engines": {
- "node": "0.5 || 0.6 || 0.7"
+ "node": ">=0.6"
},
"dependencies": {
"rimraf": "2",
@@ -22,20 +22,21 @@
"inherits": "~1.0.0"
},
"devDependencies": {
- "tap": "0.1"
+ "tap": ""
},
"scripts": {
"test": "tap examples/*.js"
},
+ "license": "BSD",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
- "_id": "fstream@0.1.13",
+ "_id": "fstream@0.1.14",
"optionalDependencies": {},
"_engineSupported": true,
- "_npmVersion": "1.1.4",
- "_nodeVersion": "v0.7.6-pre",
+ "_npmVersion": "1.1.10",
+ "_nodeVersion": "v0.7.7-pre",
"_defaultsLoaded": true,
- "_from": "fstream@~0.1.5"
+ "_from": "fstream@~0.1.13"
}