Commit Graph

798 Commits

Author SHA1 Message Date
Evan You
a0e2c12874 fix(warning): always check for component instance presence when formatting traces 2020-04-29 14:41:22 -04:00
Evan You
892fb6d229 types: use more consistent naming for apiWatch type exports
BREAKING CHANGE: Some watch API types are renamed.

    - `BaseWatchOptions` -> `WatchOptionsBase`
    - `StopHandle` -> `WatchStopHandle`
2020-04-27 13:33:57 -04:00
Evan You
8ab44e1f80 types: expose ComponentOptionsBase 2020-04-27 13:31:40 -04:00
Evan You
d29aefcf99 release: v3.0.0-beta.4 2020-04-24 16:20:20 -04:00
Evan You
ca84f46cd0 chore: add tip about Suspense being experimental 2020-04-24 16:13:44 -04:00
Evan You
ded92f93b4 fix(runtime-core): dynamic component should support falsy values without warning 2020-04-24 15:32:47 -04:00
Carlos Rodrigues
f3a9b516bd
fix(types): make return type of defineComponent assignable to Component type (#1032)
fix #993
2020-04-24 13:22:58 -04:00
Carlos Rodrigues
28b4c317b4
feat(types): expose ToRefs type (#1037) 2020-04-24 13:10:16 -04:00
Evan You
c9f10be9de refactor(runtime-core): extract key/ref normalization logic 2020-04-24 13:06:56 -04:00
Evan You
d7379c7647 fix(runtime-core): fix key/ref resolution for cloneVNode
fix #1041
2020-04-24 12:42:46 -04:00
Evan You
dcf2458fa8 fix(runtime-core): fix dynamic node tracking in dynamic component that resolves to plain elements
fix #1039
2020-04-24 12:18:51 -04:00
Evan You
2acf3e84b9 feat(reactivity): add triggerRef API
Also make shallowRef assignment behavior consistent with normal ref
2020-04-22 18:00:10 -04:00
underfin
2b19965bcf
fix(slots): compiled slot fallback should be functions (#1030)
This avoids it being collected as dynamic children when it's not used.

fix #1021
2020-04-22 16:52:41 -04:00
Evan You
ff4d1fcd81 fix(runtime-core): mixin options that rely on this context should be deferred
Also ensure consistent option apply order with Vue 2, close #1016, close #1029
2020-04-22 16:36:18 -04:00
Evan You
e422b8b082 fix(runtime-core): only infer component name for object components
close #1023
2020-04-22 04:39:12 -04:00
Evan You
6fefeafe98 release: v3.0.0-beta.3 2020-04-20 17:00:26 -04:00
Andrew Talbot
cebad64d22
feat(runtime-core): improve warning for extraneous event listeners (#1005)
fix #1001
2020-04-20 16:40:59 -04:00
Evan You
dece6102aa feat(warn): infer anonymous component named based on resolve name 2020-04-20 16:17:29 -04:00
Evan You
0278992f78 fix(warn): fix component name inference in warning trace 2020-04-20 16:06:51 -04:00
Andrew Talbot
054ccecd58
perf(core): use startsWith instead of indexOf (#989) 2020-04-20 15:44:20 -04:00
Evan You
ab844fd169 feat(runtime-core): more specific warning for failed v-on fallthrough
close #1001
2020-04-20 15:32:21 -04:00
Evan You
e954ba21f0 feat(build): provide more specific warnings for runtime compilation
close #1004
2020-04-20 15:23:26 -04:00
Evan You
171cfa404f fix(runtime-core): should not cast prop value if prop did not change
fix #999
2020-04-20 14:16:25 -04:00
Evan You
36d77f9a9e refactor(hmr): simplify usage 2020-04-20 13:39:47 -04:00
Evan You
19223f5462 build: remove __BUNLDER__ flag so that HMR is available for all builds 2020-04-20 13:39:47 -04:00
Jian Zhang
a51b052672
chore: remove a dead if branch (#986) 2020-04-17 18:41:33 -04:00
Evan You
c1a85cb124 release: v3.0.0-beta.2 2020-04-17 11:01:01 -04:00
Evan You
d7ca1c5c6e fix(runtime-core): fix user attched public instance properties that start with "$" 2020-04-17 10:23:10 -04:00
Carlos Rodrigues
99fd158d09
fix(watch): fix deep watchers on refs containing primitives (#984) 2020-04-17 09:55:41 -04:00
Evan You
c0adb67c2e feat(types): expose ComponentCustomOptions for declaring custom options 2020-04-17 09:41:36 -04:00
Evan You
be21cfb1db feat(types): feat(types): add ComponentCustomProperties interface (#982) 2020-04-17 09:12:50 -04:00
Cédric Exbrayat
4cf5e07608
feat(types): expose ExtractPropTypes (#983) 2020-04-17 09:00:25 -04:00
Evan You
ca6912554c release: v3.0.0-beta.1 2020-04-16 15:45:04 -04:00
Evan You
370fc820cc refactor(runtime-core): refactor instance public proxy context object 2020-04-16 12:49:50 -04:00
Evan You
b2662a62c5 wip: separate setupState 2020-04-16 11:50:33 -04:00
Evan You
0709380c5f feat(runtime-core): skip emit warn if has equivalent onXXX prop 2020-04-16 11:27:52 -04:00
Evan You
bfd6744fb1 perf(runtime-core): use raw context on component options init 2020-04-16 10:39:51 -04:00
Evan You
24e5ab33f5 refactor(runtime-core): remove need for internal instance sink 2020-04-16 10:09:20 -04:00
Evan You
09b4202a22 refactor(reactivity): adjust APIs
BREAKING CHANGE: Reactivity APIs adjustments:

- `readonly` is now non-tracking if called on plain objects.
  `lock` and `unlock` have been removed. A `readonly` proxy can no
  longer be directly mutated. However, it can still wrap an already
  reactive object and track changes to the source reactive object.

- `isReactive` now only returns true for proxies created by `reactive`,
   or a `readonly` proxy that wraps a `reactive` proxy.

- A new utility `isProxy` is introduced, which returns true for both
  reactive or readonly proxies.

- `markNonReactive` has been renamed to `markRaw`.
2020-04-15 16:45:20 -04:00
Evan You
11654a6e50 release: v3.0.0-alpha.13 2020-04-15 12:46:26 -04:00
pikax
dcb5985c00 Merge remote-tracking branch 'github/master' into changing_unwrap_ref 2020-04-15 15:54:26 +01:00
Evan You
3178504273 refactor(reactivity): make readonly non-tracking 2020-04-14 23:49:46 -04:00
Evan You
486dc188fe feat(reactivity): add support for toRef API 2020-04-14 20:49:18 -04:00
Evan You
b83c580131 feat(reactivity): add support for customRef API 2020-04-14 20:45:46 -04:00
Evan You
4046f0bc03 chore: revert debugging dev flag 2020-04-14 18:32:27 -04:00
Evan You
8ae362400e types: fix public instance $root and $parent type 2020-04-14 18:13:53 -04:00
Evan You
2e06f5bbe8 feat(runtime-core): detect and warn against components made reactive
close #962
2020-04-14 18:07:47 -04:00
Evan You
3e7bb7d110 feat(runtime-core): warn async data() 2020-04-14 17:40:41 -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
Evan You
c80b857eb5 fix(runtime-core): should resolve value instead of delete for dynamic props with options 2020-04-14 16:17:35 -04:00