Skip to content

Commit

Permalink
fix: prettier output
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainweb committed Apr 25, 2020
1 parent 53d8522 commit 1d99263
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/versioning/composer/index.ts
Expand Up @@ -41,9 +41,12 @@ function composer2npm(input: string): string {
let stability = '';
if (versionParts.length > 1) {
// Process the version number separately.
output = versionParts[0]
output = versionParts[0];
// 1.0@beta2 to 1.0-beta.2
stability = '-' + versionParts[1].replace(/(?:^|\s)(beta|alpha|rc)([1-9][0-9]*)(?: |$)/gi, '$1.$2');
stability = versionParts[1].replace(
/(?:^|\s)(beta|alpha|rc)([1-9][0-9]*)(?: |$)/gi,
'-$1.$2'
);
}

// ~4 to ^4 and ~4.1 to ^4.1
Expand Down

0 comments on commit 1d99263

Please sign in to comment.