@@ -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;&#97;&#x69;&#108;&#x74;&#111;&#x3a;&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;">&#x73;&#117;&#112;&#112;&#x6f;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#x2e;&#99;&#x6f;&#109;</a>
<p>If the registry IS down, let us know by emailing <a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#115;&#117;&#x70;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;">&#115;&#117;&#x70;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;</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>
@@ -7,9 +7,9 @@ <h2 id="description">DESCRIPTION</h2>
<pre><code>@somescope/somepackagename
</code></pre><p>Scopes are a way of grouping related packages together, and also affect a few
things about the way npm treats the package.</p>
<p><strong>As of 2014-09-03, scoped packages are not supported by the public npm registry</strong>.
However, the npm client is backwards-compatible with un-scoped registries, so
it can be used to work with scoped and un-scoped registries at the same time.</p>
<p>Scoped packages are supported by the public npm registry. The npm
client is backwards-compatible with un-scoped registries, so it can be
used to work with scoped and un-scoped registries at the same time.</p>
<h2 id="installing-scoped-packages">Installing scoped packages</h2>
<p>Scoped packages are installed to a sub-folder of the regular installation
folder, e.g. if your other packages are installed in <code>node_modules/packagename</code>,
@@ -32,10 +32,22 @@ <h2 id="requiring-scoped-packages">Requiring scoped packages</h2>
</code></pre><p>There is nothing special about the way Node treats scope folders, this is
just specifying to require the module <code>mypackage</code> in the folder called <code>@myorg</code>.</p>
<h2 id="publishing-scoped-packages">Publishing scoped packages</h2>
<p>Scoped packages can be published to any registry that supports them.
<em>As of 2014-09-03, the public npm registry does not support scoped packages</em>,
so attempting to publish a scoped package to the registry will fail unless
you have associated that scope with a different registry, see below.</p>
<p>Scoped packages can be published to any registry that supports them, including
the public npm registry.</p>
<p>(As of 2015-04-19, the public npm registry <strong>does</strong> support scoped packages)</p>
<p>If you wish, you may associate a scope with a registry; see below.</p>
<h3 id="publishing-public-scoped-packages-to-the-public-npm-registry">Publishing public scoped packages to the public npm registry</h3>
<p>To publish a public scoped package, you must specify <code>--access public</code> with
the initial publication. This will publish the package and set access
to <code>public</code> as if you had run <code>npm access public</code> after publishing.</p>
<h3 id="publishing-private-scoped-packages-to-the-npm-registry">Publishing private scoped packages to the npm registry</h3>
<p>To publish a private scoped package to the npm registry, you must have
an <a href="https://www.npmjs.com/private-modules">npm Private Modules</a>
account.</p>
<p>You can then publish the module with <code>npm publish</code> or <code>npm publish
--access restricted</code>, and it will be present in the npm registry, with
restricted access. You can then change the access permissions, if
desired, with <code>npm access</code> or on the npmjs.com website.</p>
<h2 id="associating-a-scope-with-a-registry">Associating a scope with a registry</h2>
<p>Scopes can be associated with a separate registry. This allows you to
seamlessly use a mix of packages from the public npm registry and one or more
@@ -54,5 +66,6 @@ <h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
<li><a href="../cli/npm-publish.html">npm-publish(1)</a></li>
<li><a href="../cli/npm-access.html">npm-access(1)</a></li>
</ul>

@@ -1,13 +1,14 @@
module.exports = bin

var npm = require("./npm.js")
var osenv = require("osenv")

bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)"

