Add content loader for json-lines and ztsd, gzip and zlib encoding - #356
Merged
Merged
Conversation
|
Coverage after merging json-lines-content-loader into main will be
Coverage Report for Changed Files
|
|||||||||||||||||||||||||
Merged
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
darklua 0.19.0
Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`
---
Created with `brew bump-formula-pr`.<details>
<summary>release notes</summary>
<pre>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:
```json5
{
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 `cp` workaround) with the `copy` loader
- 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 `process` flow too
- there is now a path to support more Lua parsers, since there is a way to add loaders like a future `lua53` loader. (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:
- `const` declarations are now supported, with a new `make_assignment_local` rule to convert them to `local` assignments
- type instantiation prefixes and methods are now supported (e.g. `func<<string>>()`)
- the `rename_variables` rule can now detect globals automatically and avoid renaming them
---
## What's Changed
* Support type instantiation prefixes and methods by @jeparlefrancais in seaofvoices/darklua#345
* Add `make_assignment_local` rule by @notpoiu in seaofvoices/darklua#346
* Add `detect_globals` parameter to `rename_variables` rule by @jeparlefrancais in seaofvoices/darklua#348
* Fix file watcher to handle rename events by @jeparlefrancais in seaofvoices/darklua#351
* Create content loaders by @jeparlefrancais in seaofvoices/darklua#354
* Support infinity for generators `column_span` parameter by @jeparlefrancais in seaofvoices/darklua#355
* Add content loader for json-lines and `ztsd`, `gzip` and `zlib` encoding by @jeparlefrancais in seaofvoices/darklua#356
## New Contributors
* @notpoiu made their first contribution in seaofvoices/darklua#346
**Full Changelog**: https://github.com/seaofvoices/darklua/compare/v0.18.0...v0.19.0</pre>
<p>View the full release notes at <a href="https://github.com/seaofvoices/darklua/releases/tag/v0.19.0">https://github.com/seaofvoices/darklua/releases/tag/v0.19.0</a>.</p>
</details>
<hr>
See merge request: Harmonybrew/homebrew-core!11206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #353
Adds new content loaders and encoding options for embedding file content.
json_linesloader to support line-delimited jsonzstd,gzipandzlib: new variants forstring,buffer, andbytesloadersJust like the existing base64, the content is compressed at build time by darklua and embedded as-is. Decoding is left to the runtime.