Commit Graph

120 Commits

Author SHA1 Message Date
Evan You 51d2be2038 perf: avoid deopt for props/emits normalization when global mixins are used 2021-06-02 15:22:52 -04:00
Evan You b76c453507 refactor: adjust absent prop casting logic 2021-05-24 19:09:18 -04:00
Evan You 0255be2f4b fix(runtime-core): avoid double-setting props when casting
fix #3371, close #3384
2021-05-24 18:48:33 -04:00
Carlos Rodrigues 92e7330385
types(props): Support `undefined` as default (#3783) 2021-05-17 14:04:31 -04:00
Evan You bd3cc4d2c7 wip: tests for compiler compat 2021-04-30 15:50:32 -04:00
Evan You 6f8fe4eac9 wip: more compat tweaks 2021-04-22 17:30:54 -04:00
Evan You 7e0224aa8c wip: more compat tweaks 2021-04-22 14:59:54 -04:00
Evan You 12abd4af85 wip: class/style fallthrough compat 2021-04-21 22:04:26 -04:00
Evan You 5566d39d46 perf: only trigger $attrs update when it has actually changed 2021-04-21 19:05:20 -04:00
Evan You 1b8f14ee76 wip: more compat progress 2021-04-21 15:09:18 -04:00
Evan You f6dee53270 wip: compat integration progress 2021-04-20 09:25:12 -04:00
Evan You 3ea68691e2 wip: inline-template compat 2021-04-17 23:19:40 -04:00
Evan You 115372dd5b wip: refactor deprecations into a single file 2021-04-12 18:47:50 -04:00
Evan You 183f9b0013 wip: component v-model compat 2021-04-09 23:10:29 -04:00
Evan You 1c2c77eb9f wip: apply compat enabled flags to currently implemented features 2021-04-07 16:19:25 -04:00
Evan You d619a770a8 wip: props default this compat 2021-04-07 16:19:24 -04:00
Evan You 4fe4de0a49 fix(runtime-core): ensure declare prop keys are always present
fix #3288
2021-04-01 20:25:12 -04:00
edison 2e50acfbb8
perf(runtime-core): optimize the performance of getTypeIndex (#3206) 2021-03-30 10:53:14 -04:00
Evan You 2121c32e22 fix(runtime-core): fix kebab-case prop required warning
fix #3495
ref #3363
2021-03-27 11:16:39 -04:00
HcySunYang 44166b43d9
fix(runtime-core): cache props default values to avoid unnecessary watcher trigger (#3474)
fix #3471
2021-03-25 17:26:58 -04:00
HcySunYang 86ceef4352
fix(runtime-core): fix warning for absent props (#3363)
fix #3362
2021-03-25 16:22:43 -04:00
07akioni 3755e60c52
fix(types): union function prop (#3119)
fix #3357
2021-03-25 11:27:54 -04:00
HcySunYang 4a965802e8
types: support object as props type (#3165) 2021-02-24 16:20:41 -05:00
HcySunYang 48f0d2944f
fix(types): extract the correct props type for the DateConstructor (#2676) 2021-02-05 19:56:23 +01:00
edison ffd5288545
feat(runtime-core): props type support `BigInt` (#2891) 2021-02-03 19:25:45 +01:00
被雨水过滤的空气 edd49dcab4
fix(runtime-core): avoid mutating EMPTY_ARR when setting dev root (#2419)
also freeze EMPTY_ARR in dev

fix #2413
2020-10-19 18:08:54 -04:00
Carlos Rodrigues d9ad45ad6c
types(defineComponent): fix optional Boolean prop types (#2401)
fix #2338
2020-10-19 17:25:55 -04:00
underfin e78915a740
fix(hmr): full diff props for non-sfc component (#2359)
close #https://github.com/vitejs/vite/issues/872
2020-10-15 11:05:12 -04:00
Evan You a66e53a24f fix(runtime-core): fix SSR memoery leak due to props normalization cache
fix #2225

The previous props/emits normlaization was caching normalized result per
app instance, but during SSR there is a new app instance created for
every request.

The fix now de-opts props/emits normlaization caching when there are
props/emits declared in global mixins - which is a very rare use case.
2020-10-06 15:31:29 -04:00
Evan You 58c31e3699 feat(runtime-core): support using inject() inside props default functions 2020-09-17 15:59:01 -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
Evan You 8ed0b342d4 fix(runtime-core): fix props/emits resolving with global mixins
fix #1975
2020-08-31 18:32:07 -04:00
Evan You 499bc0bfc4 fix(hmr): properly force hmr full component props update
fix #1942
2020-08-24 18:13:29 -04:00
Carlos Rodrigues c2913d57d1
fix(types): handling PropType<Function> with default value (#1896)
fix #1891
2020-08-19 16:36:42 -04:00
Evan You eb2ae44d94 refactor(types): widen `Component` type to include consutructor types
returned from `defineComponent`

ref: https://github.com/vuejs/vue-router-next/pull/421
also close #1880

Previous `Component` type is now exported as `ConcreteComponent`.

This introduces a minor breaking change when calling `h(comp, { ... })`
will now fail if `comp` is a of generic `Component` type, since it does
not specify what props it expects.
2020-08-19 16:19:25 -04:00
Evan You 9f92871c80 types(runtime-core): argument for props validator
Unfortunately it requires explicit annotation for now
2020-08-18 11:37:34 -04:00
HcySunYang 9d36c61796
types(runtime-core): improve PropType inference precision (#1863) 2020-08-18 11:23:18 -04:00
Evan You 0d508e9f51 feat(runtime-core): pass current props to prop default value functions
close #1886
2020-08-18 10:52:50 -04:00
Evan You 6ccd9ac2bc fix(runtime-core): fix Object props validation for objects with custom toStringTag
fix #1872
2020-08-17 11:25:38 -04:00
Evan You 54727f9874 feat: provide ability to overwrite feature flags in esm-bundler builds
e.g. by replacing `__VUE_OPTIONS_API__` to `false` using webpack's
`DefinePlugin`, the final bundle will drop all code supporting the
options API.

This does not break existing usage, but requires the user to explicitly
configure the feature flags via bundlers to properly tree-shake the
disabled branches. As a result, users will see a console warning if
the flags have not been properly configured.
2020-07-20 21:51:30 -04:00
Stanislav fa5ddf8d06
chore(types): convert type literals to records (#1615) 2020-07-18 22:56:28 -04:00
Evan You ba3b3cdda9 fix(runtime-core/emits): merge emits options from mixins/extends
fix #1562
2020-07-13 11:55:46 -04:00
Evan You 903e8f697e fix(runtime-core): should allow v-model listeners to fallthrough, but ignore for warning
fix #1543
2020-07-08 11:56:47 -04:00
Evan You 6dd59ee301 fix(v-model): should ignore compiled v-model listeners in attr fallthrough
fix #1510
2020-07-06 17:00:34 -04:00
underfin 1c4e1b6792
fix(runtime-core): should remove no longer present camelCase props (#1413)
fix #1412
2020-06-26 09:16:06 -04:00
Albert Liu a60f3b1430
refactor(types): remove unnecessary as any (#1411) 2020-06-25 11:05:39 -04:00
Evan You 6abac87b3d fix(runtime-core): track access to $attrs
fix #1346
2020-06-12 16:59:15 -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
Evan You 80c868aefe workflow: setup eslint for prohibited syntax and globals
fix #1285
2020-06-10 16:54:23 -04:00