@@ -52,7 +52,7 @@ <h2 id="bugs">bugs</h2>
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
<p>It should look like this:</p>
<pre><code>{ &quot;url&quot; : &quot;http://github.com/owner/project/issues&quot;
<pre><code>{ &quot;url&quot; : &quot;https://github.com/owner/project/issues&quot;
, &quot;email&quot; : &quot;project@hostname.com&quot;
}
</code></pre><p>You can specify either one or both values. If you want to provide only a url,
@@ -150,7 +150,7 @@ <h2 id="bin">bin</h2>
<h2 id="directories">directories</h2>
<p>The CommonJS <a href="http://wiki.commonjs.org/wiki/Packages/1.0">Packages</a> spec details a
few ways that you can indicate the structure of your package using a <code>directories</code>
object. If you look at <a href="http://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
object. If you look at <a href="https://registry.npmjs.org/npm/latest">npm&#39;s package.json</a>,
you&#39;ll see that it has directories for doc, lib, and man.</p>
<p>In the future, this information may be used in other creative ways.</p>
<h3 id="directories-lib">directories.lib</h3>
@@ -175,17 +175,20 @@ <h2 id="repository">repository</h2>
<p>Do it like this:</p>
<pre><code>&quot;repository&quot; :
{ &quot;type&quot; : &quot;git&quot;
, &quot;url&quot; : &quot;http://github.com/npm/npm.git&quot;
, &quot;url&quot; : &quot;https://github.com/npm/npm.git&quot;
}

&quot;repository&quot; :
{ &quot;type&quot; : &quot;svn&quot;
, &quot;url&quot; : &quot;http://v8.googlecode.com/svn/trunk/&quot;
, &quot;url&quot; : &quot;https://v8.googlecode.com/svn/trunk/&quot;
}
</code></pre><p>The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It&#39;s for computers.</p>
<h2 id="scripts">scripts</h2>
<p>For GitHub repositories you can use the same shortcut syntax you use for <code>npm
install</code>:</p>
<pre><code>&quot;repository&quot;: &quot;npm/npm&quot;
</code></pre><h2 id="scripts">scripts</h2>
<p>The &quot;scripts&quot; property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.</p>
@@ -331,12 +334,17 @@ <h2 id="peerdependencies">peerDependencies</h2>
}
}
</code></pre><p>This ensures your package <code>tea-latte</code> can be installed <em>along</em> with the second
major version of the host package <code>tea</code> only. The host package is automatically
installed if needed. <code>npm install tea-latte</code> could possibly yield the following
dependency graph:</p>
major version of the host package <code>tea</code> only. <code>npm install tea-latte</code> could
possibly yield the following dependency graph:</p>
<pre><code>├── tea-latte@1.3.5
└── tea@2.2.0
</code></pre><p>Trying to install another plugin with a conflicting requirement will cause an
</code></pre><p><strong>NOTE: npm versions 1 and 2 will automatically install <code>peerDependencies</code> if
they are not explicitly depended upon higher in the dependency tree. In the
next major version of npm (npm@3), this will no longer be the case. You will
receive a warning that the peerDependency is not installed instead.</strong> The
behavior in npms 1 &amp; 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible.</p>
<p>Trying to install another plugin with a conflicting requirement will cause an
error. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions.</p>
<p>Assuming the host complies with <a href="http://semver.org/">semver</a>, only changes in
@@ -385,15 +393,15 @@ <h2 id="engines">engines</h2>
</code></pre><p>Note that, unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only.</p>
<h2 id="enginestrict">engineStrict</h2>
<p><strong>NOTE: This feature is deprecated and will be removed in npm 3.0.0.</strong></p>
<p>If you are sure that your module will <em>definitely not</em> run properly on
versions of Node/npm other than those specified in the <code>engines</code> object,
then you can set <code>&quot;engineStrict&quot;: true</code> in your package.json file.
This will override the user&#39;s <code>engine-strict</code> config setting.</p>
<p>Please do not do this unless you are really very very sure. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.</p>
updating to new versions of Node. Consider this choice carefully.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -45,6 +45,8 @@ <h3 id="npm-install-1-"><a href="cli/npm-install.html">npm-install(1)</a></h3>
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="cli/npm-link.html">npm-link(1)</a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="cli/npm-logout.html">npm-logout(1)</a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="cli/npm-ls.html">npm-ls(1)</a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="cli/npm-outdated.html">npm-outdated(1)</a></h3>
@@ -195,8 +195,12 @@ <h3 id="depth">depth</h3>
<li>Default: Infinity</li>
<li>Type: Number</li>
</ul>
<p>The depth to go when recursing directories for <code>npm ls</code> and
<code>npm cache ls</code>.</p>
<p>The depth to go when recursing directories for <code>npm ls</code>,
<code>npm cache ls</code>, and <code>npm outdated</code>.</p>
<p>For <code>npm outdated</code>, a setting of <code>Infinity</code> will be treated as <code>0</code>
since that gives more useful information. To show the outdated status
of all packages and dependents, use a large integer value,
e.g., <code>npm outdated --depth 9999</code></p>
<h3 id="description">description</h3>
<ul>
<li>Default: true</li>
@@ -2,7 +2,7 @@ <h1><a href="../misc/npm-disputes.html">npm-disputes</a></h1> <p>Handling Module
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a></li>
<li>Email the author, CC <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#117;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -40,12 +40,12 @@ <h2 id="description">DESCRIPTION</h2>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
adds the npm support staff <a href="&#109;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a> to the CC list of
adds the npm support staff <a href="&#109;&#97;&#105;&#108;&#x74;&#x6f;&#58;&#115;&#x75;&#x70;&#x70;&#111;&#x72;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#x6f;&#x6d;">&#115;&#x75;&#x70;&#x70;&#111;&#x72;&#116;&#x40;&#x6e;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#x6f;&#x6d;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
<a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
<a href="&#x6d;&#97;&#x69;&#x6c;&#x74;&#111;&#x3a;&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#111;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#112;&#x6d;&#106;&#x73;&#x2e;&#99;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
@@ -225,7 +225,7 @@ <h2 id="i-get-econnrefused-a-lot-what-s-up-">I get ECONNREFUSED a lot. What&#39
<p>To check if the registry is down, open up
<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a> in a web browser. This will also tell
you if you are just unable to access the internet for some reason.</p>
<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</a>
<p>If the registry IS down, let us know by emailing <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x73;&#x75;&#x70;&#x70;&#111;&#x72;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#46;&#x63;&#x6f;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#111;&#x72;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#46;&#x63;&#x6f;&#x6d;</a>
or posting an issue at <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a>. If it&#39;s
down for the world (and not just on your local network) then we&#39;re
probably already being pinged about it.</p>
@@ -45,6 +45,8 @@ <h3 id="npm-install-1-"><a href="../cli/npm-install.html">npm-install(1)</a></h3
<p>Install a package</p>
<h3 id="npm-link-1-"><a href="../cli/npm-link.html">npm-link(1)</a></h3>
<p>Symlink a package folder</p>
<h3 id="npm-logout-1-"><a href="../cli/npm-logout.html">npm-logout(1)</a></h3>
<p>Log out of the registry</p>
<h3 id="npm-ls-1-"><a href="../cli/npm-ls.html">npm-ls(1)</a></h3>
<p>List installed packages</p>
<h3 id="npm-outdated-1-"><a href="../cli/npm-outdated.html">npm-outdated(1)</a></h3>
@@ -83,7 +83,7 @@ <h3 id="prerelease-tags">Prerelease Tags</h3>
<h4 id="prerelease-identifiers">Prerelease Identifiers</h4>
<p>The method <code>.inc</code> takes an additional <code>identifier</code> string argument that
will append the value of the string as a prerelease identifier:</p>
<pre><code class="lang-`javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
<pre><code class="lang-javascript">&gt; semver.inc(&#39;1.2.3&#39;, &#39;pre&#39;, &#39;beta&#39;)
&#39;1.2.4-beta.0&#39;
</code></pre>
<p>command-line example:</p>
@@ -208,6 +208,9 @@ <h2 id="functions">Functions</h2>
increments it.</li>
</ul>
</li>
<li><code>major(v)</code>: Return the major version number.</li>
<li><code>minor(v)</code>: Return the minor version number.</li>
<li><code>patch(v)</code>: Return the patch version number.</li>
</ul>
<h3 id="comparison">Comparison</h3>
<ul>
@@ -239,8 +239,9 @@ function linkMans (pkg, folder, parent, gtop, cb) {
var stem = parseMan[1]
var sxn = parseMan[2]
var bn = path.basename(stem)
var manSrc = path.resolve(folder, man)
var manDest = path.join(manRoot, "man" + sxn, bn)

linkIfExists(man, manDest, gtop && folder, cb)
linkIfExists(manSrc, manDest, gtop && folder, cb)
}, cb)
}
@@ -12,6 +12,7 @@ var path = require("path")
, addRemoteTarball = require("./add-remote-tarball.js")
, cachedPackageRoot = require("./cached-package-root.js")
, mapToRegistry = require("../utils/map-to-registry.js")
, warnStrict = require("../utils/warn-deprecated.js")("engineStrict")


