Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runtime-core, reactivity): onEffectCleanup and baseWatch #82

Merged
merged 23 commits into from
Jan 4, 2024

Conversation

LittleSound
Copy link
Member

Copy from vuejs/core#9927

Copy link

github-actions bot commented Dec 31, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 90.2 kB (+803 B) 34.3 kB (+259 B) 30.9 kB (+191 B)
runtime-vapor.global.prod.js 23.3 kB 8.86 kB 8.19 kB
vue-vapor.global.prod.js 58.2 kB 19.9 kB 18.1 kB
vue.global.prod.js 147 kB (+803 B) 53.5 kB (+220 B) 47.8 kB (+195 B)

Usages

Name Size Gzip Brotli
createApp 50.7 kB (+930 B) 19.8 kB (+310 B) 18 kB (+263 B)
createSSRApp 54 kB (+930 B) 21.1 kB (+318 B) 19.2 kB (+193 B)
defineCustomElement 52.9 kB (+930 B) 20.5 kB (+315 B) 18.7 kB (+252 B)
vapor 23.2 kB 8.88 kB 8.18 kB
overall 64.1 kB (+930 B) 24.7 kB (+289 B) 22.5 kB (+266 B)

@LittleSound LittleSound marked this pull request as ready for review December 31, 2023 13:58
@sxzz sxzz mentioned this pull request Jan 4, 2024
12 tasks
packages/reactivity/src/baseWatch.ts Outdated Show resolved Hide resolved
packages/runtime-core/src/scheduler.ts Outdated Show resolved Hide resolved
packages/runtime-core/src/scheduler.ts Outdated Show resolved Hide resolved
packages/runtime-core/src/errorHandling.ts Outdated Show resolved Hide resolved
@sxzz
Copy link
Member

sxzz commented Jan 4, 2024

LGTM! Let's sync this PR to vue/core repo.

@sxzz sxzz force-pushed the feat/vapor-onEffectCleanup-and-baseWatch branch from 48aca4a to c1b3e7c Compare January 4, 2024 15:21
@sxzz sxzz merged commit bdf28de into main Jan 4, 2024
5 checks passed
@sxzz sxzz deleted the feat/vapor-onEffectCleanup-and-baseWatch branch January 4, 2024 15:22
@LittleSound LittleSound restored the feat/vapor-onEffectCleanup-and-baseWatch branch January 5, 2024 15:55
LittleSound added a commit to LittleSound/core that referenced this pull request Jan 5, 2024
sxzz added a commit that referenced this pull request Jan 6, 2024
* refactor: use baseWatch to drive watchAPI

* feat: basic implementation of renderWatch and effectId

* chore: remove effect id

* chore: export and simplify types

* test: render watch

* chore: add todo comment

* fix: sync code changes according to the review in PR #82

* fix: enum values conflict

* chore: rename

* feat: change watchEffect to renderEffect in compiler-vapor

* chore: update

---------

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
@LittleSound LittleSound deleted the feat/vapor-onEffectCleanup-and-baseWatch branch January 7, 2024 17:25
LittleSound added a commit to LittleSound/core that referenced this pull request Aug 9, 2024
Squashed commit of the following:

commit dad9d0f
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 14 20:35:19 2024 +0800

    feat: scheduler in reactivity

commit 406c750
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 14 14:08:12 2024 +0800

    fix: revert export alias

commit 74996b6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 22:21:27 2024 +0800

    test: onWatcherCleanup in apiWatch

commit a5769e1
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 22:09:43 2024 +0800

    fix: remove elusive code for once

commit 589cd11
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 21:14:34 2024 +0800

    fix: errors related to immediateFirstRun

commit 3694745
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Mar 12 18:16:52 2024 +0800

    refactor: rename to onWatcherCleanup, getCurrentWatcher, remove middleware

commit b3f45d2
Merge: 60a1b97 9a936aa
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 7 22:23:13 2024 +0800

    chore: merge branch 'minor' into feat/onEffectCleanup-and-baseWatch

commit 60a1b97
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Jan 9 20:45:31 2024 +0800

    feat: middleware in baseWatch

commit 2fdda65
Merge: 39f07cd 2701355
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Jan 8 17:40:54 2024 +0800

    Merge branch 'main' into feat/onEffectCleanup-and-baseWatch

commit 39f07cd
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Jan 8 17:40:18 2024 +0800

    fix: should export getCurrentEffect function

commit 770c21d
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sat Jan 6 00:07:41 2024 +0800

    fix: sync code changes according to the review in PR vuejs/vue-vapor#82

commit a6eb043
Merge: 8dd0c1f 0275dd3
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Fri Jan 5 23:43:02 2024 +0800

    chore: merge branch 'main' into feat/onEffectCleanup-and-baseWatch

commit 8dd0c1f
Merge: 2213634 274f6f7
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 20:30:29 2023 +0800

    chore: merge remote-tracking branch 'origin/minor' into feat/onEffectCleanup-and-baseWatch

commit 2213634
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 19:21:12 2023 +0800

    refactor: simplify unwatch implementation

commit f44ef0b
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 18:45:04 2023 +0800

    feat: implement getCurrentEffect

commit a078ad1
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 21:28:28 2023 +0800

    chore: rename handleWarn to onWarn

commit 90fd005
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 21:05:03 2023 +0800

    chore: organize exports

commit e9555ce
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 20:36:56 2023 +0800

    test: baseWatch

