Skip to content

Commit 290197c

Browse files
committed
fmt
1 parent 2de0dc4 commit 290197c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

semver/coerce.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import { parse } from "./parse.ts";
66
const MAX_SAFE_COMPONENT_LENGTH = 16;
77

88
const PRERELEASE_IDENTIFIER = "(?:0|[1-9]\\d*|\\d*[a-zA-Z-][a-zA-Z0-9-]*)";
9-
const PRERELEASE = `(?:-(?<prerelease>${PRERELEASE_IDENTIFIER}(?:\\.${PRERELEASE_IDENTIFIER})*))`;
9+
const PRERELEASE =
10+
`(?:-(?<prerelease>${PRERELEASE_IDENTIFIER}(?:\\.${PRERELEASE_IDENTIFIER})*))`;
1011
const BUILD_IDENTIFIER = "[0-9A-Za-z-]+";
11-
const BUILD = `(?:\\+(?<buildmetadata>${BUILD_IDENTIFIER}(?:\\.${BUILD_IDENTIFIER})*))`;
12+
const BUILD =
13+
`(?:\\+(?<buildmetadata>${BUILD_IDENTIFIER}(?:\\.${BUILD_IDENTIFIER})*))`;
1214

13-
const COERCE_PLAIN =
14-
`(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})` +
15+
const COERCE_PLAIN = `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})` +
1516
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
1617
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`;
1718

0 commit comments

Comments
 (0)