diff --git a/.changeset/changelog-github-custom.cjs b/.changeset/changelog-github-custom.cjs index c2fbf4eb4d4..aafbd513782 100644 --- a/.changeset/changelog-github-custom.cjs +++ b/.changeset/changelog-github-custom.cjs @@ -351,12 +351,9 @@ var changelogFunctions = { .concat(links.pull || links.commit, ')'); } emojiFirstline = firstLine - .replace('FEAT:', '✨ ') - .replace('feat:', '✨ ') - .replace('fix:', '🐞🩹') - .replace('FIX:', '🐞🩹') - .replace('DOCS:', '📃') - .replace('docs:', '📃'); + .replace(/feat:/i, '✨ ') + .replace(/fix:/i, '🐞🩹') + .replace(/docs:/i, '📃'); return [ 2 /*return*/, '\n\n- ' diff --git a/.changeset/changelog-github-custom.ts b/.changeset/changelog-github-custom.ts index d151d212941..c51cdf71ad4 100644 --- a/.changeset/changelog-github-custom.ts +++ b/.changeset/changelog-github-custom.ts @@ -116,12 +116,9 @@ const changelogFunctions: ChangelogFunctions = { } const emojiFirstline = firstLine - .replace('FEAT:', '✨ ') - .replace('feat:', '✨ ') - .replace('fix:', '🐞🩹') - .replace('FIX:', '🐞🩹') - .replace('DOCS:', '📃') - .replace('docs:', '📃'); + .replace(/feat:/i, '✨ ') + .replace(/fix:/i, '🐞🩹') + .replace(/docs:/i, '📃'); return `\n\n- ${emojiFirstline} ${suffix}\n${futureLines.map((l) => ` ${l}`).join('\n')}`; }, diff --git a/.changeset/eleven-rabbits-cross.md b/.changeset/eleven-rabbits-cross.md new file mode 100644 index 00000000000..9baa1fde14f --- /dev/null +++ b/.changeset/eleven-rabbits-cross.md @@ -0,0 +1,36 @@ +--- +'@builder.io/qwik': minor +--- + +Async functions in `useComputed` are deprecated. + +**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` and `useResource` are available, without these problems. + +In v2, async functions won't work. + +Again, to get the same functionality use `useTask` or `useResource` instead, or this function: + +```tsx +export const useAsyncComputed$ = (qrlFn: QRL<() => Promise>) => { + 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; +}; +``` diff --git a/.changeset/funny-wasps-do.md b/.changeset/funny-wasps-do.md new file mode 100644 index 00000000000..638547bcb7b --- /dev/null +++ b/.changeset/funny-wasps-do.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik': patch +--- + +FIX: 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. diff --git a/.changeset/gentle-adults-compare.md b/.changeset/gentle-adults-compare.md new file mode 100644 index 00000000000..3748cec64ac --- /dev/null +++ b/.changeset/gentle-adults-compare.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik': patch +--- + +FIX: the type for `