# Changelog

All notable changes to this project will be documented in this file.

## [0.6.1] - 2026-02-10

### 🚀 Features

- Add `strangemeadowlark_formatter` binary for formatting Starlark files.
- Improve pretty printer to closely match `buildifier` output style:
    - Preserve blank lines between top-level statements.
    - Respect original multiline formatting for lists, calls, and function definitions.
    - Correct handling of suffix comments (placed before trailing comma).
    - Fix trailing comma logic (only when broken, or single-element tuple).
    - Normalize single-line lists to have no spaces inside brackets.

### 🐛 Bug Fixes

- Fix incorrect association of suffix comments with innermost AST nodes (now associates with outermost node on the line).
- Fix `LoadStmt` span calculation in parser to correctly include closing parenthesis.
- Fix double parenthesis issue when pretty printing `ParenExpr` containing `TupleExpr`.

## [0.6.0] - 2026-02-06

### ⚠️ Breaking Changes

- `parse` and `parse_with_mode` now return `Result<FileUnit>` instead of `Result<&FileUnit>`. This fixes memory leaks but requires callers to manage ownership of the `FileUnit`. Callers passing the result to functions like `resolve_file` will need to pass a reference (e.g., `&unit`).
- `FileUnitWithModule` now has two lifetime parameters: `FileUnitWithModule<'u, 'a>` to decouple the `FileUnit` reference lifetime from the arena lifetime.

### 🚀 Features

- Implement `buildifier`-style pretty printing (4-space indent, `load` sorting, comment preservation).

### 🐛 Bug Fixes

- Fix scanner bug where incorrect outdent tokens were emitted at EOF.
- Fix AST walker to support all statement and expression variants.
- Fix memory leak in `FileUnit` (by returning by value).

## [0.4.7] - 2025-04-27

### ⚙️ Miscellaneous Tasks

- refactor, fix clippy findings, remove `UNDEFINED_BINDING`

## [0.4.6] - 2025-04-27

### ⚙️ Miscellaneous Tasks

- refactor, introduce Arena, hide bumpalo

## [0.4.5] - 2025-04-25

### 🚀 Features

- pretty printing can wrap lines

## [0.4.3] - 2025-01-18

### 🚀 Features

- Translation to a Rust MIR-like IR.

### 🐛 Bug Fixes

- Fixed a bug in name resolution, more checks

## [0.3.0] - 2024-09-24

### 🚀 Features

- Added resolver (which also does checks). This required some changes to exported types, hence bumping.

## [0.2.0] - 2024-09-20

### 🐛 Bug Fixes

- Fix memory leaks

## [0.1.4] - 2024-06-19

### 🚀 Features

- Add missing print cases to pretty printer.

## [0.1.3] - 2024-05-28

### 🐛 Bug Fixes

- Print load statements correctly

### ⚙️ Miscellaneous Tasks

- Release strangemeadowlark version 0.1.3

## [0.1.2] - 2024-05-22

### 🚀 Features

- Printing

### ⚙️ Miscellaneous Tasks

- Release strangemeadowlark version 0.1.1
- Release strangemeadowlark version 0.1.2

<!-- generated by git-cliff -->
