Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib/publish.js')
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/publish.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js
index a6de802105a..11aa599e617 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/publish.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js
@@ -4,8 +4,7 @@ module.exports = publish
var path = require("path")
, url = require("url")
-function publish (data, tarball, readme, cb) {
- if (typeof cb !== "function") cb = readme, readme = ""
+function publish (data, tarball, cb) {
if (!this.email || !this.auth || !this.username) {
return cb(new Error("auth and email required for publishing"))
@@ -18,15 +17,13 @@ function publish (data, tarball, readme, cb) {
// PUT the data to {config.registry}/{data.name}/{data.version}
var registry = this.registry
- readme = readme ? "" + readme : ""
-
var fullData =
{ _id : data.name
, name : data.name
, description : data.description
, "dist-tags" : {}
, versions : {}
- , readme: readme
+ , readme: data.readme || ""
, maintainers :
[ { name : this.username
, email : this.email
@@ -72,12 +69,6 @@ function publish (data, tarball, readme, cb) {
var exists = fullData.versions && fullData.versions[data.version]
if (exists) return cb(conflictError.call(this, data._id))
- // this way, it'll also get attached to packages that were previously
- // published with a version of npm that lacked this feature.
- if (!fullData.readme) {
- data.readme = readme
- }
-
this.request("PUT", dataURI, data, function (er) {
if (er) {
if (er.message.indexOf("conflict Document update conflict.") === 0) {