Commit Graph

2227 Commits

Author SHA1 Message Date
Evan You
cf2c9f6faa perf: do not enable hmr in non-browser envs 2020-10-06 11:51:55 -04:00
Evan You
5c3e8e9840 fix(runtime-core): ensure this context for $nextTick callback
fix #2282
2020-10-05 18:18:38 -04:00
Evan You
f4119249f2 fix(compiler-core): consistently remove comment nodes for pre tags in production
close #2217
2020-10-05 17:53:34 -04:00
ᴜɴвʏтᴇ
4d20ac8173
fix(runtime-core): make errorCaptured return value handling consistent with Vue 2 (#2289)
fix #2267
2020-10-05 17:37:26 -04:00
HcySunYang
ea1f87eabf
fix(reactivity): should add allowRecurse to the effect (#2213)
So that the scheduler also respects effect's allowRecurse option.

fix #2200
2020-10-05 16:36:02 -04:00
Philipp Rudloff
28d5fd7a28
fix(runtime-core): vnode.el is null in watcher after rerendering (#2295)
fix #2170
2020-10-05 16:05:43 -04:00
HcySunYang
9499871582
fix(compiler-core): make v-once work with v-if/else-if/else (#2182)
Partial fix for #2035
2020-10-05 11:58:37 -04:00
Nathan Shively-Sanders
d52d139b85
types: fix Typescript 4.1 compile error (#2219)
close #2218
2020-09-28 12:39:14 -04:00
meteorlxy
64f44c671a
chore(compiler-core): fix typo in tests (#2209) 2020-09-23 12:25:52 +02:00
Evan You
376883d1cf fix(runtime-core): fix duplicated unmount traversal in optimized mode
fix #2169
2020-09-22 11:38:15 -04:00
wonderful-panda
5dbd6b36a0
fix(types): fix using tuple type as EmitsOptions (#2160)
fix #2159
2020-09-22 10:05:37 -04:00
Evan You
6aa2256913 fix(types): avoid DefineComponent defaulting to any
fix #2192
2020-09-22 10:02:19 -04:00
Evan You
d8c1536ead release: v3.0.0 2020-09-18 11:28:05 -04:00
Evan You
876ecc8672 release: v3.0.0-rc.13 2020-09-18 01:39:30 -04:00
ᴜɴвʏтᴇ
f316a332b0
fix(reactivity): avoid length mutating array methods causing infinite updates (#2138)
fix #2137

Co-authored-by: Evan You <yyx990803@gmail.com>
2020-09-18 01:01:36 -04:00
Katashin
422f05e085
fix(hmr): make hmr working with class components (#2144) 2020-09-18 00:14:59 -04:00
Anthony Fu
57bdaa2220
fix(types): component instance inference without props (#2145) 2020-09-18 00:13:47 -04:00
Evan You
1c9a0b3e19 feat(watch): support dot-delimited path in watch option 2020-09-18 00:00:39 -04:00
Evan You
5bfcad155b fix(suspense): should discard unmount effects of invalidated pending branch 2020-09-17 23:49:06 -04:00
Evan You
49bb44756f refactor: watch APIs default to trigger pre-flush
BREAKING CHANGE: watch APIs now default to use `flush: 'pre'` instead of
`flush: 'post'`.

  - This change affects `watch`, `watchEffect`, the `watch` component
    option, and `this.$watch`.

  - As pointed out by @skirtles-code in
    [this comment](https://github.com/vuejs/vue-next/issues/1706#issuecomment-666258948),
    Vue 2's watch behavior is pre-flush, and the ecosystem has many uses
    of watch that assumes the pre-flush behavior. Defaulting to post-flush
    can result in unnecessary re-renders without the users being aware of
    it.

  - With this change, watchers need to specify `{ flush: 'post' }` via
    options to trigger callback after Vue render updates. Note that
    specifying `{ flush: 'post' }` will also defer `watchEffect`'s
    initial run to wait for the component's initial render.
2020-09-17 23:17:21 -04:00
Evan You
58c31e3699 feat(runtime-core): support using inject() inside props default functions 2020-09-17 15:59:01 -04:00
Evan You
985bd2bcb5 release: v3.0.0-rc.12 2020-09-16 13:50:13 -04:00
Evan You
df954dc90f chore: do not log warned error during tests 2020-09-16 13:37:12 -04:00
Evan You
dd40ad8fca fix(runtime-core): should still do full traverse of stable fragment children in dev + hmr 2020-09-16 13:01:53 -04:00
Evan You
bebd44f793 fix(runtime-core): ensure root stable fragments inherit elements for moving
fix #2134
2020-09-16 12:18:03 -04:00
Evan You
c7b4a379cf fix(runtime-core/async-component): fix error component when there are no error handlers
fix #2129
2020-09-16 11:10:16 -04:00
Evan You
3810de7d6b fix(reactivity): effect shoud only recursively self trigger with explicit options
fix #2125
2020-09-16 10:52:31 -04:00
wonderful-panda
89e9ab8a2a
fix(types/tsx): optional props from Mixin/Extends are treated as required (#2048) 2020-09-16 10:09:35 -04:00
Cédric Exbrayat
7e68ddd354
chore: typos in suspense events (#2131)
Removes the mention of the recede event that has been replaced.
2020-09-16 09:30:47 -04:00
Carlos Rodrigues
be27bbc5ad
types(defineComponent): fix missing exported types (#2124) 2020-09-16 09:29:42 -04:00
underfin
066d514d75
feat(compiler-sfc): additionalData support for css preprocessors (#2126)
close https://github.com/vitejs/vite/issues/520
2020-09-16 09:28:31 -04:00
Evan You
f2ef7d7c8e release: v3.0.0-rc.11 2020-09-15 13:15:42 -04:00
Evan You
87ca99e396 chore: bump deps 2020-09-15 13:04:28 -04:00
Evan You
5ae7380b4a
feat: update Suspense usage (#2099)
See https://github.com/vuejs/vue-next/pull/2099 for details.
2020-09-15 12:45:06 -04:00
Evan You
37e686f25e chore: remove wip code 2020-09-15 12:41:56 -04:00
Carlos Rodrigues
4fd468aced
types(runtime-core): refactor defineComponent (#1883) 2020-09-15 11:46:11 -04:00
izayl
848ccf56fb
test(reactive): add test case of mutation in original reflecting in observed value (#2118) 2020-09-15 10:49:59 -04:00
underfin
05df696a2b
fix(compiler-sfc): should extract comment for import or type declarations (#2107)
fix #2102
2020-09-15 10:39:27 -04:00
HuangYi
98cc1f9d84
fix(KeepAlive): when exclude prop change, it should prune cache that not matched (#2111) 2020-09-15 10:33:50 -04:00
Carlos Rodrigues
d4bf9bcbb4
fix(reactivity): toRef should not wrap a ref (#2103) 2020-09-15 10:29:38 -04:00
HcySunYang
aa8dc9a507
fix(compiler-ssr): correct the variable name generated by the generator (#2065) 2020-09-15 10:00:14 -04:00
HcySunYang
7455dca11c
fix(compiler-ssr/teleport): correct the target prop of teleport (#2053) 2020-09-15 09:59:36 -04:00
Jonathan Wood
cdd849a09c
chore: fix tests (#2120) 2020-09-15 09:36:27 -04:00
Evan You
c67e78ab6f chore(compiler-sfc): gracefully handle failed parse when analyzing bindings 2020-09-14 22:10:23 -04:00
Haoqun Jiang
273d19ad46
fix: should be able to parse decorators in script lang="ts" & jsx (#2088)
* fix: should be able to parse decorators in script lang="ts"

* fix: should also support parsing jsx

Added to `compileScript` instead of `babelParserDefaultPlugins` because
it's not needed for template expression parsing
2020-09-14 21:51:15 -04:00
edison
0cddde6aa4
test(runtime-core): test app API warnings (#2079) 2020-09-14 21:48:38 -04:00
Haoqun Jiang
c65d6def84
polish: warn deprecated beforeDestroy/destroyed lifecycle hooks (#1999) 2020-09-14 21:47:58 -04:00
Pick
fcf9b2cf19
fix(reactivity): should trigger collection's write-function correctly on non-reactive keys (#1992) 2020-09-14 21:31:04 -04:00
Evan You
b2dc95378d types: fix + test inject API typing
ref: #2052
2020-09-14 21:26:28 -04:00
edison
b29bc0d694
chore(compiler-core): define child if necessary. (#2033) 2020-09-14 20:56:53 -04:00
Pick
09a939d37c
Revert "refactor(runtime-core): add @internal for instance.proxy (#1849)" (#2024)
This reverts commit 4d51be73d3.
2020-09-14 20:56:04 -04:00
satotake
937735251c
feat(compiler-sfc): support additionalData option in compileStyle when processing sass (#1952) 2020-09-14 20:53:06 -04:00
被雨水过滤的空气
890ca8aa34
fix(keep-alive): should use onMounted and onUpdated to invoke cacheSubtree (#1984) 2020-09-14 20:50:06 -04:00
Hefty
0d4910a211
fix(reactivity): add NaN prop on Array should not trigger length dependency. (#1998) 2020-09-14 20:40:09 -04:00
Evan You
124c385baf perf: should not trigger child update if changed prop is declared emit listener
close #2072
2020-09-14 18:58:30 -04:00
Evan You
4de5b111ee test: fix cloneVNode ref tests 2020-09-14 18:55:00 -04:00
Evan You
be946ea549 fix(compiler-core): fix prefixing for <template v-for> key expressions
fix #2085
2020-09-14 17:04:27 -04:00
underfin
a32870a8f6
fix: inherit el for static nodes inside keyed template fragment (#2089)
fix #2080
2020-09-14 16:02:29 -04:00
Evan You
612eb6712a fix(runtime-core/refs): handle multiple merged refs for dynamic component with vnode
fix #2078
2020-09-14 15:33:38 -04:00
Stanislav Lashmanov
313dd06065
fix(runtime-core/inject): handle optional from option in inject object config (#2073) 2020-09-14 12:52:19 -04:00
Evan You
a096a58e41 fix(compiler-core): fix v-if block handling for components that fail to resolve
fix #2058
2020-09-14 12:41:35 -04:00
HcySunYang
24fcf6ae7c
fix(types): properly infer return type from async setup (#2051)
fix #2049
2020-09-14 11:28:56 -04:00
Evan You
0124eacc91 refactor(reactivity): refactor iteration key trigger logic + use more robust Map/Set check 2020-09-14 11:26:34 -04:00
Pick
cf1b6c666f
feat(runtime-dom): allow native Set as v-model checkbox source (#1957) 2020-09-14 11:16:50 -04:00
Evan You
d4724619fc fix(inject): fix support for inject option default function
fix #2050
2020-09-04 12:07:30 -04:00
Evan You
6dbc6c4cd0 fix(sfc): fix scoped style regression for child component with single root + comment
fix #2046
2020-09-04 11:36:55 -04:00
Evan You
5f4053967c fix(reactivity): revert ac81dcf
fix #2043
2020-09-04 11:10:26 -04:00
Evan You
fa7ab0a7f7 fix(runtime-core): warn reserved prefix for setup return properties and ensure consistent dev/prod behavior
close #2042
2020-09-03 11:21:14 -04:00
ᴜɴвʏтᴇ
95c07d8c36
fix(runtime-core): fix priority of option merging (#2041) 2020-09-03 10:35:43 -04:00
Evan You
4386653e76 release: v3.0.0-rc.10 2020-09-02 12:41:54 -04:00
Evan You
52e45a9850 fix(v-once): fix v-once usage with v-if and v-for
fix #2035
2020-09-02 12:30:37 -04:00
Evan You
ad93fa42fc fix(runtime-core): openBlock() should not be tracked when block tracking is disabled 2020-09-02 12:30:37 -04:00
Evan You
c73b4a0e10 feat(ssr): serverPrefetch 2020-09-01 22:52:46 -04:00
HcySunYang
63f1f18064
fix(runtime-core): v-model listeners that already exists on the component should not be merged (#2011)
fix #1989
2020-09-01 22:24:20 -04:00
Carter Li
aa757e8e6d
fix(types): fix this type of this.$watch (#2022) 2020-09-01 21:08:01 -04:00
HcySunYang
93b8ff94a4
polish(teleport): do not warn missing target when teleport is disabled (#2021) 2020-09-01 21:05:51 -04:00
zhangzhonghe
0d0970f9cd
refactor(runtime-core): remove the deactivated branch in unmountComponent method (#2012) 2020-09-01 21:03:50 -04:00
Evan You
691a4b9530 perf(reactivity): no need to proxy has/ownKeys for readonly objects 2020-09-01 20:52:48 -04:00
Evan You
c0427b45ff fix(sfc/scoped-style): inherit scopeId through nested HOCs with inheritAttrs: false
fix #1988
2020-09-01 18:56:02 -04:00
HcySunYang
5b82c48c7b
fix(runtime-core): enable block tracking when normalizing plain element with slot children (#1987)
fix #1980
2020-09-01 12:38:47 -04:00
ᴜɴвʏтᴇ
706b52aadd
fix(runtime-core): ensure consistent $options merge behavior with 2.x (#1986)
close #1978 , close #1979
2020-08-31 21:04:06 -04:00
Evan You
8ed0b342d4 fix(runtime-core): fix props/emits resolving with global mixins
fix #1975
2020-08-31 18:32:07 -04:00
Guillaume Chau
5df71b739d chore: add repository directories 2020-08-30 15:06:06 +02:00
Guillaume Chau
7fd3436290 fix(devtools): make el extra properties non-enumerable 2020-08-29 05:00:38 +02:00
Guillaume Chau
38ca7e8e4e feat(devtools): expose vnode and component on elements 2020-08-29 04:53:25 +02:00
Stanislav Lashmanov
4421c00903
feat(compiler-sfc): analyze script bindings (#1962)
Also expose `scriptAst` and `scriptSetupAst` on returned script block
2020-08-28 16:21:03 -04:00
Evan You
94d94bafc5 release: v3.0.0-rc.9 2020-08-26 18:21:18 -04:00
Evan You
0cb7f7f880 fix(runtime-core): fix resolving assets from mixins and extends
fix #1963
2020-08-26 18:09:54 -04:00
meteorlxy
bc64c60c7e
style(compiler-sfc): tweak api and types export (#1976) 2020-08-26 15:22:11 -04:00
Pick
d0cc4b37d0
test(runtime-core): add tests for componentSlots (#1940) 2020-08-26 12:17:21 -04:00
Pick
97bc30edad
perf(reactivity): avoid triggering Map.has twice on non-reactive keys (#1972) 2020-08-26 11:41:18 -04:00
xxgjzftd
d5c4f6ed4d
perf(reactivity): add existing index or non-integer prop on Array should not trigger length dependency (#1969) 2020-08-26 11:28:58 -04:00
HcySunYang
6df0e738cb
fix(runtime-core): properly call lifecycle hooks in chained mixins & extends (#1974)
fix #1973
2020-08-26 10:31:23 -04:00
HcySunYang
9153fc2d8a
fix(runtime-core): class and style should be properly normalized in cloneVNode (#1967)
fix #1964
2020-08-26 09:37:28 -04:00
Evan You
ede2e0d1b5 release: v3.0.0-rc.8 2020-08-25 10:31:52 -04:00
zhangzhonghe
1ea24000c8
fix(keep-alive): should remove wrapped version of injected keep alive hooks (#1959) 2020-08-25 10:02:39 -04:00
Amour1688
a47626a4a3
types(jsx): make HTMLAttributes and SVGAttributes extend Events (#1941) 2020-08-25 09:50:33 -04:00
ᴜɴвʏтᴇ
1d55454e61
fix(runtime-dom): avoid setting unchanged input value (#1937)
fix #1935 (fix v-model usage with HTML5 validation)
2020-08-25 09:47:55 -04:00
Katashin
67b6e0f894
fix(types): relax ComponentPublicInstanceConstructor type for class components (#1943) 2020-08-24 21:53:30 -04:00
HcySunYang
955450f539
types(runtime-core): improve the extracted instance types (#1936) 2020-08-24 21:37:22 -04:00