Joseph Xia
d57749cbf7
test(compiler-core): add v-if with comments test case ( #1389 )
2020-06-17 16:01:12 -04:00
hanmingyang
bf5aba8f19
test(compiler-sfc):test isRelativeUrl ( #1377 )
2020-06-17 15:57:26 -04:00
Evan You
e68209bfdb
test: bump jest
2020-06-16 12:11:51 -04:00
Evan You
2961e149c9
fix(types): ensure correct public props interface for defineComponent instance type
...
fix #1385
2020-06-16 12:00:18 -04:00
underfin
6c8bfa1018
fix(runtime-core): fix parent el update on nested HOC self-update ( #1360 )
...
fix #1357
2020-06-15 16:46:29 -04:00
Evan You
be69beed5e
fix(runtime-core): cloneVNode should preserve correct ctx instance when normalizing ref
...
fix #1311
2020-06-15 15:57:37 -04:00
Evan You
605953a154
refactor: only inject rest args for member expression handlers + fix tests
2020-06-15 15:24:46 -04:00
Cathrine Vaage
7e28173312
fix(compiler-core/v-on): pass noninitial arguments in cached event handlers ( #1265 )
2020-06-15 15:04:03 -04:00
underfin
35dbef268c
fix(compiler-core): should not prefix object method ( #1375 )
2020-06-15 11:20:00 -04:00
Cédric Exbrayat
68e2d6c68a
fix(types): export ComponentOptionsMixin ( #1361 )
...
The newly introduced `ComponentOptionsMixin` was not re-exported.
2020-06-15 11:13:00 -04:00
Cathrine Vaage
250eb4a5bc
fix(runtime-core): properly capitalize v-on object keys ( #1358 )
2020-06-15 11:12:08 -04:00
Evan You
e52b7cd7e7
fix(compiler-core): ignore comment nodes in transition children
...
fix #1352
2020-06-15 11:08:55 -04:00
Evan You
afb231ec5c
fix(compiler-core): skip empty expressions when validating expressions in browser mode
2020-06-15 10:59:03 -04:00
Carlos Rodrigues
6e9789cef1
test(runtime-core): test multi-root ref assignment ( #1374 )
2020-06-15 09:31:14 -04:00
蜗牛老湿
79686e90e2
test: 100% vue packages coverage ( #1371 )
2020-06-15 09:29:58 -04:00
Evan You
cf2f278f48
release: v3.0.0-beta.15
2020-06-12 18:09:05 -04:00
Evan You
51510adacb
test: fix hmr test
2020-06-12 17:17:01 -04:00
Evan You
6abac87b3d
fix(runtime-core): track access to $attrs
...
fix #1346
2020-06-12 16:59:15 -04:00
Evan You
91fa52850a
chore: lint for unused arguments
2020-06-12 16:31:31 -04:00
Evan You
825ec1500f
fix(compiler-core): support static slot names containing dots for 2.x compat
...
close #1241
2020-06-12 16:09:27 -04:00
Evan You
0d26413433
fix(compiler-core): fix parsing for directive with dynamic argument containing dots
2020-06-12 15:59:13 -04:00
Evan You
e76ed4c269
refactor(hmr): simplify hmr force update check
2020-06-12 14:53:48 -04:00
Carlos Rodrigues
8f2a7489b7
fix(hmr): force full update on nested child components ( #1312 )
2020-06-12 14:31:56 -04:00
Evan You
4492b88938
fix: always treat spellcheck and draggable as attributes
...
fix #1350
2020-06-12 12:40:54 -04:00
Evan You
8084156f4d
fix(runtime-core): mount children before setting element props
...
fix #1318 , close #1320
2020-06-12 12:14:39 -04:00
underfin
aac9b03c11
fix(runtime-core): should pass instance to patchProp on mount for event error handling ( #1337 )
...
fix #1336
2020-06-12 11:59:55 -04:00
Aneryu
90c3532946
fix(runtime-dom): compatibility for cases where event.timeStamp is 0 ( #1328 )
...
close #1325
2020-06-12 11:00:37 -04:00
Albert Liu
47c4ffbdbe
refactor(types): improve typing ( #1317 )
2020-06-12 10:46:44 -04:00
Cédric Exbrayat
cab769f174
fix(types): add RawSlots in h signature ( #1293 )
2020-06-12 10:38:56 -04:00
CodinCat
c7cd386194
test(e2e): enhance and fix test of svg example ( #560 )
2020-06-12 10:32:27 -04:00
underfin
c463a71bb3
fix(ssr): fix unintended error on Teleport
hydration mismatch ( #1271 )
...
fix #1235
2020-06-12 10:01:56 -04:00
Evan You
d863ce721f
refactor: improve base getter readability
2020-06-12 09:25:40 -04:00
Yang Mingshan
80e1693e1f
fix(reactivity): replaced ref in reactive object should be tracked ( #1058 )
2020-06-12 09:20:43 -04:00
tangjinzhou
d437a0145d
fix(runtime-core): default value for function type prop ( #1349 )
...
fix #1348
2020-06-12 09:06:28 -04:00
Carlos Rodrigues
4c4f39b6ea
types(props): fix typo on prototype ( #1334 )
2020-06-11 17:34:21 -04:00
蜗牛老湿
f3eac11058
chore(reactivity): use ReactiveFlags instead of __v_ properties ( #1313 )
2020-06-11 17:32:44 -04:00
underfin
d4e9b19932
perf: only patch string style when value has changed ( #1310 )
...
fix #1309
2020-06-11 17:25:39 -04:00
ysj16
1f2926a33c
perf: optimize LRU access in keep-alive ( #1316 )
2020-06-11 17:24:50 -04:00
underfin
0b93440146
chore: better warning when remounting a mounted app ( #1297 )
2020-06-11 17:20:38 -04:00
蜗牛老湿
426803046f
test(reactivity): 100% reactivity coverage ( #1299 )
2020-06-11 16:55:56 -04:00
Evan You
3fafc3b3ac
types(runtime-core): improve types for transition hook ( #1009 )
...
* types(runtime-core): improve types for transition hook
fix #1000
* Update packages/runtime-core/src/components/BaseTransition.ts
Co-Authored-By: Carlos Rodrigues <david-181@hotmail.com>
* fix: run ci
Co-authored-by: Carlos Rodrigues <david-181@hotmail.com>
2020-06-11 16:39:18 -04:00
underfin
419b86d190
feat(types): support typing directive value via generic argument ( #1007 )
...
close #998
2020-06-11 16:37:14 -04:00
Evan You
e29f0b3fc2
feat(compiler): better warning for invalid expressions in function/browser mode
...
fix #1266
2020-06-11 16:31:51 -04:00
Evan You
10bb34bb86
fix(reactivity): fix toRaw for objects prototype inherting reactive
...
fix #1246
2020-06-11 15:12:57 -04:00
Evan You
f3623e4d1e
fix(compiler-core): fix prod whitespace/comment removal
...
fix #1256
2020-06-11 11:45:10 -04:00
Evan You
80c868aefe
workflow: setup eslint for prohibited syntax and globals
...
fix #1285
2020-06-10 16:54:23 -04:00
Evan You
e4dc03a8b1
feat(types): adjust type exports for manual render function and tooling usage
...
- v-model and v-show directives are now exposed as public
- compiler-used runtime helpers are now exposed for TS tooling, but marked as @private
close #1329
2020-06-10 14:57:21 -04:00
Evan You
9b5d13e598
fix: bail stringification for slots
...
fix #1281 , close #1286
2020-06-10 14:31:59 -04:00
蜗牛老湿
fbaf52ae9f
fix(compiler-dom): add tfoot,caption,col element on bail stringification ( #1333 )
2020-06-10 14:24:51 -04:00
Carlos Rodrigues
958b6c80cf
fix(compiler-core): allow multiline expression on v-model and v-on ( #1234 )
2020-06-09 17:24:48 -04:00
Carlos Rodrigues
c97d1bae56
fix(reactivity): shallowReactive collection to not-readonly ( #1212 )
2020-06-09 17:20:30 -04:00
Evan You
3f80183f1f
test: test for table stringification bail
2020-06-09 17:10:07 -04:00
Evan You
a938b61edc
fix(compiler-dom): bail stringification on table elements
...
close #1230 , close #1268
2020-06-09 17:02:27 -04:00
Zardddddd60
64ec8bfb54
fix(compiler-core): bail static stringfication even threshold is met ( #1298 )
...
fix #1128
2020-06-09 16:26:03 -04:00
Evan You
215c106297
test: test for mixin/extends props merging
2020-06-09 16:20:33 -04:00
Evan You
2417a0cb30
fix(runtime-core): respect props from mixins and extends
...
fix #1236 , close #1250
2020-06-09 11:27:40 -04:00
Evan You
dc986addd9
fix(build): retain main vue package side effect for compiler registration
...
fix #1263
2020-06-09 10:38:56 -04:00
doly mood
d3c436ae2e
feat(types): mixins/extends support in TypeScript ( #626 )
2020-06-09 10:37:00 -04:00
Carlos Rodrigues
97dedebd80
feat(types): update to Typescript 3.9 ( #1106 )
2020-06-09 10:17:42 -04:00
Alexandre Bonaventure Geissmann
4a5021e763
fix(runtime-core): use array destructuring instead of object for edge compat ( #1302 )
...
fix #1294
2020-06-05 10:57:44 -04:00
Evan You
2408a65662
fix(hmr): force full update in child component on slot update
2020-05-29 10:50:01 -04:00
Evan You
5ddd9d2417
fix(compiler-sfc): asset url transform should ignore direct hash urls
2020-05-29 10:20:57 -04:00
Evan You
5f15d9aa4b
fix(compiler-ssr): should escape template string interpolation chars in generated code
2020-05-26 14:38:24 -04:00
Evan You
38f2d23a60
feat(runtime-core): add inheritRef option + make <transition> & <keep-alive> inherit refs
2020-05-22 10:26:17 -04:00
Evan You
0a7932c6b3
fix(ssr): should set ref on hydration
2020-05-21 17:37:23 -04:00
zhangzhonghe
5a3b44caf7
chore: fix typo in comment ( #1217 )
2020-05-21 09:34:05 +02:00
Evan You
32b3f78a36
release: v3.0.0-beta.14
2020-05-18 14:42:11 -04:00
Evan You
24168bbb33
chore: improve comments
2020-05-18 11:17:57 -04:00
Carlos Rodrigues
488e2bcfef
fix(reactivity): shallowReactive for collections ( #1204 )
...
close #1202
2020-05-18 11:17:37 -04:00
Yang Mingshan
ba62ccd55d
feat(watch): support directly watching reactive object in multiple sources with deep default ( #1201 )
2020-05-18 11:02:51 -04:00
underfin
83b7158017
fix(v-model): should not trigger updates during input composition ( #1183 )
2020-05-18 10:23:55 -04:00
underfin
520cad7d4d
test(runtime-core): add test case for createBlock
with disableTracking ( #1169 )
2020-05-18 10:20:05 -04:00
underfin
efa3214866
test(runtime-core): add test for renderSlot
( #1160 )
2020-05-18 10:14:09 -04:00
zhangenming
6574a5bf29
chore: merge imports ( #1182 )
2020-05-18 10:12:14 -04:00
Albert Kaaman
ab86b190ce
fix(runtime-dom): event handlers with modifiers should get all event arguments ( #1193 )
2020-05-18 10:11:39 -04:00
underfin
d73a508a73
fix(Transition): fix validate duration ( #1188 )
2020-05-18 10:09:10 -04:00
Carlos Rodrigues
8e30d0c74c
types(server-renderer): export SSRContext type ( #1199 )
2020-05-18 10:07:20 -04:00
Jian Zhang
b2dd5612ff
chore: fix typo Stringiable -> Stringifiable ( #1200 )
2020-05-18 10:06:57 -04:00
Evan You
dd2bfb5a8f
fix(compiler-dom): should bail stringification on runtime constant regardless of position
...
ref: vuejs/vite#157
2020-05-18 10:04:18 -04:00
Evan You
449fd05ad6
release: v3.0.0-beta.13
2020-05-16 21:53:47 -04:00
Evan You
d965bb6227
feat: improve static content stringiciation
...
Now a single static vnode can contain stringified content
for multiple consecutive nodes, which greatly improves the
coverage of this optimization.
2020-05-16 21:30:16 -04:00
Evan You
59d50dad9c
wip: account for text call nodes in stringify chunks
2020-05-15 17:55:24 -04:00
Evan You
b26976b6d8
wip: fix tests
2020-05-15 17:05:26 -04:00
Evan You
dc229bcda4
wip(hydration): hydrate multi-element static nodes
2020-05-15 16:30:20 -04:00
Evan You
1184118d23
wip(runtime): test for static vnode handling
2020-05-15 16:11:53 -04:00
Evan You
baa6973b13
wip(compiler): tests for new stringification
2020-05-15 15:50:42 -04:00
Evan You
dbf627f136
wip(runtime): support multi-element static vnode in renderer
2020-05-15 15:12:26 -04:00
Evan You
cb9444807e
wip(compiler): improve node stringification to support adjacent nodes
2020-05-15 12:58:44 -04:00
Evan You
c2f3ee4dc0
chore: use jsdoc comments in ast
2020-05-15 11:00:07 -04:00
Evan You
3c88299f6a
release: v3.0.0-beta.12
2020-05-11 15:52:37 -04:00
Evan You
2bc6a8c1cf
fix(hmr): static child traversal should only affect elements
2020-05-11 15:46:30 -04:00
Evan You
aa1672a8bd
test: fix hmr test id
2020-05-11 15:44:13 -04:00
Evan You
7887c54dfe
release: v3.0.0-beta.11
2020-05-11 14:25:36 -04:00
Evan You
1b946c85df
fix(hmr): always force full child component props update in HMR mode
2020-05-11 14:17:35 -04:00
Evan You
5b8883a846
fix(runtime-core): should not take unmount children fast path for v-for fragments
...
fix #1153
2020-05-11 13:53:28 -04:00
underfin
697de07e63
fix(transition): should reset enter class after appear ( #1152 )
2020-05-11 12:30:10 -04:00
Evan You
9d111f534a
test(transition): refactor DOM transition test
2020-05-11 11:52:08 -04:00
Evan You
66c5a556dc
fix(hmr): ensure static nodes inherit DOM element in hmr mode
...
fix #1156
2020-05-11 11:34:42 -04:00
Evan You
a165d8293d
feat(runtime-core): expose isVNode
2020-05-11 11:09:36 -04:00
Evan You
13acb9134e
release: v3.0.0-beta.10
2020-05-07 11:21:18 -04:00
underfin
66dd1aaecd
test(Transition): test transition ( #1140 )
2020-05-07 11:10:28 -04:00
Evan You
d10835aee7
fix(compiler-sfc): template with alt lang should be parsed as raw text
...
fix #1120
2020-05-07 11:08:17 -04:00
Evan You
e58beecc97
refactor(compiler/types): convert compiler options documentation to jsdoc
...
BREAKING CHANGE: `getTextMode` compiler option signature has changed from
```ts
(tag: string, ns: string, parent: ElementNode | undefined) => TextModes
```
to
```ts
(node: ElementNode, parent: ElementNode | undefined) => TextModes
```
2020-05-07 11:01:36 -04:00
Evan You
304ab8c99b
fix(compiler-dom): bail static stringfication on non-attr bindings
...
fix #1128
2020-05-07 10:32:54 -04:00
Evan You
2f69167e88
perf(compiler-sfc): only add character mapping if not whitespace
2020-05-07 10:32:54 -04:00
Evan You
675330ba54
fix(compiler): warn against v-bind with empty attribute value
...
ref: https://github.com/vuejs/vue-next/issues/1128#issuecomment-624647434
2020-05-07 10:32:54 -04:00
Evan You
698c8d35d5
feat(compiler-sfc): improve sfc source map generation
2020-05-07 01:37:34 -04:00
龙腾道
e08f6f0ede
fix(reactivity): use correct thisArg for collection method callbacks ( #1132 )
2020-05-06 13:41:34 -04:00
Evan You
8df6bc0132
refactor: reuse parseStringStyle across compiler and runtime
2020-05-06 11:22:49 -04:00
t-zzzzzzzzz
2d9f136077
fix(runtime-dom/style): normalize string when merging styles ( #1127 )
2020-05-06 11:14:07 -04:00
susiwen8
df4150dc4c
chore: LegacyOptions doesn't need to be exported ( #1134 )
2020-05-06 11:07:11 -04:00
Evan You
d66211849c
fix(compiler-sfc): should not transform external asset url with
...
includeAbsolute: true
2020-05-06 09:41:31 -04:00
龙腾道
037fa07113
fix(reactivity): fix __proto__ access on proxy objects ( #1133 )
2020-05-06 09:08:44 -04:00
Evan You
c5dcfe16f6
perf(compiler-sfc): improve asset url trasnform efficiency
2020-05-05 16:07:15 -04:00
Evan You
40166a8637
feat(types): re-expose trasnformVNodeArgs
2020-05-05 10:45:33 -04:00
Evan You
c32ed52b97
release: v3.0.0-beta.9
2020-05-04 17:14:42 -04:00
Evan You
f05aeea7ae
fix(transitionGroup): fix transition children resolving condition
2020-05-04 17:09:19 -04:00
Evan You
6a0be882d4
feat(compiler-sfc): support transforming absolute asset urls
...
BREAKING CHANGE: `@vue/compiler-sfc`'s `transformAssetUrlsBase` option
has been removed. It is merged into `trasnformAssetUrls` which now also
accepts the format of
```ts
{
base?: string
includeAbsolute?: string
tags?: { [name: string]: string[] }
}
```
2020-05-04 16:45:19 -04:00
Evan You
f9a3766fd6
fix(compiler): bail strigification on runtime constant expressions
2020-05-04 15:15:26 -04:00
Evan You
3c3fe88c64
release: v3.0.0-beta.8
2020-05-04 10:49:23 -04:00
underfin
26a50ce67f
fix(transitionGroup): inner children should skip comment node ( #1105 )
2020-05-04 10:41:48 -04:00
Evan You
3c60d40827
feat(shared): support Map and Set in toDisplayString
...
close #1067 , close #1100
2020-05-04 10:38:03 -04:00
Evan You
ff97be15c3
chore: ensure warn is dev only
2020-05-04 10:17:40 -04:00
Evan You
c6217b4d46
refactor(types): use pure type symbol
2020-05-04 09:38:32 -04:00
Evan You
6b33cc4229
feat(watch): support directly watching reactive object with deep default
...
Also warn invalid watch sources
close #1110
2020-05-04 09:27:28 -04:00
Evan You
64ef7c76bf
feat(types): re-expose resolve asset utitlies and registerRuntimeCompiler in type definitions
...
close #1109
2020-05-04 08:52:59 -04:00
Evan You
bc1f097e29
fix(types/reactivity): fix ref type inference on nested reactive properties with .value
...
fix #1111
2020-05-04 08:51:17 -04:00
Evan You
f40f3a0e95
fix(reactivity): avoid polluting Object prototype
2020-05-04 08:51:17 -04:00
Jackliu
42a99d28ae
chore: typo ( #1113 )
2020-05-04 10:30:24 +02:00
Evan You
6be2b73f8a
fix(reactivity): check own property for existing proxy of target
...
fix #1107
2020-05-03 15:36:19 -04:00
XinPing Wang
8bab78b648
test: reactive proto
2020-05-03 15:36:19 -04:00
Evan You
01b7e90eac
fix(hmr): handle cases where instances with same id having different definitions
2020-05-03 13:52:09 -04:00
Evan You
0c48558f4c
chore: remove commented stale code [ci skip]
2020-05-02 17:08:54 -04:00
Evan You
0dc44a6a86
release: v3.0.0-beta.7
2020-05-02 17:06:16 -04:00
Evan You
d901b6bea8
refactor(reactivity): use more efficient reactive checks
...
WeakSets and WeakMaps shows degrading performance as the amount of
observed objects increases. Using hidden keys result in better
performance especially when repeatedly creating large amounts of
reactive proxies.
This also makes it possible to more efficiently declare non-reactive
objects in userland.
2020-05-02 16:58:17 -04:00
Evan You
36972c20b5
feat(compiler-sfc): add transformAssetUrlsBase option
2020-05-02 16:58:17 -04:00
Eduardo San Martin Morote
71a942b25a
fix(warn): cast symbols to strings ( #1103 )
2020-05-02 10:26:32 -04:00
Evan You
583ba0c172
feat(types): re-expose withDirectives
as public type
2020-05-02 10:19:40 -04:00
Evan You
b570287dfe
release: v3.0.0-beta.6
2020-05-01 18:56:53 -04:00
HiiTea
f0d52d5428
chore: code comment formatting ( #1089 ) [ci skip]
2020-05-01 18:48:44 -04:00
Evan You
98bee596bd
fix(runtime-core): should catch dom prop set TypeErrors
...
based on #1051
2020-05-01 18:47:27 -04:00
Evan You
c5e7d8b532
fix(compiler-core): hoist pure annotations should apply to all nested calls
2020-05-01 18:36:34 -04:00
Evan You
cad25d95a3
fix(compiler-core): hoisted vnode calls and scoped id calls should be marked pure
...
Otherwise they cannot be tree-shaken
2020-05-01 17:34:11 -04:00
Evan You
6c60ce13e0
fix(compiler-ssr): handle comments codegen + refactor ssr codegen transform
2020-05-01 17:04:36 -04:00
underfin
8b85aaeea9
fix(runtime-core): should call Suspense fallback unmount hook ( #1061 )
...
fix #1059
2020-05-01 16:20:16 -04:00
Evan You
b40fcbc4c6
fix(types): augment ref unwrap bail types in appropriate packages
...
Packages can now augment the ref unwrap bail types in their own `d.ts`.
Also updated the build script to auto concat any files in a package's
`types` directory to the final generated `d.ts`.
- `@vue/reactivity` should no longer require `libs: ["DOM"]` in tsconfig
- Properly bail on `VNode` and `ComponentPublicInstance` in runtime-core
2020-05-01 16:14:30 -04:00
Evan You
7f23555356
fix(teleport): teleport should always be tracked as dynamic child for unmount
...
fix #1088
2020-05-01 15:12:07 -04:00
Evan You
08bf7e3607
fix(runtime-core): cloned vnodes with extra props should de-opt
2020-05-01 14:55:27 -04:00
Evan You
ac6a6f11ac
fix(runtime-core): fix slot fragment bail check
2020-05-01 14:16:55 -04:00
Evan You
11f38d8a85
perf: instance public proxy should never be observed
2020-05-01 13:24:38 -04:00
Evan You
62336085f4
fix(runtime-core): avoid infinite warning loop for isRef check on component public proxy
...
fix #1091
2020-05-01 13:23:59 -04:00
Evan You
5b09e743a0
fix(ssr): fix escape and handling for raw Text, Comment and Static vnodes
2020-05-01 11:52:40 -04:00
Evan You
1bddeea247
feat(runtime-core): warn against user properties with reserved prefixes
2020-05-01 11:23:22 -04:00
Evan You
20bc7ba1c5
fix(runtime-dom): should not coerce nullish values to empty strings for non-string dom props
...
fix #1049
close #1092 , close #1093 , close #1094
2020-05-01 11:06:24 -04:00
Evan You
68e1ce8b66
refactor(types): mark more internal APIs
2020-05-01 10:37:40 -04:00
HiiTea
22717772dd
chore: fix typos ( #1090 )
2020-05-01 09:42:58 -04:00
Evan You
127e96a993
types: fix internal exports from @vue/shared
2020-05-01 09:19:30 -04:00
Evan You
c9bf7ded2e
refactor(types): mark internal API exports and exclude from d.ts
...
BREAKING CHANGE: Internal APIs are now excluded from type decalrations.
2020-04-30 17:04:35 -04:00
Evan You
a5bb1d02b7
release: v3.0.0-beta.5
2020-04-30 16:20:25 -04:00
underfin
8ed3455251
fix(transition-group): should collect raw children with Fragment ( #1046 )
...
fix #1045
2020-04-30 15:06:50 -04:00
Bas van Meurs
ba240eb497
feat(runtime-core): export queuePostFlushCb ( #1078 )
2020-04-30 14:58:50 -04:00
Carlos Rodrigues
239270c38a
fix(keep-alive): do not invoke onVnodeBeforeUnmount if is KeepAlive component ( #1079 )
2020-04-30 14:52:03 -04:00
Evan You
352c369704
chore: remove stale _isVue checks
2020-04-30 14:45:25 -04:00
Evan You
386b093554
fix(hmr): support hmr for static nodes
2020-04-30 14:45:25 -04:00
Evan You
e087b4e024
fix(hydration): fix text mismatch warning
2020-04-29 17:07:41 -04:00
Evan You
08b4e8815d
fix(compiler-ssr): avoid unnecessary withCtx import
2020-04-29 16:21:54 -04:00
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
bd0f7da2c6
build: add browser builds for @vue/compiler-sfc
2020-04-26 01:24:25 -04:00
Evan You
0bb1f67d12
types(compiler-sfc): expose SFCAsyncStyleCompileOptions
2020-04-24 17:11:41 -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
susiwen8
ad2b940c17
chore: remove unnecessary export ( #1044 ) [ci skip]
2020-04-24 13:02:44 -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
fa216a0c3a
feat(compiler-sfc): built-in support for css modules
2020-04-24 09:59:52 -04:00
Evan You
20d425fb19
feat(compiler-sfc): add preprocessCustomRequire option
2020-04-24 09:28:03 -04:00
underfin
63c8444d4a
Update packages/runtime-core/src/components/BaseTransition.ts
...
Co-Authored-By: Carlos Rodrigues <david-181@hotmail.com>
2020-04-23 06:53:46 +08: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
b0d4df9743
perf(reactivity): ref should not trigger if value did not change
...
Note: shallowRef will always trigger on assignment because it does not
account for deep mutations
close #1012
2020-04-22 15:11:01 -04:00
Evan You
7d858a9001
test(compiler-core): test dynamic component block
2020-04-22 14:47:31 -04:00
Evan You
7d0ab3392a
fix(compiler-core): dynamic component should always be made blocks
...
since it can potentially resolve to plain elements
fix #1018
2020-04-22 14:45:00 -04:00
Carlos Rodrigues
0bdd889156
fix(types): fix ref(false) type to Ref<boolean> ( #1028 )
2020-04-22 11:54:54 -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
likui
9bddf3820e
types(runtime-core): improve types for transition hook
...
fix #1000
2020-04-21 12:06:10 +08: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
limichange
fa40d1ef3a
refactor(reactivity): simplify if condition ( #1002 )
2020-04-20 13:39:35 -04:00
Evan You
218e6e1667
build: adjust build formats
...
- Rename `esm` to `esm-browser`
- Add runtime-only build for `esm-browser`
- Add default CDN alias for jsdelivr
2020-04-19 18:43:21 -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
扩散性百万甜面包
70c8c58be2
test(compiler-core): expect onError to be called ( #976 )
2020-04-17 08:58:38 -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
Cédric Exbrayat
4d014dc3d3
fix(reactivity): remove Symbol.observable ( #968 )
...
* chore: add @types/node as an explicit dependency
As `tsconfig.json` references it, it should be listed in the dependencies.
It currently uses an older version: this commit also bumps to the latest v12 version, and fixes a typing issue.
* fix(reactivity): remove Symbol.observable
`Symbol.observable` is brought by `@types/node@12` and is not a "well-known" typescript symbol https://www.typescriptlang.org/docs/handbook/symbols.html that can be find in lib.es20xx like the others. It has been removed in `@types/node@v13`.
It means that an application using vue@3.0.0-alpha.13 does not compile unless it explicitely adds `@types/node@v12` as a dependency and `node` in its own tsconfig types.
2020-04-16 09:33:30 -04:00
Carlos Rodrigues
d7ae1d0244
test(reactivity): add tests for object with symbols ( #969 )
2020-04-16 09:24:46 -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
8a74260b70
types: remove tuple check and add type check for tuple
2020-04-15 16:22:44 +01:00
Carlos Rodrigues
70b55d797f
Apply suggestions from code review
...
Co-Authored-By: Evan You <yyx990803@gmail.com>
2020-04-15 16:07:07 +01:00
pikax
dcb5985c00
Merge remote-tracking branch 'github/master' into changing_unwrap_ref
2020-04-15 15:54:26 +01:00
Evan You
1068212cb2
chore: run prettier
2020-04-15 10:51:07 -04:00
Evan You
d45e47569d
fix(runtime-dom/v-on): support event.stopImmediatePropagation on multiple listeners
...
close #916
2020-04-15 10:35:34 -04:00
Evan You
3178504273
refactor(reactivity): make readonly non-tracking
2020-04-14 23:49:46 -04:00
Evan You
09b44e07cb
refactor(reactivity): move array ref handling into getter
2020-04-14 22:18:58 -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
Evan You
0869443d01
chore: import toRaw from @vue/reactivity
2020-04-14 09:59:02 -04:00
Evan You
e8a866ec99
refactor(reactivity): remove stale API markReadonly
...
BREAKING CHANGE: `markReadonly` has been removed.
2020-04-13 17:39:48 -04:00
Evan You
9e9d264412
Revert "feat(reactivity): add effect to public api ( #909 )" ( #961 )
...
This reverts commit 6fba241850
.
2020-04-13 17:13:06 -04:00
pikax
6a66b7b60a
Merge remote-tracking branch 'github/master' into changing_unwrap_ref
2020-04-13 18:32:14 +01:00
Evan You
7cbf684611
fix(runtime-core): fix kebab-case props update
...
fix #955
2020-04-13 12:37:31 -04:00
likui
27b5c71944
fix(runtime-dom): should patch svg innerHtml ( #956 )
2020-04-13 12:13:37 -04:00
Thorsten Lünborg
33ccfc0a8b
fix(types): UnwrapRef should bail on DOM element types ( #952 )
...
fix #951
2020-04-13 11:51:32 -04:00
Evan You
5968cff3a8
refactor: make sure setupContext.emit always reference current emit on instance
...
This is dev only and for internal use by vue-test-utils.
2020-04-13 10:06:51 -04:00
pikax
c20d8af8c0
types: add symbolExtract to extract all known symbols
...
#951
2020-04-12 11:45:56 +01:00
Evan You
ab16a065a8
refactor: adjust runtime-dom test structure + tests for dom props
2020-04-10 15:37:30 -04:00
Evan You
ed235f16de
refactor: simplify runtime-dom class tests
2020-04-10 15:23:01 -04:00
Evan You
6eb3399311
fix(runtime-dom): fix patching for attributes starting with on
...
fix #949
BREAKING CHANGE: Only props starting with `on` followed by an uppercase
letter or a non-letter character are considered event listeners.
2020-04-10 11:57:07 -04:00
Evan You
55566e8f52
refactor(runtime-core): remove emit return value
...
BREAKING CHANGE: this.$emit() and setupContext.emit() no longer
return values. For logic that relies on return value of listeners,
the listener should be declared as an `onXXX` prop and be called
directly. This still allows the parent component to pass in
a handler using `v-on`, since `v-on:foo` internally compiles
to `onFoo`.
ref: https://github.com/vuejs/rfcs/pull/16
2020-04-10 10:59:46 -04:00