Repository navigation
v5.6.0
A name the language has is not a program's to declare.
Changes
- A name the language already has is
E118, where it is declared. A
page'sstate envcompiled every read to the build's settings and every
write to the state:"{env}"showed[object Object],env == "prod"
was never true, andwf checksaid nothing. A loop'sthid the
translation function inside the loop the same way. Such a name is now
refused as astate,derived,persistorlet, a prop, a route or
action parameter, a loop item, a lambda's parameter, a binding ofif let,matchor a slot, and as a top-levelconst,data,image,
store orapi. The names areenv,params,localeanddir; the
values the browser keeps current (now,viewport,query,hash,
theme,network,update); the language's functions (t,format,
ago,log,navigate,fetch,uuid,every,after, …); the
words a statement is written with (state,action,let,if,
show,match,style,on, …); and, at the top level, the runtime's
WF. The message suggests a name of your own where there is a usual one
—targetforenv,searchforquery,schemefortheme.
event,e,value,keyand the browser's globals stay yours, and so
does any name as a field, a map key or an enum case. - A top-level
const envis refused where it is written. It was
refused only when the build read its own bundle back, as "a bug in
WebFluent" (E901).
Upgrading
A program that declares one of these names stops at E118, on the line
that declares it; rename it and its reads. The usual ones are a loop's or a
lambda's t (for t in todos, items.filter(t => …) — todo, item),
state query (search), persist theme (scheme), a route parameter or
state env (target, stage) and an action named update (edit). The
guide, the examples and the site were renamed the same way.
Full Changelog: v5.5.0...v5.6.0