Beraliv / beraliv.dev

Digital garden 🌳🌲
https://blog.beraliv.dev
2 stars 1 forks source link

fix(deps): update all dependencies - autoclosed #560

Closed renovate[bot] closed 10 months ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Type Update
@solidjs/router 0.8.2 -> 0.8.3 age adoption passing confidence dependencies patch
@solidjs/router 0.5.1 -> 0.8.3 age adoption passing confidence dependencies minor
@testing-library/react 13.3.0 -> 13.4.0 age adoption passing confidence devDependencies minor
@types/jsdom (source) 20.0.0 -> 20.0.1 age adoption passing confidence devDependencies patch
@types/mocha (source) 10.0.0 -> 10.0.2 age adoption passing confidence devDependencies patch
@types/node (source) 18.7.23 -> 18.18.4 age adoption passing confidence devDependencies minor
@types/unist (source) 2.0.6 -> 2.0.8 age adoption passing confidence devDependencies patch
csstype 3.1.0 -> 3.1.2 age adoption passing confidence devDependencies patch
effector (source) 22.4.0 -> 22.8.7 age adoption passing confidence dependencies minor
effector-solid (source) 0.22.6 -> 0.22.7 age adoption passing confidence dependencies patch
eslint (source) 8.23.0 -> 8.51.0 age adoption passing confidence devDependencies minor
formik (source) 2.2.9 -> 2.4.5 age adoption passing confidence dependencies minor
jsdom 20.0.0 -> 20.0.3 age adoption passing confidence devDependencies patch
mocha (source) 10.0.0 -> 10.2.0 age adoption passing confidence devDependencies minor
next-mdx-remote 4.1.0 -> 4.4.1 age adoption passing confidence dependencies minor
node 18.12.1 -> 18.18.0 age adoption passing confidence minor
prism-react-renderer 1.2.1 -> 1.3.5 age adoption passing confidence dependencies minor
solid-devtools (source) 0.27.3 -> 0.27.7 age adoption passing confidence devDependencies patch
solid-js (source) 1.7.6 -> 1.7.12 age adoption passing confidence dependencies patch
solid-js (source) 1.5.1 -> 1.7.12 age adoption passing confidence dependencies minor
ts-essentials 9.3.0 -> 9.4.1 age adoption passing confidence devDependencies minor
typescript (source) 5.1.3 -> 5.2.2 age adoption passing confidence devDependencies minor
typescript (source) 4.8.2 -> 4.9.5 age adoption passing confidence devDependencies minor
unist-util-visit 4.1.1 -> 4.1.2 age adoption passing confidence dependencies patch
vite (source) 4.3.9 -> 4.4.11 age adoption passing confidence devDependencies minor
vite (source) 3.0.9 -> 3.2.7 age adoption passing confidence devDependencies minor
vite-plugin-solid-svg 0.6.1 -> 0.6.4 age adoption passing confidence devDependencies patch

Release Notes

