Releases: QwikDev/qwik
@qwik.dev/router@2.0.0-alpha.0
@qwik.dev/core@2.0.0-alpha.0
2.0.0-alpha.0
A complete rewrite of the core internals by @mhevery, @Varixo , @wmertens and more contributors
Major Changes
-
π₯BREAKING: remove HTML-related types. Use PropsOf instead. (by @wmertens in #7045)
-
π₯BREAKING:
useComputed
no longer allows Promise returns. (meaning it is strictly sync) Instead, useuseSignal
anduseTask
together to perform async signal updates (by @wmertens in #6907) -
qwik-labs
package has been removed in favor of experimental features. (by @shairez in #7025)
So the "Insights" vite plugin and components have been moved to core as an experimental feature.In order to use it, you need to -
1) add
insights
to the experimental array invite.config.ts
:qwikVite({ experimental: ['insights'] }),
2) Import and use the
qwikInsights
vite plugin from@qwik.dev/core/insights/vite
:import { qwikInsights } from '@qwik.dev/core/insights/vite';
3) import the
<Insights>
component from@qwik.dev/core/insights
and use it in yourroot.tsx
file: :import { Insights } from '@qwik.dev/core/insights'; // ...rest of root.tsx file return ( <Insights publicApiKey="..." postUrl="..." /> /* ...qwik app */ );
-
π₯BREAKING: the Typescript exports were trimmed down to the bare minimum. If there are types you are missing, open an issue. (by @wmertens in #7045)
Minor Changes
-
β¨ new integration tests that are running with the optimizer (by @Varixo in #7055)
-
β¨ new simpler signals implementation with lazy useComputed$ execution, only when is needed (by @Varixo in #7055)
-
β¨ added the scheduler to sort chores execution and have more predictable behavior (by @Varixo in #7055)
-
β¨ new CSR and SSR rendering written from scratch to speed up performance, improve code readability, and make the code easier to understand for new contributors (by @Varixo in #7055)
Patch Changes
eslint-plugin-qwik@1.10.0
create-qwik@1.10.0
Patch Changes
- INFRA: migration from tsm to tsx (by @JerryWu1234 in #6877)
@builder.io/qwik@1.10.0
Minor Changes
-
Async functions in
useComputed
are deprecated. (by @wmertens in #7013)Why?
- Qwik can't track used signals after the first await, which leads to subtle bugs.
- When calculating the first time, it will see it's a promise and it will restart the render function.
- Both
useTask
anduseResource
are available, without these problems.
In v2, async functions won't work.
Again, to get the same functionality use
useTask
oruseResource
instead, or this function:export const useAsyncComputed$ = (qrlFn: QRL<() => Promise<any>>) => { const sig = useSignal(); useTask(({ track }) => { const result = track(qrlFn); if (result && 'then' in result) { result.then( (val) => (sig.value = val), (err) => { console.error('async computed function threw!', err); throw error; } ); } else { sig.value = result; } }); return sig; };
-
β¨ Expose
unwrapStore
as a low level AP (by @GrandSchtroumpf in #6960)This enables developers to clone the content of a
useStore()
usingstructureClone
or IndexedDB
Patch Changes
-
π fix useResource docs example & remove unused demo (by @ianlet in #6893)
-
ππ©Ή QRL segment filenames are no longer lowercased. This was giving trouble with parent lookups in dev mode and there was no good reason for it. (by @wmertens in #7003)
-
ππ©Ή the type for
<textarea>
now accepts text children, as per spec. (by @wmertens in #7016) -
ππ©Ή dev-mode QRL paths are now handled by Vite so they are the same as the parent paths. You can see this in the Sources section of the browser devtools, where the segments are now always next to their parents (when the parent is loaded). (by @wmertens in #7037)
-
ππ©Ή
vite
is now a peer dependency ofqwik
,qwik-city
,qwik-react
andqwik-labs
, so that there can be no duplicate imports. This should not have consequences, since all apps also directly depend onvite
. (by @wmertens in #6945) -
β¨ sync$ QRLs will now be serialized into the HTML in a shorter form (by @wmertens in #6944)
-
ππ©Ή cli build command appearing to "hang" on errors (by @shairez in #6943)
-
β¨ Allow setting
linkFetchPriority
for modulepreload links in the prefetch strategy. Also fix the links in dev mode (by @GrandSchtroumpf in #6947)
@builder.io/qwik-city@1.10.0
Patch Changes
-
ππ©Ή MDX content no longer ignores Layout components. See the MDX docs for more information. (by @danielvaijk in #6845)
-
ππ©Ή SSG errors now show the path that failed (by @wmertens in #6998)
-
ππ©Ή Fixed action redirect regression where searchParams were appended (by @brandonpittman in #6927)
-
ππ©Ή Redirect, error, and fail request events no longer forcefully delete user-defined Cache-Control HTTP header value. (by @nelsonprsousa in #6991)
-
ππ©Ή
vite
is now a peer dependency ofqwik
,qwik-city
,qwik-react
andqwik-labs
, so that there can be no duplicate imports. This should not have consequences, since all apps also directly depend onvite
. (by @wmertens in #6945) -
ππ©Ή Fixed MDX layout default export being ignored by transformer. (by @danielvaijk in #6845)
-
ππ©Ή Prevent unexpected caching for q-data.json (by @genki in #6808)
-
ππ©Ή Multiple rewrite routes pointing to the same route is no longer an error. (by @JerryWu1234 in #6970)
eslint-plugin-qwik@1.9.1
eslint-plugin-qwik@1.9.1
create-qwik@1.9.1
create-qwik@1.9.1
@builder.io/qwik@1.9.1
Patch Changes
-
β¨ showing qrl parent names. (by @wmertens in #6881)
in dev mode, qrl segments now start with their parent filename so it's easy to see where they came from. Furthermore, in production builds these filenames are also used so that origins inq-manifest.json
are easy to understand. -
ππ©Ή Optimizer now ignores unknown deps in graph that caused crashes during build (by @wmertens in #6888)
-
ππ©Ή Do not allow object methods to be serialized with style prop (by @jakovljevic-mladen in #6932)
-
ππ©Ή In dev mode, changes to QRLs now explicitly invalidate the segment so that the browser will reload it (by @wmertens in #6938)
@builder.io/qwik-city@1.9.1
Patch Changes
- β¨ Experimental feature -
noSPA
. (by @wmertens in #6937)
This disables history patching, slightly reducing code size and startup time. Use this when your application is MPA only, meaning you don't use the Link component. To enable this, add it to theexperimental
array of theqwikVite
plugin (not theqwikCity
plugin).