NOTE: This release removes the version from the release file names (#343). If you have automated tooling to download StyLua releases, you may need to update them to exclude the version from the name
[0.13.0] - 2022-03-31
Added
General
- Added support for alternative diff outputs. You can now use
--output-format=unified
or--output-format=json
to output a unified diff or json mismatches list respectively. A unified diff can be fed into other tools such aspatch
ordelta
, whilst a JSON diff provides a more machine readable format useful for extensions. (#230)
Changed
General
- Migrate internal dependency for CLI arguments handling, with improved help messages.
- Generic fors will no longer expand onto multiple lines if the expression looping over is a function call with a single table argument (e.g.,
ipairs({ ... })
) (#405) - When hanging an assignment of an expression contained within parentheses, we do not add an extra indentation. The formatting is now consistent with expanded tables and function calls. (#274)
Luau
- Type declarations consisting of unions/intersections where an inner type has a multiline comment will now force hanging
- Excess parentheses around a type assertion will now be removed. (#383, #425)
Fixed
General
- Fixed issue through static linking where Windows binary would not execute due to missing
VCRUNTIME140.dll
. (#413) - Fixed assignment with comment sometimes not hanging leading to malformed syntax. (#416)
- Fixed block ignores not applied when multiple leading block ignore comments are present at once. (#421)
- Fixed ordering of comments when semicolon after statement is removed. (#423)
What's Changed
- Break down function argument code by @JohnnyMorganz in #408
- Migrate to clap v3 with new help messages by @JohnnyMorganz in #409
- Add support for alternative diff outputs by @JohnnyMorganz in #411
- Hang type union declarations if multiline comment is seen by @JohnnyMorganz in #402
- Hug generic for when expression is function call with single table arg by @JohnnyMorganz in #412
- Revert 1.58 format string syntax by @JohnnyMorganz in #417
- Statically link the vc runtime by @JohnnyMorganz in #418
- Remove excess parentheses around type assertions by @JohnnyMorganz in #419
- Always hang assignment if it contains comments by @JohnnyMorganz in #420
- Fix block ignore not applied when multiple comments present by @JohnnyMorganz in #422
- Fix comments ordering when semicolon removed after stmt by @JohnnyMorganz in #424
- Fix parentheses incorrectly removed around assertion when hanging by @JohnnyMorganz in #426
- Perform large scale testing by @JohnnyMorganz in #428
- Fix large scale test action by @JohnnyMorganz in #429
- Don't hang an extra level when hanging parens assignment by @JohnnyMorganz in #427
Full Changelog: v0.12.5...v0.13.0