testing-library/react-testing-library (@​testing-library/react) ### [`v13.4.0`](https://togithub.com/testing-library/react-testing-library/releases/tag/v13.4.0) [Compare Source](https://togithub.com/testing-library/react-testing-library/compare/v13.3.0...v13.4.0) ##### Features - **renderHook:** allow passing of all render options to renderHook ([#​1118](https://togithub.com/testing-library/react-testing-library/issues/1118)) ([27a9584](https://togithub.com/testing-library/react-testing-library/commit/27a9584629e28339b9961edefbb2134d7c570678))
frenic/csstype (csstype) ### [`v3.1.2`](https://togithub.com/frenic/csstype/compare/v3.1.1...v3.1.2) [Compare Source](https://togithub.com/frenic/csstype/compare/v3.1.1...v3.1.2) ### [`v3.1.1`](https://togithub.com/frenic/csstype/compare/v3.1.0...v3.1.1) [Compare Source](https://togithub.com/frenic/csstype/compare/v3.1.0...v3.1.1)
effector/effector (effector) ### [`v22.8.7`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2287) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.6...effector@22.8.7) - Fix `combine` function called twice on first `allSettled` call ([PR #​984](https://togithub.com/effector/effector/pull/984)) ### [`v22.8.6`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2286) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.5...effector@22.8.6) - Follow-up fix for `22.8.2`: now `combine` in tuple-form handles compelx edge-cases with mapped stores correctly. ([PR #​902](https://togithub.com/effector/effector/pull/902)) ### [`v22.8.5`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2285) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.4...effector@22.8.5) - Follow up fix for `22.8.4`: now fix works for `fork({ handlers })` calls too. [PR #​898](https://togithub.com/effector/effector/pull/898) ### [`v22.8.4`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2284) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.3...effector@22.8.4) - Fixed an edge case for `fork` calls without sid (function from release `22.8.0`). Some libraries provide built-in sid's in the code, which led to the `duplicated sid found` exception when calling `fork` when trying to use two instances of the same factory in a test and running it without `effector/babel-plugin`. The exception on `fork` calls is no longer thrown, and all sid-related checks and assertions have been moved to `serialize` calls, since sid's are actually only required for `serialize` to work. [PR #​897](https://togithub.com/effector/effector/pull/897) ### [`v22.8.3`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2283) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.2...effector@22.8.3) - Added missing node and stateRef ids to meta-objects. These are internal changes which are not covered by the types or docs yet. ### [`v22.8.2`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2282) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.1...effector@22.8.2) - `combine` types now allow primitive values, just like it was stated in the docs. Thanks to [@​faustienf](https://togithub.com/faustienf) [PR #​884](https://togithub.com/effector/effector/pull/884) - Events, created from split with match-object shape and internal inFlight counters of Effects now have proper metadata to use in the Inspect API. [PR #​892](https://togithub.com/effector/effector/pull/892) ### [`v22.8.1`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2281) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.8.0...effector@22.8.1) - Internal state refs now also see meta, if owned by store. [PR #​889](https://togithub.com/effector/effector/pull/889) ### [`v22.8.0`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2280) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.7.0...effector@22.8.0) - Sids are no longer required for `fork({ values, handlers })`, which allows to run tests without `effector/babel-plugin`. Note, that plugin and sids are still required for SSR. ([PR #​855](https://togithub.com/effector/effector/pull/855)) ### [`v22.7.0`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2270) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.6.2...effector@22.7.0) - Fix `Declaration` type, provide missing top-level properties for `region` and `factory` types - Add node's `id` to `Declaration` type ### [`v22.6.2`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2262) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.6.1...effector@22.6.2) - Fix return type of `withRegion` ### [`v22.6.1`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2261) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.6.0...effector@22.6.1) - Add missing `exports` definition for `effector/inspect` API ### [`v22.6.0`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2260) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.5.2...effector@22.6.0) - Implemented inspect API ([PR #​859](https://togithub.com/effector/effector/pull/859)) ### [`v22.5.2`](https://togithub.com/effector/effector/blob/HEAD/CHANGELOG.md#effector-2252) [Compare Source](https://togithub.com/effector/effector/compare/effector@22.5.1...effector@22.5.2) - Fix `serialize: "ignore"` in `fork({ values })` ([PR #​862](https://togithub.com/effector/effector/pull/862)) #### effector 22.5.1 - Fix default factories list in babel-plugin ([PR #​857](https://togithub.com/effector/effector/pull/857)) #### effector-react 22.5.0 - Make `useGate` isomorphic in `effector-react` module, so the one not needed to use `effector-react/scope` anymore ([PR #​852](https://togithub.com/effector/effector/pull/852)) - Fix `useUnit` hangs when scope is changed (happens when route is changed in next.js) ([PR #​851](https://togithub.com/effector/effector/pull/851)) #### effector 22.5.0 - Support [`allSettled(scope)`](https://togithub.com/effector/effector/issues/687) feature. #### effector-react 22.4.0 - Support [`@@​unitShape` protocol](https://effector.dev/docs/ecosystem-development/unit-shape-protocol) ([PR #​803](https://togithub.com/effector/effector/pull/822)) in `useUnit` #### effector-solid 0.22.7 - Support [`@@​unitShape` protocol](https://effector.dev/docs/ecosystem-development/unit-shape-protocol) ([PR #​803](https://togithub.com/effector/effector/pull/822)) in `useUnit` #### effector 22.4.1 - Add type support for read only arrays in sample `source`. This case now supported and typechecked correctly: ```ts const profileFormSubmitted = createEvent() const $name = createStore('alice') const $age = createStore(0) const saveProfileFx = createEffect(async ([name, age]: [string, number]) => {}) sample({ clock: profileFormSubmitted, source: [$name, $age] as const, target: saveProfileFx, }) ``` Note that the one need to use "as const" in that case to got correct typechecking because without it typescript cannot infer the type `[Store, Store]`. We are working to avoid that limitation, stay tuned! #### effector Encke 22.4.0 - Add custom serializers for Store ([PR #​744](https://togithub.com/effector/effector/pull/744/)) - Allow to pass domain as an argument for createEvent and similar methods ([PR #​763](https://togithub.com/effector/effector/pull/763)) - Add `store.reinit` event to set default value into store ([PR #​797](https://togithub.com/effector/effector/pull/797)) ```ts const $store = createStore>([]) sample({ clock: someEffectFailed, target: $store.reinit, }) // subscribe on store reinit sample({ clock: $store.reinit, fn: createEffect(() => console.log('store value set to default')), }) ``` - Add safe mode for scopeBind ([PR #​688](https://togithub.com/effector/effector/pull/688)) - Add `is.attached` method to detect effects created via `attach` ([PR #​670](https://togithub.com/effector/effector/pull/670)) - Add [@​farfetched/core](https://togithub.com/farfetched/core) and atomic-router to default factories so the one not needed to describe them explicitly - Protect against combine argument being broken via Array.slice ([PR #​801](https://togithub.com/effector/effector/pull/801)) - Add "type" entry for package exports ([PR #​759](https://togithub.com/effector/effector/pull/759)) - Finally allow `Gate` to be serialized (as this requires changes in babel plugin) ([PR #​683](https://togithub.com/effector/effector/pull/683)) #### effector-react 22.3.4 - Fix useUnit skipping updates when used with useEffect and useGate #### effector-react 22.3.3 - Fix useUnit skipping updates during scope changes (often happens in next.js apps). Big thanks to [@​AlexandrHoroshih](https://togithub.com/AlexandrHoroshih) for investigation #### effector-react 22.3.1 - Fix useUnit skipping updates in react 16-17 #### effector-vue 22.2.0 - Add `useStoreMap` hook for Vue 3 composition API to select part from a store ((PR [#​780](https://togithub.com/effector/effector/issues/780))\[https://github.com/effector/effector/pull/780](https://togithub.com/effector/effector/pull/780)0]) by [@​ilajosmanov](https://togithub.com/ilajosmanov) #### effector-react 22.3.0 - Made hooks `useEvent`, `useStore`, `useStoreMap` and `useList` isomorphic, now they would use `scope` from the `Provider` if it is available and scope-less mode otherwise. For `useUnit` it was done in 22.2.0. - Added parameter `forceScope` to `useEvent`, `useStore`, `useStoreMap` and `useList` to force usage of scope from `Provider`, it would throw an error if `Provider` is not available, `/scope` module sets `forceScope` to `true` by default #### effector-solid 0.22.6 - Add type of `Provider` to main module #### effector-solid 0.22.5 - Add export of `Provider` from main module #### effector-react 22.2.0 - Made hook `useUnit` isomorphic, now it would use `scope` from the `Provider` if it is available and scope-less mode otherwise (PR [#​776](https://togithub.com/effector/effector/pull/776) and PR [#​785](https://togithub.com/effector/effector/pull/785)) - Added parameter `forceScope` to `useUnit` to force usage of scope from `Provider`, it would throw an error if `Provider` is not available (PR [#​776](https://togithub.com/effector/effector/pull/776) and PR [#​785](https://togithub.com/effector/effector/pull/785)), `/scope` module sets `forceScope` to `true` by default - Added "type" entry for package exports (PR [#​759](https://togithub.com/effector/effector/pull/759)) - Fixed typing in `useUnit` (PR [#​747](https://togithub.com/effector/effector/pull/747)) #### effector-solid 0.22.4 - Made `useUnit` isomorphic, now it would use `scope` from the `Provider` if it is available and scope-less mode otherwise (PR [#​782](https://togithub.com/effector/effector/pull/782)) - Added parameter `forceScope` to `useUnit` to force usage of scope from `Provider`, it would throw an error if `Provider` is not available (PR [#​782](https://togithub.com/effector/effector/pull/782)), `/scope` module sets `forceScope` to `true` by default #### effector-vue 22.1.2 - Added "type" entry for package exports (PR [#​759](https://togithub.com/effector/effector/pull/759)) #### effector-solid 0.22.3 - Added "type" entry for package exports (PR [#​759](https://togithub.com/effector/effector/pull/759)) #### effector-solid 0.22.2 - Fixed typing in `useUnit` (PR [#​747](https://togithub.com/effector/effector/pull/747)) #### forest 0.21.2 - Added "type" entry for package exports (PR [#​759](https://togithub.com/effector/effector/pull/759)) #### effector-react 22.1.0 - Added support for react 18 (PR [#​655](https://togithub.com/effector/effector/pull/655)) - Added `useUnit` method to read multiple stores and bind events or effects to scope in a single batched call (PR [#​733](https://togithub.com/effector/effector/pull/733), [#​738](https://togithub.com/effector/effector/pull/738)) ```tsx import {createEvent, createStore, fork} from 'effector' import {useUnit, Provider} from 'effector-react/scope' const inc = createEvent() const $count = createStore(0) const $title = createStore('useStore example') $count.on(inc, x => x + 1) const App = () => { const [count, title, incFn] = useUnit([$count, $title, inc]) return ( <>

