Commit Graph

1474 Commits

Author SHA1 Message Date
Yang Mingshan
14908f2734
chore: prefer const (#865) 2020-03-23 11:11:00 -04:00
Evan You
b8c1be18f3 refactor(types): use stricter settings
fix #847
2020-03-23 11:08:22 -04:00
Evan You
b3890a93e3 fix(runtime-core): fix component proxy props presence check
fix #864
2020-03-21 16:25:33 -04:00
Evan You
c3bb3169f4 feat(runtime-core): async component support 2020-03-21 16:01:08 -04:00
Igor Randjelovic
d425818901
fix(runtime-dom): invalid lineGradient svg tag (#863)
close #862
2020-03-21 15:11:04 -04:00
ysj16
a3601e9fa7
perf(transform-vif): don't need to createBlock for a component (#853) 2020-03-20 11:29:44 -04:00
Jessica Sachs
b7d1e0fa2f
feat: add hook for transforming h's arguments (#851)
Note: this is for internal use (e.g. `@vue/test-utils`) only
2020-03-19 10:54:03 -04:00
Evan You
ba9a91c48c refactor: remove null comparisons 2020-03-18 18:14:51 -04:00
Evan You
811f28a7d1 test(runtime-core): tests for vnode hooks 2020-03-18 16:35:04 -04:00
Evan You
ebc1ca8eff fix(suspense): clear effects on suspense resolve 2020-03-18 15:40:20 -04:00
Evan You
be91b43564 types: improve directive hook argument types 2020-03-18 12:30:26 -04:00
Evan You
aa4ab39c1a refactor: separate vnode hooks and directive hooks 2020-03-18 12:30:26 -04:00
Evan You
6679799540 refactor: refactor vnode hooks invocation 2020-03-18 12:30:26 -04:00
Evan You
a1da9c28a0 fix(compiler-core): assign patchFlag for template v-if fragment
fix #850
2020-03-17 11:36:56 -04:00
Evan You
3b282e7e3c fix(runtime-core): fix boolean props validation 2020-03-17 10:35:32 -04:00
Evan You
5282ff0edb release: v3.0.0-alpha.9 2020-03-16 18:56:44 -04:00
likui
d318576d74
fix(runtime-dom): patch xlink attribute (#842) 2020-03-16 18:46:01 -04:00
yang
3d38e6faf3
refactor(componentProps): extract validate prop name logic (#825) 2020-03-16 18:45:08 -04:00
yang
703c9bc61f
types(ComponentInternalInstance): ComponentInternalInstance.type could reuse Component type (#824) 2020-03-16 18:41:11 -04:00
Evan You
c450ede12d feat(ssr): support getSSRProps for vnode directives 2020-03-16 18:36:19 -04:00
Evan You
a46f3b354d fix(compiler-ssr): should pass necessary tag names for dynamic v-bind 2020-03-16 18:24:26 -04:00
Evan You
3b40fc56db fix(compiler-ssr): fix input w/ v-bind="obj" codegen 2020-03-16 18:14:49 -04:00
Evan You
9eef37fa32 refactor(compiler): remove modelValue from generated code for native v-model 2020-03-16 17:51:56 -04:00
Evan You
3b2d236714 feat(compiler-sfc): add ssr option 2020-03-16 16:24:49 -04:00
Evan You
38f0269765 refactor: simplify suspense ssr + adjust behavior 2020-03-16 15:38:35 -04:00
Evan You
eb5b32fead test: fix resolveAssets test + test resolveDynamicComponent in slots 2020-03-16 13:17:57 -04:00
Evan You
4dc8ffc378 fix: simplify and use correct ctx in withCtx 2020-03-16 13:06:46 -04:00
Evan You
fd3418d79d chore: fix snapshot 2020-03-16 13:06:46 -04:00
Evan You
23701666cb Revert "refactor(directives): remove binding.instance"
This reverts commit 52cc7e8231.
2020-03-16 13:06:46 -04:00
Evan You
19228a469a refactor: simplify resolveDyanmicComponent 2020-03-16 13:06:46 -04:00
Evan You
9ad65b1653 refactor(template-ref): improve template ref handling
close #836, close #839
2020-03-16 13:06:46 -04:00
Evan You
8a58dce603 feat(runtime-core): set context for manual slot functions as well 2020-03-16 13:06:46 -04:00
Evan You
ecd7ce60d5 feat(compiler-core): wrap slot functions with render context 2020-03-16 13:06:46 -04:00
djy0
bcb750bb3a
test(runtime-core): fix test for vnode key (#846) 2020-03-16 13:06:03 -04:00
sqal
d9dd1d8a0a
fix(runtime-core): pass instance proxy as data() argument (#828)
Match current behaviour of vue 2
2020-03-16 10:28:17 -04:00
Evan You
586e5bb800 fix(compiler-core): fix property shorthand detection
fix #845
2020-03-16 10:27:03 -04:00
jods
c7ae269972
fix(runtime-core): empty boolean props (#844)
close #843
2020-03-16 10:19:06 -04:00
likui
760c3e0fd6
feat(types): export ErrorTypes (#840) 2020-03-15 11:40:58 -04:00
djy0
58bc51991e
chore(runtime-core): fix typo in warning (#841) [ci skip] 2020-03-15 11:29:21 -04:00
Evan You
60ed4e7e08 feat(ssr): improve fragment mismatch handling 2020-03-13 18:02:53 -04:00
Evan You
eb1d538ea2 test(ssr): hydration suspense tests 2020-03-13 13:05:05 -04:00
Evan You
1f9c9c14ae chore: move hydration tests 2020-03-13 13:05:05 -04:00
Evan You
a05d41c940 refactor(ssr): adjust ssr fragment anchor content 2020-03-13 13:05:05 -04:00
Evan You
cad5bcce40 feat(ssr): hide comment anchors during hydration in dev mode 2020-03-13 13:05:05 -04:00
Evan You
a3cc970030 feat(ssr/suspense): suspense hydration
In order to support hydration of async components, server-rendered
fragments must be explicitly marked with comment nodes.
2020-03-13 13:05:05 -04:00
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
7af089d429 test: fix & improve ssr warning assertion 2020-03-10 17:13:27 -04:00
Evan You
80c625dce3 feat(ssr): compiler-ssr support for Suspense 2020-03-10 16:52:31 -04:00
Evan You
47ead3b33a refactor(ssr): improve ssr async setup / suspense error handling 2020-03-10 16:52:31 -04:00
Evan You
9c4de7b9ed test(srr): group portal tests 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
djy0
b13886b1ba
types(reactivity): remove this in get accessor, fix #800 (#806) 2020-03-09 16:01:49 -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
f7a026109d test(ssr): ssr + hydration integration test 2020-03-06 15:14:12 -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
274f81c5db fix(reactivity): allow effect trigger inside no-track execution contexts
fix #804
2020-03-06 12:11:37 -05:00
Evan You
d6bf9ffdc6 chore(template-explorer): bump monaco version for live deployed page 2020-03-06 12:02:38 -05:00
Cédric Exbrayat
6fad2efb8c
chore(template-explorer): update monaco dependency (#793) 2020-03-06 12:01:13 -05:00
hareku
643ff233af
types(reactivity): add undefined type to ref/shallowRef when no args (#791) 2020-03-06 11:32:39 -05:00
Evan You
a3066581f3 fix(reactivity): should not trigger length dependency on Array delete
close #774
2020-03-06 11:31:10 -05:00
Evan You
cc69fd72e3 fix(reactivity): Map/Set identity methods should work even if raw value contains reactive entries
fix #799
2020-03-06 11:10:02 -05:00
Evan You
16f9e63951
types: remove 'this' annotation from 'get' accessor (#801)
The next version of Typescript disallows 'this' parameter annotations on
accessors, which causes vue-next to fail to compile.

This PR removes the annotation and adds a cast instead.

Fixes #800
2020-03-05 16:57:52 -06: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
11e6fba78c chore: update @vue/shared readme [ci skip] 2020-02-29 22:05:41 -05: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
33ab0f8e0f chore: fix snapshot 2020-02-27 17:15:51 -05:00
Evan You
8449a9727c feat(compiler-core): switch to @babel/parser for expression parsing
This enables default support for parsing bigInt, optional chaining
    and nullish coalescing, and also adds the `expressionPlugins`
    compiler option for enabling additional parsing plugins listed at
    https://babeljs.io/docs/en/next/babel-parser#plugins.
2020-02-27 16:53:51 -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
d52ffaa202 refactor(compiler-ssr): extract portal processing + emit errors 2020-02-26 15:05:11 -05:00
Dmitry Sharshakov
d8ed0e7fbf
feat(compiler-ssr): compile portal (#775) 2020-02-26 14:59:53 -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
djy0
59393dd757
fix(template-explorer): rename watch -> watchEffect (#780) 2020-02-26 10:13:07 -05:00
Evan You
3206e5dfe5 fix(types): shallowRef should not unwrap value type 2020-02-25 20:43:01 -05:00
Evan You
d4c6957e2d fix(types): ref value type unwrapping should happen at creation time 2020-02-25 19:44:06 -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