Guide

Migration v2.3 → v2.4

v2.4 is mostly additive. The only breaking changes are in Stream | the old FPS-based API is removed. Everything else is backwards-compatible.

Breaking changes

Wally | update your wally.toml: RoExpress = "unofficialrobloxtutor/roexpress@2.4.0"
AreaWhat changedAction
Stream v2 API removed Stream:Sender(), Stream:Receiver(), FPS-tick model Migrate to Stream:Channel() | see below
Stream v2 types removed Stream.Channel type (v2 shape) Use new Channel instance API

Stream migration (pre-v2.4 → v2.4)

Old (pre-v2.4 | FPS tick model)

-- v2: FPS sender/receiver with tick accumulation
local sender = Stream:Sender("movement", 20)
sender:Send({ x = pos.X, y = pos.Y, z = pos.Z })

New (v2.4 | schema channels)

-- v3: define schema once, create channel, send
local schema = Stream:Schema({
    position = "Vector3",
    yaw      = "float32",
    health   = "uint8",
})
local channel = Stream:Channel("movement", schema)

-- client: send
channel:Send({ position = pos, yaw = angle, health = hp })

-- server: subscribe
channel:Subscribe(function(player, data)
    updatePosition(player, data.position, data.yaw)
end)

New in v2.4 (non-breaking)

Typed accessors

RoExpress.GetApp() and RoExpress.GetNetwork() are new | they return fully-typed instances. Your existing RoExpress("App") calls still work, but switch to the typed form to get autocomplete and type checking:

-- Before
local app = RoExpress("App")  -- returns any

-- After
local app = RoExpress.GetApp()  -- returns App (fully typed)

Compact handler form

Both handler forms still work. Modern handlers now receive req.player and req.raw which weren't populated in legacy form:

-- Legacy (still works)
app:Get("x", function(Player, Payload, req, res) end)

-- Modern (recommended) | req.player is now populated
app:Get("x", function(req, res)
    print(req.player.Name)  -- available in modern form
end)

Exported types

All inner types are now exported from the root module. If you had local type aliases copied from source, delete them and use the forwarded ones:

-- Before (had to copy type definitions manually)
type Request = { params: { [string]: any }, data: any }

-- After
type Request = RoExpress.Request  -- forwarded from source, always in sync

See also

Stream API  ·  Exported Types  ·  Changelog