Skip to content

Releases: lune-org/lune

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

0.6.3

26 Mar 07:50
ffe0ce1
Compare
Choose a tag to compare

Added

  • Added support for instance tags & CollectionService in the roblox 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 as Instance::GetChildren (oops)

0.6.2

25 Mar 11:00
6fe642e
Compare
Choose a tag to compare

This release adds some new features and fixes for the roblox built-in.

Added

  • Added GetAttribute, GetAttributes and SetAttribute 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

23 Mar 08:57
6e411de
Compare
Choose a tag to compare

Fixed

  • Fixed writePlaceFile and writeModelFile in the new roblox built-in making mysterious "ROOT" instances

0.6.0

22 Mar 19:48
3a36a9d
Compare
Choose a tag to compare

Added

  • Added a roblox built-in

    If 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-in

    This built-in contains previously available functions encode and decode from the net 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 and serde can only be imported using require("@lune/roblox"), require("@lune/serde"), ...
    • Previous globals such as fs, net and others can now also be imported using require("@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.

  • Added net.urlEncode and net.urlDecode for URL-encoding and decoding strings

Changed

  • Renamed the global info function to printinfo to make it less ambiguous

Removed

  • Removed experimental net.encode and net.decode functions, since they are now available using require("@lune/serde")
  • Removed option to preserve default Luau require behavior