Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[api][test] name can't start with an underscore.
  • Loading branch information
blakmatrix committed Mar 15, 2013
1 parent c19102f commit f0c9921
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/jitsu/package.js
Expand Up @@ -542,10 +542,10 @@ package.properties = function (dir) {
name: 'name',
unique: true,
message: 'Application name',
validator: /^(?!\.)(?!node_modules)(?!favicon.ico)[^\/@\s\+%:\n]+$/,
validator: /^(?!\.)(?!_)(?!node_modules)(?!favicon.ico)[^\/@\s\+%:\n]+$/,
warning: 'The application name must follow the rules for npm package names.\n'+
' They must not start with a \'.\', contain any whitespace characters\n'+
' or any of the following characters(between quotes): "/@+%:". \n'+
' They must not start with a \'.\' or \'_\', contain any whitespace \n'+
' characters or any of the following characters(between quotes): "/@+%:". \n'+
' Additionally, the name may not be \'node_modules\' or \'favicon.ico\'.',
default: path.basename(dir)
},
Expand Down
4 changes: 2 additions & 2 deletions test/lib/package-test.js
Expand Up @@ -61,8 +61,8 @@ var suite = vows.describe('jitsu/lib/package').addBatch({
'starting with _': {
topic: setupPackage({ name: '_example-app' }),

'should be valid': function (topic) {
assert.ok(isValid('name', topic.name));
'should be invalid': function (topic) {
assert.ok(!isValid('name', topic.name));
}
},
'containing -': {
Expand Down

0 comments on commit f0c9921

Please sign in to comment.