mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
Merge pull request #78 from josephg/master
Allow tarballs with @ in them
This commit is contained in:
commit
20524118ef
2 changed files with 2 additions and 3 deletions
|
@ -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' ||
|
||||
|
|
|
@ -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() {
|
||||
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue