Skip to content

0.8.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Jan 16:17
· 136 commits to main since this release
1b25ed2

Breaking Changes

  • The Lune CLI now uses subcommands instead of flag options:

    • lune script_name arg1 arg2 arg3 -> lune run script_name arg1 arg2 arg3
    • lune --list -> lune list
    • lune --setup -> lune setup

    This unfortunately hurts ergonomics for quickly running scripts but is a necessary change to allow us to add more commands, such as the new build subcommand.

  • The createdAt, modifiedAt, and accessedAt properties returned from fs.metadata are now DateTime values instead of numbers.

  • The Lune struct has been renamed to Runtime in the Lune rust crate.

Added

  • Added support for compiling single Lune scripts into standalone executables! (#140)

    Example usage:

    -- my_cool_script.luau
    print("Hello, standalone!")
    > lune build my_cool_script.luau
    # Creates `my_cool_script.exe` (Windows) or `my_cool_script` (macOS / Linux)
    > ./my_cool_script.exe # Windows
    > ./my_cool_script # macOS / Linux
    > "Hello, standalone!"

    To compile scripts that use require and reference multiple files, a bundler such as darklua should preferrably be used. You may also distribute files alongside the standalone binary, they will still be able to be require-d. This limitation will be lifted in the future and Lune will automatically bundle any referenced scripts.

  • Added support for path aliases using .luaurc config files!

    For full documentation and reference, check out the official Luau RFC, but here's a quick example:

    // .luaurc
    {
      "aliases": {
        "modules": "./some/long/path/to/modules"
      }
    }
    -- ./some/long/path/to/modules/foo.luau
    return { World = "World!" }
    
    -- ./anywhere/you/want/my_script.luau
    local mod = require("@modules/foo")
    print("Hello, " .. mod.World)
  • Added support for multiple values for a single query, and multiple values for a single header, in net.request. This is a part of the HTTP specification that is not widely used but that may be useful in certain cases. To clarify:

    • Single values remain unchanged and will work exactly the same as before.

      -- https://example.com/?foo=bar&baz=qux
      local net = require("@lune/net")
      net.request({
          url = "example.com",
          query = {
              foo = "bar",
              baz = "qux",
          }
      })
    • Multiple values on a single query / header are represented as an ordered array of strings.

      -- https://example.com/?foo=first&foo=second&foo=third&bar=baz
      local net = require("@lune/net")
      net.request({
          url = "example.com",
          query = {
              foo = { "first", "second", "third" },
              bar = "baz",
          }
      })

Changed

  • Update to Luau version 0.606.

Fixed

  • Fixed the print and warn global functions yielding the thread, preventing them from being used in places such as the callback to table.sort.
  • Fixed the overwrite option for fs.move not correctly removing existing files / directories. (#133)