Skip to content

Commit

Permalink
feat(): revert resolvePackageName signature
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobrowolski8 committed Apr 28, 2022
1 parent 83e63aa commit e523f54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/application/application.factory.ts
Expand Up @@ -38,7 +38,7 @@ function transform(options: ApplicationOptions): ApplicationOptions {
? target.description
: DEFAULT_DESCRIPTION;
target.language = !!target.language ? target.language : DEFAULT_LANGUAGE;
target.name = resolvePackageName(target.name);
target.name = resolvePackageName(target.name.toString());
target.version = !!target.version ? target.version : DEFAULT_VERSION;

target.packageManager =
Expand All @@ -62,8 +62,8 @@ function transform(options: ApplicationOptions): ApplicationOptions {
* but only the rule *1* is addressed by this function as the other ones doesn't
* have a canonical representation.
*/
function resolvePackageName(path: string | number) {
const { base: baseFilename, dir: dirname } = parse(path.toString());
function resolvePackageName(path: string) {
const { base: baseFilename, dir: dirname } = parse(path);
if (baseFilename === '.') {
return basename(process.cwd());
}
Expand Down

0 comments on commit e523f54

Please sign in to comment.