Skip to content

Commit

Permalink
fix: allow . in command and script name
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jan 5, 2022
1 parent 8ff346a commit a7202b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/is-script-name.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const isScriptNamePattern = /^[\w-]+$/;
export const isScriptNamePattern = /^[\w.-]+$/;
6 changes: 6 additions & 0 deletions tests/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ describe('error-handling', () => {
});
}).toThrow('Invalid script name: "a b"');
});

test('allowed name format', () => {
cli({
name: 'a.b_',
});
});
});

0 comments on commit a7202b2

Please sign in to comment.