Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update fstream-npm

fix #2490
  • Loading branch information...
commit 187b91b1bcdb25d6735c39253c6c70a79438f6d9 1 parent 7d11364
@isaacs isaacs authored
View
14 node_modules/fstream-npm/fstream-npm.js
@@ -26,14 +26,20 @@ function Packer (props) {
this.bundleLinks = props.bundleLinks
this.package = props.package
+ // only do the magic bundling stuff for the node_modules folder that
+ // lives right next to a package.json file.
+ this.bundleMagic = this.parent &&
+ this.parent.packageRoot &&
+ this.basename === "node_modules"
+
// in a node_modules folder, resolve symbolic links to
// bundled dependencies when creating the package.
- props.follow = this.follow = this.basename === "node_modules"
+ props.follow = this.follow = this.bundleMagic
// console.error("follow?", this.path, props.follow)
if (this === this.root ||
this.parent &&
- this.parent.basename === "node_modules" &&
+ this.parent.bundleMagic &&
this.basename.charAt(0) !== ".") {
this.readBundledLinks()
}
@@ -85,7 +91,7 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
if (entry === "package.json") return true
// special rules. see below.
- if (entry === "node_modules") return true
+ if (entry === "node_modules" && this.packageRoot) return true
// some files are *never* allowed under any circumstances
if (entry === ".git" ||
@@ -110,7 +116,7 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
// To prevent infinite cycles in the case of cyclic deps that are
// linked with npm link, even in a bundle, deps are only bundled
// if they're not already present at a higher level.
- if (this.basename === "node_modules") {
+ if (this.bundleMagic) {
// bubbling up. stop here and allow anything the bundled pkg allows
if (entry.indexOf("/") !== -1) return true
View
3  node_modules/fstream-npm/node_modules/fstream-ignore/package.json
@@ -38,8 +38,5 @@
"_npmVersion": "1.1.23",
"_nodeVersion": "v0.7.10-pre",
"_defaultsLoaded": true,
- "dist": {
- "shasum": "054e6efb613bad5f71a7a5c031e15a6a9c8f075c"
- },
"_from": "fstream-ignore@~0.0.5"
}
View
9 node_modules/fstream-npm/package.json
@@ -6,7 +6,7 @@
},
"name": "fstream-npm",
"description": "fstream class for creating npm packages",
- "version": "0.0.6",
+ "version": "0.1.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream-npm.git"
@@ -21,7 +21,7 @@
"name": "isaacs",
"email": "i@izs.me"
},
- "_id": "fstream-npm@0.0.6",
+ "_id": "fstream-npm@0.1.0",
"devDependencies": {},
"optionalDependencies": {},
"engines": {
@@ -31,8 +31,5 @@
"_npmVersion": "1.1.23",
"_nodeVersion": "v0.7.10-pre",
"_defaultsLoaded": true,
- "dist": {
- "shasum": "f57eb3a8d77428f612c5e6e5b84042f7406b47fe"
- },
- "_from": "../fstream-npm"
+ "_from": "fstream-npm@0.1"
}
View
2  package.json
@@ -54,7 +54,7 @@
"read": "0",
"lru-cache": "1",
"node-gyp": "~0.4.4",
- "fstream-npm": "0 >=0.0.5",
+ "fstream-npm": "0.1",
"uid-number": "0",
"archy": "0",
"chownr": "0"
Please sign in to comment.
Something went wrong with that request. Please try again.