Repository navigation
fix(vue): drop effector-vue 23.1.1 workarounds - #125
Open
leo-millennial wants to merge 4 commits into
Open
leo-millennial wants to merge 4 commits into
leo-millennial wants to merge 4 commits into
Conversation
effector-vue 23.3.0 exports the scope plugin from the composition entry, and its ESM entries load in Vitest with Vue 3. The tests no longer need createRequire and a cast to reach the CJS build. Bump the effector-vue dev dependency to ^23.3.0 and resolve the Vue package's peer to the same version.
effector-vue 23.3.0 types a store ref as Readonly<Ref<T>>, so the current query is a plain Query and passes to stringifyQuery as it is.
useOpenedViews combined the route stores into a new derived store on every mount. Nothing cleared it, so each RoutesView or Outlet mount left a node linked to the route stores. The stores now go to useUnit as a list, which subscribes to them directly and unsubscribes on unmount. The new test counts stores created during three mounts with inspectGraph: three before, none after.
Point the Scope sections at the composition entry and mention the forceScope option. Both need effector-vue 23.3.0.
|
|
🦋 Changeset detectedLatest commit: a04433d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
❌ Deploy Preview for effector-router failed. Why did it fail? →
|
6 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
effector-vue 23.3.0 fixes the defects router-vue worked around, so this PR removes three workarounds. Related: #124.
EffectorScopePluginfromeffector-vue/composition. ThecreateRequirecall and thePlugincast are gone.useLinkpasses the current query tostringifyQuerywithout theDeepReadonlycast.useOpenedViewspasses the route stores touseUnitas a list. Before, everyRoutesViewandOutletmount created acombinestore that stayed linked to the route stores. The new test counts stores created during three mounts withinspectGraph: 3 onmain, 0 here.forceScope.The effector-vue dev dependency is now
^23.3.0. The peer range stays>=23, the list form ofuseUnitexists since 23.0.0. router-react has the samecombineper mount inuseMemo, this PR changes Vue only.Type of change
Checklist
pnpm buildpassespnpm typecheckpassespnpm testpasses and I added/updated tests for my changepnpm lintpassespnpm changeset), or an empty one for no-release changes (pnpm changeset --empty)