0.35.0
elements man changelog/v0-35-0The browser attaches a page to the server's HTML by position, and the HTML
carries no ids. A deployed app serves no browser source maps. A migration
file with no statement is not applied. elements run prints only the
program's output when the build has no errors. The hydration changes are in
@elements/app 0.31.0: upgrade the package in every project after upgrading
Elements.
Changes
- The HTML the server renders has no ids. A template is between the comments
<!--<Dialog>-->and<!--</Dialog>-->, and an element with a binding or an event handler has the bare attributee:mark. The browser attaches each element,e:if,e:forand template to the server's HTML in the order they appear in the page. Requires@elements/app0.31.0. - When an attribute initializer returns one value on the server and another
in the browser, the page shows the browser's value after it attaches. The
browser renders an
e:if,e:switch,e:for, template or{expression}again when what it holds differs from what the server rendered, and every part of the page after it attaches to its own nodes. - On the first page load, an
oninithandler runs after every element on the page has attached to the server's HTML. On an element the browser renders later,oninitruns before the element is inserted, as before. - A deployed app has no browser source maps: the build on a deploy machine
writes no
.mapfile and nosourceMappingURLcomment for a browser file.elements starton your own machine writes them as before. Seeelements man deploy/what-happens. - The build does not apply a migration file that has no statement. The file
elements create migrationwrites without-tablesholds only comments, and the build applies it as a new migration when you save its first statement. Seeelements man migrations. elements runprints nothing of its own when the build has no errors, so its output is the program's output. When the build has errors it prints them and does not start the program.- The
-quietoption is removed from every command. A command draws its live view only when its output is a terminal, and-jsonwrites the result as JSON. - In browser code,
new C()is a compile error when the constructor ofC, one of its field initializers or one of its static blocks calls a server function or readsprocess.env, and it is not called through an@rpcfunction. A read of a static field of such a class is the same error. {process.env.KEY}in a template is a compile error, and so isprocess.envused as a value in browser code: assigned to a variable, destructured, or passed as an argument.- The call stack of a browser security error starts with the code the error
is at, as written (
db.query,process.env.KEYor a config key). The calls that reach it follow, innermost first. - The error for a config key read in browser code is placed at the key to
tag. For
config.app.stripe.publicKeythe line, the column and the underline are atpublicKey. elements man database/transactionshas a section on a network call that must run once per key, andelements man migrationssays which parts of a migration the camelCase conversion leaves as written.- The
AGENTS.mdthatelements createwrites tells an agent to name the manual pagesstart/conventionsandasyncin each brief to a subagent.
Upgrade
-
Upgrade
@elements/appin each project, and restartelements startafter the install.Terminalelements install @elements/app -u -json elements build -json -
Remove
-quietfrom each script that passes it to anelementscommand. A script that reads a command's output passes-json. -
Change a test or a script that finds an element by its
e:idattribute, or that reads an id from a template's comment. Find a template by its name, aselements man browsershows.