commit d99e9a6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 20:04:42 2023 +0800

    test: onEffectCleanup in runtime-core

commit 56c87ec
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 19:44:43 2023 +0800

    test: baseWatch with onEffectCleanup

commit 7c5f05a
Merge: a8dc8e6 75dbbb8
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 17:32:00 2023 +0800

    Merge branch 'minor' of https://github.com/vuejs/core into feat/onEffectCleanup-and-baseWatch

commit a8dc8e6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 22:43:17 2023 +0800

    fix: tracked in cleanup

commit b57405c
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:28:49 2023 +0800

    fix: treeshaking error

commit 4d04f5e
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:19:53 2023 +0800

    fix: treeshaking error

commit d1f001b
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:10:05 2023 +0800

    fix: lint

commit 97179ed
Merge: 2aef609 9183069
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 23:24:47 2023 +0800

    chore: merge branch 'minor' of https://github.com/vuejs/core into feat/onEffectCleanup-and-baseWatch

commit 2aef609
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 22:19:26 2023 +0800

    fix: some cases for server-renderer

commit db4463c
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 21:40:12 2023 +0800

    fix: export onEffectCleanup

commit 409b52a
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 21:31:27 2023 +0800

    refactor: the watch API with baseWatch

commit d8682e8
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Dec 25 22:09:38 2023 +0800

    feat: initial code of baseWatch

commit f1fe01e
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Dec 25 20:50:35 2023 +0800

    refactor: externalized COMPAT case
LittleSound added a commit to LittleSound/core that referenced this pull request Aug 9, 2024
Squashed commit of the following:

commit dad9d0f
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 14 20:35:19 2024 +0800

    feat: scheduler in reactivity

commit 406c750
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 14 14:08:12 2024 +0800

    fix: revert export alias

commit 74996b6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 22:21:27 2024 +0800

    test: onWatcherCleanup in apiWatch

commit a5769e1
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 22:09:43 2024 +0800

    fix: remove elusive code for once

commit 589cd11
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Mar 13 21:14:34 2024 +0800

    fix: errors related to immediateFirstRun

commit 3694745
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Mar 12 18:16:52 2024 +0800

    refactor: rename to onWatcherCleanup, getCurrentWatcher, remove middleware

commit b3f45d2
Merge: 60a1b97 9a936aa
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Mar 7 22:23:13 2024 +0800

    chore: merge branch 'minor' into feat/onEffectCleanup-and-baseWatch

commit 60a1b97
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Jan 9 20:45:31 2024 +0800

    feat: middleware in baseWatch

commit 2fdda65
Merge: 39f07cd 2701355
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Jan 8 17:40:54 2024 +0800

    Merge branch 'main' into feat/onEffectCleanup-and-baseWatch

commit 39f07cd
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Jan 8 17:40:18 2024 +0800

    fix: should export getCurrentEffect function

commit 770c21d
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sat Jan 6 00:07:41 2024 +0800

    fix: sync code changes according to the review in PR vuejs/vue-vapor#82

commit a6eb043
Merge: 8dd0c1f 0275dd3
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Fri Jan 5 23:43:02 2024 +0800

    chore: merge branch 'main' into feat/onEffectCleanup-and-baseWatch

commit 8dd0c1f
Merge: 2213634 274f6f7
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 20:30:29 2023 +0800

    chore: merge remote-tracking branch 'origin/minor' into feat/onEffectCleanup-and-baseWatch

commit 2213634
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 19:21:12 2023 +0800

    refactor: simplify unwatch implementation

commit f44ef0b
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Sun Dec 31 18:45:04 2023 +0800

    feat: implement getCurrentEffect

commit a078ad1
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 21:28:28 2023 +0800

    chore: rename handleWarn to onWarn

commit 90fd005
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 21:05:03 2023 +0800

    chore: organize exports

commit e9555ce
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 20:36:56 2023 +0800

    test: baseWatch

commit d99e9a6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 20:04:42 2023 +0800

    test: onEffectCleanup in runtime-core

commit 56c87ec
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 19:44:43 2023 +0800

    test: baseWatch with onEffectCleanup

commit 7c5f05a
Merge: a8dc8e6 75dbbb8
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Thu Dec 28 17:32:00 2023 +0800

    Merge branch 'minor' of https://github.com/vuejs/core into feat/onEffectCleanup-and-baseWatch

commit a8dc8e6
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 22:43:17 2023 +0800

    fix: tracked in cleanup

commit b57405c
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:28:49 2023 +0800

    fix: treeshaking error

commit 4d04f5e
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:19:53 2023 +0800

    fix: treeshaking error

commit d1f001b
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Wed Dec 27 20:10:05 2023 +0800

    fix: lint

commit 97179ed
Merge: 2aef609 9183069
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 23:24:47 2023 +0800

    chore: merge branch 'minor' of https://github.com/vuejs/core into feat/onEffectCleanup-and-baseWatch

commit 2aef609
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 22:19:26 2023 +0800

    fix: some cases for server-renderer

commit db4463c
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 21:40:12 2023 +0800

    fix: export onEffectCleanup

commit 409b52a
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Tue Dec 26 21:31:27 2023 +0800

    refactor: the watch API with baseWatch

commit d8682e8
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Dec 25 22:09:38 2023 +0800

    feat: initial code of baseWatch

commit f1fe01e
Author: Rizumu Ayaka <rizumu@ayaka.moe>
Date:   Mon Dec 25 20:50:35 2023 +0800

    refactor: externalized COMPAT case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants