Repository navigation
v4.2.0
JavaScript is part of a project the way CSS is. A .js file under src/
is a plain browser script, linked on every page as written, and what it
declares is in scope by name — checked, documented and offered by the
editor. external is gone; wf migrate rewrites it.
Breaking
externalis removed. A remote module is ameta.scriptsentry, a
local one a script undersrc/, and a custom element
Element("tag", …).wf migratedoes all three; a call into a remote
moduleexternaltyped isAnyafterwards.- Every
.jsundersrc/ships, on every page.wf migratelists the
ones a project already has.
New
- Your own scripts. Top-level
function,class,const,let,
varandwindow.x = …are names.wfcalls directly. A call is held to
the parameters (T10) and to the JSDoc types (T01);@returnstypes
the result; a class is constructed. Collisions with another script, a
declaration or a name the language owns are errors. An ES module under
src/stops the build; an unreadable file is linked with a warning. meta.scripts: libraries by URL, linked before the project's
scripts, their origins added to the policy;module: true, as:imports
an ES module;globalsputs a library's names in scope asAny.mount:,update:,cleanup:on every element and component call,
andwf:renderondocumentonce per drawing.Element("tag-name", …)places any custom element, in the SPA, the
static paint and the template engine.class:takes a map and a list, and anifwith noelseisnull
when it fails.V04flags a borrowedwf-class.- Editor: completion, hover and go-to-definition for script names and
for the classes.cssfiles define, insideclass:; the server watches
.jsand.cssfiles. wf auditlists the scripts and their names;wf typestheir
signatures; actingwf testpages link them.
Fixed
- What an
ifbranch,matcharm, list item or slot fill made is
disposed of with its page. A route change used to leave its effects,
timers andHostcleanups running. - An
IconButtonwhoseclass:reads state kept its own classes; it used
to have them replaced.
Tooling
scripts/check.sh(just check) runs formatting, clippy and the build
one by one, as CI does;--fixformats first,--testruns the tests.
just lintandjust fmt-checknow match CI too.- Editors: the VS Code extension (0.4.0) and the Zed extension (3.2.0)
dropexternaland re-read the project when a.jsor.cssfile
changes.
Full Changelog: v4.1.2...v4.2.0