Commit Graph

194 Commits

Author SHA1 Message Date
Evan You b3b65b4058 fix: runtime compilation marker should be applied in exposed compile function 2020-07-28 11:11:26 -04:00
Evan You 354d79c42b fix(runtime-core): respect render function from mixins
fix #1630
2020-07-27 17:44:17 -04:00
Evan You 3d2bdafd2f chore: revert accidentally commented line 2020-07-23 14:53:09 -04:00
Evan You a75b8a268f fix(build): fix component resolution when disabling options API
fix #1688
2020-07-23 14:33:15 -04:00
Evan You ba17c871d8 feat: support delimiters option for runtime compilation
close #1679
2020-07-23 14:27:17 -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
Evan You 03c681e396 refactor(types): move component props interfaces + expose `AllowedComponentProps`
fix #1632
2020-07-19 14:09:53 -04:00
Stanislav fa5ddf8d06
chore(types): convert type literals to records (#1615) 2020-07-18 22:56:28 -04:00
Guillaume Chau 568b6db12b
feat: Initial devtools support (#1125) 2020-07-16 18:18:52 -04:00
Evan You 32a4cb804b test: improve coverage 2020-07-15 10:38:45 -04:00
Carlos Rodrigues d78a6821f5
types(runtime-core): default `SetupContext` generic argument to `EmitsOptions` (#1584) 2020-07-15 09:19:20 -04:00
Evan You 380c6792d8 fix(v-on): refactor DOM event options modifer handling
fix #1567

Previously multiple `v-on` handlers with different event attach option
modifers (`.once`, `.capture` and `.passive`) are generated as an array
of objects in the form of `[{ handler, options }]` - however, this
makes it pretty complex for `runtime-dom` to properly handle all
possible value permutations, as each handler may need to be attached
with different options.

With this commit, they are now generated as event props with different
keys - e.g. `v-on:click.capture` is now generated as a prop named
`onClick.capture`. This allows them to be patched as separate props
which makes the runtime handling much simpler.
2020-07-14 11:48:05 -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 b6cdd5621e wip: template binding optimization 2020-07-10 22:12:25 -04:00
Carlos Rodrigues 1e90605c15
types(runtime-core): provide valid type for default `$emit` (#1498) 2020-07-08 11:51:03 -04:00
Evan You 7886c267f7 refactor: remove unused inheritRef option
This is technically a breaking change, but the option was not meant for public use
and ended up not solving the problem it was introduced for.
2020-07-01 15:40:11 -04:00
Evan You e765d81404 fix(runtime-core): fix component name inference in warnings
Should not pollute component definition name property
fix #1418
2020-06-26 09:28:15 -04:00
Evan You e76ed4c269 refactor(hmr): simplify hmr force update check 2020-06-12 14:53:48 -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
doly mood d3c436ae2e
feat(types): mixins/extends support in TypeScript (#626) 2020-06-09 10:37:00 -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 38f2d23a60 feat(runtime-core): add inheritRef option + make <transition> & <keep-alive> inherit refs 2020-05-22 10:26:17 -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 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 11f38d8a85 perf: instance public proxy should never be observed 2020-05-01 13:24:38 -04:00
Evan You 68e1ce8b66 refactor(types): mark more internal APIs 2020-05-01 10:37:40 -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
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 0278992f78 fix(warn): fix component name inference in warning trace 2020-04-20 16:06:51 -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 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 24e5ab33f5 refactor(runtime-core): remove need for internal instance sink 2020-04-16 10:09:20 -04:00
Evan You 3178504273 refactor(reactivity): make readonly non-tracking 2020-04-14 23:49:46 -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
Evan You cb504c287f refactor(runtime-core): refactor slots resolution
Get rid of need for setup proxy in production mode and improve console
inspection in dev mode
2020-04-06 21:06:53 -04:00
Evan You c5f0f63b91 refactor(runtime-core): make setup attrs proxy dev only 2020-04-06 17:57:27 -04:00
Evan You ec4a4c1e06 refactor(runtime-core): refactor props resolution
Improve performance in optimized mode + tests
2020-04-06 17:37:47 -04:00
Evan You 899287ad35 feat(runtime-core): improve component public instance proxy inspection 2020-04-05 18:39:22 -04:00
Evan You 24e9efcc21 refactor(runtime-core): extract component emit related logic into dedicated file 2020-04-03 19:08:17 -04:00
Evan You bf473a64ea feat(runtime-core): type and attr fallthrough support for emits option 2020-04-03 12:05:52 -04:00
Cédric Exbrayat 2103a485d7
refactor(runtime-core): remove unnecessary tracing check (#912)
The check for `config.performance` is already done inside `endMeasure` and is not done anywhere else `endMeasure` is called.
2020-04-03 09:19:53 -04:00
Evan You e93e426bfa feat(runtime-core): config.performance tracing support 2020-04-01 21:36:50 -04:00
Evan You 573bcb2e11 refactor(runtime-core): remove the need for currentSuspense 2020-03-30 11:49:51 -04:00
Evan You b8c1be18f3 refactor(types): use stricter settings
fix #847
2020-03-23 11:08:22 -04:00
Evan You aa4ab39c1a refactor: separate vnode hooks and directive hooks 2020-03-18 12:30:26 -04:00
yang 703c9bc61f
types(ComponentInternalInstance): ComponentInternalInstance.type could reuse Component type (#824) 2020-03-16 18:41:11 -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 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
Katashin dd17fa1c90
feat(runtime-core): add special property to get class component options (#821) 2020-03-12 11:46:32 -04:00