Permalink
Browse files

update fstream-npm to 0.0.5

  • Loading branch information...
1 parent f6dc052 commit 66dae8740c16e14cd10b9e87a5441e81f7fb8b32 @isaacs isaacs committed Apr 17, 2012
@@ -171,7 +171,17 @@ Packer.prototype.readRules = function (buf, e) {
return Ignore.prototype.readRules.call(this, buf, e)
}
- var p = this.package = JSON.parse(buf.toString())
+ buf = buf.toString().trim()
+
+ if (buf.length === 0) return
+
+ try {
+ var p = this.package = JSON.parse(buf)
+ } catch (er) {
+ er.file = path.resolve(this.path, e)
+ this.error(er)
+ return
+ }
if (this === this.root) {
this.bundleLinks = this.bundleLinks || {}
@@ -262,7 +272,9 @@ Packer.prototype.emitEntry = function (entry) {
}
// all *.gyp files are renamed to binding.gyp for node-gyp
- if (entry.basename.match(/\.gyp$/)) {
+ // but only when they are in the same folder as a package.json file.
+ if (entry.basename.match(/\.gyp$/) &&
+ this.entries.indexOf("package.json") !== -1) {
entry.basename = "binding.gyp"
entry.path = path.resolve(entry.dirname, entry.basename)
}
@@ -35,8 +35,11 @@
"node": "*"
},
"_engineSupported": true,
- "_npmVersion": "1.1.13",
- "_nodeVersion": "v0.7.7-pre",
+ "_npmVersion": "1.1.16",
+ "_nodeVersion": "v0.6.15",
"_defaultsLoaded": true,
+ "dist": {
+ "shasum": "054e6efb613bad5f71a7a5c031e15a6a9c8f075c"
+ },
"_from": "fstream-ignore@~0.0.5"
}
@@ -6,7 +6,7 @@
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "0.0.4",
+ "version": "0.0.5",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-npm.git"
@@ -20,15 +20,15 @@
"name": "isaacs",
"email": "i@izs.me"
},
- "_id": "fstream-npm@0.0.4",
+ "_id": "fstream-npm@0.0.5",
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "*"
},
"_engineSupported": true,
- "_npmVersion": "1.1.13",
- "_nodeVersion": "v0.7.7-pre",
+ "_npmVersion": "1.1.16",
+ "_nodeVersion": "v0.6.15",
"_defaultsLoaded": true,
- "_from": "fstream-npm@0 >=0.0.3"
+ "_from": "fstream-npm@0 >=0.0.4"
}
View
@@ -54,7 +54,7 @@
"read": "0",
"lru-cache": "1",
"node-gyp": "~0.4.1",
- "fstream-npm": "0 >=0.0.4",
+ "fstream-npm": "0 >=0.0.5",
"uid-number": "0",
"archy": "0",
"chownr": "0"

0 comments on commit 66dae87

Please sign in to comment.