Path to this page:
Subject: CVS commit: pkgsrc/devel/stylua
From: Nikita
Date: 2023-03-29 21:27:25
Message id: 20230329192725.EDA72F9F4@cvs.NetBSD.org
Log Message:
stylua: update to version 0.17.0
ChangeLog:
0.17.0 - 2023-03-11
Added
Added support for "sort requires", which sorts top-level \
statements of the form local NAME = require(EXPR) lexicographically on NAME. We \
do this by treating a group of consecutive requires as a "block", and \
then sorting only within the block. Any other statement, or an empty line, \
between require statements will split the group into two separate blocks (and \
can be used to separate the sorting). A block of requires will not move around \
the file. Roblox Luau statements of the form local NAME = game:GetService(EXPR) \
will also be sorted separately.
This feature is disabled by default. To enable it, add the following to your \
stylua.toml:
[sort_requires]
enabled = true
Note: we assume that all requires are pure with no side effects. It is not \
recommended to use this feature if the ordering of your requires matter.
Added support for EditorConfig, which is taken into account only if no \
stylua.toml was found.
This feature is enabled by default, it can be disabled using --no-editorconfig.
Published StyLua to the Docker Hub
0.16.1 - 2023-02-10
Fixed
Fixed mistransformation of a function argument in a multilined function call \
when the argument contains a comment, causing a syntax error. We now attempt to \
hang the expression (#648)
Fixed verify AST flagging a false positive for parentheses removed around a \
Luau type (#643)
0.16.0 - 2023-01-15
Added
Unnecessary parentheses around Luau types will now be removed (#611)
Collapse a body containing only a goto statement when \
collapse_simple_statement is set (#618)
Changed
Update internal parser:
(lua52) Support Lua 5.2 fractional hexidecimal / hexidecimal with \
exponents (#621)
(lua52) Support LuaJIT number suffixes LL/ULL/i (#621)
(lua52) Support \z escape sequences in strings (#613)
(luau) Support Luau string interpolation (#607)
Several optimisations applied to formatting functions to reduce time taken. \
Files which previously did not terminate (6MB+) now finish in reasonable time. \
(#591)
Assignments of the form local name = function will no longer hang at the \
equals token, and instead force parameters multiline, to reduce unnecessary \
indentation. (#595)
Fixed
Fixed an anonymous function assignment local x = function() being \
unnecessarily indented if the function body contains a comment (#627)
Fixed malformed formatting when there is a newline between a return token \
and the expressions (#605)
Fixed malformed formatting of multi-assignment or multi-returns where there \
is a comment within the expressions list (#637)
Files: