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:
authorForrest L Norvell <forrest@npmjs.com>2015-08-20 06:30:44 +0300
committerRebecca Turner <me@re-becca.org>2015-08-21 04:58:22 +0300
commitde7c872d75e4e77afe4ad612fac387ce31b0d7db (patch)
tree975e8e1a9e97fe5ea89c3cc1ae27da2fbf18e86b /node_modules/fstream-npm
parenta1d49fce2d5c44a6a2151e4dd1d9a0dbcd9be78b (diff)
fstream-npm@1.0.5
Don't bundle config cruft and project-specific config on publish. PR-URL: https://github.com/npm/fstream-npm/pull/12
Diffstat (limited to 'node_modules/fstream-npm')
-rw-r--r--node_modules/fstream-npm/.travis.yml13
-rw-r--r--node_modules/fstream-npm/fstream-npm.js11
-rw-r--r--node_modules/fstream-npm/package.json42
-rw-r--r--node_modules/fstream-npm/test/ignores.js95
4 files changed, 139 insertions, 22 deletions
diff --git a/node_modules/fstream-npm/.travis.yml b/node_modules/fstream-npm/.travis.yml
new file mode 100644
index 000000000..c225dd427
--- /dev/null
+++ b/node_modules/fstream-npm/.travis.yml
@@ -0,0 +1,13 @@
+language: node_js
+sudo: false
+node_js:
+ - iojs
+ - "0.12"
+ - "0.10"
+ - "0.8"
+before_install:
+ - "npm config set spin false"
+ - "npm install -g npm/npm#2.x"
+script: "npm test"
+notifications:
+ slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8
diff --git a/node_modules/fstream-npm/fstream-npm.js b/node_modules/fstream-npm/fstream-npm.js
index ab528952c..5541c3197 100644
--- a/node_modules/fstream-npm/fstream-npm.js
+++ b/node_modules/fstream-npm/fstream-npm.js
@@ -109,16 +109,19 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true
// some files are *never* allowed under any circumstances
+ // (VCS folders, native build cruft, npm cruft, regular cruft)
if (entry === '.git' ||
- entry === '.lock-wscript' ||
- entry.match(/^\.wafpickle-[0-9]+$/) ||
entry === 'CVS' ||
entry === '.svn' ||
entry === '.hg' ||
+ entry === '.lock-wscript' ||
+ entry.match(/^\.wafpickle-[0-9]+$/) ||
+ entry === 'config.gypi' ||
+ entry === 'npm-debug.log' ||
+ entry === '.npmrc' ||
entry.match(/^\..*\.swp$/) ||
entry === '.DS_Store' ||
- entry.match(/^\._/) ||
- entry === 'npm-debug.log'
+ entry.match(/^\._/)
) {
return false
}
diff --git a/node_modules/fstream-npm/package.json b/node_modules/fstream-npm/package.json
index bd5c412b9..f4deee360 100644
--- a/node_modules/fstream-npm/package.json
+++ b/node_modules/fstream-npm/package.json
@@ -1,35 +1,36 @@
{
"_args": [
[
- "fstream-npm@~1.0.4",
+ "fstream-npm@~1.0.5",
"/Users/rebecca/code/npm"
]
],
- "_from": "fstream-npm@>=1.0.4 <1.1.0",
- "_id": "fstream-npm@1.0.4",
+ "_from": "fstream-npm@>=1.0.5 <1.1.0",
+ "_id": "fstream-npm@1.0.5",
"_inCache": true,
"_location": "/fstream-npm",
- "_nodeVersion": "0.10.38",
+ "_nodeVersion": "2.5.0",
"_npmUser": {
- "email": "me@re-becca.org",
- "name": "iarna"
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
},
- "_npmVersion": "3.1.0",
+ "_npmVersion": "2.14.0",
"_phantomChildren": {},
"_requested": {
"name": "fstream-npm",
- "raw": "fstream-npm@~1.0.4",
- "rawSpec": "~1.0.4",
+ "raw": "fstream-npm@~1.0.5",
+ "rawSpec": "~1.0.5",
"scope": null,
- "spec": ">=1.0.4 <1.1.0",
+ "spec": ">=1.0.5 <1.1.0",
"type": "range"
},
"_requiredBy": [
"/"
],
- "_shasum": "22196318b8fc2ab5ce15fd330fff931165e0305a",
+ "_resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.0.5.tgz",
+ "_shasum": "4c1d1cbc6da95c745f8d2c52077a1d2e7b337206",
"_shrinkwrap": null,
- "_spec": "fstream-npm@~1.0.4",
+ "_spec": "fstream-npm@~1.0.5",
"_where": "/Users/rebecca/code/npm",
"author": {
"email": "i@izs.me",
@@ -45,15 +46,20 @@
},
"description": "fstream class for creating npm packages",
"devDependencies": {
- "standard": "^4.3.1"
+ "graceful-fs": "^4.1.2",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.4.2",
+ "standard": "^4.3.1",
+ "tap": "^1.3.2"
},
"directories": {},
"dist": {
- "shasum": "22196318b8fc2ab5ce15fd330fff931165e0305a",
- "tarball": "http://registry.npmjs.org/fstream-npm/-/fstream-npm-1.0.4.tgz"
+ "shasum": "4c1d1cbc6da95c745f8d2c52077a1d2e7b337206",
+ "tarball": "http://registry.npmjs.org/fstream-npm/-/fstream-npm-1.0.5.tgz"
},
- "gitHead": "d4bec1d24e777b8cef64857d26af828cff1bba68",
+ "gitHead": "f6ec06b9c45d7330213a5b446fff424b5a74e197",
"homepage": "https://github.com/isaacs/fstream-npm#readme",
+ "installable": true,
"license": "ISC",
"main": "./fstream-npm.js",
"maintainers": [
@@ -77,7 +83,7 @@
"url": "git://github.com/isaacs/fstream-npm.git"
},
"scripts": {
- "test": "standard"
+ "test": "standard && tap test/*.js"
},
- "version": "1.0.4"
+ "version": "1.0.5"
}
diff --git a/node_modules/fstream-npm/test/ignores.js b/node_modules/fstream-npm/test/ignores.js
new file mode 100644
index 000000000..fef5dcc22
--- /dev/null
+++ b/node_modules/fstream-npm/test/ignores.js
@@ -0,0 +1,95 @@
+var fs = require('graceful-fs')
+var join = require('path').join
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var test = require('tap').test
+
+var Packer = require('..')
+
+var pkg = join(__dirname, 'test-package')
+
+var gitDir = join(pkg, '.git')
+
+var elfJS = function () {/*
+module.exports = function () {
+ console.log("i'm a elf")
+}
+*/}.toString().split('\n').slice(1, -1).join()
+
+var json = {
+ 'name': 'test-package',
+ 'version': '3.1.4',
+ 'main': 'elf.js'
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+var included = [
+ 'package.json',
+ 'elf.js'
+]
+
+test('follows npm package ignoring rules', function (t) {
+ var subject = new Packer({ path: pkg, type: 'Directory', isDirectory: true })
+ subject.on('entry', function (entry) {
+ t.equal(entry.type, 'File', 'only files in this package')
+ var filename = entry.basename
+ t.ok(
+ included.indexOf(filename) > -1,
+ filename + ' is included'
+ )
+ })
+ // need to do this so fstream doesn't explode when files are removed from
+ // under it
+ subject.on('end', function () { t.end() })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
+
+function setup () {
+ cleanup()
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ join(pkg, 'package.json'),
+ JSON.stringify(json, null, 2)
+ )
+
+ fs.writeFileSync(
+ join(pkg, 'elf.js'),
+ elfJS
+ )
+
+ fs.writeFileSync(
+ join(pkg, '.npmrc'),
+ 'packaged=false'
+ )
+
+ var build = join(pkg, 'build')
+ mkdirp.sync(build)
+ fs.writeFileSync(
+ join(build, 'config.gypi'),
+ "i_wont_be_included_by_fstream='with any luck'"
+ )
+
+ fs.writeFileSync(
+ join(build, 'npm-debug.log'),
+ '0 lol\n'
+ )
+
+ mkdirp.sync(gitDir)
+ fs.writeFileSync(
+ join(gitDir, 'gitstub'),
+ "won't fool git, also won't be included by fstream"
+ )
+}
+
+function cleanup () {
+ rimraf.sync(pkg)
+}