Commit Graph

643 Commits

Author SHA1 Message Date
Evan You
bb7fa3dabc feat(runtime-core): implement RFC-0020
BREAKING CHANGE: data no longer supports object format (per RFC-0020)
2020-03-12 16:13:12 -04:00
Katashin
dd17fa1c90
feat(runtime-core): add special property to get class component options (#821) 2020-03-12 11:46:32 -04:00
hareku
1e9d1319c3
fix(types): app.component should accept defineComponent return type (#822)
fix #730
2020-03-12 10:19:30 -04:00
Cédric Exbrayat
28a9beed16
fix(runtime-core): always set invalid vnode type (#820)
Currently, when a component used is not properly registered, we have a warning and the vnode type is set to a Comment type in DEV mode. But in prod mode, we have no default value, making such an application broken and throw a strange error (`can not read _isSuspense of undefined`).

This commit avoids such an error in prod mode (as it is currently the case in Vue 2.x).
2020-03-11 16:44:14 -04:00
Evan You
206640a2d8 fix(build): remove __RUNTIME_COMPILE__ flag
behavior should be consistent in all builds. fix #817
2020-03-11 16:39:26 -04:00
Cédric Exbrayat
f59779706b
refactor(Suspense): remove unnecessary casts (#819) 2020-03-11 11:17:10 -04:00
Evan You
47ead3b33a refactor(ssr): improve ssr async setup / suspense error handling 2020-03-10 16:52:31 -04:00
Dmitry Sharshakov
589aeb402c
feat(server-renderer): render suspense in vnode mode (#727) 2020-03-09 18:20:30 -04:00
hareku
e12ddd96ba
test(runtime-core/renderer): tests for rendering elements (#699) 2020-03-09 17:08:05 -04:00
Evan You
ca5f39ee35 refactor(runtime-core): adjust patchProp value arguments order
BREAKING CHANGE: `RendererOptions.patchProp` arguments order has changed

  The `prevValue` and `nextValue` position has been swapped to keep it
  consistent with other functions in the renderer implementation. This
  only affects custom renderers using the `createRenderer` API.
2020-03-09 16:15:49 -04:00
hareku
cd34603864
fix(runtime-core): pass prev value to hostPatchProp (#809)
fix #808
2020-03-09 16:08:10 -04:00
djy0
54a0e93c27
fix(runtime-core): should allow empty string and 0 as valid vnode key (#807) 2020-03-09 16:03:57 -04:00
hareku
257727569a
types(runtime-core): update error type to unknown (#798) 2020-03-09 15:58:52 -04:00
Evan You
c75388d538 release: v3.0.0-alpha.8 2020-03-06 15:58:40 -05:00
Evan You
dd2d25fee1 test(ssr): test for hydration mismatch handling 2020-03-06 15:39:54 -05:00
Evan You
3be3785f94 fix(ssr): fix ssr on-the-fly compilation + slot fallback branch helper injection 2020-03-06 14:52:15 -05:00
Evan You
08bba093af test(ssr): more hydration tests 2020-03-05 10:29:50 -06:00
Evan You
fb4856b363 test(ssr): hydratioon tests (wip) 2020-03-04 17:06:50 -06:00
Evan You
91269da52c feat(ssr): hydration mismatch handling 2020-03-03 15:12:38 -06:00
Evan You
7971b0468c fix(directives): ignore invalid directive hooks
fix #795
2020-03-03 12:26:48 -06:00
火石
27afbaf02d
chore: fix componentRenderUtils.ts comment typo (#790) [ci skip] 2020-03-03 10:05:07 -06:00
Evan You
bcb2a9b4a6 build: make @vue/shared public
This avoids it being inlined multiple times in esm bundler builds
2020-02-29 22:04:42 -05:00
Evan You
e1660f4338 refactor(runtime-core): adjust attr fallthrough behavior
BREAKING CHANGE: adjust attr fallthrough behavior

    Updated per pending RFC https://github.com/vuejs/rfcs/pull/137

    - Implicit fallthrough now by default only applies for a whitelist
      of attributes (class, style, event listeners, a11y attributes, and
      data attributes).

    - Fallthrough is now applied regardless of whether the component has
      explicitly declared props. (close #749)
2020-02-28 17:53:26 -05:00
Evan You
6810d1402e fix(runtime-core): ensure inhertied attrs update on optimized child root
fix #677, close #784
2020-02-27 21:51:57 -05:00
Evan You
4809325c07 refactor(hydration): move fragment to seaprate function + skip normalization in optimized mode 2020-02-27 11:26:39 -05:00
Evan You
3357ff438c fix(slots): fix conditional slot
fix #787
2020-02-26 21:43:27 -05:00
Evan You
5d952cc051 test: fix options usage of reactive 2020-02-26 21:29:41 -05:00
Evan You
e67f655b26 refactor(runtime-core): revert setup() result reactive conversion
BREAKING CHANGE: revert setup() result reactive conversion

    Revert 6b10f0c & a840e7d. The motivation of the original change was
    avoiding unnecessary deep conversions, but that can be achieved by
    explicitly marking values non-reactive via `markNonReactive`.

    Removing the reactive conversion behavior leads to an usability
    issue in that plain objects containing refs (which is what most
    composition functions will return), when exposed as a nested
    property from `setup()`, will not unwrap the refs in templates. This
    goes against the "no .value in template" intuition and the only
    workaround requires users to manually wrap it again with `reactive()`.

    So in this commit we are reverting to the previous behavior where
    objects returned from `setup()` are implicitly wrapped with
    `reactive()` for deep ref unwrapping.
2020-02-26 19:01:42 -05:00
Evan You
11d2fb2594 refactor(fragments): remove visible anchors for fragments 2020-02-26 16:32:06 -05:00
Evan You
439752822c fix(portal): fix portal placeholder text 2020-02-26 16:07:00 -05:00
Evan You
312513d255 release: v3.0.0-alpha.7 2020-02-26 14:36:38 -05:00
Evan You
e42d6b0712 refactor: use consistent name for watch invalidation register function 2020-02-26 10:20:30 -05:00
djy0
04f83fa681
fix(runtime-core): set appContext.provides to Object.create(null) (#781) 2020-02-26 10:20:10 -05:00
Evan You
711d16cc65 refactor: remove old watch signature support 2020-02-25 19:39:49 -05:00
Evan You
52cc7e8231 refactor(directives): remove binding.instance
BREAKING CHANGE: custom directive bindings no longer expose instance

    This is a rarely used property that creates extra complexity in
    ensuring it points to the correct instance. From a design
    perspective, a custom directive should be scoped to the element and
    data it is bound to and should not have access to the entire
    instance in the first place.
2020-02-25 19:35:48 -05:00
Evan You
3eab143843 fix(template-ref): fix string template refs inside slots 2020-02-25 18:29:51 -05:00
ysj16
8cb0b83088
fix(renderSlot): set slot render as a STABLE_FRAGMENT (#776)
fix #766
2020-02-25 16:41:44 +01:00
Evan You
4a5b91bd1f fix(runtime-core): fix slot fallback + slots typing
fix #773
2020-02-25 09:41:07 -05:00
djy0
19a799c28b
fix(runtime-core): make watchEffect ignore deep option (#765) 2020-02-24 18:03:02 +01:00
djy0
c11905fe36
chore: fix typo (#764) [ci skip] 2020-02-24 18:01:26 +01:00
Evan You
9ab22c7ae6 release: v3.0.0-alpha.6 2020-02-22 08:25:32 +01:00
Evan You
99a2e18c97 feat(runtime-core): add watchEffect API
BREAKING CHANGE: replae `watch(fn, options?)` with `watchEffect`

    The `watch(fn, options?)` signature has been replaced by the new
    `watchEffect` API, which has the same usage and behavior. `watch`
    now only supports the `watch(source, cb, options?)` signautre.
2020-02-22 08:19:10 +01:00
Evan You
e9024bf1b7 feat(reactivity): expose unref and shallowRef 2020-02-22 04:39:32 +01:00
Evan You
0c67201942 chore: fix test type 2020-02-22 03:54:20 +01:00
hareku
9547c2b93d
fix(sfc): inherit parent scopeId on child rooot (#756) 2020-02-21 14:44:13 +01:00
Evan You
a840e7ddf0 fix(types): update setup binding unwrap types for 6b10f0c
close #738
2020-02-19 18:29:18 +01:00
Evan You
478b4cfb2c release: v3.0.0-alpha.5 2020-02-18 15:00:55 -05:00
Evan You
8383e5450e fix(runtime-core): ensure renderCache always exists 2020-02-18 14:43:12 -05:00
Evan You
583f9468fa refactor: extract remove util 2020-02-18 13:52:59 -05:00
Evan You
fd031490fb feat(ssr): useSSRContext 2020-02-18 13:26:15 -05:00