Releases: lune-org/lune
0.7.11
Changed
- Update to Luau version
0.601
.
Fixed
- Fixed
roblox.getAuthCookie
not being compatible with the latest cookie format by upgrading rbx_cookie.
0.7.10
Added
- Added the
GetDebugId
instance method to theroblox
built-in. This will return the internal id used by the instance, and as the name implies, it should be primarily used for debugging purposes and cases where you need a globally unique identifier for an instance. It is guaranteed to be a 32-digit hexadecimal string.
Fixed
- Fixed issues with
SecurityCapabilities
on instances in theroblox
built-in by upgrading rbx-dom.
0.7.9
Added
-
Added
implementProperty
andimplementMethod
to theroblox
built-in library to fill in missing functionality that Lune does not aim to implement itself.Example usage:
local roblox = require("@lune/roblox") local part = roblox.Instance.new("Part") roblox.implementMethod("BasePart", "TestMethod", function(_, ...) print("Tried to call TestMethod with", ...) end) part:TestMethod("Hello", "world!")
Changed
- Update to Luau version
0.599
. - Stdio options when using
process.spawn
can now be set with more granularity, allowing stderr & stdout to be disabled individually and completely to improve performance when they are not being used.
0.7.8
Added
-
Added a new
datetime
built-in library for handling date & time values, parsing, formatting, and more. (#94)Example usage:
local DateTime = require("@lune/datetime") -- Creates a DateTime for the current exact moment in time local now = DateTime.now() -- Formats the current moment in time as an ISO 8601 string print(now:toIsoDate()) -- Formats the current moment in time, using the local -- time, the French locale, and the specified time string print(now:formatLocalTime("%A, %d %B %Y", "fr")) -- Returns a specific moment in time as a DateTime instance local someDayInTheFuture = DateTime.fromLocalTime({ year = 3033, month = 8, day = 26, hour = 16, minute = 56, second = 28, millisecond = 892, }) -- Extracts the current local date & time as separate values (same values as above table) print(now:toLocalTime()) -- Returns a DateTime instance from a given float, where the whole -- denotes the seconds and the fraction denotes the milliseconds -- Note that the fraction for millis here is completely optional DateTime.fromUnixTimestamp(871978212313.321) -- Extracts the current universal (UTC) date & time as separate values print(now:toUniversalTime())
-
Added support for passing
stdin
inprocess.spawn
(#106) -
Added support for setting a custom environment in load options for
luau.load
, not subject togetfenv
/setfenv
deoptimizations -
Added Terrain:GetMaterialColor and Terrain:SetMaterialColor (#93)
-
Added support for a variable number of arguments for CFrame methods (#85)
Changed
- Update to Luau version
0.596
. - Update to rbx-dom database version
0.596
. process.spawn
now usespowershell
instead of/bin/bash
as the shell on Windows, withshell = true
.- CFrame and Vector3 values are now rounded to the nearest 2 ^ 16 decimal place to reduce floating point errors and diff noise. Note that this does not affect intermediate calculations done in lua, and only happens when a property value is set on an Instance.
Fixed
- Fixed the
process
built-in library not loading correctly when using Lune in REPL mode. - Fixed list subcommand not listing global scripts without a local
.lune
/lune
directory present. - Fixed
net.serve
stopping when the returnedServeHandle
is garbage collected. - Fixed missing trailing newline when using the
warn
global. - Fixed constructor for
CFrame
in theroblox
built-in library not parsing the 12-arg overload correctly. (#102) - Fixed various functions for
CFrame
in theroblox
built-in library being incorrect, specifically row-column ordering and some flipped signs. (#103) - Fixed cross-service Instance references disappearing when using the
roblox
built-in library (#117)
0.7.7
Added
-
This allows you to run scripts within Lune without writing files!
Example usage, inside your favorite terminal:
# 1. Run the Lune executable, without any arguments lune # 2. You will be shown the current Lune version and a blank prompt arrow: Lune v0.7.7 > # 3. Start typing, and hit enter when you want to run your script! # Your script will run until completion and output things along the way. > print(2 + 3) 5 > print("Hello, lune changelog!") Hello, lune changelog! # 4. You can also set variables that will get preserved between runs. # Note that local variables do not get preserved here. > myVariable = 123 > print(myVariable) 123 # 5. Press either of these key combinations to exit the REPL: # - Ctrl + D # - Ctrl + C
-
Added a new
luau
built-in library for manually compiling and loading Luau source code. (#82)Example usage:
local luau = require("@lune/luau") local bytecode = luau.compile("print('Hello, World!')") local callableFn = luau.load(bytecode) callableFn() -- Additionally, we can skip the bytecode generation and -- load a callable function directly from the code itself. local callableFn2 = luau.load("print('Hello, World!')") callableFn2()
Changed
-
Update to Luau version
0.591
-
Lune's internal task scheduler and
require
functionality has been completely rewritten.
The new scheduler is much more stable, conforms to a larger test suite, and has a few additional benefits:- Built-in libraries are now lazily loaded, meaning nothing gets allocated until the built-in library gets loaded using
require("@lune/builtin-name")
. This also improves startup times slightly. - Spawned processes using
process.spawn
now run on different thread(s), freeing up resources for the main thread where luau runs. - Serving requests using
net.serve
now processes requests on background threads, also freeing up resources. In the future, this will also allow us to offload heavy tasks such as compression/decompression to background threads. - Groundwork for custom / user-defined require aliases has been implemented, as well as absolute / cwd-relative requires. These will both be exposed as options and be made available to use some time in the future.
- Built-in libraries are now lazily loaded, meaning nothing gets allocated until the built-in library gets loaded using
-
When using the
serde
built-in library, keys are now sorted during serialization. This means that the output ofencode
is now completely deterministic, and wont cause issues when committing generated files to git etc.
Fixed
-
Fixed not being able to pass arguments to the thread using
coroutine.resume
. (#86) -
Fixed a large number of long-standing issues, from the task scheduler rewrite:
- Fixed
require
hanging indefinitely when the module being require-d uses an async function in its main body. - Fixed background tasks (such as
net.serve
) not keeping Lune alive even if there are no lua threads to run. - Fixed spurious panics and error messages such as
Tried to resume next queued future but none are queued
. - Fixed not being able to catch non-string errors properly, errors were accidentally being wrapped in an opaque
userdata
type.
- Fixed
0.7.6
Changed
- Update to Luau version
0.588
- Enabled Luau JIT backend for potential performance improvements 🚀
If you run into any strange behavior please open an issue!
Fixed
- Fixed publishing of the Lune library to
crates.io
. - Fixed
serde.decode
deserializingnull
values asuserdata
instead ofnil
. - Fixed not being able to require files with multiple extensions, eg.
module.spec.luau
was not require-able usingrequire("module.spec")
. - Fixed instances and
roblox
built-in library APIs erroring when used asynchronously/concurrently.
0.7.5
Added
-
Lune now has a new documentation site!
This addresses new APIs from version0.7.0
not being available on the docs site, brings much improved searching functionality, and will help us keep documentation more up-to-date going forward with a more automated process. You can check out the new site at lune-org.github.io. -
Added
fs.copy
to recursively copy files and directories.Example usage:
local fs = require("@lune/fs") fs.writeDir("myCoolDir") fs.writeFile("myCoolDir/myAwesomeFile.json", "{}") fs.copy("myCoolDir", "myCoolDir2") assert(fs.isDir("myCoolDir2")) assert(fs.isFile("myCoolDir2/myAwesomeFile.json")) assert(fs.readFile("myCoolDir2/myAwesomeFile.json") == "{}")
-
Added
fs.metadata
to get metadata about files and directories.Example usage:
local fs = require("@lune/fs") fs.writeFile("myAwesomeFile.json", "{}") local meta = fs.metadata("myAwesomeFile.json") print(meta.exists) --> true print(meta.kind) --> "file" print(meta.createdAt) --> 1689848548.0577152 (unix timestamp) print(meta.permissions) --> { readOnly: false }
-
Added
roblox.getReflectionDatabase
to access the builtin database containing information about classes and enums.Example usage:
local roblox = require("@lune/roblox") local db = roblox.getReflectionDatabase() print("There are", #db:GetClassNames(), "classes in the reflection database") print("All base instance properties:") local class = db:GetClass("Instance") for name, prop in class.Properties do print(string.format( "- %s with datatype %s and default value %s", prop.Name, prop.Datatype, tostring(class.DefaultProperties[prop.Name]) )) end
-
Added support for running directories with an
init.luau
orinit.lua
file in them in the CLI.
Changed
- Update to Luau version
0.583
Fixed
- Fixed publishing of Lune to crates.io by migrating away from a monorepo.
- Fixed crashes when writing a very deeply nested
Instance
to a file. (#62) - Fixed not being able to read & write to WebSocket objects at the same time. (#68)
- Fixed tab character at the start of a script causing it not to parse correctly. (#72)
0.7.4
Added
- Added support for
CFrame
andFont
types in attributes when using theroblox
builtin.
Fixed
- Fixed
roblox.serializeModel
still keeping some unique ids.
0.7.3
Changed
- When using
roblox.serializeModel
, Lune will no longer keep internal unique ids.
This is consistent with what Roblox does and prevents Lune from always generating a new and unique file.
This previously caused unnecessary diffs when using git or other kinds of source control. (Relevant issue)
0.7.2
Added
- Added support for
init
files in directories, similar to Rojo, orindex.js
/mod.rs
in JavaScript / Rust.
This means that placing a file namedinit.luau
orinit.lua
in a directory will now let yourequire
that directory.
Changed
- The
lune --setup
command is now much more user-friendly - Update to Luau version
0.581