{title}

Count: {count}

) } const scope = fork() render( () => ( ), document.getElementById('root'), ) ``` - Added `placeholder` option to `useList` to render in cases of empty list ```tsx const ChatList = () => (
{useList($chats, { fn: chat =>
Chat {chat.name}
, keys: [], placeholder:
You have no chats yet. Add first one?
, })}
) ``` - Added `defaultValue` option to `useStoreMap` to return in cases when `fn` returns undefined ```tsx const ChatName = ({id}) => { const chat = useStoreMap({ store: $chats, keys: [id], fn: chats => chats.find(chat => chat.id === id), defaultValue: {id: 'default', name: 'Default chat'}, }) return {chat.name} } ``` - Fixed `Gate.status` store being serialized (PR [#​683](https://togithub.com/effector/effector/pull/683)) #### effector 22.2.0 - Added `filter` option to `sample`, thereby making `guard` an alias (issue [#​521](https://togithub.com/effector/effector/issues/521)) ```ts sample({ clock: submitPasswordEvent, source: $store, filter: (state: AuthFlowState) => state is WaitingPasswordState, fn: (waitingPasswordState, clock) => waitingPasswordState.password, target: submitPassowrdFx, }) ``` - Added `clock` option to `split` (issue [#​537](https://togithub.com/effector/effector/issues/537)) ```ts split({ clock: submit, source: $form, match: $mode, cases: { draft: saveFormDraftFx, send: sendFormToBackendFx, }, }) ``` - Improved `sample` type checking: - Fixed cases when target units becomes compatible with any type (issue [#​600](https://togithub.com/effector/effector/issues/600)) - Fixed cases when method call being marked as error when it perfectly correct - Removed vague "incompatible unit in target" error - Error messages now explicitly tells which type is given by source and which one is expected by target - 16 overloads was merged into single one to improve clarity of error messages. Will remove a lot of noise from IDE output thereby improving developer expirience - Improved `split` type checking: - Fixed a case when units in cases becomes compatible with any type - Removed vague "incompatible unit in target" error - Error messages now explicitly tells which type is given by source and which one is expected by failed target case - Added jsdoc documentation for all top level methods. Will be used by IDE such as VS Code and Webstorm to provide better developer expirience - Derived units in target of `sample`, `guard`, `split` and `forward` are deprecated (issue [#​563](https://togithub.com/effector/effector/issues/563)) - Imperative calls of derived units created by `merge`, `sample` and `split` are deprecated - Imperative calls of events and effects in pure functions are deprecated (issue [#​541](https://togithub.com/effector/effector/issues/541)) - `restore($store)` is deprecated (issue [#​571](https://togithub.com/effector/effector/issues/571)) - Effects created by `attach` got correct name for use in developer tools like [effector-logger](https://togithub.com/effector/logger) (issue [#​527](https://togithub.com/effector/effector/issues/527)) - Fixed a case when `sample/guard` pass obsolete data from it's `source` store (issue [#​544](https://togithub.com/effector/effector/issues/544)) - Fixed data race when using `combine` with fork api (issue [#​613](https://togithub.com/effector/effector/issues/613)) - Fixed cases when `effector/babel-plugin` changes function calls which it should avoid (issue [#​603](https://togithub.com/effector/effector/issues/603)) - Fixed support for multiple passes of `effector/babel-plugin` (issue [#​601](https://togithub.com/effector/effector/issues/601)) - Fixed `combine` support for units with large union types (issue [#​531](https://togithub.com/effector/effector/issues/531)) - Fixed support for calls without payload for `Event` (PR [#​454](https://togithub.com/effector/effector/pull/454)) - Fixed circular reference warning during import of typings (issue [#​578](https://togithub.com/effector/effector/issues/578)) #### effector-vue 22.1.0 - Add support for Vue 3 SSR via new [useEvent hook](https://effector.dev/docs/api/effector-vue/useEvent) and [VueSSRPlugin](https://effector.dev/docs/api/effector-vue/VueSSRPlugin) ([PR #​595](https://togithub.com/effector/effector/pull/595)) #### effector-react 22.0.6 - Fix `Can't perform a React state update on an unmounted component` warning for `useStoreMap` in a few cases (issue [#​574](https://togithub.com/effector/effector/issues/574)) #### effector 22.1.2 - Allow to use `effector/babel-plugin` in `patronum/macro` #### effector 22.1.1 - Fix data races that cause obsolete states to appear in the `.on` and `.reset` methods #### effector 22.1.0 - Added option `debugSids` to `effector/babel-plugin` The option allows adding file path and variable name to a sid for each unit definition. It allows to easily debug serialized scope using SSR. #### effector 22.0.0 - Add support for plain functions to attach: `attach({source, async effect(source, params) {}})` - Allow to use fork without domains: `const scope = fork()` - `Unit not found in scope` error is no longer exists, any unit could be used in any scope - Increase performance of `fork` and `serialize` a hundredfold - Add support for attached effects to fork handlers - Add support for tuples to fork values and handlers: `fork({values: [[$user, 'alice'], [$age, 22]]})` - Add `serialize: 'ignore'` option to `createStore` to declare store as ignored by `serialize` calls - Make `onlyChanges: true` a default `serialize` option - Fix babel plugin issue with parsing method calls (e.g. in react native) - Validate `combine` arguments and throw an error in case of `undefined` and non-store units ([issue #​509](https://togithub.com/effector/effector/issues/509)) - Throw an error when fork handlers or values got units without sid or with duplicate sid - Deprecate `createStoreObject` alias for `combine` - Deprecate `effector/fork` module - Deprecate `.thru` - Deprecate second argument in `store.map` - Deprecate direct manipulations with derived units: - Deprecate `.on` in derived stores created by `store.map` and `combine` - Deprecate calls of derived events created by `event.map`, `event.filterMap` and `event.filter` - Deprecate calls of `fx.done`, `fx.doneData` and other events belongs to effects - Remove `ɔ` (latin small letter open o) symbol to prevent incorrect unicode parsing - Remove undocumented `scope.find` which is a wrong abstraction for a new fork - Make `Scope` a unit: - Add support for `Scope` to `is.unit` - Add `is.scope` method - Allow to pass a scope to scopeBind: `scopeBind(unit, {scope})`, which is also can be used outside from `.watch` - Improve es modules support - Make package size 10% smaller #### effector-react 22.0.0 - Add module `effector-react/scope` and make `effector-react/ssr` an alias for it - Fix `Cannot update a component` warning in `useGate` - Allow to return `undefined` in `useStoreMap` - Make `domain` field in `createGate` optional - Deprecate `createContextComponent` and `createReactState` - Improve es modules support #### effector-vue 22.0.0 - Improve es modules support #### forest 0.20.0 - Improve es modules support #### effector-react 21.3.1 - Fixed TypeError in `useStoreMap` with scope ([PR #​474](https://togithub.com/effector/effector/pull/474)) #### effector-react 21.3.0 - Add support for `updateFilter` to `useStoreMap`. It helps to control component rerendering, e.g. when component should rerender only when `id` field is changed - Add `useStoreMap($store, value => result)` shorthand - Add support for `getKey` to `useList`. Function in this field will be used to compute key for every item of list - Add support for stores with functions in them to `useStore` ([PR #​431](https://togithub.com/effector/effector/pull/431)) - Add domain name passed to `createGate` to `gate.displayName` and gate units ([issue #​449](https://togithub.com/effector/effector/issues/449)) - Fix unhandled promise rejection in `useEvent` when used effect throw an error #### effector 21.8.0 - Add type support for arrays in `sample` `target` ([PR #​284](https://togithub.com/effector/effector/pull/284), [#​445](https://togithub.com/effector/effector/pull/445)) ```js sample({ clock: clickValidate, source: $formFields, target: [validateForm, sendStatsFx], }) ``` - Add support for case functions, case stores and matcher stores to `split`. Case functions and stores will choose target case by its name, matcher stores are boolean stores which indicate whether to choose given case ```typescript const source = createEvent() const even = createEvent() const $odd = createStore(0) split({ source, // case function match(n) { if (n % 2 === 0) return 'even' return 'odd' }, cases: { even, odd: $odd, }, }) const $currentPage = createStore('dashboard') split({ source, // case store match: $currentPage, cases: { dashboard: even, __: odd, }, }) const tryUpdatePage = createEvent() const updatePageFx = createEffect() const $hasWriteAccess = createStore(false) split({ source: tryUpdatePage, match: { // matcher store admin: $hasWriteAccess, }, cases: { admin: updatePageFx, }, }) ``` - Add `updateFilter` config field to `createStore` to skip arbitrary store updates ([discussion #​428](https://togithub.com/effector/effector/discussions/428)) ```js const $playerPosition = createStore( {x: 0, y: 0}, { updateFilter: (update, current) => update.x !== current.x, }, ) ``` - Add support for `sample` with `clock` without `source`. For example, it useful in cases when `clock` is array of units and no `source` stores is needed ```js sample({ clock: [fx1.doneData, fx2.doneData], fn: data => ({url: '/stats', data}) target: fetchFx, }) ``` - Add support for `clock` to `guard` to improve developer expirience in cases when update trigger (`clock` field) and data source (`source` field) are different things ```js guard({ clock: validateForm, source: $formFields, filter: formFields => validator(formFields), target: submitFormFx, }) ``` - Add `addNames` field to babel plugin ([PR #​450](https://togithub.com/effector/effector/pull/450)) - Add type support for `Scope` to `clearNode` ([issue #​441](https://togithub.com/effector/effector/issues/441)) - Add `compositeName` to `Domain` typings, making it consistent with other units - Add `EventPayload` and `UnitValue` type helpers ([PR #​434](https://togithub.com/effector/effector/pull/434)) - Improve various edge cases with fork api and serialization - Improve typechecking for `attach` ([issue #​439](https://togithub.com/effector/effector/issues/439)) - Fix various type issues in `sample` and `guard` typings #### effector-react 21.2.0 - Add `createGate` implementation to `effector-react/ssr` ```jsx import {createDomain} from 'effector' import {createGate, useGate} from 'effector-react/ssr' const app = createDomain() const currentRouteGate = createGate({ domain: app, defaultState: 'dashboard', }) export const Layout = ({routeName, children}) => { useGate(currentRouteGate, routeName) return ( <>

