sparksp / elm-review-imports

elm-review rule to enforce consistent import aliases
https://package.elm-lang.org/packages/sparksp/elm-review-imports/latest/
MIT License
14 stars 3 forks source link

Bump jfmengels/elm-review-simplify from 2.1.0 to 2.1.1 in /review #182

Closed dependabot[bot] closed 11 months ago

dependabot[bot] commented 1 year ago

Bumps jfmengels/elm-review-simplify from 2.1.0 to 2.1.1.

Changelog

Sourced from jfmengels/elm-review-simplify's changelog.

[2.1.1] - 2023-09-18

  • A very large number of error messages were reworded to be more consistent, precise and descriptive.
  • Checks that applied on [ a ] now also report for List.singleton a (ex: List.concatMap f (List.singleton 1) gets simplified to f 1)

The simplification (\x y -> x + y) n m introduced in [2.1.0] was removed (#147).

The rule now simplifies:

  • 0 // n to 0
  • n // 0 to 0
  • n // 1 to n
  • Tuple.first ( a, b ) to a
  • Tuple.second ( a, b ) to b
  • Tuple.pair a b to ( a, b )
  • List.repeat 1 x to List.singleton x
  • List.reverse [ x ] to [ x ]
  • List.intersperse s [ x ] to [ x ]
  • List.concatMap List.singleton x to x
  • String.reverse (String.fromChar a) to String.fromChar a
  • Dict.intersect Dict.empty dict to Dict.empty
  • Dict.diff Dict.empty dict to Dict.empty
  • Dict.diff dict Dict.empty to dict
  • Dict.union dict Dict.empty to dict
  • Random.andThen f (Random.constant x) to f x
  • Random.andThen Random.constant generator to generator
  • Random.andThen (\a -> Random.constant b) generator to Random.map (\a -> b) generator
  • Random.andThen (always thenGenerator) generator to thenGenerator
  • Result.mapError f (if x then Err a else Err b) to f (if x then a else b)
  • Random.map identity generator to generator
  • Random.map (always a) generator to Random.constant a
  • Random.map f (Random.constant x) to Random.constant (f x)
  • Random.list 0 generator to Random.constant []
  • Random.list -1/-2/-3/... generator to Random.constant []
  • Random.list 1 generator to Random.map List.singleton generator
  • Random.list n (Random.constant el) to Random.constant (List.repeat n el)
  • Random.uniform a [] to Random.constant a
  • Random.weighted ( weight, a ) [] to Random.constant a
  • Random.weighted tuple [] to Random.constant (Tuple.first tuple)
  • List.member (List.singleton b) b to b == b when [expectNaN] is enabled (and to True otherwise)

Bug fixes:

  • Fixed an issue where Dict.size (Dict.fromList [...]) would be fixed to an incorrect value
  • Fixed an issue where Result.toMaybe (if c then Err a else Ok b) would be fixed to Nothing
  • Fixed an issue where Maybe.andThen (always (Just a)) maybe would be fixed to maybe
Commits
  • 77eb42f 2.1.1
  • 313c00a Update CHANGELOG
  • 7ea011c Add Tuple.pair a b --> ( a, b ) (#163)
  • 8843726 Update changelog
  • c23ae2c Add Tuple.first, Tuple.second on tuple simplifications (#161)
  • 5700c02 Separate error when 0 / 0 is found with expectNaN disabled (#158)
  • 45a5216 Add Random.andThen simplifications (#159)
  • 19dcde4 Add Dict.union, diff, intersect simplifications
  • 5efeb67 Add simplifications for List.intersperse on a singleton list (#156)
  • 553551a Add simplification String.reverse (String.fromChar a) --> String.fromChar a
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 11 months ago

Superseded by #188.