packages feed

zxcvbn-hs 0.2.0.0 → 0.2.1.0

raw patch · 5 files changed

+14/−18 lines, 5 filesdep ~lensdep ~optparse-applicativePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: lens, optparse-applicative

API changes (from Hackage documentation)

+ Text.Password.Strength.Config: config :: HasConfig c_ayAx => Lens' c_ayAx Config
+ Text.Password.Strength.Internal: config :: HasConfig c_ayAx => Lens' c_ayAx Config
- Text.Password.Strength.Config: class HasConfig c_ayA0
+ Text.Password.Strength.Config: class HasConfig c_ayAx
- Text.Password.Strength.Config: customFrequencyLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Config: customFrequencyLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]
- Text.Password.Strength.Config: keyboardGraphs :: HasConfig c_ayA0 => Lens' c_ayA0 [AdjacencyTable]
+ Text.Password.Strength.Config: keyboardGraphs :: HasConfig c_ayAx => Lens' c_ayAx [AdjacencyTable]
- Text.Password.Strength.Config: obviousSequenceStart :: HasConfig c_ayA0 => Lens' c_ayA0 (Char -> Bool)
+ Text.Password.Strength.Config: obviousSequenceStart :: HasConfig c_ayAx => Lens' c_ayAx (Char -> Bool)
- Text.Password.Strength.Config: passwordLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Config: passwordLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]
- Text.Password.Strength.Config: wordFrequencyLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Config: wordFrequencyLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]
- Text.Password.Strength.Internal: class HasConfig c_ayA0
+ Text.Password.Strength.Internal: class HasConfig c_ayAx
- Text.Password.Strength.Internal: customFrequencyLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Internal: customFrequencyLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]
- Text.Password.Strength.Internal: keyboardGraphs :: HasConfig c_ayA0 => Lens' c_ayA0 [AdjacencyTable]
+ Text.Password.Strength.Internal: keyboardGraphs :: HasConfig c_ayAx => Lens' c_ayAx [AdjacencyTable]
- Text.Password.Strength.Internal: obviousSequenceStart :: HasConfig c_ayA0 => Lens' c_ayA0 (Char -> Bool)
+ Text.Password.Strength.Internal: obviousSequenceStart :: HasConfig c_ayAx => Lens' c_ayAx (Char -> Bool)
- Text.Password.Strength.Internal: passwordLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Internal: passwordLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]
- Text.Password.Strength.Internal: wordFrequencyLists :: HasConfig c_ayA0 => Lens' c_ayA0 [Dictionary]
+ Text.Password.Strength.Internal: wordFrequencyLists :: HasConfig c_ayAx => Lens' c_ayAx [Dictionary]

Files

CHANGELOG.md view
@@ -1,6 +1,12 @@ Revision History for zxcvbn-hs ============================== +0.2.1.0 (September 25, 2019)+----------------------------++  * Export the entire `HasConfig` class so external code can use the+    `config` lens.+ 0.2.0.0 (September 12, 2019) ---------------------------- 
src/Text/Password/Strength/Config.hs view
@@ -39,12 +39,7 @@   --     start a sequence.  For example, in English, @a@ and @A@ would   --     be considered 'True'.   ---  passwordLists,-  wordFrequencyLists,-  customFrequencyLists,-  keyboardGraphs,-  obviousSequenceStart,-  HasConfig+  HasConfig(..)   ) where  import Text.Password.Strength.Internal.Config
src/Text/Password/Strength/Internal/Config.hs view
@@ -20,15 +20,10 @@ module Text.Password.Strength.Internal.Config (   -- * Configuration   Config,-  HasConfig,+  HasConfig(..),   Dictionary,   en_US,   dictionaries,-  passwordLists,-  wordFrequencyLists,-  customFrequencyLists,-  keyboardGraphs,-  obviousSequenceStart,   addCustomFrequencyList   ) where 
src/Text/Password/Strength/Internal/Match.hs view
@@ -92,7 +92,7 @@ -------------------------------------------------------------------------------- -- | All possible matches after various transformations. matches :: Config -> Day -> Text -> Matches-matches config day =+matches cfg day =     repeats .       foldr (\t -> Map.insert t (check t)) Map.empty .         allTokens@@ -104,12 +104,12 @@      -- Tokens that appear in a dictionary.     dict :: Token -> Maybe Match-    dict t = DictionaryMatch <$> rank config (^. tokenLower) t+    dict t = DictionaryMatch <$> rank cfg (^. tokenLower) t      -- Tokens that, when reversed, appear in a dictionary.     rdict :: Token -> Maybe Match     rdict t = ReverseDictionaryMatch <$>-                rank config (views tokenLower Text.reverse) t+                rank cfg (views tokenLower Text.reverse) t      -- Tokens that, when decoded, appear in a dictionary.     --@@ -119,7 +119,7 @@     l33ts :: Token -> Maybe Match     l33ts t =       let ts = l33t t -- Decoding may result in multiple outputs.-          rnk l = (,l) <$> rank config (^. l33tText) l+          rnk l = (,l) <$> rank cfg (^. l33tText) l       in uncurry L33tMatch <$>            minimumByOf traverse (compare `on` (^. _1))                                 (mapMaybe rnk ts)@@ -128,7 +128,7 @@     kbd :: Token -> [Match]     kbd t = KeyboardMatch <$>               mapMaybe (`keyboardPattern` t)-                (config ^. keyboardGraphs)+                (cfg ^. keyboardGraphs)      -- Characters in a token form a sequence.     seqMatch :: Token -> Maybe Match
zxcvbn-hs.cabal view
@@ -2,7 +2,7 @@  -------------------------------------------------------------------------------- name:          zxcvbn-hs-version:       0.2.0.0+version:       0.2.1.0 synopsis:      Password strength estimation based on zxcvbn. description:   Please see the README below. license:       MIT