Releases: lune-org/lune
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
0.6.3
Added
- Added support for instance tags &
CollectionService
in theroblox
built-in.
Currently implemented methods are listed on the docs site.
Fixed
- Fixed accessing a destroyed instance printing an error message even if placed inside a pcall
- Fixed cloned instances not having correct instance reference properties set (
ObjectValue.Value
,Motor6D.Part0
, ...) - Fixed
Instance::GetDescendants
returning the same thing asInstance::GetChildren
(oops)
0.6.2
This release adds some new features and fixes for the roblox
built-in.
Added
- Added
GetAttribute
,GetAttributes
andSetAttribute
methods for instances - Added support for getting & setting properties that are instance references
Changed
- Improved handling of optional property types such as optional cframes & default physical properties
Fixed
- Fixed handling of instance properties that are serialized as binary strings
0.6.1
Fixed
- Fixed
writePlaceFile
andwriteModelFile
in the newroblox
built-in making mysterious "ROOT" instances
0.6.0
Added
-
Added a
roblox
built-inIf you're familiar with Remodel, this new built-in contains more or less the same APIs, integrated into Lune.
There are just too many new APIs to list in this changelog, so head over to the wiki to learn more! -
Added a
serde
built-inThis built-in contains previously available functions
encode
anddecode
from thenet
global.
The plan is for this built-in to contain more serialization and encoding functionality in the future. -
require
has been reimplemented and overhauled in several ways:- New built-ins such as
roblox
andserde
can only be imported usingrequire("@lune/roblox")
,require("@lune/serde")
, ... - Previous globals such as
fs
,net
and others can now also be imported usingrequire("@lune/fs")
,require("@lune/net")
, ... - Requiring a script is now completely asynchronous and will not block lua threads other than the caller.
- Requiring a script will no longer error when using async APIs in the main body of the required script.
All new built-ins will be added using this syntax and new built-ins will no longer be available in the global scope, and current globals will stay available as globals until proper editor and LSP support is available to ensure Lune users have a good development experience. This is the first step towards moving away from adding each library as a global, and allowing Lune to have more built-in libraries in general.
Behavior otherwise stays the same, and requires are still relative to file unless the special
@
prefix is used. - New built-ins such as
-
Added
net.urlEncode
andnet.urlDecode
for URL-encoding and decoding strings
Changed
- Renamed the global
info
function toprintinfo
to make it less ambiguous
Removed
- Removed experimental
net.encode
andnet.decode
functions, since they are now available usingrequire("@lune/serde")
- Removed option to preserve default Luau require behavior