Skip to content

Commit

Permalink
Bumps version to 0.18.0 (#410)
Browse files Browse the repository at this point in the history
Co-authored-by: tconbeer <[email protected]>
  • Loading branch information
github-actions[bot] and tconbeer authored Apr 19, 2023
1 parent 258bfd5 commit 972a97b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.18.0] - 2023-04-19

### Formatting Changes

- the contents of jinja blocks are now indented if the block wraps onto multiple rows ([#403](https://github.com/tconbeer/sqlfmt/issues/403)). This is now the proper sqlfmt style:

```sql
select
some_field,
{% for some_item in some_sequence %}
some_function({{ some_item }}){% if not loop.last %}, {% endif %}
{% endfor %}
```

While in this simple example the new style makes it less clear
that `some_field` and `some_function` are at the
same SQL depth, the formatting of complex files with nested jinja blocks is much improved.
Expand All @@ -27,6 +32,7 @@ All notable changes to this project will be documented in this file.
{%- endif %}
{%- endfor %}
```

See also [this discussion](https://github.com/tconbeer/sqlfmt/discussions/317). Thank you
[@dave-connors-3](https://github.com/dave-connors-3) and
[@alrocar](https://github.com/alrocar)!
Expand All @@ -35,11 +41,13 @@ All notable changes to this project will be documented in this file.
## [0.17.1] - 2023-04-12

### Bug Fixes

- fixed a bug where format-off tokens could cause sqlfmt to raise a bracket mismatch error ([#395](https://github.com/tconbeer/sqlfmt/issues/395) - thank you, [@AndrewLaneAtPowerSchool](https://github.com/AndrewLaneAtPowerSchool)!).

## [0.17.0] - 2023-02-24

### Features

- sqlfmt now defaults to reading and writing files using the `utf-8` encoding. Previously, we used Python's default behavior of using the encoding from the host machine's locale. However, as `utf-8` becomes a de-facto standard, this was causing issues for some Windows users, whose locale was set to use older encodings. You can use the `--encoding` option to specify a different encoding. Setting encoding to `inherit`, e.g., `sqlfmt --encoding inherit foo.sql` will revert to the old behavior of using the host's locale. sqlfmt will detect and preserve a UTF BOM if it is present. If you specify `--encoding utf-8-sig`, sqlfmt will always write a UTF-8 BOM in the formatted file. ([#350](https://github.com/tconbeer/sqlfmt/issues/350), [#381]((https://github.com/tconbeer/sqlfmt/issues/381)), [#383]((https://github.com/tconbeer/sqlfmt/issues/383)) - thank you [@profesia-company](https://github.com/profesia-company), [@cmcnicoll](https://github.com/cmcnicoll), [@aersam](https://github.com/aersam), and [@ryanmeekins](https://github.com/ryanmeekins)!)

## [0.16.0] - 2023-01-27
Expand Down Expand Up @@ -370,7 +378,9 @@ All notable changes to this project will be documented in this file.
- supports --check and --diff options
- supports --no-color

[Unreleased]: https://github.com/tconbeer/sqlfmt/compare/0.17.1...HEAD
[Unreleased]: https://github.com/tconbeer/sqlfmt/compare/0.18.0...HEAD

[0.18.0]: https://github.com/tconbeer/sqlfmt/compare/0.17.1...0.18.0

[0.17.1]: https://github.com/tconbeer/sqlfmt/compare/0.17.0...0.17.1

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "shandy-sqlfmt"
version = "0.17.1"
version = "0.18.0"
description = "sqlfmt is an opinionated CLI tool that formats your sql files"
readme = "README.md"
authors = ["Ted Conbeer <[email protected]>"]
Expand Down

0 comments on commit 972a97b

Please sign in to comment.