@@ -1,5 +1,5 @@
{
"version": "1.3.8",
"version": "1.3.10",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
@@ -58,7 +58,7 @@
"npmlog": "0.0.4",
"ansi": "~0.1.2",
"npm-registry-client": "~0.2.28",
"read-package-json": "~1.1.0",
"read-package-json": "~1.1.3",
"read-installed": "~0.2.2",
"glob": "~3.2.6",
"init-package-json": "0.0.11",
@@ -123,7 +123,7 @@
"devDependencies": {
"ronn": "~0.3.6",
"tap": "~0.4.0",
"npm-registry-mock": "~0.2.0"
"npm-registry-mock": "~0.3.0"
},
"engines": {
"node": ">=0.6",
@@ -0,0 +1,32 @@
var fs = require("fs")
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")

var mr = require("npm-registry-mock")
// config
var port = 1331
var address = "http://localhost:" + port
var pkg = __dirname + '/outdated'

test("it should not throw", function (t) {
rimraf.sync(pkg + "/node_modules")
process.chdir(pkg)

mr(port, function (s) {
npm.load({registry: address}, function () {
npm.install(".", function (err) {
npm.outdated(function (er, d) {
console.log(d)
s.close()
t.end()
})
})
})
})
})

test("cleanup", function (t) {
rimraf.sync(pkg + "/node_modules")
t.end()
})
@@ -0,0 +1 @@
module.exports = true
@@ -0,0 +1,8 @@
{
"name": "bla",
"version": "0.0.1",
"main": "index.js",
"dependencies": {
"underscore": "1.3.1"
}
}
@@ -0,0 +1,53 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');

var stream = require('stream');
var PassThrough = stream.PassThrough;

var src = new PassThrough({ objectMode: true });
var tx = new PassThrough({ objectMode: true });
var dest = new PassThrough({ objectMode: true });

var expect = [ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
var results = [];
process.on('exit', function() {
assert.deepEqual(results, expect);
console.log('ok');
});

dest.on('data', function(x) {
results.push(x);
});

src.pipe(tx).pipe(dest);

var i = -1;
var int = setInterval(function() {
if (i > 10) {
src.end();
clearInterval(int);
} else {
src.write(i++);
}
});