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. Nowbodywill be undefined and can be checked for in function itself.
v0.5.2¶
- Bugfix:
errorvariable works in Catch Statements - Bugfix: exported dictionary views did not compile
- More CSS syntax is supported now, in particular
--varsand 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
catchare prohibited now - API: use
import {attach} from 'khufu-runtime'instead of importing default
- Added if-let statement
catchbecame reserved word, added catch statement- Imports that shadow builtin names like
textanditemare now handled properly - Simplified object literals like
{field1, field2}are supported - Stores are now in the same namespace as normal variables, so
xis a store and@xis 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
@xas 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-runtimemodule is now gone, and is replaced byattachfunction that works the same. This is because exporting both the default and named variables is not recommended at least by rollup.