module.exports = addNamed
@@ -91,6 +92,12 @@ function engineFilter (data) {
Object.keys(data.versions || {}).forEach(function (v) {
var eng = data.versions[v].engines
if (!eng) return
if (data.versions[v].engineStrict) {
warnStrict([
"Per-package engineStrict (found in package.json for "+data.name+")",
"won't be used in npm 3+. Use the config setting `engine-strict` instead."
], data.name)
}
if (!strict && !data.versions[v].engineStrict) return
if (eng.node && !semver.satisfies(nodev, eng.node, true)
|| eng.npm && !semver.satisfies(npmv, eng.npm, true)) {
@@ -0,0 +1,16 @@
var assert = require("assert")

var toNerfDart = require("./nerf-dart.js")

module.exports = clearCredentialsByURI

function clearCredentialsByURI (uri) {
assert(uri && typeof uri === "string", "registry URL is required")

var nerfed = toNerfDart(uri)

this.del(nerfed + ":_authToken", "user")
this.del(nerfed + ":_password", "user")
this.del(nerfed + ":username", "user")
this.del(nerfed + ":email", "user")
}
@@ -152,10 +152,17 @@ function load_(builtin, rc, cli, cb) {
// annoying humans and their expectations!
if (conf.get("prefix")) {
var etc = path.resolve(conf.get("prefix"), "etc")
defaults.globalconfig = path.resolve(etc, "npmrc")
defaults.globalignorefile = path.resolve(etc, "npmignore")
mkdirp(etc, function (err) {
defaults.globalconfig = path.resolve(etc, "npmrc")
defaults.globalignorefile = path.resolve(etc, "npmignore")
afterUserContinuation()
})
} else {
afterUserContinuation()
}
}

function afterUserContinuation() {
conf.addFile(conf.get("globalconfig"), "global")

// move the builtin into the conf stack now.
@@ -220,6 +227,7 @@ Conf.prototype.setUser = require("./set-user.js")
Conf.prototype.findPrefix = require("./find-prefix.js")
Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js")
Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js")
Conf.prototype.clearCredentialsByURI = require("./clear-credentials-by-uri.js")

Conf.prototype.loadExtras = function(cb) {
this.setUser(function(er) {
@@ -89,6 +89,7 @@ var npm = require("./npm.js")
, locker = require("./utils/locker.js")
, lock = locker.lock
, unlock = locker.unlock
, warnPeers = require("./utils/warn-deprecated.js")("peerDependencies")

function install (args, cb_) {
var hasArguments = !!args.length
@@ -159,6 +160,11 @@ function install (args, cb_) {
"install",
"peerDependency", dep, "wasn't going to be installed; adding"
)
warnPeers([
"The peer dependency "+dep+" included from "+data.name+" will no",
"longer be automatically installed to fulfill the peerDependency ",
"in npm 3+. Your application will need to depend on it explicitly."
], dep+","+data.name)
peers.push(dep)
}
})
@@ -1036,6 +1042,13 @@ function write (target, targetFolder, context, cb_) {
// favor of killing implicit peerDependency installs with fire.
var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled,
wrap, family)
peerDeps.forEach(function (pd) {
warnPeers([
"The peer dependency "+pd+" included from "+data.name+" will no",
"longer be automatically installed to fulfill the peerDependency ",
"in npm 3+. Your application will need to depend on it explicitly."
], pd+","+data.name)
})
var pdTargetFolder = path.resolve(targetFolder, "..", "..")
var pdContext = context
if (peerDeps.length > 0) {
@@ -0,0 +1,40 @@
module.exports = logout

var dezalgo = require("dezalgo")
var log = require("npmlog")

var npm = require("./npm.js")
var mapToRegistry = require("./utils/map-to-registry.js")

logout.usage = "npm logout [--registry] [--scope]"

function logout (args, cb) {
npm.spinner.start()
cb = dezalgo(cb)

mapToRegistry("/", npm.config, function (err, uri, auth, normalized) {
if (err) return cb(err)

if (auth.token) {
log.verbose("logout", "clearing session token for", normalized)
npm.registry.logout(normalized, { auth: auth }, function (err) {
if (err) return cb(err)

npm.config.clearCredentialsByURI(normalized)
npm.spinner.stop()
npm.config.save("user", cb)
})
}
else if (auth.username || auth.password) {
log.verbose("logout", "clearing user credentials for", normalized)
npm.config.clearCredentialsByURI(normalized)
npm.spinner.stop()
npm.config.save("user", cb)
}
else {
cb(new Error(
"Not logged in to", normalized + ",", "so can't log out."
))
}
})
}
@@ -110,6 +110,7 @@ var commandCache = {}
, "stars"
, "tag"
, "adduser"
, "logout"
, "unpublish"
, "owner"
, "access"
@@ -40,7 +40,12 @@ var path = require("path")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var dir = path.resolve(npm.dir, "..")

// default depth for `outdated` is 0 (cf. `ls`)
if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0)

outdated_(args, dir, {}, 0, function (er, list) {
if (!list) list = []
if (er || silent || list.length === 0) return cb(er, list)
if (npm.config.get("json")) {
console.log(makeJSON(list))
@@ -0,0 +1,24 @@
module.exports = warnDeprecated

var log = require("npmlog")

var deprecations = {}

function warnDeprecated (type) {
return function warn (messages, instance) {
if (!instance) {
if (!deprecations[type]) {
deprecations[type] = {}
messages.forEach(function (m) { log.warn(type, m) })
}
}
else {
if (!deprecations[type]) deprecations[type] = {}

if (!deprecations[type][instance]) {
deprecations[type][instance] = true
messages.forEach(function (m) { log.warn(type, m) })
}
}
}
}
@@ -192,7 +192,7 @@ npm, Inc\. or the Node\.js project\.
.P
Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher\. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
ensure accountability, there is absolutely no guarantee, warranty, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package\.
.P
@@ -24,7 +24,7 @@ Clear a tag that is no longer in use from the package\.
.IP \(bu 2
ls:
Show all of the dist\-tags for a package, defaulting to the package in
the curren prefix\.
the current prefix\.

.RE
.P
@@ -45,7 +45,7 @@ npm link redis # link\-install the package
.RE
.P
Now, any changes to ~/projects/node\-redis will be reflected in
~/projects/node\-bloggy/node_modules/redis/
~/projects/node\-bloggy/node_modules/node\-redis/
.P
You may also shortcut the two steps in one\. For example, to do the
above use\-case in a shorter way:
@@ -62,7 +62,7 @@ The second line is the equivalent of doing:
.RS 2
.nf
(cd \.\./node\-redis; npm link)
npm link redis
npm link node\-redis
.fi
.RE
.P
@@ -0,0 +1,62 @@
.TH "NPM\-LOGOUT" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
.P
.RS 2
.nf
npm logout [\-\-registry=url] [\-\-scope=@orgname]
.fi
.RE
.SH DESCRIPTION
.P
When logged into a registry that supports token\-based authentication, tell the
server to end this token's session\. This will invalidate the token everywhere
you're using it, not just for the current environment\.
.P
When logged into a legacy registry that uses username and password authentication, this will
clear the credentials in your user configuration\. In this case, it will \fIonly\fR affect
the current environment\.
.P
If \fB\-\-scope\fR is provided, this will find the credentials for the registry
connected to that scope, if set\.
.SH CONFIGURATION
.SS registry
.P
Default: http://registry\.npmjs\.org/
.P
The base URL of the npm package registry\. If \fBscope\fR is also specified,
it takes precedence\.
.SS scope
.P
Default: none
.P
If specified, the user and login credentials given will be associated
with the specified scope\. See npm help 7 \fBnpm\-scope\fR\|\. You can use both at the same time,
e\.g\.
.P
.RS 2
.nf
npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco
.fi
.RE
.P
This will set a registry for the given scope and login or create a user for
that registry at the same time\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help adduser
.IP \(bu 2
npm help 7 registry
.IP \(bu 2
npm help config
.IP \(bu 2
npm help 7 config
.IP \(bu 2
npm help 5 npmrc
.IP \(bu 2
npm help whoami

.RE

@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show:
.P
.RS 2
.nf
npm@2.5.1 /path/to/npm
npm@2.6.1 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
2.5.1
2.6.1
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
@@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) {
.RE
.SH VERSION
.P
2.5.1
2.6.1
.SH DESCRIPTION
.P
This is the API documentation for npm\.
@@ -77,7 +77,7 @@ It should look like this:
.P
.RS 2
.nf
{ "url" : "http://github\.com/owner/project/issues"
{ "url" : "https://github\.com/owner/project/issues"
, "email" : "project@hostname\.com"
}
.fi
@@ -251,7 +251,7 @@ will create entries for \fBman foo\fR and \fBman 2 foo\fR
.P
The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a
few ways that you can indicate the structure of your package using a \fBdirectories\fR
object\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR,
you'll see that it has directories for doc, lib, and man\.
.P
In the future, this information may be used in other creative ways\.
@@ -288,19 +288,28 @@ Do it like this:
.nf
"repository" :
{ "type" : "git"
, "url" : "http://github\.com/npm/npm\.git"
, "url" : "https://github\.com/npm/npm\.git"
}

"repository" :
{ "type" : "svn"
, "url" : "http://v8\.googlecode\.com/svn/trunk/"
, "url" : "https://v8\.googlecode\.com/svn/trunk/"
}
.fi
.RE
.P
The URL should be a publicly available (perhaps read\-only) url that can be handed
directly to a VCS program without any modification\. It should not be a url to an
html project page that you put in your browser\. It's for computers\.
.P
For GitHub repositories you can use the same shortcut syntax you use for \fBnpm
install\fR:
.P
.RS 2
.nf
"repository": "npm/npm"
.fi
.RE
.SH scripts
.P
The "scripts" property is a dictionary containing script commands that are run
@@ -531,9 +540,8 @@ For example:
.RE
.P
This ensures your package \fBtea\-latte\fR can be installed \fIalong\fR with the second
major version of the host package \fBtea\fR only\. The host package is automatically
installed if needed\. \fBnpm install tea\-latte\fR could possibly yield the following
dependency graph:
major version of the host package \fBtea\fR only\. \fBnpm install tea\-latte\fR could
possibly yield the following dependency graph:
.P
.RS 2
.nf
@@ -542,6 +550,13 @@ dependency graph:
.fi
.RE
.P
\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fR if
they are not explicitly depended upon higher in the dependency tree\. In the
next major version of npm (npm@3), this will no longer be the case\. You will
receive a warning that the peerDependency is not installed instead\.\fR The
behavior in npms 1 & 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible\.
.P
Trying to install another plugin with a conflicting requirement will cause an
error\. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions\.
@@ -618,6 +633,8 @@ Note that, unless the user has set the \fBengine\-strict\fR config flag, this
field is advisory only\.
.SH engineStrict
.P
\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR
.P
If you are sure that your module will \fIdefinitely not\fR run properly on
versions of Node/npm other than those specified in the \fBengines\fR object,
then you can set \fB"engineStrict": true\fR in your package\.json file\.
@@ -626,8 +643,7 @@ This will override the user's \fBengine\-strict\fR config setting\.
Please do not do this unless you are really very very sure\. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node\. Consider this choice carefully\. If
people abuse it, it will be removed in a future version of npm\.
updating to new versions of Node\. Consider this choice carefully\.
.SH os
.P
You can specify which operating systems your
@@ -77,7 +77,7 @@ It should look like this:
.P
.RS 2
.nf
{ "url" : "http://github\.com/owner/project/issues"
{ "url" : "https://github\.com/owner/project/issues"
, "email" : "project@hostname\.com"
}
.fi
@@ -251,7 +251,7 @@ will create entries for \fBman foo\fR and \fBman 2 foo\fR
.P
The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a
few ways that you can indicate the structure of your package using a \fBdirectories\fR
object\. If you look at npm's package\.json \fIhttp://registry\.npmjs\.org/npm/latest\fR,
object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR,
you'll see that it has directories for doc, lib, and man\.
.P
In the future, this information may be used in other creative ways\.
@@ -288,19 +288,28 @@ Do it like this:
.nf
"repository" :
{ "type" : "git"
, "url" : "http://github\.com/npm/npm\.git"
, "url" : "https://github\.com/npm/npm\.git"
}

"repository" :
{ "type" : "svn"
, "url" : "http://v8\.googlecode\.com/svn/trunk/"
, "url" : "https://v8\.googlecode\.com/svn/trunk/"
}
.fi
.RE
.P
The URL should be a publicly available (perhaps read\-only) url that can be handed
directly to a VCS program without any modification\. It should not be a url to an
html project page that you put in your browser\. It's for computers\.
.P
For GitHub repositories you can use the same shortcut syntax you use for \fBnpm
install\fR:
.P
.RS 2
.nf
"repository": "npm/npm"
.fi
.RE
.SH scripts
.P
The "scripts" property is a dictionary containing script commands that are run
@@ -531,9 +540,8 @@ For example:
.RE
.P
This ensures your package \fBtea\-latte\fR can be installed \fIalong\fR with the second
major version of the host package \fBtea\fR only\. The host package is automatically
installed if needed\. \fBnpm install tea\-latte\fR could possibly yield the following
dependency graph:
major version of the host package \fBtea\fR only\. \fBnpm install tea\-latte\fR could
possibly yield the following dependency graph:
.P
.RS 2
.nf
@@ -542,6 +550,13 @@ dependency graph:
.fi
.RE
.P
\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fR if
they are not explicitly depended upon higher in the dependency tree\. In the
next major version of npm (npm@3), this will no longer be the case\. You will
receive a warning that the peerDependency is not installed instead\.\fR The
behavior in npms 1 & 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible\.
.P
Trying to install another plugin with a conflicting requirement will cause an
error\. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions\.
@@ -618,6 +633,8 @@ Note that, unless the user has set the \fBengine\-strict\fR config flag, this
field is advisory only\.
.SH engineStrict
.P
\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR
.P
If you are sure that your module will \fIdefinitely not\fR run properly on
versions of Node/npm other than those specified in the \fBengines\fR object,
then you can set \fB"engineStrict": true\fR in your package\.json file\.
@@ -626,8 +643,7 @@ This will override the user's \fBengine\-strict\fR config setting\.
Please do not do this unless you are really very very sure\. If your
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node\. Consider this choice carefully\. If
people abuse it, it will be removed in a future version of npm\.
updating to new versions of Node\. Consider this choice carefully\.
.SH os
.P
You can specify which operating systems your
@@ -340,8 +340,13 @@ Type: Number

.RE
.P
The depth to go when recursing directories for \fBnpm ls\fR and
\fBnpm cache ls\fR\|\.
The depth to go when recursing directories for \fBnpm ls\fR,
\fBnpm cache ls\fR, and \fBnpm outdated\fR\|\.
.P
For \fBnpm outdated\fR, a setting of \fBInfinity\fR will be treated as \fB0\fR
since that gives more useful information\. To show the outdated status
of all packages and dependents, use a large integer value,
e\.g\., \fBnpm outdated \-\-depth 9999\fR
.SS description
.RS 0
.IP \(bu 2
@@ -70,6 +70,9 @@ Install a package
.SS npm help link
.P
Symlink a package folder
.SS npm help logout
.P
Log out of the registry
.SS npm help ls
.P
List installed packages
@@ -311,6 +311,12 @@ prerelease\. If the input version is already a prerelease it simply
increments it\.

.RE
.IP \(bu 2
\fBmajor(v)\fR: Return the major version number\.
.IP \(bu 2
\fBminor(v)\fR: Return the minor version number\.
.IP \(bu 2
\fBpatch(v)\fR: Return the patch version number\.

.RE
.SS Comparison
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
@@ -1,5 +1,5 @@
{
"version": "2.5.1",
"version": "2.6.1",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -53,11 +53,11 @@
"fstream-npm": "~1.0.1",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
"glob": "~4.3.5",
"glob": "~4.4.0",
"graceful-fs": "~3.0.5",
"inflight": "~1.0.4",
"inherits": "~2.0.1",
"ini": "~1.3.2",
"ini": "~1.3.3",
"init-package-json": "~1.2.0",
"lockfile": "~1.0.0",
"lru-cache": "~2.5.0",
@@ -70,7 +70,7 @@
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.5",
"npm-package-arg": "~2.1.3",
"npm-registry-client": "~6.0.7",
"npm-registry-client": "~6.1.1",
"npm-user-validate": "~0.1.1",
"npmlog": "~0.1.1",
"once": "~1.3.1",
@@ -79,13 +79,13 @@
"path-is-inside": "~1.0.0",
"read": "~1.0.4",
"read-installed": "~3.1.5",
"read-package-json": "~1.2.7",
"read-package-json": "~1.3.1",
"readable-stream": "~1.0.33",
"realize-package-specifier": "~1.3.0",
"request": "~2.53.0",
"retry": "~0.6.1",
"rimraf": "~2.2.8",
"semver": "~4.2.0",
"semver": "~4.3.0",
"sha": "~1.3.0",
"slide": "~1.1.6",
"sorted-object": "~1.0.0",
@@ -171,7 +171,8 @@
"npm-registry-couchapp": "~2.6.2",
"npm-registry-mock": "~1.0.0",
"require-inject": "~1.1.0",
"tap": "~0.5.0"
"sprintf-js": "~1.0.2",
"tap": "~0.6.0"
},
"scripts": {
"test-legacy": "node ./test/run.js",
@@ -18,7 +18,7 @@ exports.npm = function (cmd, opts, cb) {
cmd = [bin].concat(cmd)
opts = opts || {}

opts.env = opts.env ? opts.env : process.env
opts.env = opts.env || process.env
if (!opts.env.npm_config_cache) {
opts.env.npm_config_cache = npm_config_cache
}
@@ -12,7 +12,7 @@ npm-www:nocache=1
sign-git-tag=false
message=v%s
strict-ssl=false
_auth=dXNlcm5hbWU6cGFzc3dvcmQ=
_auth="dXNlcm5hbWU6cGFzc3dvcmQ="

[_token]
AuthSession=yabba-dabba-doodle
@@ -20,7 +20,9 @@ var git
test("setup", function (t) {
bootstrap()
setup(function (er, r) {
t.ifError(er, "git started up successfully")
if (er) {
throw er
}

if (!er) {
daemon = r[r.length - 2]
@@ -66,11 +68,13 @@ var pjChild = JSON.stringify({
}, null, 2) + "\n"

function bootstrap () {
rimraf.sync(pkg)
mkdirp.sync(pkg)
fs.writeFileSync(resolve(pkg, "package.json"), pjParent)
}

function setup (cb) {
rimraf.sync(repo)
mkdirp.sync(repo)
fs.writeFileSync(resolve(repo, "package.json"), pjChild)
npm.load({ registry : common.registry, loglevel : "silent" }, function () {
@@ -28,6 +28,18 @@ test("trying to set credentials with no URI", function (t) {
})
})

test("trying to clear credentials with no URI", function (t) {
npmconf.load(common.builtin, function (er, conf) {
t.ifError(er, "configuration loaded")

t.throws(function () {
conf.clearCredentialsByURI()
}, "enforced missing URI")

t.end()
})
})

test("set with missing credentials object", function (t) {
npmconf.load(common.builtin, function (er, conf) {
t.ifError(er, "configuration loaded")
@@ -76,6 +88,24 @@ test("set with token", function (t) {
})
})

test("clear with token", function (t) {
npmconf.load(common.builtin, function (er, conf) {
t.ifError(er, "configuration loaded")

t.doesNotThrow(function () {
conf.setCredentialsByURI(URI, {token : "simple-token"})
}, "needs only token")

t.doesNotThrow(function () {
conf.clearCredentialsByURI(URI)
}, "needs only URI")

t.notOk(conf.getCredentialsByURI(URI).token, "token all gone")

t.end()
})
})

test("set with missing username", function (t) {
npmconf.load(common.builtin, function (er, conf) {
t.ifError(er, "configuration loaded")
@@ -157,6 +187,31 @@ test("set with old-style credentials", function (t) {
})
})

test("clear with old-style credentials", function (t) {
npmconf.load(common.builtin, function (er, conf) {
t.ifError(er, "configuration loaded")

var credentials = {
username : "username",
password : "password",
email : "ogd@aoaioxxysz.net"
}

t.doesNotThrow(function () {
conf.setCredentialsByURI(URI, credentials)
}, "requires all of username, password, and email")

t.doesNotThrow(function () {
conf.clearCredentialsByURI(URI)
}, "clearing only required URI")

t.notOk(conf.getCredentialsByURI(URI).username, "username cleared")
t.notOk(conf.getCredentialsByURI(URI).password, "password cleared")

t.end()
})
})

test("get old-style credentials for default registry", function (t) {
npmconf.load(common.builtin, function (er, conf) {
var actual = conf.getCredentialsByURI(conf.get("registry"))
@@ -0,0 +1,72 @@
var fs = require("fs")
var path = require("path")

var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
var test = require("tap").test
var common = require("../common-tap.js")

var pkg = path.resolve(__dirname, "npm-global-edit")

var editorSrc = function () {/*
#!/usr/bin/env node
var fs = require("fs")
if (fs.existsSync(process.argv[2])) {
console.log("success")
} else {
console.log("error")
process.exit(1)
}
*/}.toString().split("\n").slice(1, -1).join("\n")
var editorPath = path.join(pkg, "editor")

test("setup", function (t) {
cleanup(function (er) {
t.ifError(er, "old directory removed")

mkdirp(pkg, "0777", function (er) {
fs.writeFileSync(editorPath, editorSrc)
fs.chmodSync(editorPath, "0777")
t.ifError(er, "created package directory correctly")
t.end()
})
})
})

test("saving configs", function (t) {
var opts = {
cwd: pkg,
env: {
PATH: process.env.PATH,
EDITOR: editorPath
}
}
common.npm(
[
"config",
"--prefix", pkg,
"--global",
"edit"
],
opts,
function (err, code, stdout, stderr) {
t.ifError(err, "command ran without issue")

t.equal(stderr, "", "got nothing on stderr")
t.equal(code, 0, "exit ok")
t.equal(stdout, "success\n", "got success message")
t.end()
}
)
})

test("cleanup", function (t) {
cleanup(function (er) {
t.ifError(er, "test directory removed OK")
t.end()
})
})

function cleanup (cb) {
rimraf(pkg, cb)
}
@@ -0,0 +1,75 @@
var fs = require("fs")
var resolve = require("path").resolve

var osenv = require("osenv")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
var test = require("tap").test

var common = require("../common-tap.js")

var pkg = resolve(__dirname, "install-man")
var target = resolve(__dirname, "install-man-target")

var EXEC_OPTS = {
cwd: target
}

test("setup", function (t) {
setup()
t.pass("setup ran")
t.end()
})

test("install man page", function (t) {
common.npm(
[
"install",
"--prefix", target,
"--global",
pkg
],
EXEC_OPTS,
function (err, code, stdout, stderr) {
t.ifError(err, "npm command ran from test")
t.equals(code, 0, "install exited with success (0)")
t.ok(stdout, "output indicating success")
t.ok(
fs.existsSync(resolve(target, "share", "man", "man1", "install-man.1")),
"man page link was created"
)

t.end()
}
)
})

test("clean", function (t) {
cleanup()
t.pass("cleaned up")
t.end()
})

var json = {
name : "install-man",
version : "1.2.3",
man : [ "./install-man.1" ]
}

function setup () {
cleanup()
mkdirp.sync(pkg)
// make sure it installs locally
mkdirp.sync(resolve(target, "node_modules"))
fs.writeFileSync(
resolve(pkg, "package.json"),
JSON.stringify(json, null, 2)+"\n"
)
fs.writeFileSync(resolve(pkg, "install-man.1"), "THIS IS A MANPAGE\n")
}

function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
rimraf.sync(target)
}
@@ -0,0 +1,67 @@
var fs = require("fs")
var path = require("path")

var mkdirp = require("mkdirp")
var mr = require("npm-registry-mock")
var rimraf = require("rimraf")
var test = require("tap").test

var common = require("../common-tap.js")

var pkg = path.resolve(__dirname, "logout")
var outfile = path.join(pkg, "_npmrc")
var opts = { cwd: pkg }

var contents = function () {/*
foo=boo
//localhost:1337/:_authToken=glarb
*/}.toString().split("\n").slice(1, -1).join("\n")

function mocks (server) {
server.delete("/-/user/token/glarb")
.reply(200, {})
}

test("setup", function (t) {
cleanup()
setup()
t.end()
})

test("npm logout", function (t) {
mr({ port: common.port, plugin: mocks }, function (err, s) {
if (err) throw err

common.npm(
[
"logout",
"--registry", common.registry,
"--loglevel", "silent",
"--userconfig", outfile
],
opts,
function (err, code) {
t.ifError(err, "no error output")
t.notOk(code, "exited OK")

var config = fs.readFileSync(outfile, "utf8")
t.equal(config, "foo=boo\n", "creds gone")
s.close()
t.end()
})
})
})

test("cleanup", function (t) {
cleanup()
t.end()
})

function setup () {
mkdirp.sync(pkg)
fs.writeFileSync(outfile, contents)
}

function cleanup () {
rimraf.sync(pkg)
}
@@ -0,0 +1,78 @@
var common = require("../common-tap")
, path = require("path")
, test = require("tap").test
, rimraf = require("rimraf")
, npm = require("../../")
, mr = require("npm-registry-mock")
, pkg = path.resolve(__dirname, "outdated-depth-deep")
, cache = path.resolve(pkg, "cache")

var osenv = require("osenv")
var mkdirp = require("mkdirp")
var fs = require("fs")

var pj = JSON.stringify({
"name": "whatever",
"description": "yeah idk",
"version": "1.2.3",
"main": "index.js",
"dependencies": {
"underscore": "1.3.1",
"npm-test-peer-deps": "0.0.0"
},
"repository": "git://github.com/luk-/whatever"
}, null, 2)

function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
}

function setup () {
mkdirp.sync(pkg)
process.chdir(pkg)
fs.writeFileSync(path.resolve(pkg, "package.json"), pj)
}

test("setup", function (t) {
cleanup()
setup()
t.end()
})

test("outdated depth deep (9999)", function (t) {
var underscoreOutdated = ["underscore", "1.3.1", "1.3.1", "1.5.1", "1.3.1"]
var childPkg = path.resolve(pkg, "node_modules", "npm-test-peer-deps")

var expected = [ [pkg].concat(underscoreOutdated),
[childPkg].concat(underscoreOutdated) ]

process.chdir(pkg)

mr({port : common.port}, function (er, s) {
npm.load({
cache: cache
, loglevel: "silent"
, registry: common.registry
, depth: 9999
}
, function () {
npm.install(".", function (er) {
if (er) throw new Error(er)
npm.outdated(function (err, d) {
if (err) throw new Error(err)
t.deepEqual(d, expected)
s.close()
t.end()
})
})
}
)
})
})


test("cleanup", function (t) {
cleanup()
t.end()
})
@@ -30,7 +30,6 @@ test("outdated depth zero", function (t) {
cache: cache
, loglevel: "silent"
, registry: common.registry
, depth: 0
}
, function () {
npm.install(".", function (er) {
@@ -4,7 +4,8 @@
"version": "1.2.3",
"main": "index.js",
"dependencies": {
"underscore": "1.3.1"
"underscore": "1.3.1",
"npm-test-peer-deps": "0.0.0"
},
"repository": "git://github.com/luk-/whatever"
}
@@ -3,6 +3,7 @@ var test = require("tap").test
var fs = require("fs")
var rimraf = require("rimraf")
var mkdirp = require("mkdirp")
var sprintf = require("sprintf-js").sprintf
var common = require("../common-tap.js")

var pkg = path.resolve(__dirname, "umask-lifecycle")
@@ -12,14 +13,15 @@ var pj = JSON.stringify({
scripts: { umask: "$npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'" }
}, null, 2) + "\n"

var umask = process.umask()
var expected = [
"",
"> x@1.2.3 umask "+path.join(__dirname, "umask-lifecycle"),
"> $npm_execpath config get umask && echo \"$npm_config_umask\" && node -p 'process.umask()'",
"",
"0022",
"0022",
"18",
sprintf("%04o", umask),
sprintf("%04o", umask),
sprintf("%d", umask),
""
].join("\n")

@@ -32,7 +34,6 @@ test("setup", function (t) {

test("umask script", function (t) {
common.npm(["run", "umask"], {
umask: 0022,
cwd: pkg,
env: {
PATH: process.env.PATH,
@@ -55,7 +55,8 @@ test("npm version <semver> with working directory not clean", function (t) {
t.fail("should fail on non-clean working directory")
}
else {
t.equal(err.message, "Git working directory not clean.\nM package.json")
t.ok(err.message.match(/Git working directory not clean./))
t.ok(err.message.match(/M package.json/))
}
t.end()
})

This file was deleted.

This file was deleted.

@@ -173,5 +173,10 @@ Michael Ira Krufky <m.krufky@samsung.com>
Helge Deller <deller@gmx.de>
Joey Geralnik <jgeralnik@gmail.com>
Tim Caswell <tim@creationix.com>
Michael Hudson-Doyle <michael.hudson@linaro.org>
Helge Deller <deller@gmx.de>
Logan Rosen <loganrosen@gmail.com>
Kenneth Perry <thothonegan@gmail.com>
John Marino <marino@FreeBSD.org>
Alexey Melnichuk <mimir@newmail.ru>
Johan Bergström <bugs@bergstroem.nu>
Alex Mo <almosnow@gmail.com>
Luis Martinez de Bartolome <lasote@gmail.com>
@@ -1,3 +1,240 @@
2015.02.10, Version 1.4.0 (Stable)

Changes since version 1.3.0:

* unix: check Android support for pthread_cond_timedwait_monotonic_np (Leith
Bade)

* test: use modified path in test (cjihrig)

* unix: implement uv_stream_set_blocking() (Ben Noordhuis)


2015.01.29, Version 1.3.0 (Stable), 165685b2a9a42cf96501d79cd6d48a18aaa16e3b

Changes since version 1.2.1:

* unix, windows: set non-block mode in uv_poll_init (Saúl Ibarra Corretgé)

* doc: clarify which flags are supported in uv_fs_event_start (Saúl Ibarra
Corretgé)

* win,unix: move loop functions which have identical implementations (Andrius
Bentkus)

* doc: explain how the threadpool is allocated (Alex Mo)

* doc: clarify uv_default_loop (Saúl Ibarra Corretgé)

* unix: fix implicit declaration compiler warning (Ben Noordhuis)

* unix: fix long line introduced in commit 94e628fa (Ben Noordhuis)

* unix, win: add synchronous uv_get{addr,name}info (Saúl Ibarra Corretgé)

* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis)

* build: compile -D_GNU_SOURCE on linux (Ben Noordhuis)

* build: use -fvisibility=hidden in autotools build (Ben Noordhuis)

* fs, pipe: no trailing terminator in exact sized buffers (Andrius Bentkus)

* style: rename buf to buffer and len to size for consistency (Andrius Bentkus)

* test: fix test-spawn on MinGW32 (Luis Martinez de Bartolome)

* win, pipe: fix assertion when destroying timer (Andrius Bentkus)

* win, unix: add pipe_peername implementation (Andrius Bentkus)


2015.01.29, Version 0.10.33 (Stable), 7a2253d33ad8215a26c1b34f1952aee7242dd687

Changes since version 0.10.32:

* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis)

* test: back-port uv_loop_configure() test (Ben Noordhuis)


2015.01.15, Version 1.2.1 (Stable), 4ca78e989062a1099dc4b9ad182a98e8374134b1

Changes since version 1.2.0:

* unix: remove unused dtrace file (Saúl Ibarra Corretgé)

* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra Corretgé)

* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé)

* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé)

* build: make dist now generates a full tarball (Johan Bergström)

* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé)

* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra
Corretgé)

* win,tcp: support uv_try_write (Bert Belder)

* test: enable test-tcp-try-write on windows (Bert Belder)

* win,tty: support uv_try_write (Bert Belder)

* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis)


2015.01.06, Version 1.2.0 (Stable), 09f25b13cd149c7981108fc1a75611daf1277f83

Changes since version 1.1.0:

* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis)

* tty: implement binary I/O terminal mode (Yuri D'Elia)

* test: fix spawn test with autotools build (Ben Noordhuis)

* test: skip ipv6 tests when ipv6 is not supported (Ben Noordhuis)

* common: move STATIC_ASSERT to uv-common.h (Alexey Melnichuk)

* win/thread: store thread handle in a TLS slot (Alexey Melnichuk)

* unix: fix ttl, multicast ttl and loop options on IPv6 (Saúl Ibarra Corretgé)

* linux: fix support for preadv/pwritev-less kernels (Ben Noordhuis)

* unix: make uv_exepath(size=0) return UV_EINVAL (Ben Noordhuis)

* darwin: fix uv_exepath(smallbuf) UV_EPERM error (Ben Noordhuis)

* openbsd: fix uv_exepath(smallbuf) UV_EINVAL error (Ben Noordhuis)

* linux: fix uv_exepath(size=1) UV_EINVAL error (Ben Noordhuis)

* sunos: preemptively fix uv_exepath(size=1) (Ben Noordhuis)

* win: fix and clarify comments in winapi.h (Bert Belder)

* win: make available NtQueryDirectoryFile (Bert Belder)

* win: add definitions for directory information types (Bert Belder)

* win: use NtQueryDirectoryFile to implement uv_fs_scandir (Bert Belder)

* unix: don't unlink unix socket on bind error (Ben Noordhuis)

* build: fix bad comment in autogen.sh (Ben Noordhuis)

* build: add AC_PROG_LIBTOOL to configure.ac (Ben Noordhuis)

* test: skip udp_options6 if there no IPv6 support (Saúl Ibarra Corretgé)

* win: add definitions for MUI errors mingw lacks (Bert Belder)

* build: enable warnings in autotools build (Ben Noordhuis)

* build: remove -Wno-dollar-in-identifier-extension (Ben Noordhuis)

* build: move flags from Makefile.am to configure.ac (Ben Noordhuis)


2015.01.06, Version 0.10.32 (Stable), 378de30c59aef5fdb6d130fa5cfcb0a68fce571c

Changes since version 0.10.31:

* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis)


2014.12.25, Version 1.1.0 (Stable), 9572f3e74a167f59a8017e57ca3ebe91ffd88e18

Changes since version 1.0.2:

* test: test that closing a poll handle doesn't corrupt the stack (Bert Belder)

* win: fix compilation of tests (Marc Schlaich)

* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert Belder)

* win: avoid stack corruption when closing a poll handle (Bert Belder)

* test: fix test-fs-file-loop on Windows (Bert Belder)

* test: fix test-cwd-and-chdir (Bert Belder)

* doc: indicate what version uv_loop_configure was added on (Saúl Ibarra
Corretgé)

* doc: fix sphinx warning (Saúl Ibarra Corretgé)

* test: skip spawn_setuid_setgid if we get EACCES (Saúl Ibarra Corretgé)

* test: silence some Clang warnings (Saúl Ibarra Corretgé)

* test: relax osx_select_many_fds (Saúl Ibarra Corretgé)

* test: fix compilation warnings when building with Clang (Saúl Ibarra
Corretgé)

* win: fix autotools build of tests (Luis Lavena)

* gitignore: ignore Visual Studio files (Marc Schlaich)

* win: set fallback message if FormatMessage fails (Marc Schlaich)

* win: fall back to default language in uv_dlerror (Marc Schlaich)

* test: improve compatibility for dlerror test (Marc Schlaich)

* test: check dlerror is "no error" in no error case (Marc Schlaich)

* unix: change uv_cwd not to return a trailing slash (Saúl Ibarra Corretgé)

* test: fix cwd_and_chdir test on Unix (Saúl Ibarra Corretgé)

* test: add uv_cwd output to platform_output test (Saúl Ibarra Corretgé)

* build: fix dragonflybsd autotools build (John Marino)

* win: scandir use 'ls' for formatting long strings (Kenneth Perry)

* build: remove clang and gcc_version gyp defines (Ben Noordhuis)

* unix, windows: don't treat uv_run_mode as a bitmask (Saúl Ibarra Corretgé)

* unix, windows: fix UV_RUN_ONCE mode if progress was made (Saúl Ibarra
Corretgé)


2014.12.25, Version 0.10.31 (Stable), 4dbd27e2219069a6daa769fb37f98673b77b4261

Changes since version 0.10.30:

* test: test that closing a poll handle doesn't corrupt the stack (Bert Belder)

* win: fix compilation of tests (Marc Schlaich)

* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert Belder)

* win: avoid stack corruption when closing a poll handle (Bert Belder)

* gitignore: ignore Visual Studio files (Marc Schlaich)

* win: set fallback message if FormatMessage fails (Marc Schlaich)

* win: fall back to default language in uv_dlerror (Marc Schlaich)

* test: improve compatibility for dlerror test (Marc Schlaich)

* test: check dlerror is "no error" in no error case (Marc Schlaich)

* build: link against -pthread (Logan Rosen)

* win: scandir use 'ls' for formatting long strings (Kenneth Perry)


2014.12.10, Version 1.0.2 (Stable), eec671f0059953505f9a3c9aeb7f9f31466dd7cd

Changes since version 1.0.1:
@@ -34,6 +34,8 @@ libuv_la_SOURCES = src/fs-poll.c \
src/version.c

if SUNOS
# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers
# on other platforms complain that the argument is unused during compilation.
libuv_la_CFLAGS += -pthread
endif

@@ -81,7 +83,6 @@ else # WINNT

include_HEADERS += include/uv-unix.h
AM_CPPFLAGS += -I$(top_srcdir)/src/unix
libuv_la_CFLAGS += -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter
libuv_la_SOURCES += src/unix/async.c \
src/unix/atomic-ops.h \
src/unix/core.c \
@@ -107,7 +108,24 @@ libuv_la_SOURCES += src/unix/async.c \
endif # WINNT

EXTRA_DIST = test/fixtures/empty_file \
test/fixtures/load_error.node
test/fixtures/load_error.node \
include \
test \
docs \
img \
samples \
android-configure \
CONTRIBUTING.md \
LICENSE \
README.md \
checksparse.sh \
vcbuild.bat \
Makefile.mingw \
common.gypi \
gyp_uv.py \
uv.gyp



TESTS = test/run-tests
check_PROGRAMS = test/run-tests
@@ -159,6 +177,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-loop-close.c \
test/test-loop-stop.c \
test/test-loop-time.c \
test/test-loop-configure.c \
test/test-multiple-listen.c \
test/test-mutexes.c \
test/test-osx-select.c \
@@ -170,8 +189,10 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-pipe-sendmsg.c \
test/test-pipe-server-close.c \
test/test-pipe-close-stdout-read-stdin.c \
test/test-pipe-set-non-blocking.c \
test/test-platform-output.c \
test/test-poll-close.c \
test/test-poll-close-doesnt-corrupt-stack.c \
test/test-poll-closesocket.c \
test/test-poll.c \
test/test-process-title.c \
@@ -274,7 +295,6 @@ endif

if DRAGONFLY
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/kqueue.c src/unix/freebsd.c
endif

if FREEBSD
@@ -284,6 +304,7 @@ endif

if LINUX
include_HEADERS += include/uv-linux.h
libuv_la_CFLAGS += -D_GNU_SOURCE
libuv_la_SOURCES += src/unix/linux-core.c \
src/unix/linux-inotify.c \
src/unix/linux-syscalls.c \
@@ -46,15 +46,6 @@ SemVer. libuv will keep a stable ABI across major releases.

## Documentation

* [include/uv.h](https://github.com/libuv/libuv/blob/master/include/uv.h)
&mdash; API documentation in the form of detailed header comments.
* [An Introduction to libuv](http://nikhilm.github.com/uvbook/) &mdash; An
overview of libuv with tutorials.
* [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - High-level
introductory talk about libuv.
* [Tests and benchmarks](https://github.com/libuv/libuv/tree/master/test) -
API specification and usage examples.

### Official API documentation

Located in the docs/ subdirectory. It uses the [Sphinx](http://sphinx-doc.org/)
@@ -33,7 +33,7 @@ UV_EXTRA_AUTOMAKE_FLAGS=
if test "$automake_version_major" -gt 1 || \
test "$automake_version_major" -eq 1 && \
test "$automake_version_minor" -gt 11; then
# serial-tests is available in v0.12 and newer.
# serial-tests is available in v1.12 and newer.
UV_EXTRA_AUTOMAKE_FLAGS="$UV_EXTRA_AUTOMAKE_FLAGS serial-tests"
fi
echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [$UV_EXTRA_AUTOMAKE_FLAGS])" \
@@ -6,8 +6,6 @@
'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'gcc_version%': 'unknown',
'clang%': 0,
},

'target_defaults': {
@@ -158,7 +156,7 @@
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'visibility=="hidden" and (clang==1 or gcc_version >= 40)', {
[ 'visibility=="hidden"', {
'cflags': [ '-fvisibility=hidden' ],
}],
],
@@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.0.2], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.4.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
@@ -24,9 +24,17 @@ AC_ENABLE_SHARED
AC_ENABLE_STATIC
AC_PROG_CC
AM_PROG_CC_C_O
CC_CHECK_CFLAGS_APPEND([-Wno-dollar-in-identifier-extension])
CC_CHECK_CFLAGS_APPEND([-fvisibility=hidden])
CC_CHECK_CFLAGS_APPEND([-g])
CC_CHECK_CFLAGS_APPEND([-std=gnu89])
CC_CHECK_CFLAGS_APPEND([-pedantic])
CC_CHECK_CFLAGS_APPEND([-Wall])
CC_CHECK_CFLAGS_APPEND([-Wextra])
CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter])
# AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
# autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR.
AC_PROG_LIBTOOL
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_INIT
# TODO(bnoordhuis) Check for -pthread vs. -pthreads