Releases: seaofvoices/darklua
v0.19.0
The big change is content loaders. darklua now accepts glob patterns that map to configurable loaders in your config file. Most loaders are already there by default, but you can override or extend them:
{
generator: "retain_lines",
rules: [
// ...
],
loaders: {
"**/*.model.json": "copy",
"**/*.json": "json",
"**/*.md": "string",
},
}This solves a few issues I know people had and it opens up new possibilities too:
- Rojo model files can now be copied when processing files (no more manual
cpworkaround) with thecopyloader - when bundling, darklua could already load data files (json, toml, yaml) and inline the converted data as Lua code, but now there are actual loaders to make that work in the regular
processflow too - there is now a path to support more Lua parsers, since there is a way to add loaders like a future
lua53loader. (this is not currently planned, but it could be sponsored)
Available loaders: luau, copy, skip, string, buffer, bytes, data loaders (json, json_lines, toml, yaml), and encoding variants for embedding content (/base64, /zstd, /gzip, /zlib)
Other changes:
constdeclarations are now supported, with a newmake_assignment_localrule to convert them tolocalassignments- type instantiation prefixes and methods are now supported (e.g.
func<<string>>()) - the
rename_variablesrule can now detect globals automatically and avoid renaming them
What's Changed
- Support type instantiation prefixes and methods by @jeparlefrancais in #345
- Add
make_assignment_localrule by @notpoiu in #346 - Add
detect_globalsparameter torename_variablesrule by @jeparlefrancais in #348 - Fix file watcher to handle rename events by @jeparlefrancais in #351
- Create content loaders by @jeparlefrancais in #354
- Support infinity for generators
column_spanparameter by @jeparlefrancais in #355 - Add content loader for json-lines and
ztsd,gzipandzlibencoding by @jeparlefrancais in #356
New Contributors
Full Changelog: v0.18.0...v0.19.0
v0.18.0
What's Changed
- Add support for property modifiers in table types by @jeparlefrancais in #332
- Add support for type function statements by @jeparlefrancais in #333
- Add support for function attributes by @jeparlefrancais in #338
- Add
apply_to_filesandskip_filesparameter to rules and config by @jeparlefrancais in #341
Full Changelog: v0.17.3...v0.18.0
v0.17.3
What's Changed
- Fix
inject_global_valuerules with default value by @jeparlefrancais in #324
Full Changelog: v0.17.2...v0.17.3
v0.17.2
What's Changed
- Upgrade to full-moon 2.0.0 by @jeparlefrancais in #312
- Add
remove_floor_divisionto all rule names list by @jeparlefrancais in #313 - Support multiple
append_text_commentrules by @jeparlefrancais in #314 - Upgrade project dependencies by @jeparlefrancais in #315
- Implement length operator computation in Lua evaluator by @jeparlefrancais in #316
- Fix module types when bundling code by @jeparlefrancais in #300
- Add
convert_function_to_assignmentrule by @jeparlefrancais in #317
Full Changelog: v0.17.1...v0.17.2
v0.17.1
What's Changed
- Normalize
luaurcalias paths by @jeparlefrancais in #305 - Support command input paths starting with
./by @jeparlefrancais in #306 - Fix bundling when using luaurc aliases by @jeparlefrancais in #307
Full Changelog: v0.17.0...v0.17.1
v0.17.0
What's Changed
- Library node docs by @jeparlefrancais in #273
- Convert luau number by @jeparlefrancais in #274
- Fix
remove_unused_variablerule bug with used unassigned variables by @jeparlefrancais in #275 - Add rule to remove method calls by @jeparlefrancais in #276
- Improve
inject_global_ruleto allow structured data by @jeparlefrancais in #277 - Add rule to convert
math.sqrt()calls into an exponent form by @jeparlefrancais in #278 - Support path requires with extensions by @jeparlefrancais in #280
- Upgrade site dependencies by @jeparlefrancais in #281
- Change internal representation of strings to support arbitrary values by @jeparlefrancais in #282
- Specify parsing Lua version by @jiwonz in #263
- Add luau require mode by @jeparlefrancais in #290
- Fix malformed decimal escape sequences preceeding a digit by @jeparlefrancais in #292
- Fix missing trailing commas when writing table types by @jeparlefrancais in #293
- Improve warning messages when a path can't be found in a Rojo sourcemap by @jeparlefrancais in #294
- Transfer comments when removing statements by @jeparlefrancais in #297
Full Changelog: v0.16.0...v0.17.0
v0.16.0
Release 0.16.0 (#255)
v0.15.0
What's Changed
- Add
mutate_expressionsmethod toGenericForStatementby @jiwonz in #236 - Expose
BundleConfigurationby @jiwonz in #238 - Improve file watching to process only changed content by @jeparlefrancais in #239
New Contributors
Full Changelog: v0.14.1...v0.15.0
v0.14.1
What's Changed
- Add rule to remove
ifexpressions by @jeparlefrancais in #221 - Fix negative zero sign erasure by @jeparlefrancais in #222
- Add rule to remove continue statements by @jeparlefrancais in #227
- Fix
remove_assertionsrule by @jeparlefrancais in #229 - Add rule to remove floor division operations by @jeparlefrancais in #230
- Fix
append_text_commentrule to not add an extra space by @jeparlefrancais in #231 - Fix string encoding by @jeparlefrancais in #232
- Fix
rename_variablesrule to rename type namespaces by @jeparlefrancais in #233
Full Changelog: v0.14.0...v0.14.1
v0.14.0
What's Changed
- Migrate fullmoon parser to version 1.1.0 by @jeparlefrancais in #219
Full Changelog: v0.13.1...v0.14.0