Releases: lune-org/lune
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
0.7.1
0.7.0
Breaking Changes
-
Globals for the
fs
,net
,process
,stdio
, andtask
builtins have been removed, and therequire("@lune/...")
syntax is now the only way to access builtin libraries. If you have previously been using a global such asfs
directly, you will now need to putlocal fs = require("@lune/fs")
at the top of the file instead. -
Migrated several functions in the
roblox
builtin to new, more flexible APIs:readPlaceFile -> deserializePlace
readModelFile -> deserializeModel
writePlaceFile -> serializePlace
writeModelFile -> serializeModel
These new APIs no longer use file paths, meaning to use them with files you must first read them using the
fs
builtin. -
Removed
CollectionService
and its methods from theroblox
builtin library - new instance methods have been added as replacements. -
Removed
Instance:FindFirstDescendant
which was a method that was never enabled in the official Roblox API and will soon be removed.
Use the second argument of the already existing find methods instead to find descendants. -
Removed the global
printinfo
function - it was generally not used, and did not work as intended. Use thestdio
builtin for formatting and logging instead. -
Removed support for Windows on ARM - it's more trouble than its worth right now, we may revisit it later.
Added
-
Added
serde.compress
andserde.decompress
for compressing and decompressing strings using one of several compression formats:brotli
,gzip
,lz4
, orzlib
.Example usage:
local INPUT = string.rep("Input string to compress", 16) -- Repeated string 16 times for the purposes of this example local serde = require("@lune/serde") local compressed = serde.compress("gzip", INPUT) local decompressed = serde.decompress("gzip", compressed) assert(decompressed == INPUT)
-
Added automatic decompression for compressed responses when using
net.request
.
This behavior can be disabled by passingoptions = { decompress = false }
in request params. -
Added support for finding scripts in the current home directory.
This means that if you have a script calledscript-name.luau
, you can place it in the following location:C:\Users\YourName\.lune\script-name.luau
(Windows)/Users/YourName/.lune/script-name.luau
(macOS)/home/YourName/.lune/script-name.luau
(Linux)
And then run it using
lune script-name
from any directory you are currently in. -
Added several new instance methods in the
roblox
builtin library: -
Implemented the second argument of the
FindFirstChild
/FindFirstChildOfClass
/FindFirstChildWhichIsA
instance methods.
Changed
- Update to Luau version
0.579
- Both
stdio.write
andstdio.ewrite
now support writing arbitrary bytes, instead of only valid UTF-8.
Fixed
- Fixed
stdio.write
andstdio.ewrite
not being flushed and causing output to be interleaved. ([#47]) - Fixed
typeof
returninguserdata
for roblox types such asInstance
,Vector3
, ...
0.6.7
Added
-
Replaced all of the separate typedef & documentation generation commands with a unified
lune --setup
command.This command will generate type definition files for all of the builtins and will work with the new
require("@lune/...")
syntax. Note that this also means that there is no longer any way to generate type definitions for globals - this is because they will be removed in the next major release in favor of the beforementioned syntax. -
New releases now include prebuilt binaries for arm64 / aarch64!
These new binaries will have names with the following format:lune-windows-0.6.7-aarch64.exe
lune-linux-0.6.7-aarch64
lune-macos-0.6.7-aarch64
-
Added global types to documentation site
0.6.6
Added
- Added tracing / logging for rare and hard to diagnose error cases, which can be configured using the env var
RUST_LOG
.
Changed
-
The
_VERSION
global now follows a consistent formatLune x.y.z+luau
to allow libraries to check against it for version requirements.Examples:
Lune 0.0.0+0
Lune 1.0.0+500
Lune 0.11.22+9999
-
Updated to Luau version
0.573
-
Updated
rbx-dom
to support reading and writingFont
datatypes
Fixed
- Fixed
_G
not being a readable & writable table - Fixed
_G
containing normal globals such asprint
,math
, ... - Fixed using instances as keys in tables
0.6.5
Changed
- Functions such as
print
,warn
, ... now respect__tostring
metamethods.
Fixed
- Fixed access of roblox instance properties such as
Workspace.Terrain
,game.Workspace
that are actually links to child instances.
These properties are always guaranteed to exist, and they are not always properly set, meaning they must be found through an internal lookup. - Fixed issues with the
CFrame.lookAt
andCFrame.new(Vector3, Vector3)
constructors. - Fixed issues with CFrame math operations returning rotation angles in the wrong order.
0.6.4
Fixed
- Fixed instances with attributes not saving if they contain integer attributes
- Fixed attributes not being set properly if the instance has an empty attributes property
- Fixed error messages for reading & writing roblox files not containing the full error message
- Fixed crash when trying to access an instance reference property that points to a destroyed instance
- Fixed crash when trying to save instances that contain unsupported attribute types