0.8.0
Breaking Changes
-
The Lune CLI now uses subcommands instead of flag options:
lune script_name arg1 arg2 arg3
->lune run script_name arg1 arg2 arg3
lune --list
->lune list
lune --setup
->lune setup
This unfortunately hurts ergonomics for quickly running scripts but is a necessary change to allow us to add more commands, such as the new
build
subcommand. -
The
createdAt
,modifiedAt
, andaccessedAt
properties returned fromfs.metadata
are nowDateTime
values instead of numbers. -
The
Lune
struct has been renamed toRuntime
in the Lune rust crate.
Added
-
Added support for compiling single Lune scripts into standalone executables! (#140)
Example usage:
-- my_cool_script.luau print("Hello, standalone!")
> lune build my_cool_script.luau # Creates `my_cool_script.exe` (Windows) or `my_cool_script` (macOS / Linux)
> ./my_cool_script.exe # Windows > ./my_cool_script # macOS / Linux > "Hello, standalone!"
To compile scripts that use
require
and reference multiple files, a bundler such as darklua should preferrably be used. You may also distribute files alongside the standalone binary, they will still be able to berequire
-d. This limitation will be lifted in the future and Lune will automatically bundle any referenced scripts. -
Added support for path aliases using
.luaurc
config files!For full documentation and reference, check out the official Luau RFC, but here's a quick example:
// .luaurc { "aliases": { "modules": "./some/long/path/to/modules" } }
-- ./some/long/path/to/modules/foo.luau return { World = "World!" } -- ./anywhere/you/want/my_script.luau local mod = require("@modules/foo") print("Hello, " .. mod.World)
-
Added support for multiple values for a single query, and multiple values for a single header, in
net.request
. This is a part of the HTTP specification that is not widely used but that may be useful in certain cases. To clarify:-
Single values remain unchanged and will work exactly the same as before.
-- https://example.com/?foo=bar&baz=qux local net = require("@lune/net") net.request({ url = "example.com", query = { foo = "bar", baz = "qux", } })
-
Multiple values on a single query / header are represented as an ordered array of strings.
-- https://example.com/?foo=first&foo=second&foo=third&bar=baz local net = require("@lune/net") net.request({ url = "example.com", query = { foo = { "first", "second", "third" }, bar = "baz", } })
-
Changed
- Update to Luau version
0.606
.
Fixed
- Fixed the
print
andwarn
global functions yielding the thread, preventing them from being used in places such as the callback totable.sort
. - Fixed the
overwrite
option forfs.move
not correctly removing existing files / directories. (#133)