git.iko.soy/typeable/libphonenumber
on main help sign in
.github/workflows/ci.yaml+6−5
since splitsnapshots
unifiedsplit
@@ -24,10 +24,11 @@ jobs:
24 - "9.0.2"
24 - "9.0.2"
25 - "9.2.8"
25 - "9.2.8"
26 - "9.4.8"
26 - "9.4.8"
27− - "9.6.6"
27+ - "9.6.7"
28 - "9.8.4"
28 - "9.8.4"
29− - "9.10.1"
29+ - "9.10.3"
30− - "9.12.1"
30+ - "9.12.2"
31+ - "9.14.1"
31 fail-fast: false
32 fail-fast: false
32 name: Build on Linux, GHC ${{ matrix.ghc_version }}
33 name: Build on Linux, GHC ${{ matrix.ghc_version }}
33 runs-on: ${{ matrix.platform }}
34 runs-on: ${{ matrix.platform }}
@@ -84,11 +85,11 @@ jobs:
84 run: |
85 run: |
85 cabal haddock --builddir "$GITHUB_WORKSPACE/doc" --haddock-for-hackage --enable-doc
86 cabal haddock --builddir "$GITHUB_WORKSPACE/doc" --haddock-for-hackage --enable-doc
86 echo "docs=$(find "$GITHUB_WORKSPACE/doc" -maxdepth 1 -type f -name '*-docs.tar.gz')" >> "$GITHUB_ENV"
87 echo "docs=$(find "$GITHUB_WORKSPACE/doc" -maxdepth 1 -type f -name '*-docs.tar.gz')" >> "$GITHUB_ENV"
87− - uses: actions/upload-artifact@v2
88+ - uses: actions/upload-artifact@v6
88 with:
89 with:
89 name: Source tarball
90 name: Source tarball
90 path: ${{ env.dist }}
91 path: ${{ env.dist }}
91− - uses: svenstaro/upload-release-action@2.2.1
92+ - uses: svenstaro/upload-release-action@2.11.3
92 with:
93 with:
93 repo_token: ${{ secrets.GITHUB_TOKEN }}
94 repo_token: ${{ secrets.GITHUB_TOKEN }}
94 file: ${{ env.dist }}
95 file: ${{ env.dist }}
libphonenumber.cabal+8−7
@@ -1,6 +1,6 @@
1cabal-version: 3.0
1cabal-version: 3.0
2name: libphonenumber
2name: libphonenumber
3−version: 0.1.3.0
3+version: 0.1.4.0
4category: Data
4category: Data
5synopsis: Parsing, formatting, and validating international phone
5synopsis: Parsing, formatting, and validating international phone
6 numbers
6 numbers
@@ -39,10 +39,11 @@ tested-with:
39 , GHC == 9.0.2
39 , GHC == 9.0.2
40 , GHC == 9.2.8
40 , GHC == 9.2.8
41 , GHC == 9.4.8
41 , GHC == 9.4.8
42− , GHC == 9.6.6
42+ , GHC == 9.6.7
43 , GHC == 9.8.4
43 , GHC == 9.8.4
44− , GHC == 9.10.1
44+ , GHC == 9.10.3
45− , GHC == 9.12.1
45+ , GHC == 9.12.2
46+ , GHC == 9.14.1
46
47
47build-type: Simple
48build-type: Simple
48
49
@@ -63,12 +64,13 @@ library
63 , Data.PhoneNumber.Internal.Number
64 , Data.PhoneNumber.Internal.Number
64 , Data.PhoneNumber.Internal.Util
65 , Data.PhoneNumber.Internal.Util
65 build-depends:
66 build-depends:
66− , base >= 4.12 && < 4.22
67+ , base >= 4.12 && < 4.23
67 , bytestring >= 0.10.8 && < 0.13
68 , bytestring >= 0.10.8 && < 0.13
68− , containers >= 0.6.0 && < 0.8
69+ , containers >= 0.6.0 && < 0.9
69 , deepseq >= 1.4.4 && < 1.6
70 , deepseq >= 1.4.4 && < 1.6
70 , transformers >= 0.5.5 && < 0.7
71 , transformers >= 0.5.5 && < 0.7
71 build-tool-depends: c2hs:c2hs
72 build-tool-depends: c2hs:c2hs
73+ pkgconfig-depends: protobuf
72 include-dirs: include
74 include-dirs: include
73 includes:
75 includes:
74 , c_phonenumber.h
76 , c_phonenumber.h
@@ -78,7 +80,6 @@ library
78 , cxxbits/c_phonenumberutil.cpp
80 , cxxbits/c_phonenumberutil.cpp
79 extra-libraries:
81 extra-libraries:
80 , phonenumber
82 , phonenumber
81− , protobuf
82 if impl(ghc >= 9.4)
83 if impl(ghc >= 9.4)
83 build-depends: system-cxx-std-lib
84 build-depends: system-cxx-std-lib
84 else
85 else
test/Spec.hs+3−9
@@ -125,15 +125,9 @@ main = hspec $ modifyMaxSuccess (* 10) $ do
125 prop "returns only ASCII digits" $ \(ParsedNumber _ pn) ->
125 prop "returns only ASCII digits" $ \(ParsedNumber _ pn) ->
126 BSC.all (`elem` ['0'..'9']) $ nationalSignificantNumber pn
126 BSC.all (`elem` ['0'..'9']) $ nationalSignificantNumber pn
127 modifyMaxDiscardRatio (* 10) $ do
127 modifyMaxDiscardRatio (* 10) $ do
128− prop "concatenated with country code parses to the original (if valid and not MX)" $
128+ prop "concatenated with country code parses to the original (if valid)" $
129− \(ParsedNumber (_, mReg, ParserInput input) pn) ->
129+ \(ParsedNumber _ pn) ->
130− -- Apparently "+52112210000000" makes the parser/formatter do weird
131− -- stuff as it tries to handle the deprecated (?) mobile token ("1"
132− -- after "+52")
133− if "5211" `BS.isPrefixOf` normalizeNumber Digits input ||
134− mReg == Just "MX" && "11" `BS.isPrefixOf` normalizeNumber Digits input
135− then discard
136− else isValidNumber Nothing pn ==>
130+ isValidNumber Nothing pn ==>
137 let
131 let
138 cc = countryCode pn
132 cc = countryCode pn
139 nsn = nationalSignificantNumber pn
133 nsn = nationalSignificantNumber pn