Releases: preactjs/prefresh
Release list
@prefresh/webpack@4.0.7
Patch Changes
- Updated dependencies [
b390f28]:- @prefresh/core@1.5.11
@prefresh/web-dev-server@1.1.7
Patch Changes
- Updated dependencies [
b390f28]:- @prefresh/core@1.5.11
@prefresh/vite@4.0.0
Major Changes
-
#614
f1a23d0Thanks @LoganDark! - Make Babel an optional peer dependency@babel/coreand@prefresh/babel-pluginare no longer hard dependencies of@prefresh/vite. Projects using modern versions of Vite no longer require Babel in their dependency tree.
Patch Changes
-
#626
4bbe51fThanks @JoviDeCroock! - Fix type resolution undermoduleResolution: NodeNextand DenoThe
importcondition now resolves to a real ESM entry (src/index.mjs) with matching ESM type declarations (index.d.mtsusingexport default), whilerequirekeeps the CommonJS declarations (index.d.tsusingexport =). Previously the ESM entry was typed with a CJS-styleexport =declaration, which TypeScript 6 / Deno 2.8.3+ reject as a hard error.Also inline the
FilterPatterntype instead of importing it from@rollup/pluginutils, whose types do not resolve under NodeNext. -
Updated dependencies [
b390f28]:- @prefresh/core@1.5.11
@prefresh/nollup@4.0.5
Patch Changes
- Updated dependencies [
b390f28]:- @prefresh/core@1.5.11
@prefresh/core@1.5.11
Patch Changes
- #630
b390f28Thanks @JoviDeCroock! - Prevent stale component vnodes from being retained across rerenders and unmounts
@prefresh/vite@3.0.1
Patch Changes
-
ba9db171417a3f9eb5726763eb693ca3f0cdce0d#611 Thanks @JoviDeCroock! - Add workaround for Oxc transforming differently than babel -
f6129bbef1db5db70e292b56a6b8fff734ba2cc2#613 Thanks @JoviDeCroock! - Align$RefreshSig$ with React's HOC-chain design to fix memo-wrapped componentsBoth Babel and Oxc emit two
_s(…, key)calls for a memo-wrapped component
(_s(memo(_c = _s(inner, key)), key)). The previous status-machine approach
mishandled the second keyed call, crashing with "Cannot set properties of
undefined" because the outer type had not yet been registered whensignwas
called with'needsHooks'.The new implementation follows the same pattern as
createSignatureFunctionForTransforminvite-plugin-react:- Discriminate by
typeof key === 'string'instead of a mutablestatusvariable. - Always call
signwith'begin'for every keyed call, regardless of position
in the HOC chain. - Track
savedType(the innermost type) and defer'needsHooks'collection to
the first no-argument body call, guarded by adidCollectHooksflag.
@prefresh/core'ssignis also made idempotent on the'begin'path so that
the inner type'sgetCustomHooksis never overwritten by an outer HOC call that
carries no hook information, and the'needsHooks'path is guarded against a
missing signature entry. - Discriminate by
-
Updated dependencies [
f6129bbef1db5db70e292b56a6b8fff734ba2cc2]:- @prefresh/core@1.5.10
@prefresh/core@1.5.10
Patch Changes
-
f6129bbef1db5db70e292b56a6b8fff734ba2cc2#613 Thanks @JoviDeCroock! - Align$RefreshSig$ with React's HOC-chain design to fix memo-wrapped componentsBoth Babel and Oxc emit two
_s(…, key)calls for a memo-wrapped component
(_s(memo(_c = _s(inner, key)), key)). The previous status-machine approach
mishandled the second keyed call, crashing with "Cannot set properties of
undefined" because the outer type had not yet been registered whensignwas
called with'needsHooks'.The new implementation follows the same pattern as
createSignatureFunctionForTransforminvite-plugin-react:- Discriminate by
typeof key === 'string'instead of a mutablestatusvariable. - Always call
signwith'begin'for every keyed call, regardless of position
in the HOC chain. - Track
savedType(the innermost type) and defer'needsHooks'collection to
the first no-argument body call, guarded by adidCollectHooksflag.
@prefresh/core'ssignis also made idempotent on the'begin'path so that
the inner type'sgetCustomHooksis never overwritten by an outer HOC call that
carries no hook information, and the'needsHooks'path is guarded against a
missing signature entry. - Discriminate by
@prefresh/vite@3.0.0
Major Changes
117dde9ca19d69bb53f4c410c3fd55cb4b895c97#607 Thanks @JoviDeCroock! - Add true vite 8 support with native rolldown rather than babel
Patch Changes
- Updated dependencies [
06555599cec8198540d221d6a1fd26fdd22de169]:- @prefresh/rolldown@0.1.0
@prefresh/rolldown@0.1.0
Minor Changes
06555599cec8198540d221d6a1fd26fdd22de169#606 Thanks @JoviDeCroock! - Add a Rolldown package that memoizescreateContext()calls so Preact context identity is preserved across hot updates.
@prefresh/web-dev-server@1.1.6
Patch Changes
- Updated dependencies [
2b79884480b19bc02ee06eba59f2882672c0e7f0]:- @prefresh/babel-plugin@0.5.3