Skip to content

Releases: lune-org/lune

0.7.5

22 Jul 15:28
4c876cb
Compare
Choose a tag to compare

Added

  • Lune now has a new documentation site!

    This addresses new APIs from version 0.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 or init.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

07 Jul 07:29
9adf296
Compare
Choose a tag to compare

Added

  • Added support for CFrame and Font types in attributes when using the roblox builtin.

Fixed

  • Fixed roblox.serializeModel still keeping some unique ids.

0.7.3

05 Jul 09:09
6a4e449
Compare
Choose a tag to compare

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

28 Jun 10:39
940834f
Compare
Choose a tag to compare

Added

  • Added support for init files in directories, similar to Rojo, or index.js / mod.rs in JavaScript / Rust.

    This means that placing a file named init.luau or init.lua in a directory will now let you require that directory.

Changed

  • The lune --setup command is now much more user-friendly
  • Update to Luau version 0.581

0.7.1

17 Jun 19:29
ef5d06a
Compare
Choose a tag to compare

Added

  • Added support for TLS in websockets, enabling usage of wss://-prefixed URLs. (#57)

Fixed

  • Fixed closeCode erroring when being accessed on websockets. (#57)
  • Fixed issues with UniqueId when using the roblox builtin by downgrading rbx-dom.

0.7.0

12 Jun 10:39
f1c230d
Compare
Choose a tag to compare

Breaking Changes

  • Globals for the fs, net, process, stdio, and task builtins have been removed, and the require("@lune/...") syntax is now the only way to access builtin libraries. If you have previously been using a global such as fs directly, you will now need to put local 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 the roblox 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 the stdio 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 and serde.decompress for compressing and decompressing strings using one of several compression formats: brotli, gzip, lz4, or zlib.

    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 passing options = { decompress = false } in request params.

  • Added support for finding scripts in the current home directory.
    This means that if you have a script called script-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 and stdio.ewrite now support writing arbitrary bytes, instead of only valid UTF-8.

Fixed

  • Fixed stdio.write and stdio.ewrite not being flushed and causing output to be interleaved. ([#47])
  • Fixed typeof returning userdata for roblox types such as Instance, Vector3, ...

0.6.7

14 May 21:17
d2ed3bd
Compare
Choose a tag to compare

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

30 Apr 19:10
1559e69
Compare
Choose a tag to compare

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 format Lune 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 writing Font datatypes

Fixed

  • Fixed _G not being a readable & writable table
  • Fixed _G containing normal globals such as print, math, ...
  • Fixed using instances as keys in tables

0.6.5

27 Mar 14:52
587e30a
Compare
Choose a tag to compare

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 and CFrame.new(Vector3, Vector3) constructors.
  • Fixed issues with CFrame math operations returning rotation angles in the wrong order.

0.6.4

26 Mar 10:54
4cb260c
Compare
Choose a tag to compare

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