{routeName}

{children} ) } ``` #### effector-react 21.1.0 - Add support for object and array of events to `useEvent`. It's a shorthand for calling several `useEvent` at once (PR [#​425](https://togithub.com/effector/effector/pull/425) by [@​sergeysova](https://togithub.com/sergeysova)) ```jsx export function ExampleComponent() { const handlers = useEvent({emailChanged, passwordChanged}) return (
) } ``` ```jsx export function ExampleComponent() { const [changeEmail, changePassword] = useEvent([ emailChanged, passwordChanged, ]) return (
) } ``` #### effector 21.7.0 - Add support for scopes to `hydrate`, to provide a way to fill additional values to existing scope (happens during SSG navigation in next.js) - Improve `prepend` type inference (PR [#​415](https://togithub.com/effector/effector/pull/415) (thanks [@​doasync](https://togithub.com/doasync))) #### effector-vue 21.1.0 - Add support for vue@next (vue 3) - `useStore` `useVModel` `useGate` `createGate` [see docs](https://effector.dev/docs/api/effector-vue/effector-vue) #### effector 21.6.0 - Add support for user-defined factories in fork api. Starting from this release, application developers can use their own functions and be sure that their content will be properly serialized and hydrated by fork api. New field `factories` in `effector/babel-plugin` accepts array of module names which exports will be treated as custom factories therefore each function call will provide unique prefix for `sid` properties of units inside them ```json title=".babelrc" { "plugins": [ [ "effector/babel-plugin", { "factories": ["src/createEffectStatus", "~/createCommonPending"] } ] ] } ``` ```js title="./src/createEffectStatus.js" import {rootDomain} from './rootDomain' export function createEffectStatus(fx) { const $status = rootDomain .createStore('init') .on(fx.finally, (_, {status}) => status) return $status } ``` ```js title="./src/statuses.js" import {createEffectStatus} from './createEffectStatus' import {fetchUserFx, fetchFriendsFx} from './api' export const $fetchUserStatus = createEffectStatus(fetchUserFx) export const $fetchFriendsStatus = createEffectStatus(fetchFriendsFx) ``` Import `createEffectStatus` from `'./createEffectStatus'` was treated as factory function so each store created by it has its own `sid` and will be handled by serialize independently, although without `factories` they will share the same `sid` [factories in documentation](https://effector.dev/docs/api/effector/babel-plugin#factories) - Add user-friendly unit name in fork api error messages when given unit is not found in scope. This improves error messages in both `effector` and `effector-react` - Add validation for `values` and `handlers` fields in `fork` and for `values` field in `hydrate` - Add type support for `createEffect(handler)` to infer `Params` and `Done` types from given `handler` and provide custom `Fail` type at the same time [createEffect and custom errors](https://effector.dev/docs/typescript/typing-effector#createeffect-and-custom-errors) in documentation - Improve `guard` return type inference (PR [#​406](https://togithub.com/effector/effector/pull/406) (thanks [@​doasync](https://togithub.com/doasync))) - Fix void params support for `createEffect(name, config)` (issue [#​404](https://togithub.com/effector/effector/issues/404)) - Allow to use `Event` in cases when only `() => void` is accepted (PR [#​400](https://togithub.com/effector/effector/pull/400) (thanks [@​doasync](https://togithub.com/doasync))) - Add support for `merge` to `effector/babel-plugin` #### effector 21.5.0 - Add support for `attach({effect})` to create effect which will call `effect` with params as it is. That allow to create separate effects with shared behavior (PR [#​396](https://togithub.com/effector/effector/pull/396) and [#​397](https://togithub.com/effector/effector/pull/397) (thanks [@​sergeysova](https://togithub.com/sergeysova) and [@​oas89](https://togithub.com/oas89))) - Add `reactSsr` option to `effector/babel-plugin` to replace imports from `effector-react` to `effector-react/ssr`. Useful for building both server-side and client-side builds from the same codebase #### effector 21.4.0 - Add support for return status to `allSettled`. When `allSettled` is called with `Effect`, it return object with `value` and `status` fields ([discussion](https://togithub.com/effector/effector/issues/385)) ```js import {createDomain, fork, allSettled} from 'effector' const app = createDomain() const fx = app.createEffect(() => 'ok') const result = await allSettled(fx, {scope: fork(app)}) // => {status: 'done', value: 'ok'} ``` [Try it](https://share.effector.dev/h8m4zT0k) - Allow to expicitly define return/error types in `createEffect(handler)` ```typescript const fx = createEffect(x => x.toString()) // fx has type Effect ``` - Add types for `domain.effect(handler)` - Fix effector/babel-plugin behavior in case when methods like `createStore` are imported from unrelated library and should be ignored. Import library could be defined by [importName](https://effector.dev/docs/api/effector/babel-plugin#importname) config field - Improve fork api support for watchers #### effector 21.3.0 - Add support for `createEffect(handler)` [createEffect(handler) in documentation](https://effector.dev/docs/api/effector/createEffect#createeffecthandler) ```js import {createEffect} from 'effector' const fetchUserReposFx = createEffect(async ({name}) => { const url = `https://api.github.com/users/${name}/repos` const req = await fetch(url) return req.json() }) fetchUserReposFx.done.watch(({params, result}) => { console.log(result) }) await fetchUserReposFx({name: 'zerobias'}) ``` [Try it](https://share.effector.dev/7K23rdej) - Add support for `attach({source, effect})` without `mapParams`: in case with `source` and `effect` only, inner effect will be triggered with `source` values [attach({effect, source}) in documentation](https://effector.dev/docs/api/effector/attach#attacheffect-source) ```js import {createStore, createEffect, attach} from 'effector' const fx = createEffect() const $token = createStore('') const secureRequest = attach({effect: fx, source: $token}) ``` it's a shorthand for common use case: ```js import {createStore, createEffect, attach} from 'effector' const fx = createEffect() const $token = createStore('') const secureRequest = attach({ effect: fx, source: $token, mapParams: (_, source) => source, }) ``` [Try it](https://share.effector.dev/lManajHQ) - Handle throws in `attach` `mapParams` field: errors happened in `mapParams` function will force attached effect to fail - Add babel plugin support for `split` and `createApi` - Add `name` field to `attach` typings - Add `.filter` and `.filterMap` to effect typings ([PR #​376](https://togithub.com/effector/effector/pull/376)) - Improve config validation for `forward`, `attach`, `sample` and `guard`: attempt to call these methods without arguments will lead to error with user-friendly description - Improve fork api support for stores and events #### effector 21.2.0 - Add array support for sample `clock` field which acts like a `merge` call ```typescript import {createStore, createEvent, createEffect, sample, merge} from 'effector' const showNotification = createEvent() const trigger = createEvent() const fx = createEffect() const $store = createStore('') // array of units in clock sample({ source: $store, clock: [trigger, fx.doneData], target: showNotification, }) // merged unit in clock sample({ source: $store, clock: merge([trigger, fx.doneData]), target: showNotification, }) ``` - Improve ide type hints support for `sample` in case of config form - Add `package.json` to package `exports` field (read more in [nodejs documentation](https://nodejs.org/api/esm.html#esm_package_entry_points)) #### effector 21.1.0 - Add `onlyChanges` option to `serialize` to ignore stores which didn't changed in fork (prevent default values from being carried over network) - Add type helpers for stores and effects: `StoreValue`, `EffectParams`, `EffectResult` and `EffectError` ```typescript import { createStore, createEffect, StoreValue, EffectParams, EffectResult, } from 'effector' const getUserFX = createEffect() const $username = createStore('guest') // string type Username = StoreValue // number type GetUserParams = EffectParams // {name: string} type User = EffectResult ``` - Allow `domain.createEffect` to infer type from given `handler` (that feature was already implemented for `createEffect` method), this code now typechecked as expected: ```typescript import {createDomain} from 'effector' const app = createDomain() const voidFx = app.createEffect({ async handler() {}, }) await voidFx() ``` - Allow to call `allSettled` with void units without `params` field, this code now typechecked as expected: ```typescript import {createDomain, fork, allSettled} from 'effector' const app = createDomain() const voidFx = app.createEffect({ async handler() {}, }) voidFx() const scope = fork(app) await allSettled(voidFx, {scope}) ``` #### effector 21.0.3, effector-react 21.0.4, effector-vue 21.0.3 - Improve native es modules support, add [conditional exports](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_conditional_exports) declarations #### effector 21.0.0 - Add object form of `split` for pattern-matching without additional forwards [`split` in documentation](https://effector.dev/docs/api/effector/split#splitsource-match-cases) ```js import {split, createEffect, createEvent} from 'effector' const messageReceived = createEvent() const showTextPopup = createEvent() const playAudio = createEvent() const reportUnknownMessageTypeFx = createEffect({ handler({type}) { console.log('unknown message:', type) }, }) split({ source: messageReceived, match: { text: msg => msg.type === 'text', audio: msg => msg.type === 'audio', }, cases: { text: showTextPopup, audio: playAudio, __: reportUnknownMessageTypeFx, }, }) showTextPopup.watch(({value}) => { console.log('new message:', value) }) messageReceived({ type: 'text', value: 'Hello', }) // => new message: Hello messageReceived({ type: 'image', imageUrl: '...', }) // => unknown message: image ``` [Try it](https://share.effector.dev/javsk7Hg) You can match directly to store api as well: ```js import {split, createStore, createEvent, createApi} from 'effector' const messageReceived = createEvent() const $textContent = createStore([]) split({ source: messageReceived, match: { text: msg => msg.type === 'text', audio: msg => msg.type === 'audio', }, cases: createApi($textContent, { text: (list, {value}) => [...list, value], audio: (list, {duration}) => [...list, `audio ${duration} ms`], __: list => [...list, 'unknown message'], }), }) $textContent.watch(messages => { console.log(messages) }) messageReceived({ type: 'text', value: 'Hello', }) // => ['Hello'] messageReceived({ type: 'image', imageUrl: '...', }) // => ['Hello', 'unknown message'] messageReceived({ type: 'audio', duration: 500, }) // => ['Hello', 'unknown message', 'audio 500 ms'] ``` [Try it](https://share.effector.dev/32FNNk8H) - Merge `effector/fork` into `effector`. Now all methods required for SSR are exported from the library itself, making `effector/fork` an alias - Make `Scope` type alias for `Fork` - Add support for es modules: `import {cr

Configuration

📅 Schedule: Branch creation - "before 6am every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.



This PR has been generated by Mend Renovate. View repository job log here.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2023 9:50pm
habits ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2023 9:50pm
tennis-tournaments ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2023 9:50pm
github-actions[bot] commented 11 months ago

node_modules report 📦

main current branch
430M 494M