Commit Graph

20 Commits

Author SHA1 Message Date
Zardddddd60
eed3973459
chore(runtime-code): delete outdated test case (#3036) 2022-05-11 20:25:06 -04:00
dependabot[bot]
305883a12f
build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#4482)
* build(deps-dev): bump typescript from 4.3.5 to 4.4.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump typescript from 4.3.5 to 4.4.2

* test: fix nodeOps types

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Rodrigues <carlos@hypermob.co.uk>
Co-authored-by: Evan You <yyx990803@gmail.com>
2021-09-02 09:53:57 -04:00
Evan You
d810a1a569 fix(scheduler): fix insertion for id-less job
fix #4148
2021-07-19 13:37:38 -04:00
Evan You
87f69fd0bb perf(reactivity): improve reactive effect memory usage (#4001)
Based on #2345 , but with smaller API change

- Use class implementation for `ReactiveEffect`
- Switch internal creation of effects to use the class constructor
- Avoid options object allocation
- Avoid creating bound effect runner function (used in schedulers) when not necessary.
- Consumes ~17% less memory compared to last commit
- Introduces a very minor breaking change: the `scheduler` option passed to `effect` no longer receives the runner function.
2021-07-16 14:30:49 -04:00
Evan You
03a7a73148 fix(reactivity): ensure computed always expose value
fix #3099

Also changes the original fix for #910 by moving the fix from
reactivity to the scheduler
2021-05-27 20:53:21 -04:00
Evan You
b57e995edd fix(scheduler): handle preFlush cb queued inside postFlush cb
fix #3806
2021-05-26 14:21:49 -04:00
HcySunYang
45fae9d308
fix(scheduler): ensure updates are always inserted in ascending id order (#3184)
fix #2768, fix #2829
2021-02-25 09:37:25 -05:00
Evan You
36fa42a88c fix(runtime-core/scheduler): handle nested flushPostFlushCbs calls
fix #1947
2020-08-24 18:47:15 -04:00
HcySunYang
caccec3f78
fix(runtime-core/scheduler): sort postFlushCbs to ensure refs are set before lifecycle hooks (#1854)
fix #1852
2020-08-14 09:50:23 -04:00
Evan You
611437a3fe fix(runtime-core/scheduler): allow component render functions to trigger itself
fix #1801
2020-08-13 17:42:47 -04:00
Evan You
3692f2738f refactor(runtime-core/scheduler): dedicated preFlush queue
properly fix #1763, #1777, #1781
2020-08-05 10:55:23 -04:00
Yang Mingshan
b2a91429ed
fix(runtime-core/scheduler): prevent duplicate queue (#1767) 2020-08-03 17:19:06 -04:00
Evan You
09702e95b9 fix(runtime-core/scheduler): only allow watch callbacks to be self-triggering
fix #1740

Previous fix for #1727 caused `watchEffect` to also recursively trigger
itself on reactive array mutations which implicitly registers array
`.length` as dependencies and mutates it at the same time.

This fix limits recursive trigger behavior to only `watch()` callbacks
since code inside the callback do not register dependencies and
mutations are always explicitly intended.
2020-07-30 17:57:20 -04:00
Evan You
7e8b26eba8 refactor(runtime-core): make nextTick() promise reject on scheduler flush error 2020-07-28 10:40:25 -04:00
Evan You
165068dbc2 perf(runtime-core): avoid duplicate postFlushCb invocation
Also improve flush performance by using for loop instead of shift()

fix #1595
2020-07-15 22:36:41 -04:00
HiiTea
22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -04:00
Evan You
78977c3997 fix(scheduler): sort jobs before flushing
This fixes the case where a child component is added to the queue before
its parent, but should be invalidated by its parent's update. Same logic
was present in Vue 2.

Properly fixes #910
ref: https://github.com/vuejs/vue-next/issues/910#issuecomment-613097539
2020-04-14 17:31:35 -04:00
Yang Mingshan
fe9da2d0e4
fix(runtime-core/scheduler): invalidate job (#717) 2020-02-11 07:30:25 -05:00
Evan You
8a87074df0 fix(runtime-core/scheduler): avoid duplicate updates of child component 2020-02-10 13:09:15 -05:00
JiZhi
f838715b7c test(runtime-core): add tests for scheduler (#462) 2019-11-16 16:32:06 -05:00