Skip to content

wowlua v0.13.17

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 18:41
· 2 commits to main since this release
ea50b8f

0.13.17 (2026-11-21)

New

  • wowlua:hooks: hook(target, name, fn, { isolate = false }) (and hookScript) installs a hook as it is, for hot paths that can't fail. Isolated hooks are cheaper too: the isolation is set up once, not per call.
  • Bag families in tests: mock.defineItem(id, { family = 1 }) gives an item its family (C_Item.GetItemFamily), mock.setBag(bag, { family = 1 }) makes a special bag (a quiver, a soul bag) that GetContainerNumFreeSlots reports and that takes only items of its family, first.
  • E1006 (W1006 in basic mode): a function that uses a file-level local declared further down the file is reported when a global of that name exists. The function can't see the local yet, so it read the game's global instead, silently (GLYPHS is the client's string "Glyphs"). Move the local above the function, or write _G.GLYPHS to mean the global. When no such global exists, E1001 now says the local is declared further down.
  • An addon can extend a class of an addon it depends on: give the class @global("Name") and write class Plugin extends Name.
  • A class re-exported by another module (export const Base = base.Base) can be extended when imported by name (import Base from "./api"), as it already could through import * as api.

Changed

  • wowlua:chat: whisper and whisperBnet no longer open the chat line from your code. They aim it: the player's next Enter opens the whisper, and an open line switches to it; they return true when the line is open. Opening it from an addon made the game's chat state the addon's, and on WoW Forever every message the player sent in a fight was blocked until /reload. insertLink returns whether a line took the link and no longer opens one. chat.open is documented as safe only from the player's own click or key.
  • mock.click(frame) clicks what a player's click on the frame's middle would: a frame your addon or test shows over it in a higher strata (an overlay, a dim, a click catcher, a first-run window) takes the click, as in the game. Otherwise the frame you name is clicked as before.

Fixed

  • Tests: a frame with one anchor and no size (or a size of 0, or only a width, or left and right anchors and no height) has no place, as in the game: GetLeft() and GetRect() return nil, IsRectValid() false, and frames anchored to it get no place and no OnSizeChanged. It had a 0-wide place at its anchor, so a window that waits for its body's first OnSizeChanged was sized in tests and stayed 0 x 0 in the game. Give such a frame a size, or anchor two opposite edges.
  • Tests: C_ChatInfo.SendChatMessage from addon code in combat is blocked (ADDON_ACTION_BLOCKED, nothing sent), as on WoW Forever.
  • Tests: a frame script your code sets off (SetFocus → OnEditFocusGained, Click → OnClick, SetValue → OnValueChanged) runs as your addon's code, as on WoW Forever, on secure frames too. Whatever Blizzard's script writes is then your addon's: focusing the chat line from your code makes ACTIVE_CHAT_EDIT_BOX yours (issecurevariable says so), which in the game blocks the player's chat in a fight until /reload. Your Click() of a secure handler button now fails as in the game ("Invalid 'self' frame handle"). These scripts ran as Blizzard's code. OnShow and OnHide still run as Blizzard's, whoever shows the frame.
  • Profiles with the monitor on: a test file's own scripts and timers no longer run under the monitor's wrapper, and the wrapper shows as [wowlua] wowlua/runtime.lua in --profile-out reports instead of a file of your addon. Your addon's cost per frame is no longer inflated by the test's own work.
  • Tests: TakeInboxItem with no room in the bags is refused as in the game ("Inventory is full.", then MAIL_FAILED with the item), and the item stays in the letter. It was lost. Taking an item from a COD letter now pays the COD.
  • Tests (WoW Forever): C_AuctionHouse.PlaceBid from addon code is refused (ADDON_ACTION_BLOCKED) unless it runs in the player's click or key press, as in the game, so an addon's "the game said no" path runs in tests too.
  • Tests: a C_Timer.After(0, …) set inside a timer's callback runs a frame later, so within the same mock.advanceTime(1), as on the game's next frame, and at the latest in the next mock.advanceTime, however short. It always waited for the next advance.
  • A frame's screenshot (wowlua screenshot --frame, toMatchScreenshot, mock.screenshot) is cropped to the frame and what is drawn of it. An empty container inside it (an aura row with no aura) no longer widens the image with the screen behind it. Stored images of such frames need wowlua test -u once.
  • The C_UnitAuras getters (GetAuraDataByIndex, GetPlayerAuraBySpellID, …) and C_TooltipInfo's aura functions return a plain AuraData? (TooltipData?): read a.spellId after if a then, no secrecy test first. The game gives addon code a plain table, or an error while auras are restricted, never a secret table.
  • C_CurveUtil.EvaluateColorFromBoolean with a colour that has no alpha, such as C_ClassColor.GetClassColor's, is reported by wowlua check (E2001) and fails in tests with the game's "Usage: …" error. The game refuses it; wowlua took it and used alpha 1. A ColorMixin's a is now optional (number?), since a class colour has none.
  • WoW Forever (camelot): UnitAura, UnitBuff and UnitDebuff are no longer declared, so wowlua check reports them (E1001 / W1001): the client has none of them and the call fails in the game. Use C_UnitAuras. The classic flavors keep them.
  • Tests (WoW Forever): C_CVar.GetCVarInfo tells whether a CVar is stored per account or per character for the CVars recorded so far (miniWorldMap per character, lockActionBars per account, …). It said neither for every CVar.
  • Tests: GetMacroInfo of a macro left on the question mark gives the icon of the spell (or item) it casts, as in the game. It gave the question mark.
  • Tests: fontString:SetFontObject(font) gives the text the font object's colour, as in the game. A colour set before with SetTextColor stayed.
  • Tests: SelectTrainerService(i) no longer fires TRAINER_DESCRIPTION_UPDATE, as on WoW Forever, so Blizzard's trainer frame keeps its own row and its Train button follows that row, not your addon's choice.
  • --manifest <file> works in a workspace: at a root that is a package too, and in a member, wowlua build, test and perf run read that file instead of the folder's wowlua.json. So wowlua perf run --manifest wowlua.perf.json can measure without runtime checks while wowlua test keeps them.
  • Tests and wowlua perf: a C_Timer timer that has fired its last time or is cancelled no longer stays in memory. Each one kept 125 to 210 bytes for the whole run, counted as your addon's memory.
  • Tests: frame:SetPropagateKeyboardInput(…) from addon code in combat is now blocked (ADDON_ACTION_BLOCKED) on any frame, as on WoW Forever, so a key-capturing frame that switches it in a fight fails in tests too. It was allowed.
  • Tests: a frame that hides while the mouse is over it now gets its OnLeave during the Hide(), and one hidden in the middle of a drag its OnDragStop, as in the game. OnLeave never ran, and OnDragStop ran only when the mouse came up.
  • Dev builds (the monitor): frame:GetScript(name) gives back the function your addon set, so frame:GetScript("OnSizeChanged") == fitter is true as in a release build. It gave the monitor's wrapper, so such a check was never true in a dev build.
  • type(v) == "number" no longer makes a secret value plain: UnitHealth("player") stays number | Secret<number> after it, so hp + 1 is still E2040. In the game a secret number's type() is "number" too, and the arithmetic fails in combat.
  • Runtime checks ("exports", the dev build's default): the constructor of an exported class now checks its arguments (bad argument #1 'name' to 'Gadget.new'). A function written inside the constructor, or the first function after the class, was checked instead, as if it were exported, under the constructor's name.
  • A generic subclass without its own constructor (class Sub<T> extends Box<T> end) now infers its type argument: Sub.new(5) is a Sub<number> and a wrong argument is reported. It was Sub<any>, unchecked.
  • class X extends api.Alias, where api.Alias is only a type alias of a class, is now E3008 like the by-name form. It passed the check and extended nil when the addon ran.