function bin (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var b = npm.bin
, PATH = (process.env.PATH || "").split(":")
, PATH = osenv.path()

if (!silent) console.log(b)
process.nextTick(cb.bind(this, null, b))
@@ -115,7 +115,7 @@ function tryClone (from, combinedURL, silent, cb) {

// ensure that similarly-named remotes don't collide
var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' +
crypto.createHash('sha1').update(cloneURL).digest('hex').slice(0, 8)
crypto.createHash('sha1').update(combinedURL).digest('hex').slice(0, 8)
var cachedRemote = path.join(remotes, repoID)

cb = inflight(repoID, cb)
@@ -196,6 +196,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, spin: true
, "strict-ssl": true
, tag : "latest"
, "tag-version-prefix" : "v"
, tmp : temp
, unicode : true
, "unsafe-perm" : process.platform === "win32"
@@ -308,15 +309,26 @@ exports.types =
, userconfig : path
, umask: Umask
, version : Boolean
, "tag-version-prefix" : String
, versions : Boolean
, viewer: String
, _exit : Boolean
}

function getLocalAddresses() {
Object.keys(os.networkInterfaces()).map(function (nic) {
return os.networkInterfaces()[nic].filter(function (addr) {
return addr.family === "IPv4"
function getLocalAddresses () {
var interfaces
// #8094: some environments require elevated permissions to enumerate
// interfaces, and synchronously throw EPERM when run without
// elevated privileges
try {
interfaces = os.networkInterfaces()
} catch (e) {
interfaces = {}
}

return Object.keys(interfaces).map(function (nic) {
return interfaces[nic].filter(function (addr) {
return addr.family === 'IPv4'
})
.map(function (addr) {
return addr.address
@@ -687,19 +687,20 @@ function installMany (what, where, context, cb) {

var parent = data

var d = data.dependencies || {}

// if we're explicitly installing "what" into "where", then the shrinkwrap
// for "where" doesn't apply. This would be the case if someone were adding
// a new package to a shrinkwrapped package. (data.dependencies will not be
// used here except to indicate what packages are already present, so
// there's no harm in using that.)
if (context.explicit) wrap = null

var deps = data.dependencies || {}
var devDeps = data.devDependencies || {}

// what is a list of things.
// resolve each one.
asyncMap( what
, targetResolver(where, context, d)
, targetResolver(where, context, deps, devDeps)
, function (er, targets) {

if (er) return cb(er)
@@ -774,7 +775,7 @@ function installMany (what, where, context, cb) {
})
}

function targetResolver (where, context, deps) {
function targetResolver (where, context, deps, devDeps) {
var alreadyInstalledManually = []
, resolveLeft = 0
, nm = path.resolve(where, "node_modules")
@@ -807,7 +808,8 @@ function targetResolver (where, context, deps) {
// otherwise, make sure that it's a semver match with what we want.
var bd = parent.bundleDependencies
var isBundled = bd && bd.indexOf(d.name) !== -1
var currentIsSatisfactory = semver.satisfies(d.version, deps[d.name] || "*", true)
var expectedVersion = deps[d.name] || (devDeps && devDeps[d.name]) || "*"
var currentIsSatisfactory = semver.satisfies(d.version, expectedVersion, true)
if (isBundled || currentIsSatisfactory || deps[d.name] === d._resolved) {
return cb(null, d.name)
}
@@ -890,7 +892,7 @@ function targetResolver (where, context, deps) {
return cb(null, [])
}

var isGit = npa(what).type === "git"
var isGit = (npa(what).type === "git" || npa(what).type === "hosted")

if (!er &&
data &&
@@ -916,7 +918,7 @@ function installOne (target, where, context, cb) {
// the --link flag makes this a "link" command if it's at the
// the top level.
var isGit = false
if (target && target._from) isGit = npa(target._from).type === 'git'
if (target && target._from) isGit = (npa(target._from).type === 'git' || npa(target._from).type === 'hosted')

if (where === npm.prefix && npm.config.get("link")
&& !npm.config.get("global") && !isGit) {
@@ -301,7 +301,7 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb, type) {
}

if (args.length && args.indexOf(dep) === -1) return skip()
var parsed = npa(req)
var parsed = npa(dep + '@' + req)
if (parsed.type === "git" || (parsed.hosted && parsed.hosted.type === "github")) {
return doIt("git", "git")
}
@@ -313,8 +313,35 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb, type) {
npm.registry.get(uri, { auth : auth }, updateDeps)
})

function updateLocalDeps (latestRegistryVersion) {
readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) {
if (er) return cb()

var wanted = localDependency.version
var latest = localDependency.version

if (latestRegistryVersion) {
latest = latestRegistryVersion
if (semver.lt(wanted, latestRegistryVersion)) {
wanted = latestRegistryVersion
req = dep + '@' + latest
}
}

if (curr.version !== wanted) {
doIt(wanted, latest)
} else {
skip()
}
})
}

function updateDeps (er, d) {
if (er) return cb()
if (er) {
if (parsed.type !== 'local') return cb()
return updateLocalDeps()
}

if (!d || !d["dist-tags"] || !d.versions) return cb()
var l = d.versions[d["dist-tags"].latest]
if (!l) return cb()
@@ -355,6 +382,8 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb, type) {
if (!curr || dFromUrl && cFromUrl && d._from !== curr.from
|| d.version !== curr.version
|| d.version !== l.version) {
if (parsed.type === 'local') return updateLocalDeps(l.version)

doIt(d.version, l.version)
}
else {
@@ -7,13 +7,12 @@ var npm = require("./npm.js")
, readJson = require("read-package-json")
, lifecycle = require("./utils/lifecycle.js")
, chain = require("slide").chain
, Conf = require("./config/core.js").Conf
, CachingRegClient = require("./cache/caching-client.js")
, mapToRegistry = require("./utils/map-to-registry.js")
, cachedPackageRoot = require("./cache/cached-package-root.js")
, createReadStream = require("graceful-fs").createReadStream
, npa = require("npm-package-arg")
, semver = require('semver')
, getPublishConfig = require("./utils/get-publish-config.js")

publish.usage = "npm publish <tarball> [--tag <tagname>]"
+ "\nnpm publish <folder> [--tag <tagname>]"
@@ -83,22 +82,13 @@ function cacheAddPublish (dir, didPre, isRetry, cb) {
function publish_ (arg, data, isRetry, cachedir, cb) {
if (!data) return cb(new Error("no package.json file found"))

var registry = npm.registry
var config = npm.config

// check for publishConfig hash
if (data.publishConfig) {
config = new Conf(npm.config)
config.save = npm.config.save.bind(npm.config)

// don't modify the actual publishConfig object, in case we have
// to set a login token or some other data.
config.unshift(Object.keys(data.publishConfig).reduce(function (s, k) {
s[k] = data.publishConfig[k]
return s
}, {}))
registry = new CachingRegClient(config)
}
var mappedConfig = getPublishConfig(
data.publishConfig,
npm.config,
npm.registry
)
var config = mappedConfig.config
var registry = mappedConfig.client

data._npmVersion = npm.version
data._nodeVersion = process.versions.node
@@ -13,7 +13,6 @@ runScript.completion = function (opts, cb) {

// see if there's already a package specified.
var argv = opts.conf.argv.remain
, installedShallow = require("./utils/completion/installed-shallow.js")

if (argv.length >= 4) return cb()

@@ -41,33 +40,11 @@ runScript.completion = function (opts, cb) {
})
}

// complete against the installed-shallow, and the pwd's scripts.
// but only packages that have scripts
var installed
, scripts
installedShallow(opts, function (d) {
return d.scripts
}, function (er, inst) {
installed = inst
next()
})

if (npm.config.get("global")) {
scripts = []
next()
}
else readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
readJson(path.join(npm.localPrefix, "package.json"), function (er, d) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
d = d || {}
scripts = Object.keys(d.scripts || {})
next()
cb(null, Object.keys(d.scripts || {}))
})

function next () {
if (!installed || !scripts) return

cb(null, scripts.concat(installed))
}
}

function runScript (args, cb) {
@@ -2,11 +2,12 @@
module.exports = unpublish

var log = require("npmlog")
, npm = require("./npm.js")
, readJson = require("read-package-json")
, path = require("path")
, mapToRegistry = require("./utils/map-to-registry.js")
, npa = require("npm-package-arg")
var npm = require("./npm.js")
var readJson = require("read-package-json")
var path = require("path")
var mapToRegistry = require("./utils/map-to-registry.js")
var npa = require("npm-package-arg")
var getPublishConfig = require("./utils/get-publish-config.js")

unpublish.usage = "npm unpublish <project>[@<version>]"

@@ -71,34 +72,44 @@ function unpublish (args, cb) {
return readJson(cwdJson, function (er, data) {
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
if (er) return cb("Usage:\n" + unpublish.usage)
gotProject(data.name, data.version, cb)
log.verbose('unpublish', data)
gotProject(data.name, data.version, data.publishConfig, cb)
})
}
return gotProject(project, version, cb)
}

function gotProject (project, version, cb_) {
function gotProject (project, version, publishConfig, cb_) {
if (typeof cb_ !== 'function') {
cb_ = publishConfig
publishConfig = null
}

function cb (er) {
if (er) return cb_(er)
console.log("- " + project + (version ? "@" + version : ""))
cb_()
}

var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry)
var config = mappedConfig.config
var registry = mappedConfig.client

// remove from the cache first
npm.commands.cache(["clean", project, version], function (er) {
if (er) {
log.error("unpublish", "Failed to clean cache")
return cb(er)
}

mapToRegistry(project, npm.config, function (er, uri, auth) {
mapToRegistry(project, config, function (er, uri, auth) {
if (er) return cb(er)

var params = {
version : version,
auth : auth
version: version,
auth: auth
}
npm.registry.unpublish(uri, params, cb)
registry.unpublish(uri, params, cb)
})
})
}
@@ -0,0 +1,25 @@
var Conf = require('../config/core.js').Conf
var CachingRegClient = require('../cache/caching-client.js')
var log = require('npmlog')

module.exports = getPublishConfig

function getPublishConfig (publishConfig, defaultConfig, defaultClient) {
var config = defaultConfig
var client = defaultClient
log.verbose('getPublishConfig', publishConfig)
if (publishConfig) {
config = new Conf(defaultConfig)
config.save = defaultConfig.save.bind(defaultConfig)

// don't modify the actual publishConfig object, in case we have
// to set a login token or some other data.
config.unshift(Object.keys(publishConfig).reduce(function (s, k) {
s[k] = publishConfig[k]
return s
}, {}))
client = new CachingRegClient(config)
}

return { config: config, client: client }
}
@@ -155,7 +155,7 @@ function commit (version, hasShrinkwrap, cb) {
git.chainableExec([ "add", "package.json" ], options),
hasShrinkwrap && git.chainableExec([ "add", "npm-shrinkwrap.json" ] , options),
git.chainableExec([ "commit", "-m", message ], options),
git.chainableExec([ "tag", "v" + version, flag, message ], options)
git.chainableExec([ "tag", npm.config.get("tag-version-prefix") + version, flag, message ], options)
],
cb
)
@@ -1,4 +1,4 @@
.TH "NPM" "1" "April 2015" "" ""
.TH "NPM" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -1,4 +1,4 @@
.TH "NPM\-ACCESS" "1" "April 2015" "" ""
.TH "NPM\-ACCESS" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-ADDUSER" "1" "April 2015" "" ""
.TH "NPM\-ADDUSER" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BIN" "1" "April 2015" "" ""
.TH "NPM\-BIN" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUGS" "1" "April 2015" "" ""
.TH "NPM\-BUGS" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUILD" "1" "April 2015" "" ""
.TH "NPM\-BUILD" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
@@ -18,7 +18,14 @@ A folder containing a \fBpackage\.json\fR file in its root\.
.P
This is the plumbing command called by \fBnpm link\fR and \fBnpm install\fR\|\.
.P
It should generally not be called directly\.
It should generally be called during installation, but if you need to run it
directly, run:
.P
.RS 2
.nf
npm run\-script build
.fi
.RE
.SH SEE ALSO
.RS 0
.IP \(bu 2
@@ -1,4 +1,4 @@
.TH "NPM\-BUNDLE" "1" "April 2015" "" ""
.TH "NPM\-BUNDLE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-CACHE" "1" "April 2015" "" ""
.TH "NPM\-CACHE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-COMPLETION" "1" "April 2015" "" ""
.TH "NPM\-COMPLETION" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-CONFIG" "1" "April 2015" "" ""
.TH "NPM\-CONFIG" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DEDUPE" "1" "April 2015" "" ""
.TH "NPM\-DEDUPE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DEPRECATE" "1" "April 2015" "" ""
.TH "NPM\-DEPRECATE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DIST\-TAG" "1" "April 2015" "" ""
.TH "NPM\-DIST\-TAG" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DOCS" "1" "April 2015" "" ""
.TH "NPM\-DOCS" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EDIT" "1" "April 2015" "" ""
.TH "NPM\-EDIT" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EXPLORE" "1" "April 2015" "" ""
.TH "NPM\-EXPLORE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-HELP\-SEARCH" "1" "April 2015" "" ""
.TH "NPM\-HELP\-SEARCH" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-HELP" "1" "April 2015" "" ""
.TH "NPM\-HELP" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-INIT" "1" "April 2015" "" ""
.TH "NPM\-INIT" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL" "1" "April 2015" "" ""
.TH "NPM\-INSTALL" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LINK" "1" "April 2015" "" ""
.TH "NPM\-LINK" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LOGOUT" "1" "April 2015" "" ""
.TH "NPM\-LOGOUT" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LS" "1" "April 2015" "" ""
.TH "NPM\-LS" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -23,7 +23,7 @@ For example, running \fBnpm ls promzard\fR in npm's source tree will show:
.P
.RS 2
.nf
npm@2.8.4 /path/to/npm
npm@2.9.1 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -1,4 +1,4 @@
.TH "NPM\-OUTDATED" "1" "April 2015" "" ""
.TH "NPM\-OUTDATED" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-OWNER" "1" "April 2015" "" ""
.TH "NPM\-OWNER" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PACK" "1" "April 2015" "" ""
.TH "NPM\-PACK" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PREFIX" "1" "April 2015" "" ""
.TH "NPM\-PREFIX" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PRUNE" "1" "April 2015" "" ""
.TH "NPM\-PRUNE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PUBLISH" "1" "April 2015" "" ""
.TH "NPM\-PUBLISH" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REBUILD" "1" "April 2015" "" ""
.TH "NPM\-REBUILD" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REPO" "1" "April 2015" "" ""
.TH "NPM\-REPO" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RESTART" "1" "April 2015" "" ""
.TH "NPM\-RESTART" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RM" "1" "April 2015" "" ""
.TH "NPM\-RM" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-ROOT" "1" "April 2015" "" ""
.TH "NPM\-ROOT" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RUN\-SCRIPT" "1" "April 2015" "" ""
.TH "NPM\-RUN\-SCRIPT" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-SEARCH" "1" "April 2015" "" ""
.TH "NPM\-SEARCH" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-SHRINKWRAP" "1" "April 2015" "" ""
.TH "NPM\-SHRINKWRAP" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions
.SH SYNOPSIS
@@ -12,10 +12,10 @@ npm shrinkwrap
.P
This command locks down the versions of a package's dependencies so
that you can control exactly which versions of each dependency will be
used when your package is installed\. The "package\.json" file is still
required if you want to use "npm install"\.
used when your package is installed\. The \fBpackage\.json\fR file is still
required if you want to use \fBnpm install\fR\|\.
.P
By default, "npm install" recursively installs the target's
By default, \fBnpm install\fR recursively installs the target's
dependencies (as specified in package\.json), choosing the latest
available version that satisfies the dependency's semver pattern\. In
some situations, particularly when shipping software where each change
@@ -68,7 +68,7 @@ and package C:
.RE
.P
If these are the only versions of A, B, and C available in the
registry, then a normal "npm install A" will install:
registry, then a normal \fBnpm install A\fR will install:
.P
.RS 2
.nf
@@ -78,7 +78,7 @@ A@0\.1\.0
.fi
.RE
.P
However, if B@0\.0\.2 is published, then a fresh "npm install A" will
However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fR will
install:
.P
.RS 2
@@ -127,7 +127,7 @@ This generates npm\-shrinkwrap\.json, which will look something like this:
.RE
.P
The shrinkwrap command has locked down the dependencies based on
what's currently installed in node_modules\. When "npm install"
what's currently installed in node_modules\. When \fBnpm install\fR
installs a package with a npm\-shrinkwrap\.json file in the package
root, the shrinkwrap file (rather than package\.json files) completely
drives the installation of that package and all of its dependencies
@@ -138,30 +138,30 @@ files\.
.SS Using shrinkwrapped packages
.P
Using a shrinkwrapped package is no different than using any other
package: you can "npm install" it by hand, or add a dependency to your
package\.json file and "npm install" it\.
package: you can \fBnpm install\fR it by hand, or add a dependency to your
package\.json file and \fBnpm install\fR it\.
.SS Building shrinkwrapped packages
.P
To shrinkwrap an existing package:
.RS 0
.IP 1. 3
Run "npm install" in the package root to install the current
Run \fBnpm install\fR in the package root to install the current
versions of all dependencies\.
.IP 2. 3
Validate that the package works as expected with these versions\.
.IP 3. 3
Run "npm shrinkwrap", add npm\-shrinkwrap\.json to git, and publish
Run \fBnpm shrinkwrap\fR, add npm\-shrinkwrap\.json to git, and publish
your package\.

.RE
.P
To add or update a dependency in a shrinkwrapped package:
.RS 0
.IP 1. 3
Run "npm install" in the package root to install the current
Run \fBnpm install\fR in the package root to install the current
versions of all dependencies\.
.IP 2. 3
Add or update dependencies\. "npm install" each new or updated
Add or update dependencies\. \fBnpm install\fR each new or updated
package individually and then update package\.json\. Note that they
must be explicitly named in order to be installed: running \fBnpm
install\fR with no arguments will merely reproduce the existing
@@ -170,7 +170,7 @@ shrinkwrap\.
Validate that the package works as expected with the new
dependencies\.
.IP 4. 3
Run "npm shrinkwrap", commit the new npm\-shrinkwrap\.json, and
Run \fBnpm shrinkwrap\fR, commit the new npm\-shrinkwrap\.json, and
publish your package\.

.RE
@@ -180,13 +180,13 @@ available\.
.SS Other Notes
.P
A shrinkwrap file must be consistent with the package's package\.json
file\. "npm shrinkwrap" will fail if required dependencies are not
file\. \fBnpm shrinkwrap\fR will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
wouldn't actually work\. Similarly, the command will fail if there are
extraneous packages (not referenced by package\.json), since that would
indicate that package\.json is not correct\.
.P
Since "npm shrinkwrap" is intended to lock down your dependencies for
Since \fBnpm shrinkwrap\fR is intended to lock down your dependencies for
production use, \fBdevDependencies\fR will not be included unless you
explicitly set the \fB\-\-dev\fR flag when you run \fBnpm shrinkwrap\fR\|\. If
installed \fBdevDependencies\fR are excluded, then npm will print a
@@ -1,4 +1,4 @@
.TH "NPM\-STAR" "1" "April 2015" "" ""
.TH "NPM\-STAR" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-STARS" "1" "April 2015" "" ""
.TH "NPM\-STARS" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-START" "1" "April 2015" "" ""
.TH "NPM\-START" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-STOP" "1" "April 2015" "" ""
.TH "NPM\-STOP" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-TAG" "1" "April 2015" "" ""
.TH "NPM\-TAG" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-TEST" "1" "April 2015" "" ""
.TH "NPM\-TEST" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RM" "1" "April 2015" "" ""
.TH "NPM\-RM" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-rm\fR \- Remove a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-UNPUBLISH" "1" "April 2015" "" ""
.TH "NPM\-UNPUBLISH" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-UPDATE" "1" "April 2015" "" ""
.TH "NPM\-UPDATE" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-VERSION" "1" "April 2015" "" ""
.TH "NPM\-VERSION" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-VIEW" "1" "April 2015" "" ""
.TH "NPM\-VIEW" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-WHOAMI" "1" "April 2015" "" ""
.TH "NPM\-WHOAMI" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM" "1" "April 2015" "" ""
.TH "NPM" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
2.8.4
2.9.1
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
@@ -1,4 +1,4 @@
.TH "NPM\-BIN" "3" "April 2015" "" ""
.TH "NPM\-BIN" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-BUGS" "3" "April 2015" "" ""
.TH "NPM\-BUGS" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-CACHE" "3" "April 2015" "" ""
.TH "NPM\-CACHE" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-cache\fR \- manage the npm cache programmatically
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-COMMANDS" "3" "April 2015" "" ""
.TH "NPM\-COMMANDS" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-commands\fR \- npm commands
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-CONFIG" "3" "April 2015" "" ""
.TH "NPM\-CONFIG" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DEPRECATE" "3" "April 2015" "" ""
.TH "NPM\-DEPRECATE" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-DOCS" "3" "April 2015" "" ""
.TH "NPM\-DOCS" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EDIT" "3" "April 2015" "" ""
.TH "NPM\-EDIT" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-EXPLORE" "3" "April 2015" "" ""
.TH "NPM\-EXPLORE" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-HELP\-SEARCH" "3" "April 2015" "" ""
.TH "NPM\-HELP\-SEARCH" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search the help pages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM" "" "April 2015" "" ""
.TH "NPM" "" "May 2015" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-INSTALL" "3" "April 2015" "" ""
.TH "NPM\-INSTALL" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- install a package programmatically
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LINK" "3" "April 2015" "" ""
.TH "NPM\-LINK" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LOAD" "3" "April 2015" "" ""
.TH "NPM\-LOAD" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-load\fR \- Load config settings
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-LS" "3" "April 2015" "" ""
.TH "NPM\-LS" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-OUTDATED" "3" "April 2015" "" ""
.TH "NPM\-OUTDATED" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-OWNER" "3" "April 2015" "" ""
.TH "NPM\-OWNER" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PACK" "3" "April 2015" "" ""
.TH "NPM\-PACK" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PREFIX" "3" "April 2015" "" ""
.TH "NPM\-PREFIX" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PRUNE" "3" "April 2015" "" ""
.TH "NPM\-PRUNE" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-PUBLISH" "3" "April 2015" "" ""
.TH "NPM\-PUBLISH" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REBUILD" "3" "April 2015" "" ""
.TH "NPM\-REBUILD" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-REPO" "3" "April 2015" "" ""
.TH "NPM\-REPO" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RESTART" "3" "April 2015" "" ""
.TH "NPM\-RESTART" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-ROOT" "3" "April 2015" "" ""
.TH "NPM\-ROOT" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-RUN\-SCRIPT" "3" "April 2015" "" ""
.TH "NPM\-RUN\-SCRIPT" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-SEARCH" "3" "April 2015" "" ""
.TH "NPM\-SEARCH" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-SHRINKWRAP" "3" "April 2015" "" ""
.TH "NPM\-SHRINKWRAP" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-START" "3" "April 2015" "" ""
.TH "NPM\-START" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-STOP" "3" "April 2015" "" ""
.TH "NPM\-STOP" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-TAG" "3" "April 2015" "" ""
.TH "NPM\-TAG" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-TEST" "3" "April 2015" "" ""
.TH "NPM\-TEST" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-UNINSTALL" "3" "April 2015" "" ""
.TH "NPM\-UNINSTALL" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- uninstall a package programmatically
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-UNPUBLISH" "3" "April 2015" "" ""
.TH "NPM\-UNPUBLISH" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-UPDATE" "3" "April 2015" "" ""
.TH "NPM\-UPDATE" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -8,7 +8,7 @@
npm\.commands\.update(packages, callback)
.fi
.RE
.TH "DESCRIPTION" "" "April 2015" "" ""
.TH "DESCRIPTION" "" "May 2015" "" ""
.SH "NAME"
\fBDESCRIPTION\fR
.P
@@ -1,4 +1,4 @@
.TH "NPM\-VERSION" "3" "April 2015" "" ""
.TH "NPM\-VERSION" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-VIEW" "3" "April 2015" "" ""
.TH "NPM\-VIEW" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-WHOAMI" "3" "April 2015" "" ""
.TH "NPM\-WHOAMI" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM" "3" "April 2015" "" ""
.TH "NPM" "3" "May 2015" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -20,7 +20,7 @@ npm\.load([configObject, ]function (er, npm) {
.RE
.SH VERSION
.P
2.8.4
2.9.1
.SH DESCRIPTION
.P
This is the API documentation for npm\.
@@ -1,4 +1,4 @@
.TH "NPM\-FOLDERS" "5" "April 2015" "" ""
.TH "NPM\-FOLDERS" "5" "May 2015" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-FOLDERS" "5" "April 2015" "" ""
.TH "NPM\-FOLDERS" "5" "May 2015" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "PACKAGE\.JSON" "5" "April 2015" "" ""
.TH "PACKAGE\.JSON" "5" "May 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -16,17 +16,32 @@ them\. The name and version together form an identifier that is assumed
to be completely unique\. Changes to the package should come along with
changes to the version\.
.P
The name is what your thing is called\. Some tips:
The name is what your thing is called\.
.P
Some rules:
.RS 0
.IP \(bu 2
The name must be shorter than 214 characters\. This includes the scope for
scoped packages\.
.IP \(bu 2
The name can't start with a dot or an underscore\.
.IP \(bu 2
New packages must not have uppercase letters in the name\.
.IP \(bu 2
The name ends up being part of a URL, an argument on the command line, and a
folder name\. Therefore, the name can't contain any non\-URL\-safe characters\.

.RE
.P
Some tips:
.RS 0
.IP \(bu 2
Don't use the same name as a core Node module\.
.IP \(bu 2
Don't put "js" or "node" in the name\. It's assumed that it's js, since you're
writing a package\.json file, and you can specify the engine using the "engines"
field\. (See below\.)
.IP \(bu 2
The name ends up being part of a URL, an argument on the command line, and a
folder name\. Any name with non\-url\-safe characters will be rejected\.
Also, it can't start with a dot or an underscore\.
.IP \(bu 2
The name will probably be passed as an argument to require(), so it should
be something short, but also reasonably descriptive\.
.IP \(bu 2
@@ -1,4 +1,4 @@
.TH "NPMRC" "5" "April 2015" "" ""
.TH "NPMRC" "5" "May 2015" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
@@ -19,7 +19,7 @@ per\-project config file (/path/to/my/project/\.npmrc)
.IP \(bu 2
per\-user config file (~/\.npmrc)
.IP \(bu 2
global config file ($PREFIX/npmrc)
global config file ($PREFIX/etc/npmrc)
.IP \(bu 2
npm builtin config file (/path/to/npm/npmrc)

@@ -1,4 +1,4 @@
.TH "PACKAGE\.JSON" "5" "April 2015" "" ""
.TH "PACKAGE\.JSON" "5" "May 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -16,17 +16,32 @@ them\. The name and version together form an identifier that is assumed
to be completely unique\. Changes to the package should come along with
changes to the version\.
.P
The name is what your thing is called\. Some tips:
The name is what your thing is called\.
.P
Some rules:
.RS 0
.IP \(bu 2
The name must be shorter than 214 characters\. This includes the scope for
scoped packages\.
.IP \(bu 2
The name can't start with a dot or an underscore\.
.IP \(bu 2
New packages must not have uppercase letters in the name\.
.IP \(bu 2
The name ends up being part of a URL, an argument on the command line, and a
folder name\. Therefore, the name can't contain any non\-URL\-safe characters\.

.RE
.P
Some tips:
.RS 0
.IP \(bu 2
Don't use the same name as a core Node module\.
.IP \(bu 2
Don't put "js" or "node" in the name\. It's assumed that it's js, since you're
writing a package\.json file, and you can specify the engine using the "engines"
field\. (See below\.)
.IP \(bu 2
The name ends up being part of a URL, an argument on the command line, and a
folder name\. Any name with non\-url\-safe characters will be rejected\.
Also, it can't start with a dot or an underscore\.
.IP \(bu 2
The name will probably be passed as an argument to require(), so it should
be something short, but also reasonably descriptive\.
.IP \(bu 2
@@ -1,4 +1,4 @@
.TH "NPM\-CODING\-STYLE" "7" "April 2015" "" ""
.TH "NPM\-CODING\-STYLE" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-CONFIG" "7" "April 2015" "" ""
.TH "NPM\-CONFIG" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -1101,6 +1101,22 @@ it will install the specified tag\.
.P
Also the tag that is added to the package@version specified by the \fBnpm
tag\fR command, if no explicit tag is given\.
.SS tag\-version\-prefix
.RS 0
.IP \(bu 2
Default: \fB"v"\fR
.IP \(bu 2
Type: String

.RE
.P
If set, alters the prefix used when tagging a new version when performing a
version increment using \fBnpm\-version\fR\|\. To remove the prefix altogether, set it
to the empty string: \fB""\fR\|\.
.P
Because other tools may rely on the convention that npm version tags look like
\fBv1\.0\.0\fR, \fIonly use this property if it is absolutely necessary\fR\|\. In
particular, use care when overriding this setting for public packages\.
.SS tmp
.RS 0
.IP \(bu 2
@@ -1,4 +1,4 @@
.TH "NPM\-DEVELOPERS" "7" "April 2015" "" ""
.TH "NPM\-DEVELOPERS" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-DISPUTES" "7" "April 2015" "" ""
.TH "NPM\-DISPUTES" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "NPM\-FAQ" "7" "April 2015" "" ""
.TH "NPM\-FAQ" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-faq\fR \- Frequently Asked Questions
.SH Where can I find these docs in HTML?
@@ -1,4 +1,4 @@
.TH "NPM\-INDEX" "7" "April 2015" "" ""
.TH "NPM\-INDEX" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
@@ -1,4 +1,4 @@
.TH "NPM\-REGISTRY" "7" "April 2015" "" ""
.TH "NPM\-REGISTRY" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-SCOPE" "7" "April 2015" "" ""
.TH "NPM\-SCOPE" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
@@ -17,9 +17,9 @@ followed by a slash, e\.g\.
Scopes are a way of grouping related packages together, and also affect a few
things about the way npm treats the package\.
.P
\fBAs of 2014\-09\-03, scoped packages are not supported by the public npm registry\fR\|\.
However, the npm client is backwards\-compatible with un\-scoped registries, so
it can be used to work with scoped and un\-scoped registries at the same time\.
Scoped packages are supported by the public npm registry\. The npm
client is backwards\-compatible with un\-scoped registries, so it can be
used to work with scoped and un\-scoped registries at the same time\.
.SH Installing scoped packages
.P
Scoped packages are installed to a sub\-folder of the regular installation
@@ -64,10 +64,27 @@ There is nothing special about the way Node treats scope folders, this is
just specifying to require the module \fBmypackage\fR in the folder called \fB@myorg\fR\|\.
.SH Publishing scoped packages
.P
Scoped packages can be published to any registry that supports them\.
\fIAs of 2014\-09\-03, the public npm registry does not support scoped packages\fR,
so attempting to publish a scoped package to the registry will fail unless
you have associated that scope with a different registry, see below\.
Scoped packages can be published to any registry that supports them, including
the public npm registry\.
.P
(As of 2015\-04\-19, the public npm registry \fBdoes\fR support scoped packages)
.P
If you wish, you may associate a scope with a registry; see below\.
.SS Publishing public scoped packages to the public npm registry
.P
To publish a public scoped package, you must specify \fB\-\-access public\fR with
the initial publication\. This will publish the package and set access
to \fBpublic\fR as if you had run \fBnpm access public\fR after publishing\.
.SS Publishing private scoped packages to the npm registry
.P
To publish a private scoped package to the npm registry, you must have
an npm Private Modules \fIhttps://www\.npmjs\.com/private\-modules\fR
account\.
.P
You can then publish the module with \fBnpm publish\fR or \fBnpm publish
\-\-access restricted\fR, and it will be present in the npm registry, with
restricted access\. You can then change the access permissions, if
desired, with \fBnpm access\fR or on the npmjs\.com website\.
.SH Associating a scope with a registry
.P
Scopes can be associated with a separate registry\. This allows you to
@@ -103,6 +120,8 @@ that registry instead\.
npm help install
.IP \(bu 2
npm help publish
.IP \(bu 2
npm help access

.RE

@@ -1,4 +1,4 @@
.TH "NPM\-SCRIPTS" "7" "April 2015" "" ""
.TH "NPM\-SCRIPTS" "7" "May 2015" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
@@ -1,4 +1,4 @@
.TH "NPM\-REMOVAL" "1" "April 2015" "" ""
.TH "NPM\-REMOVAL" "1" "May 2015" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
@@ -1,4 +1,4 @@
.TH "SEMVER" "7" "April 2015" "" ""
.TH "SEMVER" "7" "May 2015" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
{
"version": "2.8.4",
"version": "2.9.1",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -19,7 +19,6 @@
"url": "https://github.com/npm/npm"
},
"bugs": {
"email": "npm-@googlegroups.com",
"url": "http://github.com/npm/npm/issues"
},
"directories": {
@@ -46,7 +45,7 @@
"columnify": "~1.5.1",
"config-chain": "~1.1.8",
"dezalgo": "~1.0.1",
"editor": "~0.1.0",
"editor": "~1.0.0",
"fs-vacuum": "~1.2.5",
"fs-write-stream-atomic": "~1.0.2",
"fstream": "~1.0.4",
@@ -59,10 +58,10 @@
"inflight": "~1.0.4",
"inherits": "~2.0.1",
"ini": "~1.3.3",
"init-package-json": "~1.4.1",
"init-package-json": "~1.4.2",
"lockfile": "~1.0.0",
"lru-cache": "~2.6.1",
"minimatch": "~2.0.4",
"lru-cache": "~2.6.2",
"minimatch": "~2.0.7",
"mkdirp": "~0.5.0",
"node-gyp": "~1.0.3",
"nopt": "~3.0.1",
@@ -71,7 +70,7 @@
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.5",
"npm-package-arg": "~4.0.0",
"npm-registry-client": "~6.3.2",
"npm-registry-client": "~6.3.3",
"npm-user-validate": "~0.1.1",
"npmlog": "~1.2.0",
"once": "~1.3.1",
@@ -85,7 +84,7 @@
"realize-package-specifier": "~3.0.0",
"request": "~2.55.0",
"retry": "~0.6.1",
"rimraf": "~2.3.2",
"rimraf": "~2.3.3",
"semver": "~4.3.3",
"sha": "~1.3.0",
"slide": "~1.1.6",
@@ -169,9 +168,10 @@
"write-file-atomic"
],
"devDependencies": {
"deep-equal": "~1.0.0",
"marked": "~0.3.3",
"marked-man": "~0.1.4",
"nock": "~1.6.0",
"nock": "~1.7.1",
"npm-registry-couchapp": "~2.6.7",
"npm-registry-mock": "~1.0.0",
"require-inject": "~1.2.0",
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,17 @@
var path = require("path")
var test = require("tap").test
var common = require("../common-tap.js")
var opts = { cwd: __dirname }
var binDir = "../../node_modules/.bin"
var fixture = path.resolve(binDir)

test('npm bin', function (t) {
common.npm(["bin"], opts, function (err, code, stdout, stderr) {
t.ifError(err, "bin ran without issue")
t.notOk(stderr, "should have no stderr")
t.equal(code, 0, "exit ok")
var res = path.resolve(stdout)
t.equal(res, fixture + "\n")
t.end()
})
})
@@ -0,0 +1,212 @@
var execFile = require('child_process').execFile
var path = require('path')
var zlib = require('zlib')

var asyncMap = require('slide').asyncMap
var deepEqual = require('deep-equal')
var fs = require('graceful-fs')
var mkdirp = require('mkdirp')
var once = require('once')
var requireInject = require('require-inject')
var rimraf = require('rimraf')
var tar = require('tar')
var test = require('tap').test
var tmpdir = require('osenv').tmpdir
var which = require('which')

var wd = path.resolve(tmpdir(), 'git-races')
var fixtures = path.resolve(__dirname, '../fixtures')
var testcase = 'github-com-BryanDonovan-npm-git-test'
var testcase_git = path.resolve(wd, testcase + '.git')
var testcase_path = path.resolve(wd, testcase)
var testcase_tgz = path.resolve(fixtures, testcase + '.git.tar.gz')

var testtarballs = []
var testrepos = {}
var testurls = {}

/*
This test is specifically for #7202, where the bug was if you tried installing multiple git urls that
pointed at the same repo but had different comittishes, you'd sometimes get the wrong version.
The test cases, provided by @BryanDonovan, have a dependency tree like this:

top
bar#4.0.0
buzz#3.0.0
foo#3.0.0
buzz#3.0.0
foo#4.0.0
buzz#2.0.0

But what would happen is that buzz#2.0.0 would end up installed under bar#4.0.0.

bar#4.0.0 shouldn't have gotten its own copy if buzz, and if it did, it shouldn've been buzz#3.0.0
*/

;['bar', 'foo', 'buzz'].forEach(function (name) {
var mockurl = 'ssh://git@github.com/BryanDonovan/dummy-npm-' + name + '.git'
var realrepo = path.resolve(wd, 'github-com-BryanDonovan-dummy-npm-' + name + '.git')
var tgz = path.resolve(fixtures, 'github-com-BryanDonovan-dummy-npm-' + name + '.git.tar.gz')

testrepos[mockurl] = realrepo
testtarballs.push(tgz)
})

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

var npm = requireInject.installGlobally('../../lib/npm.js', {
'child_process': {
'execFile': function (cmd, args, options, cb) {
// If it's a clone we swap any requests for any of the urls we're mocking
// with the path to the bare repo
if (args[0] === 'clone') {
var m2 = args.length - 2
var m1 = args.length - 1
if (testrepos[args[m2]]) {
testurls[args[m1]] = args[m2]
args[m2] = testrepos[args[m2]]
}
execFile(cmd, args, options, cb)
// here, we intercept npm validating the remote origin url on one of the
// clones we've done previously and return the original url that was requested
} else if (args[0] === 'config' && args[1] === '--get' && args[2] === 'remote.origin.url') {
process.nextTick(function () {
cb(null, testurls[options.cwd], '')
})
} else {
execFile(cmd, args, options, cb)
}
}
}
})

function extract (tarball, target, cb) {
cb = once(cb)
fs.createReadStream(tarball).on('error', function (er) { cb(er) })
.pipe(zlib.createGunzip()).on('error', function (er) { cb(er) })
.pipe(tar.Extract({path: target})).on('error', function (er) { cb(er) })
.on('end', function () {
cb()
})
}

// Copied from lib/utils/git, because we need to use
// it before calling npm.load and lib/utils/git uses npm.js
// which doesn't allow that. =( =(

function prefixGitArgs () {
return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : []
}

var gitcmd

function execGit (args, options, cb) {
var fullArgs = prefixGitArgs().concat(args || [])
return execFile(gitcmd, fullArgs, options, cb)
}

function gitWhichAndExec (args, options, cb) {
if (gitcmd) return execGit(args, options, cb)

which('git', function (err, pathtogit) {
if (err) {
err.code = 'ENOGIT'
return cb(err)
}
gitcmd = pathtogit

execGit(args, options, cb)
})
}

function andClone (gitdir, repodir, cb) {
return function (er) {
if (er) return cb(er)
gitWhichAndExec(['clone', gitdir, repodir], {}, cb)
}
}

function setup (cb) {
cleanup()
mkdirp.sync(wd)

extract(testcase_tgz, wd, andClone(testcase_git, testcase_path, andExtractPackages))

function andExtractPackages (er) {
if (er) return cb(er)
asyncMap(testtarballs, function (tgz, done) {
extract(tgz, wd, done)
}, andChdir)
}
function andChdir (er) {
if (er) return cb(er)
process.chdir(testcase_path)
andLoadNpm()
}
function andLoadNpm () {
var opts = {
cache: path.resolve(wd, 'cache')
}
npm.load(opts, cb)
}
}

test('setup', function (t) {
setup(function (er) {
t.ifError(er, 'setup ran OK')
t.end()
})
})

// there are two (sic) valid trees that can result we don't care which one we
// get in npm@2
var oneTree = [
'npm-git-test@1.0.0', [
['dummy-npm-bar@4.0.0', [
['dummy-npm-foo@3.0.0', []]
]],
['dummy-npm-buzz@3.0.0', []],
['dummy-npm-foo@4.0.0', [
['dummy-npm-buzz@2.0.0', []]
]]
]
]
var otherTree = [
'npm-git-test@1.0.0', [
['dummy-npm-bar@4.0.0', [
['dummy-npm-buzz@3.0.0', []],
['dummy-npm-foo@3.0.0', []]
]],
['dummy-npm-buzz@3.0.0', []],
['dummy-npm-foo@4.0.0', [
['dummy-npm-buzz@2.0.0', []]
]]
]
]

test('correct versions are installed for git dependency', function (t) {
t.plan(4)
t.comment('test for https://github.com/npm/npm/issues/7202')
npm.commands.install([], function (er) {
t.ifError(er, 'installed OK')
npm.commands.ls([], true, function (er, result) {
t.ifError(er, 'ls OK')
var simplified = toSimple(result)
t.ok(
deepEqual(simplified, oneTree) || deepEqual(simplified, otherTree),
'install tree is correct'
)
})
})
})

function toSimple (tree) {
var deps = []
Object.keys(tree.dependencies || {}).forEach(function (dep) {
deps.push(toSimple(tree.dependencies[dep]))
})
return [ tree['name'] + '@' + tree['version'], deps ]
}
@@ -0,0 +1,109 @@
var fs = require('fs')
var path = require('path')

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

var common = require('../common-tap.js')
var server

var pkg = path.join(__dirname, 'install-noargs-dev')

var EXEC_OPTS = { cwd: pkg }

var PACKAGE_JSON1 = {
name: 'install-noargs-dev',
version: '0.0.1',
devDependencies: {
'underscore': '1.3.1'
}
}

var PACKAGE_JSON2 = {
name: 'install-noargs-dev',
version: '0.0.2',
devDependencies: {
'underscore': '1.5.1'
}
}

test('setup', function (t) {
setup()
mr({ port: common.port }, function (er, s) {
t.ifError(er, 'started mock registry')
server = s
t.end()
})
})

test('install noargs installs devDependencies', function (t) {
common.npm(
[
'--registry', common.registry,
'--loglevel', 'silent',
'install'
],
EXEC_OPTS,
function (err, code) {
t.ifError(err, 'npm install ran without issue')
t.notOk(code, 'npm install exited with code 0')

var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
var pkgJson = JSON.parse(fs.readFileSync(p))

t.equal(pkgJson.version, '1.3.1')
t.end()
}
)
})

test('install noargs installs updated devDependencies', function (t) {
fs.writeFileSync(
path.join(pkg, 'package.json'),
JSON.stringify(PACKAGE_JSON2, null, 2)
)

common.npm(
[
'--registry', common.registry,
'--loglevel', 'silent',
'install'
],
EXEC_OPTS,
function (err, code) {
t.ifError(err, 'npm install ran without issue')
t.notOk(code, 'npm install exited with code 0')

var p = path.join(pkg, 'node_modules', 'underscore', 'package.json')
var pkgJson = JSON.parse(fs.readFileSync(p))

t.equal(pkgJson.version, '1.5.1')
t.end()
}
)
})

test('cleanup', function (t) {
server.close()
cleanup()
t.end()
})

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

function setup () {
cleanup()
mkdirp.sync(path.resolve(pkg, 'node_modules'))
fs.writeFileSync(
path.join(pkg, 'package.json'),
JSON.stringify(PACKAGE_JSON1, null, 2)
)

process.chdir(pkg)
}
@@ -0,0 +1,193 @@
var common = require('../common-tap.js')
var test = require('tap').test
var npm = require('../../')
var rimraf = require('rimraf')
var path = require('path')
var mr = require('npm-registry-mock')
var osenv = require('osenv')
var mkdirp = require('mkdirp')
var fs = require('graceful-fs')

var pkg = path.resolve(__dirname, 'outdated-local')
var pkgLocal = path.resolve(pkg, 'local-module')
var pkgScopedLocal = path.resolve(pkg, 'another-local-module')
var pkgLocalUnderscore = path.resolve(pkg, 'underscore')
var pkgLocalOptimist = path.resolve(pkg, 'optimist')

function mocks (server) {
server.get('/local-module')
.reply(404)
server.get('/@scoped%2fanother-local-module')
.reply(404)
}

test('setup', function (t) {
bootstrap()
t.end()
})

test('outdated support local modules', function (t) {
t.plan(4)
process.chdir(pkg)
mr({ port: common.port, plugin: mocks }, function (err, s) {
t.ifError(err, 'mock registry started without problems')

function verify (actual, expected) {
for (var i = 0; i < expected.length; i++) {
var current = expected[i]

var found = false
for (var j = 0; j < actual.length; j++) {
var target = actual[j]

var k
for (k = 0; k < current.length; k++) {
if (current[k] !== target[k]) break
}
if (k === current.length) found = true
}

if (!found) return false
}

return true
}

npm.load(
{
loglevel: 'silent',
parseable: true,
registry: common.registry
},
function () {
npm.install('.', function (err) {
t.ifError(err, 'install success')
bumpLocalModules()
npm.outdated(function (er, d) {
t.ifError(er, 'outdated success')
t.ok(verify(d, [
[
path.resolve(__dirname, 'outdated-local'),
'local-module',
'1.0.0',
'1.1.0',
'1.1.0',
'file:local-module'
],
[
path.resolve(__dirname, 'outdated-local'),
'@scoped/another-local-module',
'1.0.0',
'1.2.0',
'1.2.0',
'file:another-local-module'
],
[
path.resolve(__dirname, 'outdated-local'),
'underscore',
'1.3.1',
'1.6.1',
'1.5.1',
'file:underscore'
],
[
path.resolve(__dirname, 'outdated-local'),
'optimist',
'0.4.0',
'0.6.0',
'0.6.0',
'optimist@0.6.0'
]
]), 'got expected outdated output')
s.close()
})
})
}
)
})
})

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

var pjParent = JSON.stringify({
name: 'outdated-local',
version: '1.0.0',
dependencies: {
'local-module': 'file:local-module', // updated locally, not on repo
'@scoped/another-local-module': 'file:another-local-module', // updated locally, scoped, not on repo
'underscore': 'file:underscore', // updated locally, updated but lesser version on repo
'optimist': 'file:optimist' // updated locally, updated and greater version on repo
}
}, null, 2) + '\n'

var pjLocal = JSON.stringify({
name: 'local-module',
version: '1.0.0'
}, null, 2) + '\n'

var pjLocalBumped = JSON.stringify({
name: 'local-module',
version: '1.1.0'
}, null, 2) + '\n'

var pjScopedLocal = JSON.stringify({
name: '@scoped/another-local-module',
version: '1.0.0'
}, null, 2) + '\n'

var pjScopedLocalBumped = JSON.stringify({
name: '@scoped/another-local-module',
version: '1.2.0'
}, null, 2) + '\n'

var pjLocalUnderscore = JSON.stringify({
name: 'underscore',
version: '1.3.1'
}, null, 2) + '\n'

var pjLocalUnderscoreBumped = JSON.stringify({
name: 'underscore',
version: '1.6.1'
}, null, 2) + '\n'

var pjLocalOptimist = JSON.stringify({
name: 'optimist',
version: '0.4.0'
}, null, 2) + '\n'

var pjLocalOptimistBumped = JSON.stringify({
name: 'optimist',
version: '0.5.0'
}, null, 2) + '\n'

function bootstrap () {
mkdirp.sync(pkg)
fs.writeFileSync(path.resolve(pkg, 'package.json'), pjParent)

mkdirp.sync(pkgLocal)
fs.writeFileSync(path.resolve(pkgLocal, 'package.json'), pjLocal)

mkdirp.sync(pkgScopedLocal)
fs.writeFileSync(path.resolve(pkgScopedLocal, 'package.json'), pjScopedLocal)

mkdirp.sync(pkgLocalUnderscore)
fs.writeFileSync(path.resolve(pkgLocalUnderscore, 'package.json'), pjLocalUnderscore)

mkdirp.sync(pkgLocalOptimist)
fs.writeFileSync(path.resolve(pkgLocalOptimist, 'package.json'), pjLocalOptimist)
}

function bumpLocalModules () {
fs.writeFileSync(path.resolve(pkgLocal, 'package.json'), pjLocalBumped)
fs.writeFileSync(path.resolve(pkgScopedLocal, 'package.json'), pjScopedLocalBumped)
fs.writeFileSync(path.resolve(pkgLocalUnderscore, 'package.json'), pjLocalUnderscoreBumped)
fs.writeFileSync(path.resolve(pkgLocalOptimist, 'package.json'), pjLocalOptimistBumped)
}

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