npm-registry-client
Advanced tools
Comparing version 6.0.3 to 6.0.4
@@ -21,6 +21,5 @@ module.exports = publish | ||
var access = params.access | ||
assert(access && typeof access === "string", "must pass access for package") | ||
assert( | ||
["public", "restricted"].indexOf(access) !== -1, | ||
"access level must be either 'public' or 'restricted'" | ||
(!access) || ["public", "restricted"].indexOf(access) !== -1, | ||
"if present, access level must be either 'public' or 'restricted'" | ||
) | ||
@@ -72,3 +71,2 @@ | ||
, description : data.description | ||
, access : access | ||
, "dist-tags" : {} | ||
@@ -79,2 +77,4 @@ , versions : {} | ||
if (access) root.access = access | ||
if (!auth.token) { | ||
@@ -81,0 +81,0 @@ root.maintainers = [{name : auth.username, email : auth.email}] |
@@ -5,3 +5,3 @@ { | ||
"description": "Client for the npm registry", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "url": "git://github.com/isaacs/npm-registry-client" |
@@ -74,15 +74,2 @@ var test = require("tap").test | ||
metadata : METADATA, | ||
body : BODY, | ||
auth : AUTH | ||
} | ||
client.publish(URI, params, nop) | ||
}, | ||
{ name : "AssertionError", message : "must pass access for package" }, | ||
"params must include access for package" | ||
) | ||
t.throws( | ||
function () { | ||
var params = { | ||
metadata : METADATA, | ||
access : ACCESS, | ||
@@ -136,3 +123,3 @@ auth : AUTH | ||
name : "AssertionError", | ||
message : "access level must be either 'public' or 'restricted'" | ||
message : "if present, access level must be either 'public' or 'restricted'" | ||
}, | ||
@@ -139,0 +126,0 @@ "access level must be 'public' or 'restricted'" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
311604
4371