Changelog

All versions and downloads Jump to Added | Changed | Fixed | Security

Unreleased [Not released yet]

Part 5 of 15. Previous part

Fixed (612)

  • A script-src-elem that the app names in wisp::csp gets the hashes of the inline scripts, the asset host and the nonce, as script-src does. Before, it got none, so the browser blocked the inline scripts of the app with no message. A script-src or script-src-elem with 'unsafe-inline' (in any case: 'UNSAFE-INLINE' too) still gets no hash or nonce, because one would turn 'unsafe-inline' off. A source that the directive has already, such as a hash that the app names, is not added again. The server build now logs a line that names that directive at start. The edge build does not, for its size.
  • wisp check no longer warns js-unused-import for an import that the file reads only as a store, such as $account.user. A $name is a use of name, as the browser reads it. A $name in a string or in the text of a template literal of a script is still no use.
  • First paint: the server now computes a ? b : c as an item of an array or a value of an object, such as class={:['a', on ? 'b' : 'c']}. Before, it wrote no class there, and the page kept the element hidden until the browser bound it.
  • First paint: in <b class={:c} {:...rest}>, a class in rest wins over c, as in the browser. Before, the server wrote class twice, and the browser used the first one. A spread before class={:c} does not write class.
  • First paint: a component that the browser draws gets its ...rest from the server too. Before, the server wrote none of its extra attributes, such as popovertarget. A value that the server does not know stays out, and the browser sets it.
  • HTTP/2 on a 32-bit target: the owe deadline counts with no wrap the bytes sent since the connection began to owe. Before, a usize cast cut the count past 4 GiB, so the deadline could come too early.
  • HTTP/2: DATA that comes in the same read as a WebSocket's extended CONNECT goes to the socket, in order. Before, the server gave it to the GET as its body, and the socket did not get it.
  • since_mark, before_mark_from, take_since_mark and move_before_mark of the response headers no longer slice past the end of the list after send empties it. No caller did this, so no page changed. /_wisp/health has a test for its 503 answer.
  • A chunk line is a 400 when a control byte other than tab is in its extension (1;a<NUL>b), or when a byte other than a space or a tab is between the size and its ; (a form feed). Before, such a line passed, and a proxy in front may frame it in another way.
  • The 304 for /_app/wisp.js and /_app/live.js says vary: accept-encoding, as the 200 does. Before, it had no vary.
  • An error goes back as JSON or as a page by the order of json and text/html in Accept, with the media types in any case. Before, Application/JSON, text/html got a page and TEXT/HTML, application/json got JSON.
  • An answer to HEAD with the status 204 or 304 has no content-length, and one with 205 has content-length: 0 once, on HTTP/1.1 and HTTP/2 and through handle. Before, the content-length of the app stayed on it, so a 205 had two on the wire.
  • handle runs the app setup once, not at each request. Before, an app with more than 256 locales logged the line "locales" at each request.
  • WISP_MAX_CONNS set to a number over the open-file limit no longer makes the server hang its clients on Linux. Before, a set number skipped the raise of the soft open-file limit. Clients waited with no 503 on epoll and io_uring. On epoll, accept failed with EMFILE. On io_uring, accept may fail the same way. Now the server raises the soft limit to the hard one at start on every set or unset value. It keeps the number at most half of a limit of 2048 or less, else at most the limit less 1024 (64 at least). It writes a note when it cuts a number of 1 or more. WISP_MAX_CONNS=0 is cut the same way, with no note. Test: tests/app/tests/linux.rs, both drivers.
  • With TLS in the server (the tls feature), a Secure cookie logs no wisp: sent a Secure cookie on a request with no sign of HTTPS line. Before, a request with no x-forwarded-proto to a Host that is not this machine logged it once. A panic in the TLS certificate reload check writes only wisp: TLS certificate reload failed, the old one is still served: <reason>, once, unless RUST_BACKTRACE has a value. Before, the panic hook also wrote thread 'wisp-tls-reload' panicked at ... for each panic.
  • A page of an upstash store shows each name once. Before, a SCAN reply that named a key twice gave the name twice. The same name may still show on another page, because Redis SCAN may repeat a key.
  • Each driver words an unknown operation as KIND NAME (DRIVER): no such operation: X, for example blob B (s3): no such operation: nope. Before, fs, memory, s3, vercel-blob, libsql and d1-http gave only no such operation: X, and only upstash named the store.
  • A panic in the parse of a gzip request body no longer leaves a flag set on the worker thread. Before, later gzip bodies on that thread stayed packed for the handler. A form larger than 64 KiB, sent to a route that takes an Upload, also skipped the spool.
  • A custom element reads a prop of type Option<&'static str> as text. Before, it read the attribute as JSON.
  • OpenTelemetry: the exporter thread logs the count of spans that the full queue had no room for. It logs it at most once a minute, also when the collector takes each batch. Before, it logged the count only after a POST failed. So with a working collector, a full queue dropped spans and logged nothing.
  • Wisp reads an upload as a ZIP64 Office file too: the end record with 0xFFFFFFFF fields points to the ZIP64 record. Before, such a file stayed application/zip. A text file with ftyp at byte 4 was video/mp4, and with the avif brand it was image/avif. Now an ftyp box needs a size from 16 to 0xFFFFFF. The docs say 1 MiB, as the code does, in place of 1 MB.
  • An upload that starts with <svgfoo>, <a:svgx> or <!DOCTYPE svgx> was image/svg+xml. Now the name svg must end at a space, > or /. A Unicode space before the root element no longer counts: only the four spaces of XML do. The SVG test of a text file over 1 MiB used the first read, which can be short. It now uses a full first chunk. The 1 MiB limit for JSON and CSV now holds when the caller gives a length that is too low.
  • wisp upgrade runs no bare cargo update when Cargo.lock names no Wisp crate. Wisp skips it and says so.
  • wisp upgrade updates a lock that names only wisp. Before, it ran a bare cargo update for every dependency.
  • wisp upgrade changes the tag in --tag=<old> of the deploy workflow. Before, it left that line as it was.
  • wisp upgrade does not change a path dependency that has git in its path. Before, it rewrote the line.
  • A failed wisp upgrade --undo or --force-undo names the files that it already put back. It also deletes its temp file.
  • A form to a route that takes an Upload is a 400 when it ends before its closing delimiter, also when the body is whole in memory (a form of 64 KiB or less, or one that came with its head in one read). Before, it gave 200 with the fields and no file when the last part had no end. A form that streams was a 400 already. A multipart form with no boundary in its body is a 400 too. A form of another type is not changed.
  • The error for a bad #[collection("..")] name says that the name starts with a lowercase letter. Before, it named only lowercase letters, digits and _, so _posts failed with no reason.
  • wisp route add <path> crud writes src/db.rs to a temp file and renames it over the old file. Before, it truncated the file and then wrote it, so a failed write may leave the file empty. The command now also adds only what the file lacks: struct Post with no POSTS, or POSTS with no Post. Before, it added nothing in the first case and a second POSTS in the second.
  • wisp dev shows the error when proxy rules exist and it cannot read the routes for their check (a +server.rs that is not UTF-8, for example). Before, it took the routes for none and said nothing.
  • wisp route add <path> rest names its type as wisp route add <path> crud does: /api/categories gives Category (before: Categorie), and a name of the prelude, such as /api/pages, gives PageRow. A name that starts with a dot, such as /.well-known, gives the page title Well Known (before: .well Known).
  • The text of wisp route add is plainer. The form scaffold flashes Received from {name}. Reply to {email}. (before: one sentence with a semicolon). The error for a bad folder name lists . and =, which the command allows, and the error for a folder like x.bak says that Wisp never serves the route.
  • wisp preview --static refuses the Windows device names COM0, LPT0, CONIN$ and CONOUT$ with 400. Before, it served them. The names of wisp new, wisp routes crud and wisp routes component refuse com0, lpt0, conin$ and conout$ too. The CLI and the runtime now use one list (wisp_shared::winname::windows_device).
  • A +server.rs that is not UTF-8 fails the build with its path. Before, the build read it as empty, and the route had no endpoints.
  • In an app script, a vertical tab (U+000B) is white space. Before, the build read it as a symbol.
  • In an app script, the flags of a regex end at white space. Before, a no-break space after /a/g became part of the regex token.
  • A label after a brace ({ foo: for (;;) { break foo } }) is no longer read as an object key. Before, the mangle pass of the runtime's own browser files renamed break foo and not the label, when a foo was declared in the file.
  • In an app script, the check for a write to a name no longer climbs through every block around it. A { after ;, {, }, ), =>, else, try, finally or do is a block, not a pattern. With deeply nested blocks, the build work now grows in step with the size, not with its square. 1,000 nested blocks read token text 1,104,027 times, 4,000 read it 16,416,027 times. Now 104,029 and 416,029. Source: the test big_scripts_compile_in_linear_time, counts before and after the fix.
  • In an app script, a call with a block on the next line (f(n) then { n = 1 }) is no longer read as a method. Before, the rewrite did not change the $state name n in both lines. It stayed n and not n.v. A method with its { on a new line, in a class or an object, still binds its parameters.
  • In an app script, a ++ or -- at a line break follows the rule of a line break. A $derived name on the line after n++ is a read, and the build no longer fails with "d is $derived". A name before a ++ that starts the next line is a read too. Before, the build took both for a write.
  • In an app script, $state(1,) with a trailing comma gives the first paint the value 1. Before, it gave 1,.
  • In an app script, the name of for (let x of xs) f(x) with no block is local to that one statement. Before, it was local to the rest of the enclosing block. A later read of a global x was not a read, and the $state rewrite did not change it.
  • In an app script, a declaration in a block ends at a line break, as at the top level. After let a = 1 and a new line foo(), bar(), the name bar is a read and no longer a declared name.
  • In an app script, a block after case 1: or a label is a block. Before, a call such as f(x) and a block on the next line were read as a method with the parameter x.
  • In an app script, the body of an arrow function with no block ends at its last token. Before, a name at the start of the next line was local when it had the name of a parameter.
  • In an app script, class A extends mix(x) { on one line is a class and a call. Before, mix(x) was read as a method with the parameter x.
  • In an app script, a let, const or var init without a semicolon ends at a line break before {, ++ or --. Before, the init took the next line, and let a = 0 followed by a line { x = 1 } became let a = __wisp_s(0 and { x = 1 }), which is a syntax error. A line that starts with (, [, +, -, / or a template literal still goes on with the init, as in JavaScript. A { on its own line after function () or class A still opens the body.
  • In a script, a $state name that starts a block (L: { n = 1 }, or { n = 1 } on a new line after a statement) no longer gets a label. Before, the rewrite read the block as an object pattern with a default, and wrote { n: n.v = 1 }. The code ran the same, but the output was longer. The minifier of the runtime files had the same fault after catch and static. It is not an app path.
  • A has: or missing: condition of a redirects, rewrites or headers rule reads the request as sent. A cookie that this request sets (in the before hook, a handler or the html hook) does not change a condition of a redirects, rewrites or headers rule. Before, a rewrites rule with a cookie condition also read a cookie that the before hook set, when the hook returned Response::rewrite.
  • A REST list with ?sort keeps only the first offset + limit rows that pass, with their sort keys. It does this while it reads the table under its read lock. Before, it kept the sort keys of every row that passed. The test a_sorted_page_holds_the_keys_of_its_page_not_of_every_row counts the bytes of the sort buffers on 10,000 rows with limit=10. It counts 1,280 for sort=a and 6,016 for sort=a,b,c,d. The order of the rows does not change.
  • A REST sort puts the numbers of a number field before its other values, and reads NaN as text. Before, a number and a text compared as text, so the order of three values could change with the pair compared.
  • A REST PUT with a before_update hook that writes the row is a 409 (conflict), as a PATCH is. Before, the PUT wrote over the hook's write when the type had no #[json(skip)] field.
  • t() in browser code: a <html lang> of __proto__ or constructor made a plural throw a TypeError. An empty =N case gave the text of the plural category. A plural with no case for the count and no other threw. Now the =N case wins also when it is empty. Then come the category and other, else no text, as on the server.
  • A MediaQuery, prefersReducedMotion too, calls matchMedia on the first read of current. Before, reactivity.js called it when the module loaded, also for a module that names only fromAction. Where matchMedia is missing, the load failed.
  • The build checks the name of #[collection("name")] with the rule of the macro (a lowercase letter, then lowercase letters, digits and _). Before, the build took pOsts and _posts, which the macro refuses.
  • The build reads the first type of a <script> for its CSP hash, as a browser does. Before, it read the last. A script with type=module type=application/json got no hash and the CSP blocked it.
  • wisp dev --target <host> --port 0 is an error: --port 0 does not go with --target. Before, Wisp passed PORT=0 to the host and waited 30 s for a host on port 0.
  • The error dialog of wisp dev names the file and line of a template error when the path starts with a Windows drive (C:\app\src\routes\+page.wisp:4:1). Before, it named no place.
  • wisp dev counts a save as a change after a build when a Rust file keeps its size and its time stamp but not its text. Before, it kept the code of the file from before the build.
  • The Pages warning about static/ entries that reach the worker uses the singular for a count of 1 (1 top-level name, 1 entry reaches the worker, which serves it). Before, it said 1 top-level names and 1 entries reach.
  • const EARLY_HINTS_H1 in src/hooks.rs or in a +server.rs fails the build, as EARLY_HINTS does. Before, the build ignored it there.
  • The docs of Browser::eval said that a value that is not JSON gives Value::NULL. undefined gives Value::NULL, and an object (an element too) gives its own fields. A browser may fail to send some values (for example window). Then eval fails with the browser's error. For such a statement, use void (...) or return JSON (el.id).
  • On a CACHE or CACHE_PUBLIC route whose handler calls cx.cors, the kept answer holds each header that the handler set, also those before cx.cors. With cx.cors("*"), a request with any origin gets a hit. When access-control-allow-origin echoes an origin, the kept answer holds one origin at a time. A request with the same origin gets a hit, and alternating origins run the handler again. Before, a hit sent no access-control-allow-origin and no vary: origin.
  • A plugin path reads as each other string of Cargo.toml: '''../k''' and """../k""" are ../k. An empty path is an error that names it. Before, such a path was the app folder, and the error named another cause.
  • A [dependencies.kit] table takes the dependency from the workspace only with workspace = true. Before, any such table took the rename of the workspace's kit, also with workspace = false.
  • A release build reads [lib] and [workspace only as table headers of Cargo.toml. Before, the text in a comment or a string made a plain build, or took the folder above as the workspace root.
  • A cargo child with no output to read is a failed build with the message Could not read the output of cargo <command>. Before, wisp panicked.
  • wisp::oauth::oidc with a name that is not a word (my-okta) answers 500 with a provider's name is a word, such as "github", not my-okta . Before, the handler panicked after the discovery fetch.
  • wisp dev: after a failed build, a save in a layer reaches the app again. The check before the compile now copies the layer in first. Before, it read the broken copy of the failed build, and each later save failed until you copied the files by hand.
  • wisp lsp drops the data of an app when the editor closes the last open file of that app. Before, the server kept the data of each app until it stopped.
  • After shutdown, wisp lsp answers each request with the error -32600 (InvalidRequest). The LSP specification asks for this error. Before, the server answered the request.
  • The colors of wisp lsp keep the names of a block after a browser text hole such as {:count}. Before, the char of {#each xs as char} showed as a type after {:count}.
  • wisp lsp reads the name of an action attribute as the build does: #[action] and #[wisp::action] mark an action, #[actionx] does not. A comment between #[action] and fn no longer hides the action.
  • The build reads a mod NAME; of main.rs and lib.rs by tokens, at the top level only. The braces of a macro (cfg_if!) are not a level. The body of a fn or a const is a level. A mod NAME; in a string literal or in an inline module is not a declaration of src/NAME.rs. A mod with its name on the next line is one, and so is mod r#NAME;. Before, the build did not compile src/NAME.rs for such a string, and compiled it a second time for such a declaration.
  • The auto-imports take lib.rs as the crate root only when its code calls app!. Before, a comment or a string with app! in lib.rs was enough. The auto-imports also read a mod NAME; in the braces of a macro, but not in a macro_rules! body.

Next part (6 of 15)

Source: CHANGELOG.md