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 4 forks source link

Bump jfmengels/elm-review-simplify from 2.1.0 to 2.1.2 in /review #188

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

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

Changelog

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

[2.1.2] - 2023-09-28

Lots of new simplifications, especially for Array and Task.

The rule now simplifies:

  • Array.fromList [] to Array.empty

  • Array.fromList (Array.toList array) to array

  • Array.toList (Array.fromList list) to list

  • Array.map f Array.empty to Array.empty

  • Array.map identity array to array

  • Array.indexedMap (\_ value -> f value) array to Array.map (\value -> f value) array

  • the same operations for Array.filter as for List.filter and Set.filter

  • Array.isEmpty Array.empty to True

  • Array.isEmpty (Array.fromList [ x ]) to False

  • Array.repeat 0 n to Array.empty

  • Array.initialize 0 f to Array.empty

  • Array.length Array.empty to 0

  • Array.length (Array.fromList [ a, b, c ]) to 3

  • Array.length (Array.repeat 3 x) to 3

  • Array.length (Array.initialize 3 f) to 3

  • Array.length (Array.repeat n x) to max 0 n

  • Array.length (Array.initialize n f) to max 0 n

  • Array.append Array.empty array to array

  • Array.append (Array.fromList [ a, b ]) (Array.fromList [ c, d ]) to Array.fromList [ a, b, c, d ]

  • Array.get n Array.empty to Nothing

  • Array.get 1 (Array.fromList [ a, b, c ]) to Just b

  • Array.get 100 (Array.fromList [ a, b, c ]) to Nothing

  • Array.get -1 array to Nothing

  • Array.set n x Array.empty to Array.empty

  • Array.set -1 x array to array

  • Array.set 1 x (Array.fromList [ a, b, c ]) to Array.fromList [ a, x, c ]

  • Array.set 100 x (Array.fromList [ a, b, c ]) to Array.fromList [ a, b, c ]

  • Task.andThen f (Task.fail x) to Task.fail x

  • Task.andThen f (Task.succeed a) to f a

  • Task.andThen Task.succeed task to task

  • Task.andThen (\a -> Task.succeed b) task to Task.map (\a -> b) x

  • Task.onError f (Task.succeed a) to Task.succeed a

  • Task.onError f (Task.fail x) to f x

  • Task.onError Task.fail task to task

  • Task.onError (\x -> Task.fail y) task to Task.mapError (\x -> y) x

  • Task.sequence [ Task.succeed a, Task.succeed b ] to Task.succeed [ a, b ]

  • Task.sequence [ Task.succeed a, Task.fail x ] to Task.fail x

  • Task.sequence [ a, Task.fail x, b ] to Task.sequence [ a, Task.fail x ]

  • Task.sequence [ task ] to Task.map List.singleton task

  • Task.map identity task to task

  • Task.map f (Task.fail x) to Task.fail x

  • Task.map f (Task.succeed a) to Task.succeed (f a)

  • Task.map3 f (Task.succeed a) (Task.succeed b) (Task.succeed c) to Task.succeed (f a b c) (same for all Task.mapN functions)

... (truncated)

Commits
  • 48a05e7 2.1.2
  • 23b55b4 Update CHANGELOG
  • bc03396 Improve error message
  • ab00adb Create a new helper to replace by the last arg with arbitrary number of missi...
  • 853bf28 Simplify Array.set 100 x [ a, b ] by [ a, b ]
  • e23e612 Simplify Array.set 1 x [ a, b ] by [ a, x ]
  • 58c8f3d Simplify Array.set with negative index to identity
  • 27528ac Simplify Array.set on Array.empty to Array.empty
  • 719f071 Limit the number of args to what each check expects
  • 72f7d21 Add String,List.reverse composition simplifications
  • 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 1 year ago

Superseded by #192.