Skip to content

Commit e2a4d83

Browse files
committed
Allow adding/removing tags by anonymous users
1 parent 14efa68 commit e2a4d83

File tree

6 files changed

+4
-37
lines changed

6 files changed

+4
-37
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# npm-registry-client
1+
# anonymous-npm-registry-client
22

33
The code that npm uses to talk to the registry.
44

lib/dist-tags/add.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ function add (uri, params, cb) {
2525
typeof params.version === 'string',
2626
'must pass version to be mapped to distTag to distTags.add'
2727
)
28-
assert(
29-
params.auth && typeof params.auth === 'object',
30-
'must pass auth to distTags.add'
31-
)
3228

3329
var p = npa(params.package)
3430
var pkg = p.scope ? params.package.replace('/', '%2f') : params.package

lib/dist-tags/rm.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ function rm (uri, params, cb) {
2121
typeof params.distTag === 'string',
2222
'must pass package distTag name to distTags.rm'
2323
)
24-
assert(
25-
params.auth && typeof params.auth === 'object',
26-
'must pass auth to distTags.rm'
27-
)
2824

2925
var p = npa(params.package)
3026
var pkg = p.scope ? params.package.replace('/', '%2f') : params.package

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
3-
"name": "npm-registry-client",
3+
"name": "anonymous-npm-registry-client",
44
"description": "Client for the npm registry",
5-
"version": "8.6.0",
5+
"version": "0.1.0",
66
"repository": {
7-
"url": "https://github.com/npm/npm-registry-client.git"
7+
"url": "https://github.com/zkochan/anonymous-npm-registry-client.git"
88
},
99
"main": "index.js",
1010
"scripts": {

test/dist-tags-add.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,6 @@ test('distTags.add call contract', function (t) {
9595
'distTags.add must include version'
9696
)
9797

98-
t.throws(
99-
function () {
100-
var params = {
101-
'package': PACKAGE,
102-
distTag: DIST_TAG,
103-
version: VERSION
104-
}
105-
client.distTags.add(BASE_URL, params, nop)
106-
},
107-
{ name: 'AssertionError', message: 'must pass auth to distTags.add' },
108-
'distTags.add must include auth'
109-
)
110-
11198
t.end()
11299
})
113100

test/dist-tags-rm.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,6 @@ test('distTags.rm call contract', function (t) {
7575
'distTags.rm must include dist-tag'
7676
)
7777

78-
t.throws(
79-
function () {
80-
var params = {
81-
'package': PACKAGE,
82-
distTag: DIST_TAG
83-
}
84-
client.distTags.rm(BASE_URL, params, nop)
85-
},
86-
{ name: 'AssertionError', message: 'must pass auth to distTags.rm' },
87-
'distTags.rm must include auth'
88-
)
89-
9078
t.end()
9179
})
9280

0 commit comments

Comments
 (0)