Commit Graph

3050 Commits

Author SHA1 Message Date
James Ross
17cc4e15a7
docs(server-renderer): fix typo in renderToWebStream error, and remove Cloudflare Worker reference (#4249) [ci skip] 2021-08-06 11:23:12 -04:00
AlexandraCaragata
d045055b47
fix(core): typing of key in VNodeProps (#4242)
close #4240
2021-08-06 11:11:26 -04:00
Evan You
9bee5ccea4 chore: update new ref sugar warning link 2021-08-04 17:06:23 -04:00
Evan You
bf2589b1f0 refactor(compiler-sfc): use shallowRef for ref sugar destructure 2021-08-04 15:39:32 -04:00
hfutsora
bc7dd93f92
fix(runtime-dom): fix shadowRoot instanceof check in unsupported browsers (#4238) 2021-08-02 09:41:41 -04:00
Amour1688
d3d5ad204d
fix(types): remove explicit return type annotation requirement for this inference in computed options (#4221) 2021-08-02 09:18:35 -04:00
Evan You
f9f9bad53f chore(server-renderer): readme [ci skip] 2021-07-29 17:20:07 -04:00
Evan You
6aa871e565 fix(runtime-core): component effect scopes should be detached 2021-07-29 17:15:56 -04:00
Evan You
b357009a82 release: v3.2.0-beta.7 2021-07-29 13:21:30 -04:00
Evan You
08672222c6 feat(server-renderer): decouple esm build from Node + improve stream API
- deprecate `renderToSTream`
- added `renderToNodeStream`
- added `renderToWebStream`
- added `renderToSimpleStream`

close #3467
close #3111
close #3460
2021-07-29 13:14:02 -04:00
Roan Kattouw
9d5fd33d6d
fix(shared): support custom .toString() in text interpolation again (#4210)
fix #3944
2021-07-29 10:51:03 -04:00
Bartek Igielski
1e3d468ca1
build(server-renderer): Add ESM as a build target (#4209) 2021-07-29 10:48:15 -04:00
Evan You
13c69469f2 refactor: simplify for size 2021-07-29 10:45:05 -04:00
Bas van Meurs
91f29540fe
refactor(reactivity): optimize child effect scope dereferencing (#4184) 2021-07-29 10:26:24 -04:00
Evan You
3b38c9ae9b feat(sfc): remove experimental status for sfc style v-bind 2021-07-28 18:31:48 -04:00
Evan You
51ee84fc6a fix(suspense): fix dynamicChildren tracking when suspense root is a block itself
e.g. `<slot>` inside suspense

fix #4183, fix #4198
2021-07-28 16:49:34 -04:00
Evan You
1867591e7c fix(reactivity): dereference nested effect scopes on manual stop 2021-07-28 12:08:01 -04:00
Pick
da6c055b19
types(reactivity): simplify UnwrapNestedRefs (#4194) 2021-07-28 11:15:08 -04:00
Pick
b79e4ca717
types(reactivity): Simplify the SymbolExtract (#4162) 2021-07-28 11:12:46 -04:00
Roan Kattouw
d2585e13e9
chore: Add LICENSE file for vue-compat (#4200) [ci skip] 2021-07-28 11:07:47 -04:00
edison
771635b72a
fix(sfc/style-vars): improve ignore style variable bindings in comments (#4202) 2021-07-28 10:51:25 -04:00
Evan You
204e194d2b release: v3.2.0-beta.6 2021-07-27 18:56:02 -04:00
Evan You
f994b974c0 feat: unwrap refs in toDisplayString 2021-07-27 18:42:30 -04:00
Evan You
ee4cbaeec9 fix(runtime-core): expose ssrUtils in esm-bundler build
this is necessary for worker environments where Vue needs to be
bundled (instead of using cjs build via Node.js require)

fix #4199
2021-07-27 17:59:13 -04:00
Evan You
561e210157 fix(inject): should auto unwrap injected refs
fix #4196
2021-07-27 17:52:37 -04:00
Evan You
8681c12c0c chore: rename method to make it more explicit it is dev only 2021-07-27 17:52:37 -04:00
edison
3a75d5d694
fix(sfc/style-vars): should ignore style variable bindings in comments (#4188)
fix #4185
2021-07-26 11:19:56 -04:00
Evan You
4b595a3ea1 release: v3.2.0-beta.5 2021-07-23 16:10:22 -04:00
Evan You
ac74e1dd33 fix(v-model): avoid resetting value of in-focus & lazy input
fix #4182
2021-07-23 15:44:56 -04:00
Evan You
2581cfb707 fix(types): fix types for readonly ref
fix #4180
2021-07-23 15:24:58 -04:00
Evan You
231dafd55a refactor: adjust custom element hmr, fix tests 2021-07-22 23:18:15 -04:00
Evan You
bff4ea74c5 fix(hmr): fix custom elements hmr edge cases 2021-07-22 18:54:26 -04:00
Evan You
5b76843b69 feat(runtime-dom): support passing initial props to custom element constructor 2021-07-22 18:19:58 -04:00
Evan You
7a7e1d8e9f feat(runtime-dom): hmr for custom elements 2021-07-22 17:48:15 -04:00
Evan You
a7fa4ac28a feat(runtime-dom): support specifying shadow dom styles in defineCustomElement 2021-07-22 16:33:32 -04:00
Evan You
f0ca233d8b refactor(compiler-sfc): improve script setup import expose heuristics 2021-07-22 12:53:08 -04:00
Evan You
5a3ccfd914 feat(compiler-sfc): avoid exposing imports not used in template
close #3183
2021-07-22 12:04:46 -04:00
Evan You
db3f57a392 fix(hmr): fix hmr when global mixins are used
fix #4174
2021-07-22 10:53:59 -04:00
Evan You
fe58bae412 release: v3.2.0-beta.4 2021-07-21 17:40:25 -04:00
Evan You
8560005601 fix(runtime-core): ensure setupContext.attrs reactivity when used in child slots
fix #4161
2021-07-21 17:31:00 -04:00
Evan You
ff0c810300 fix(runtime-dom): defer setting value
fix #2325, fix #4024
2021-07-21 16:38:01 -04:00
王嘉欣
36ae23d27e
chore(types): remove unnecessary assertions (#4168) 2021-07-21 15:55:31 -04:00
webfansplz
9c931d8154
chore(types): remove unnecessary non-null assertion (#4169) 2021-07-21 15:50:08 -04:00
Evan You
d13774b881 perf: skip patch on same vnode 2021-07-21 14:04:02 -04:00
Evan You
dd1439e711 build: reduce runtime build size 2021-07-21 11:11:40 -04:00
Evan You
9d5dd2da8c release: v3.2.0-beta.3 2021-07-20 17:47:03 -04:00
Evan You
14ca881a1b feat(reactivity): deferredComputed
Note: this is not exposed as part of Vue API, only as
a lower-level API specific to @vue/reactivity
2021-07-20 17:39:19 -04:00
Evan You
d87d059ac1 feat(runtime-core): watchSyncEffect 2021-07-20 16:49:54 -04:00
Evan You
33c2fbfdc8 fix(reactivity): revert computed scheduler change
fix #4157
2021-07-20 16:45:29 -04:00
Evan You
bc7f9767f5 fix(watch): ensure watchers respect detached scope
fix #4158
2021-07-20 14:32:17 -04:00
Evan You
2bdee50a59 fix(runtime-core): fix v-bind class/style merging regression
fix #4155
2021-07-20 13:58:43 -04:00
webfansplz
acb2a4d285
fix(sfc-playground): Transform named default exports without altering scope (#4154)
Co-authored-by: webfansplz <>
2021-07-20 10:28:02 -04:00
webfansplz
457c9aed1f
chore(type): remove unnecessary type assertion (#4150) 2021-07-20 09:31:40 -04:00
Evan You
3ff94faca1 build: fix default build script (ignore sfc-playground)
close #4153
2021-07-20 09:29:45 -04:00
Evan You
1034546a4c release: v3.2.0-beta.2 2021-07-19 19:36:55 -04:00
Evan You
a21ca3dccc fix(compiler-core): fix self-closing tags with v-pre 2021-07-19 19:29:28 -04:00
Evan You
7e75b4105a refactor: better fix for ec6abe8d 2021-07-19 19:23:44 -04:00
Evan You
bb7b130b0b chore: remove peer dep for compiler-sfc 2021-07-19 19:06:17 -04:00
Evan You
8dbecfcbb3 feat(compiler-sfc): add ignoreEmpty option for sfc parse method 2021-07-19 19:02:46 -04:00
Evan You
ec6abe8d5e fix(compiler-sfc): fix whitespace preservation when block contains single self-closing tag 2021-07-19 18:54:35 -04:00
Evan You
47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
Amour1688
69344ff1ae
feat(types): map declared emits to onXXX props in inferred prop types (#3926) 2021-07-19 18:22:19 -04:00
Pick
35cc7b0d31
chore(reactivity): correct the description of the test case (#4135) 2021-07-19 17:59:30 -04:00
Evan You
3056e9b3dc fix(v-model): properly detect input type=number
fix #3813
2021-07-19 17:46:04 -04:00
Evan You
93a950d60d fix(compiler-sfc): support const enum 2021-07-19 17:31:13 -04:00
Cédric Exbrayat
b771fdbef9
perf(compiler-sfc): ignore empty blocks (#3520) 2021-07-19 17:24:40 -04:00
Homyee King
65f82ce94f
chore(shared): remove extra NaN logic (#3837) 2021-07-19 17:22:21 -04:00
ioslh
20b6619793
fix(ssr): update initial old value to watch callback in ssr usage (#4103) 2021-07-19 17:13:37 -04:00
Evan You
b274b08f5f fix(compiler-sfc): expose correct range for empty blocks 2021-07-19 17:05:37 -04:00
Evan You
d810a1a569 fix(scheduler): fix insertion for id-less job
fix #4148
2021-07-19 13:37:38 -04:00
Evan You
6eb47f000a fix(reactivity): computed should not trigger scheduler if stopped
fix #4149
2021-07-19 13:37:03 -04:00
Austin Keener
dd0f9d1ce6
feat(compiler): allow 'comments' option to affect comment inclusion in dev (#4115)
Close: #3392
Replace: #3395
2021-07-19 11:40:37 -04:00
webfansplz
d868d5ffa7
chore(shared): remove deprecated html tags (#4130) 2021-07-19 11:30:43 -04:00
Evan You
bbf6ca9bca fix(runtime-core): fix null type in required + multi-type prop declarations
fix #4146 (in combination with #4147)
2021-07-19 11:20:28 -04:00
Evan You
cac6ab5bdb chore: fix type issue 2021-07-19 11:11:17 -04:00
edison
f7607d3a15
fix(compiler-sfc): defineProps infer TSParenthesizedType (#4147) 2021-07-19 11:09:24 -04:00
Evan You
47ba33e27b refactor: improve the fix for #4138 2021-07-19 10:43:14 -04:00
Evan You
a8c3a8ad61 fix(shared): normalizeStyle should handle strings
fix #4138
2021-07-19 10:37:12 -04:00
leno
84f6791e89
chore(runtime-core): use bit operations instead (#4142) 2021-07-19 10:32:14 -04:00
webfansplz
df0ce21836
chore(types): improve of type assertion (#4141) 2021-07-19 10:32:07 -04:00
Cédric Exbrayat
1e5e004d7c
chore(sfc-playground): remove compiler macro imports (#4134)
Importing `defineEmits` and `defineProps` is no longer needed since v3.1.3
2021-07-19 10:08:51 -04:00
Evan You
327c8983fb types: typing for ref macros 2021-07-16 17:35:04 -04:00
Evan You
1bab53e717 chore: remove deprecated defineEmit & useContext APIs 2021-07-16 16:56:51 -04:00
Evan You
d4c67dd253 release: v3.2.0-beta.1 2021-07-16 14:44:06 -04:00
Evan You
49dc2dd1e4 fix(sfc/style-vars): properly re-apply style vars on component root elements change
Now uses MutationObserver to ensure it works even for HOCs

fix #3894
2021-07-16 14:30:49 -04:00
Evan You
317654b34f chore: fix codegen error due to scopeId deprecation change 2021-07-16 14:30:49 -04:00
Evan You
fcc6a54ee7 chore: expose watchPostEffect 2021-07-16 14:30:49 -04:00
Evan You
de32cfa43e fix: ensure customElements API ssr compatibility
fix #4129
2021-07-16 14:30:49 -04:00
fishDog
eca4d7891a chore(compiler-core): reduce unnecessary cache inside v-once (#4112) 2021-07-16 14:30:49 -04:00
Evan You
e5a4412764 feat(sfc): support namespaced component tags when using <script setup> 2021-07-16 14:30:49 -04:00
Evan You
a8edf2bdff refactor: remove outdated slot ctx wrapper codegen 2021-07-16 14:30:49 -04:00
Evan You
2a310df753 fix(runtime-core): fix default shapeFlag for fragments 2021-07-16 14:30:49 -04:00
Evan You
29732c2c86 fix: ignore .prop/.attr modifiers in ssr 2021-07-16 14:30:49 -04:00
Evan You
e66a493da1 refactor: remove deprecated defineEmit() support 2021-07-16 14:30:49 -04:00
Evan You
562bddb3ce feat(sfc): (experimental) new ref sugar 2021-07-16 14:30:49 -04:00
Evan You
27104eaaf0 feat: remove experimental status of <script setup> 2021-07-16 14:30:49 -04:00
Evan You
f596e008ef refactor: remove deprecated scopeId codegen
BREAKING CHANGE: Output of SFC using `<style scoped>` generated by 3.2+
will be incompatible w/ runtime <3.2.
2021-07-16 14:30:49 -04:00
Evan You
1c7d737cc8 feat: support v-bind .prop & .attr modifiers
Also allows render function usage like the following:

```js
h({
  '.prop': 1, // force set as property
  '^attr': 'foo' // force set as attribute
})
```
2021-07-16 14:30:49 -04:00
Evan You
00f0b3c465 feat: custom element reflection, casting and edge cases 2021-07-16 14:30:49 -04:00
Evan You
bf4893c17c types: fix dts tests 2021-07-16 14:30:49 -04:00
Evan You
4e5897d2df test: fix renderSlot tests 2021-07-16 14:30:49 -04:00
Evan You
8610e1c9e2 feat(runtime-dom): defineCustomElement 2021-07-16 14:30:49 -04:00
Evan You
42ace9577d feat: watchPostEffect 2021-07-16 14:30:49 -04:00
Evan You
3b64508e3b feat: v-memo 2021-07-16 14:30:49 -04:00
Evan You
5cea9a1d4e feat(reactivity): support onTrack/onTrigger debug options for computed 2021-07-16 14:30:49 -04:00
Evan You
b7ea7c1485 perf: also hoist all-static children array 2021-07-16 14:30:49 -04:00
Evan You
2dd4739089 test: more test cases for computed w/ scheduler 2021-07-16 14:30:49 -04:00
Evan You
1fe2239270 refactor: sync value access for chained computed w/ scheduler 2021-07-16 14:30:49 -04:00
Evan You
02339b67d8 perf: hoist dynamic props lists 2021-07-16 14:30:49 -04:00
Evan You
979a841946 chore: use consistent file naming 2021-07-16 14:30:49 -04:00
Evan You
eae7c247af refactor: reduce bundle size 2021-07-16 14:30:49 -04:00
Bas van Meurs
6cf2377cd4 perf(reactivity): use bitwise dep markers to optimize re-tracking (#4017) 2021-07-16 14:30:49 -04:00
Evan You
cc09772d55 chore: remove unncessary property on ComputedRef interface 2021-07-16 14:30:49 -04:00
Evan You
bde855e017 test: test for computed optimization 2021-07-16 14:30:49 -04:00
Evan You
ebaac9a56d perf(reactivity): avoid triggering re-render if computed value did not change 2021-07-16 14:30:49 -04:00
Anthony Fu
f5617fc3bb feat(reactivity): new effectScope API (#2195) 2021-07-16 14:30:49 -04:00
Evan You
87f69fd0bb perf(reactivity): improve reactive effect memory usage (#4001)
Based on #2345 , but with smaller API change

- Use class implementation for `ReactiveEffect`
- Switch internal creation of effects to use the class constructor
- Avoid options object allocation
- Avoid creating bound effect runner function (used in schedulers) when not necessary.
- Consumes ~17% less memory compared to last commit
- Introduces a very minor breaking change: the `scheduler` option passed to `effect` no longer receives the runner function.
2021-07-16 14:30:49 -04:00
Evan You
63a51ffcab chore: fix test failing types 2021-07-16 14:30:49 -04:00
Evan You
b2554aefba refactor: small bundle size / readability optimization 2021-07-16 14:30:49 -04:00
Bas van Meurs
64310405ac perf(reactivity): ref-specific track/trigger and miscellaneous optimizations (#3995) 2021-07-16 14:30:49 -04:00
HcySunYang
ceff89905b perf: improve VNode creation performance with compiler hints (#3334) 2021-07-16 14:30:49 -04:00
Evan You
31abdc8ada release: v3.1.5 2021-07-16 12:38:01 -04:00
Evan You
b6cc8640c5 test: test for compat mode v3 render fn detection 2021-07-16 10:23:25 -04:00
Evan You
8dbad83e7f fix(compat): fix v3 compiled fn detection in production 2021-07-16 10:17:38 -04:00
Evan You
68365b9b2b fix(runtime-core): enter optimized mode for component as root
fix #3943
2021-07-15 18:51:59 -04:00
TheDro
1cfe290352
fix(reactivity): call array subclass methods (#3624)
fix #2314, close #2315
2021-07-15 17:17:13 -04:00
Evan You
299f7c08c7 chore: fix snapshot from merge 2021-07-15 16:57:30 -04:00
patak
29010501cc
fix(compiler-sfc): duplicated injected css var with repeated vars in style (#2802) 2021-07-15 16:45:37 -04:00
b31712ecc5
test(teleport): fix meaningless test case (#2872) 2021-07-15 16:36:36 -04:00
HcySunYang
3756270272
fix(runtime-dom): capture errors when setting value for IDL (#3578)
fix #3576
2021-07-15 16:32:25 -04:00
Carlos Rodrigues
18911abb91
fix(type): infer parent as this on nextTick function (#3608)
fix #3599
2021-07-15 16:28:20 -04:00
Yang Mingshan
08f504c1b7
fix(ref): should not trigger when setting value to same proxy (#3658) 2021-07-15 16:28:01 -04:00
Carlos Rodrigues
f6a5f09a3a
types(defineComponent): fix unwrap when returning Ref<T>|undefined from setup (#4100) 2021-07-15 15:58:20 -04:00
Tan Zhen Yong
e508ee08e9
chore: fix typo in inherit-attrs warning (#4094) 2021-07-15 15:45:23 -04:00
Austin Keener
e00aa56658
fix(compiler): Addressed infinite loop in compiler (#3992)
close #3987
2021-07-15 14:57:47 -04:00
Evan You
7013e8f578 fix(runtime-dom): remove class attribute on nullish values
close #3173
2021-07-15 13:45:43 -04:00
Evan You
5af718ba41 fix(v-model): support calling methods in v-model expression
close #3993
2021-07-15 13:34:42 -04:00
Evan You
395572b593 fix(v-on): proper member exp detection for bracket assignment
fix #4097
2021-07-15 13:26:09 -04:00
Evan You
c0db807844 refactor: simplify static content insertion 2021-07-15 13:16:19 -04:00
Evan You
5df7dfcd71 fix(sfc): only enable jsx parser plugin when explicitly using tsx
fix #4106
2021-07-15 13:12:06 -04:00
Evan You
963085d18c fix(v-on): properly detect member expressions with optional chaining
fix #4107
2021-07-15 12:23:07 -04:00
Evan You
2937530bef fix(v-model): handle mutations of v-model bound array/sets
fix #4096
2021-07-15 12:14:19 -04:00
edison
c23153d82e
fix(compiler-core): fix forwarded slots detection on template slots (#4124)
fix #4123
2021-07-15 11:37:11 -04:00
edison
6a0c7cd905
fix(sfc): fix style variables injection on static vnode (#3847)
fix #3841
2021-07-14 18:08:12 -04:00
Evan You
03e26845e2 fix(sfc): fix <script setup> async context preservation logic
fix #4050
2021-07-06 14:31:53 -04:00
Evan You
d12206db8e test: add test case for proper effect teardown w/ withAsyncContext 2021-07-06 11:39:27 -04:00
Evan You
6fad2093a4 fix(compiler-sfc): should not rewrite ref sugar identifiers in types
fix #4062
2021-07-05 14:41:53 -04:00
Austin Keener
f3e15f633e
fix(compat): fix props check for v-model compat warning (#4056) 2021-07-04 18:32:44 -04:00
Evan You
348c3b01e5 release: v3.1.4 2021-07-02 08:37:50 -04:00
Evan You
253ca2729d fix(compiler-sfc): fix parse-only mode when there is no script setup block 2021-07-02 08:24:24 -04:00