@@ -54,9 +54,9 @@ public enum VersionError: Error, CustomStringConvertible {
54
54
/// Some or all of the version core identifiers contain non-numerical characters or are empty.
55
55
case nonNuumericalOrEmptyVersionCoreIdentifiers( _ identifiers: [ String ] )
56
56
/// Some or all of the pre-release identifiers contain characters other than alpha-numerics and hyphens.
57
- case nonAlphaNuumerHyphenalPrereleaseIdentifiers ( _ identifiers: [ String ] )
57
+ case nonAlphaNumerHyphenalPrereleaseIdentifiers ( _ identifiers: [ String ] )
58
58
/// Some or all of the build metadata identifiers contain characters other than alpha-numerics and hyphens.
59
- case nonAlphaNuumerHyphenalBuildMetadataIdentifiers ( _ identifiers: [ String ] )
59
+ case nonAlphaNumerHyphenalBuildMetadataIdentifiers ( _ identifiers: [ String ] )
60
60
61
61
public var description : String {
62
62
switch self {
@@ -72,11 +72,11 @@ public enum VersionError: Error, CustomStringConvertible {
72
72
let nonNumericalIdentifiers = identifiers. filter { !$0. allSatisfy ( \. isNumber) }
73
73
return " non-numerical characters in version core identifier \( nonNumericalIdentifiers. count > 1 ? " s " : " " ) \( nonNumericalIdentifiers. map { " ' \( $0) ' " } . joined ( separator: " , " ) ) "
74
74
}
75
- case let . nonAlphaNuumerHyphenalPrereleaseIdentifiers ( identifiers) :
75
+ case let . nonAlphaNumerHyphenalPrereleaseIdentifiers ( identifiers) :
76
76
// Not checking for `.isASCII` here because non-ASCII characters should've already been caught before this.
77
77
let nonAlhpaNumericalIdentifiers = identifiers. filter { !$0. allSatisfy { $0. isLetter || $0. isNumber || $0 == " - " } }
78
78
return " characters other than alpha-numerics and hyphens in pre-release identifier \( nonAlhpaNumericalIdentifiers. count > 1 ? " s " : " " ) \( nonAlhpaNumericalIdentifiers. map { " ' \( $0) ' " } . joined ( separator: " , " ) ) "
79
- case let . nonAlphaNuumerHyphenalBuildMetadataIdentifiers ( identifiers) :
79
+ case let . nonAlphaNumerHyphenalBuildMetadataIdentifiers ( identifiers) :
80
80
// Not checking for `.isASCII` here because non-ASCII characters should've already been caught before this.
81
81
let nonAlhpaNumericalIdentifiers = identifiers. filter { !$0. allSatisfy { $0. isLetter || $0. isNumber || $0 == " - " } }
82
82
return " characters other than alpha-numerics and hyphens in build metadata identifier \( nonAlhpaNumericalIdentifiers. count > 1 ? " s " : " " ) \( nonAlhpaNumericalIdentifiers. map { " ' \( $0) ' " } . joined ( separator: " , " ) ) "
@@ -129,7 +129,7 @@ extension Version {
129
129
let prereleaseStartIndex = versionString. index ( after: prereleaseDelimiterIndex)
130
130
let prereleaseIdentifiers = versionString [ prereleaseStartIndex..< ( metadataDelimiterIndex ?? versionString. endIndex) ] . split ( separator: " . " , omittingEmptySubsequences: false )
131
131
guard prereleaseIdentifiers. allSatisfy ( { $0. allSatisfy { $0. isLetter || $0. isNumber || $0 == " - " } } ) else {
132
- throw VersionError . nonAlphaNuumerHyphenalPrereleaseIdentifiers ( prereleaseIdentifiers. map { String ( $0) } )
132
+ throw VersionError . nonAlphaNumerHyphenalPrereleaseIdentifiers ( prereleaseIdentifiers. map { String ( $0) } )
133
133
}
134
134
self . prereleaseIdentifiers = prereleaseIdentifiers. map { String ( $0) }
135
135
} else {
@@ -140,7 +140,7 @@ extension Version {
140
140
let metadataStartIndex = versionString. index ( after: metadataDelimiterIndex)
141
141
let buildMetadataIdentifiers = versionString [ metadataStartIndex... ] . split ( separator: " . " , omittingEmptySubsequences: false )
142
142
guard buildMetadataIdentifiers. allSatisfy ( { $0. allSatisfy { $0. isLetter || $0. isNumber || $0 == " - " } } ) else {
143
- throw VersionError . nonAlphaNuumerHyphenalBuildMetadataIdentifiers ( buildMetadataIdentifiers. map { String ( $0) } )
143
+ throw VersionError . nonAlphaNumerHyphenalBuildMetadataIdentifiers ( buildMetadataIdentifiers. map { String ( $0) } )
144
144
}
145
145
self . buildMetadataIdentifiers = buildMetadataIdentifiers. map { String ( $0) }
146
146
} else {
0 commit comments