Khufu Changes By Release¶
v0.5.3¶
- Bugfix: previously if some block (e.g.
view f(){body}
) was declared in arguments but not passed exception were when calling function. Nowbody
will be undefined and can be checked for in function itself.
v0.5.2¶
- Bugfix:
error
variable works in Catch Statements - Bugfix: exported dictionary views did not compile
- More CSS syntax is supported now, in particular
--vars
and quoted literals (outside of url)
v0.5.1¶
- Support of tagged templates (not just bare template strings)
- Support of dictionaries of views
v0.5.0¶
Upgrading
- If you have the variables that clash with store names, they must be renamed, (see below).
- The variables named
catch
are prohibited now - API: use
import {attach} from 'khufu-runtime'
instead of importing default
- Added if-let statement
catch
became reserved word, added catch statement- Imports that shadow builtin names like
text
anditem
are now handled properly - Simplified object literals like
{field1, field2}
are supported - Stores are now in the same namespace as normal variables, so
x
is a store and@x
is ax.getState()
(but with optimizations applied). So the store can be passed as a variable normally as well as you can access any extra methods on the store without any hacks. - Now we allow
@x
as assignment target everywhere (i.e. even in let statements or object/array unpacking, etc..). The AT sign in assignment context basically just an indicator that you will use the variable as a store, without any special meaning. - The default-exported function in
khufu-runtime
module is now gone, and is replaced byattach
function that works the same. This is because exporting both the default and named variables is not recommended at least by rollup.