Skip to content

Commit

Permalink
Merge pull request #78 from josephg/master
Browse files Browse the repository at this point in the history
Allow tarballs with @ in them
  • Loading branch information
rlidwka committed Jun 17, 2014
2 parents a79fa68 + 68bf469 commit 2052411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports.validate_name = function(name) {
if (
name.charAt(0) === '.' || // ".bin", etc.
name.charAt(0) === '-' || // "-" is reserved by couchdb
name.match(/[\/@\s\+%:]/) ||
name !== encodeURIComponent(name) ||
name.match(/[\\\/\s\+%:]/) ||
name === 'node_modules' ||
name === '__proto__' ||
name === 'package.json' ||
Expand Down
2 changes: 1 addition & 1 deletion test/unit/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('Validate', function() {
it('good ones', function() {
assert(validate('sinopia'))
assert(validate('some.weird.package-zzz'))
assert(validate('old-package@0.1.2.tgz'))
})

it('uppercase', function() {
Expand Down Expand Up @@ -32,7 +33,6 @@ describe('Validate', function() {
})

it('other', function() {
assert(!validate('pkg@'))
assert(!validate('pk g'))
assert(!validate('pk\tg'))
assert(!validate('pk%20g'))
Expand Down

0 comments on commit 2052411

Please sign in to comment.