diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-06-19 10:16:13 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-06-19 10:16:13 +0300 |
commit | 9583cc3cb192c2fced006927cfba7cd37b588605 (patch) | |
tree | d3454d5e6015acf89bff9d11ba6ae73170fd9dff /node_modules/fstream-npm | |
parent | df894930f2716adac28740b29b2e863170919990 (diff) |
fstream-npm@1.0.3
Ensure that the "main" entry in package.json is always included, if
present.
Contributed by @coderhaoxin.
PR-URL: https://github.com/npm/fstream-npm/pull/8
Diffstat (limited to 'node_modules/fstream-npm')
-rw-r--r-- | node_modules/fstream-npm/fstream-npm.js | 4 | ||||
-rw-r--r-- | node_modules/fstream-npm/package.json | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/node_modules/fstream-npm/fstream-npm.js b/node_modules/fstream-npm/fstream-npm.js index 7e44072bc..c1f76bf87 100644 --- a/node_modules/fstream-npm/fstream-npm.js +++ b/node_modules/fstream-npm/fstream-npm.js @@ -104,6 +104,10 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) { // special rules. see below. if (entry === 'node_modules' && this.packageRoot) return true + // package.json main file should never be ignored. + var mainFile = this.package.main + if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true + // some files are *never* allowed under any circumstances if (entry === '.git' || entry === '.lock-wscript' || diff --git a/node_modules/fstream-npm/package.json b/node_modules/fstream-npm/package.json index f3c5d3cfc..9a75817d3 100644 --- a/node_modules/fstream-npm/package.json +++ b/node_modules/fstream-npm/package.json @@ -6,7 +6,7 @@ }, "name": "fstream-npm", "description": "fstream class for creating npm packages", - "version": "1.0.2", + "version": "1.0.3", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream-npm.git" @@ -20,17 +20,17 @@ "inherits": "2" }, "devDependencies": { - "standard": "^2.7.3" + "standard": "^4.3.1" }, "license": "ISC", "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n", "readmeFilename": "README.md", - "gitHead": "d5e26643135522925effa2c112258f1feeec2ba5", + "gitHead": "910a52b38c7fb4d4f2204058b37294e4e370e2cb", "bugs": { "url": "https://github.com/isaacs/fstream-npm/issues" }, - "homepage": "https://github.com/isaacs/fstream-npm", - "_id": "fstream-npm@1.0.2", - "_shasum": "a1d2a4ce6ac2db731f0f66a85b4dddfea9565d77", - "_from": "fstream-npm@>=1.0.2 <1.1.0" + "homepage": "https://github.com/isaacs/fstream-npm#readme", + "_id": "fstream-npm@1.0.3", + "_shasum": "67cfb5437b14237155bf319c0536e6d4335170fe", + "_from": "fstream-npm@>=1.0.3 <1.1.0" } |