Skip to content

Releases: lune-org/lune

0.10.1

16 Jul 19:18
87b1fb4
Compare
Choose a tag to compare

Fixed

  • Fixed a regression where it was not possible to run directories with init.luau files in them directly using lune run directory-name.
  • Fixed a panic when calling process.exit inside a file that require was called on. (#333)
  • Fixed a panic when calling process.exit inside a request handler for net.serve. (#333)

0.10.0

15 Jul 13:06
1d6d3b9
Compare
Choose a tag to compare

This version of Lune contains a major internal refactoring of the require function, now using the proper require-by-string APIs exposed by Luau.
If you relied on any (incorrect) behavior of relative, non-@self requires, from within init.luau files in Lune 0.9.0, you may need to update your code.
No other usages of require will be affected - but if you previously encountered any internal bugs or panics during require, these will have been fixed!

Added

  • Added support for TCP client in the net standard library.
    It may be used either with TLS or not, and basic usage looks as such:

    -- Plain TCP connections
    local stream = net.tcp.connect("example.com", 80)
    
    -- TLS connections (shorthand)
    local tlsStream = net.tcp.connect("example.com", 443, true)
    
    -- Connections with custom TLS setting & TTL
    local customStream = net.tcp.connect("192.168.1.100", 8080, {
    	  tls = false,
    	  ttl = 128
    })
    
    -- Interacting with the stream
    tlsStream:write("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")
    
    while true do
        local data = tlsStream:read()
        if data ~= nil then
            print(data)
        else
            break -- Connection was closed
        end
    end
  • Added submodules to the net standard library: http, tcp, and ws.

    These will be the preferred way of interacting with the net standard library going forward, but none of the old functions have been removed or deprecated yet to allow users time to migrate.

    In a future major version of Lune, direct functions such as net.socket will be removed in favor of their equivalent functions in submodules, such as net.ws.connect. Here is the full new list of functions:

    • net.http.request
    • net.http.serve
    • net.tcp.connect
    • net.ws.connect
  • Added a method with_lib to the Runtime struct in the lune crate, to allow registering custom libraries.

Changed

  • Updated to Luau version 0.682
  • Upgraded to mlua version 0.11 - if you use any of the Lune crates as a dependency, you may also need to upgrade

Fixed

  • Fixed errors being emitted twice when the error is thrown from the main (entrypoint) script
  • Fixed a panic when calling net.request and related functions in the main body of a module during require
  • Fixed various issues with not conforming to the new Luau require-by-string semantics

0.9.4

13 Jun 11:16
e33cbc0
Compare
Choose a tag to compare

Changed

  • lune setup now properly sets up a .luaurc file instead of using legacy VSCode-specific settings
  • process.args and process.env are now plain tables again - not userdata - thank you to everyone who provided feedback on this and the usability issues!

Fixed

  • Fixed invalid handling of http redirects in net.request
  • Fixed not being able to download binaries for cross-compiling with lune build
  • Fixed binary output when running lune build not being deterministic and sometimes truncating
  • Fixed cargo install lune failing due to a yanked dependency (#323)

0.9.3

06 May 17:20
100164f
Compare
Choose a tag to compare

Added

  • Added support for non-UTF8 strings in arguments to process.exec and process.spawn

Changed

  • Improved cross-platform compatibility and correctness for values in process.args and process.env, especially on Windows

Fixed

  • Fixed stdin not being properly closed when not providing the stdin option to process.exec
  • Fixed various crashes during require that had the error cannot mutably borrow app data container

0.9.2

30 Apr 13:50
b1fc600
Compare
Choose a tag to compare

Changed

  • Improved performance of net.request and net.serve when handling large request bodies
  • Improved performance and memory usage of task.spawn, task.defer, and task.delay

Fixed

  • Fixed accidental breakage of net.request in version 0.9.1

0.9.1

29 Apr 14:10
4079842
Compare
Choose a tag to compare

Added

  • Added support for automatic decompression of HTTP requests in net.serve (#310)

Fixed

  • Fixed net.serve no longer serving requests if the returned ServeHandle is discarded (#310)
  • Fixed net.serve having various performance issues (#310)
  • Fixed Lune still running after cancelling a task such as task.delay(5, ...) and all tasks having completed

0.9.0

25 Apr 14:33
fc12e15
Compare
Choose a tag to compare

The next major version of Lune has finally been released!

This release has been a long time coming, and many breaking changes have been made.
If you are an existing Lune user upgrading to this version, you will most likely be affected.
The full list of breaking changes can be found on below.

Breaking changes & additions

  • The behavior of require has changed, according to the latest Luau RFCs and specifications.

    For the full details, feel free to read documentation here, otherwise, the most notable changes here are:

    • Paths passed to require must start with either ./, ../ or @ - require statements such as require("foo") will now error and must be changed to require("./foo").
    • The behavior of require from within init.luau and init.lua files has changed - previously require("./foo") would resolve
      to the file or directory foo as a sibling of the init file, but will now resolve to the file or directory foo which is a sibling of the parent directory of the init file.
      To require files inside of the same directory as the init file, the new @self alias must be used - like require("@self/foo").
  • The main lune run subcommand will no longer sink flags passed to it - lune run -- will now literally pass the string -- as the first
    value in process.args, and -- is no longer necessary to be able to pass flag arguments such as --foo and -b properly to your Lune programs.

  • Two new process spawning functions - process.create and process.exec - replace the previous process.spawn API. (#211)

    To migrate from process.spawn, use the new process.exec API which retains the same behavior as the old function, with slight changes in how the stdin option is passed.

    The new process.create function is a non-blocking process creation API and can be used to interactively
    read and write to standard input and output streams of the child process.

    local child = process.create("program", {
      "first-argument",
      "second-argument"
    })
    
    -- Writing to stdin
    child.stdin:write("Hello from Lune!")
    
    -- Reading partial data from stdout
    local data = child.stdout:read()
    print(data)
    
    -- Reading the full stdout
    local full = child.stdout:readToEnd()
    print(full)
  • Removed net.jsonEncode and net.jsonDecode - please use the equivalent serde.encode("json", ...) and serde.decode("json", ...) instead

  • WebSocket methods in net.socket and net.serve now use standard Lua method calling convention and colon syntax.
    This means socket.send(...) is now socket:send(...), socket.close(...) is now socket:close(...), and so on.

  • Various changes have been made to the Lune Rust crates:

    • Runtime::run now returns a more useful value instead of an ExitCode (#178)
    • All Lune standard library crates now export a typedefs function that returns the source code for the respective standard library module type definitions
    • All Lune crates now depend on mlua version 0.10 or above
    • Most Lune crates have been migrated to the smol and async-* ecosystem instead of tokio, with a full migration expected soon (this will not break public types)
    • The roblox crate re-export has been removed from the main lune crate - please depend on lune-roblox crate directly instead

Added

  • Added functions for getting Roblox Studio locations to the roblox standard library (#284)
  • Added support for the Content datatype in the roblox standard library (#305)
  • Added support for EnumItem instance attributes in the roblox standard library (#306)
  • Added support for RFC 2822 dates in the datetime standard library using fromRfc2822 (#285) - the fromIsoDate
    function has also been deprecated (not removed yet) and fromRfc3339 should instead be preferred for any new work.
  • Added a readLine function to the stdio standard library for reading line-by-line from stdin.
  • Added a way to disable JIT by setting the LUNE_LUAU_JIT environment variable to false before running Lune.
  • Added process.endianness constant (#267)

Changed

  • Documentation comments for several standard library properties have been improved (#248, #250)
  • Error messages no longer contain redundant or duplicate stack trace information
  • Updated to Luau version 0.663
  • Updated to rbx-dom database version 0.670

Fixed

  • Fixed deadlock in stdio.format calls in __tostring metamethods (#288)
  • Fixed task.wait and task.delay not being guaranteed to yield when duration is set to zero or very small values
  • Fixed __tostring metamethods sometimes not being respected in print and stdio.format calls

0.8.9

07 Oct 17:46
010cd36
Compare
Choose a tag to compare

Changed

  • Updated to Luau version 0.640

0.8.8

22 Aug 19:46
ff83c40
Compare
Choose a tag to compare

Fixed

  • Fixed errors when deserializing Lighting.AttributesSerialize by updating rbx-dom dependencies (#245)

0.8.7

10 Aug 11:44
1d4d163
Compare
Choose a tag to compare

Added

  • Added a compression level option to serde.compress (#224)
  • Added missing vector methods to the roblox library (#228)

Changed

  • Updated to Luau version 0.635
  • Updated to rbx-dom database version 0.634

Fixed

  • Fixed fs.readDir with trailing forward-slash on Windows (#220)
  • Fixed __type and __tostring metamethods not always being respected when formatting tables