Skip to content

Commit c6a72c1

Browse files
committed
v0.11.0
1 parent 1fdbffc commit c6a72c1

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

CHANGELOG.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@
44

55
### Improvements
66

7-
All styles now deal reasonably with comments.
7+
#### Comments
8+
9+
Styler will no longer make comments jump around in any situation, and will move comments with the appropriate node in all cases but module directive rearrangement (where they'll just be left behind - sorry! we're still working on it).
10+
11+
* Keep comments in logical places when rewriting if/unless/cond/with (#79, #97, #101, #103)
812

913
#### With Statements
1014

11-
A slew of improvements for the `with` statement in this release:
15+
This release has a slew of improvements for `with` statements. It's not surprising that there's lots of style rules for `with` given that just about any `case`, `if`, or even `cond do` could also be expressed as a `with`. They're very powerful! And with great power...
1216

13-
* rewrite trivial `lhs <- rhs` to `lhs = rhs` (#86)
14-
* rewrite `with` statements all the way to `if` statements when appropriate
15-
* switch keyword `, do: ` to `do end` rather than wrapping multiple statements in parens
17+
* style trivial pattern matches ala `lhs <- rhs` to `lhs = rhs` (#86)
18+
* style `_ <- rhs` to `rhs`
19+
* style keyword `, do: ` to `do end` rather than wrapping multiple statements in parens
20+
* style statements all the way to `if` statements when appropriate (#100)
1621

1722
#### Other
1823

1924
* Rewrite `{Map|Keyword}.merge(single_key: value)` to use `put/3` instead (#96)
20-
* Keep comments in logical places when rewriting if/unless/cond/with (#97)
25+
26+
### Fixes
27+
28+
* `with`: various edge cases we can only hope no one's encountered and thus never reported
29+
2130

2231
## v0.10.5
2332

@@ -29,6 +38,7 @@ In short, we now have `assert style(x) == style(style(x))` as part of every test
2938
### Fixes
3039

3140
* alias: fix single-module alias deletion newlines bug
41+
* comments: ensure all generated nodes always include line meta (#101)
3242

3343
## v0.10.4
3444

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add `:styler` as a dependency to your project's `mix.exs`:
1212
```elixir
1313
def deps do
1414
[
15-
{:styler, "~> 0.10", only: [:dev, :test], runtime: false},
15+
{:styler, "~> 0.11", only: [:dev, :test], runtime: false},
1616
]
1717
end
1818
```

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule Styler.MixProject do
1212
use Mix.Project
1313

1414
# Don't forget to bump the README when doing non-patch version changes
15-
@version "0.10.5"
15+
@version "0.11.0"
1616
@url "https://github.com/adobe/elixir-styler"
1717

1818
def project do

0 commit comments

Comments
 (0)