Skip to content

Commit

Permalink
🐛 Fix forcing public version for major version >=0
Browse files Browse the repository at this point in the history
  • Loading branch information
priestine committed Jul 7, 2020
1 parent 2276bd3 commit 1666fa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pure/validators/normalize-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const normalizePublic = ({ latestVersion, public: isPublic, prefixReset }
public:
isPublic ||
Either.fromNullable(extractVersionTuple(latestVersion))
.map(([_, __, major]) => major)
.map(([_, major]) => major)
.map(Number)
.fold(
() => prefixReset,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export const tap = <TArg>(f: Unary<TArg, any>) => (x: TArg): TArg => {
}

export const extractVersionTuple = (versionString: string) =>
/\.?(\d+)\.?(\d+)?\.?(\d+)?/.exec(versionString)
/(\d+)\.?(\d+)?\.?(\d+)?/.exec(versionString)

0 comments on commit 1666fa0

Please sign in to comment.