Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump styler from 1.3.3 to 1.4.0 #135

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 24, 2025

Bumps styler from 1.3.3 to 1.4.0.

Release notes

Sourced from styler's releases.

v1.4.0

Improvements

Alias Lifting

This release taught Styler to try just that little bit harder when doing alias lifting.

  • general improvements around conflict detection, lifting in more correct places and fewer incorrect places (#193, h/t @​jsw800)

  • use knowledge of existing aliases to shorten invocations (#201, h/t me)

    example:

      alias A.B.C
    

    A.B.C.foo()

    becomes:

      alias A.B.C
    

    C.foo()

Struct Updates => Map Updates

1.19 deprecates struct update syntax in favor of map update syntax.

# This
%Struct{x | y}
# Styles to this
%{x | y}

WARNING Double check your diffs to make sure your variable is pattern matching against the same struct if you want to harness 1.19's type checking features. Apologies to folks who hoped Styler would do this step for you <3 (#199, h/t @​SteffenDE)

Ex1.17+

  • Replace :timer.units(x) with the new to_timeout(unit: x) for hours|minutes|seconds (This style is only applied if you're on 1.17+)

Fixes

  • pipes: handle pipifying when the first arg is itself a pipe: c(a |> b, d) => a |> b() |> c(d) (#214, h/t @​kybishop)
  • pipes: handle pipifying nested functions d(c(a |> b)) => a |> b |> c() |> d (#216, h/t @​emkguts)
  • with: fix a stabby with , else: (_ -> :ok) being rewritten to a case (#219, h/t @​iamhassangm)
Changelog

Sourced from styler's changelog.

Changelog

Note Styler's only public API is its usage as a formatter plugin. While you're welcome to play with its internals, they can and will change without that change being reflected in Styler's semantic version.

main

1.4

  • A very nice change in alias lifting means Styler will make sure that your code is using the aliases that it's specified.
  • Shoutout to the smartrent folks for finding pipifying recursion issues
  • Elixir 1.17 improvements and fixes
  • Elixir 1.19-dev: delete struct updates

Read on for details.

Improvements

Alias Lifting

This release taught Styler to try just that little bit harder when doing alias lifting.

  • general improvements around conflict detection, lifting in more correct places and fewer incorrect places (#193, h/t @​jsw800)

  • use knowledge of existing aliases to shorten invocations (#201, h/t me)

    example: alias A.B.C

      A.B.C.foo()
      A.B.C.bar()
      A.B.C.baz()
    

    becomes: alias A.B.C

      C.foo()
      C.bar()
      C.baz()
    

Struct Updates => Map Updates

1.19 deprecates struct update syntax in favor of map update syntax.

# This
%Struct{x | y}
# Styles to this
%{x | y}

... (truncated)

Commits
  • aaedd0c v1.4.0
  • 6896d97 ship struct update to map update changes after all
  • d015a99 docs docs docs docs docs!
  • ceb827a change struct update deprecation to ex1.19+
  • a46c43f pipify nested function calls with pipe as the first argument. closes #216
  • fc6fb5d fix with rewrites when keyword with an else stab (#220)
  • 74d6fd2 ensure test works across versions
  • d0ecf1d 1.18+: change struct updates to map updates. Closes #199
  • e083b4b ex1.17+: replace :timer.units(x) with the new to_timeout(unit: x) for `ho...
  • 8d921d9 no one saw that right?
  • 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 <dependency name> 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)

Bumps [styler](https://github.com/adobe/elixir-styler) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/adobe/elixir-styler/releases)
- [Changelog](https://github.com/adobe/elixir-styler/blob/main/CHANGELOG.md)
- [Commits](adobe/elixir-styler@v1.3.3...v1.4.0)

---
updated-dependencies:
- dependency-name: styler
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file elixir Pull requests that update Elixir code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant