Commit Graph

210 Commits

Author SHA1 Message Date
童欧巴 df48fc225a
chore: fix file path in comments (#2709) [ci skip] 2020-12-03 12:27:03 -05:00
Evan You e41b46c396 chore: annotate generated slot flag 2020-11-30 15:19:32 -05:00
Evan You 3bc2914e32 fix(attr-fallthrough): ensure consistent attr fallthrough for root fragments with comments
fix #2549
2020-11-27 18:04:26 -05: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
ᴜɴвʏтᴇ 052a621762
feat(compile-core): handle falsy dynamic args for v-on and v-bind (#2393)
fix #2388
2020-10-19 17:15:53 -04:00
Pick 6a554feb13
perf(runtime-dom/vModel): remove looseHas if model is Set (#2236) 2020-10-13 16:20:05 -04:00
izayl bac4d22614
chore: add magic number comment (#2198) [ci skip] 2020-10-13 15:33:16 -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 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
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
edison 075d769e0b
chore: fix typo for `babelParserDefautPlugins` (#1897) 2020-08-19 09:53:09 -04:00
小妍妍 fdb2f418cf
chore: remove deprecated `<content>` tag (#1647)
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/content
2020-08-18 11:47:38 -04:00
Jacob Smith b14f4a505b
fix(codeframe): Added Math.max to prevent RangeError (#1807)
fix #1806
2020-08-12 15:52:28 -04:00
Evan You 5c74243211 test: move mockWarn into setup files 2020-07-27 22:58:51 -04:00
Evan You c852bf18d7 fix(v-model): v-model listeners should not fallthrough to plain element root
fix #1643
2020-07-21 14:17:48 -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
leyale e626caa4d1
chore(shared): menuitem tag has been deprecated (#1613) 2020-07-17 11:26:12 -04:00
lawvs a935998b33
chore: better comment hovers preview [ci skip] (#1612) 2020-07-17 11:24:12 -04:00
无忧 22973b418b
chore: remove deprecated elements from dom tag config (#1596) 2020-07-15 23:16:28 -04:00
Evan You aab99abd28 fix(slots): properly force update on forwarded slots
fix #1594
2020-07-15 20:12:49 -04:00
Jacob Müller fe1b27b7f8
fix(v-model): handle more edge cases in `looseEqual()` (#379) 2020-07-15 09:37:51 -04:00
Evan You 9152a89016 fix(v-on): capitalize dynamic event names 2020-07-13 17:36:46 -04:00
Evan You 3e1cdba9db wip: tests for compileScriptSetup 2020-07-09 12:17:28 -04:00
Evan You 1359cc3a28 wip: compileScriptSetup 2020-07-09 12:17:28 -04:00
Evan You 062835d45a fix(slots): make compiled slot marker non-enumerable
fix #1470
2020-06-30 09:27:06 -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 a938b61edc fix(compiler-dom): bail stringification on table elements
close #1230, close #1268
2020-06-09 17:02:27 -04:00
underfin d73a508a73
fix(Transition): fix validate duration (#1188) 2020-05-18 10:09:10 -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 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
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 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 6c60ce13e0 fix(compiler-ssr): handle comments codegen + refactor ssr codegen transform 2020-05-01 17:04:36 -04:00
Evan You 08bf7e3607 fix(runtime-core): cloned vnodes with extra props should de-opt 2020-05-01 14:55:27 -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
Andrew Talbot 054ccecd58
perf(core): use `startsWith` instead of `indexOf` (#989) 2020-04-20 15:44:20 -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 c5f0f63b91 refactor(runtime-core): make setup attrs proxy dev only 2020-04-06 17:57:27 -04:00
Evan You f42d11e8e1 fix(v-model): handle dynamic assigners and array assigners
close #923
2020-04-04 20:51:42 -04:00
Evan You eee5095692 refactor: rename `<portal>` to `<teleport>`
BREAKING CHANGE: `<portal>` has been renamed to `<teleport>`.

    `target` prop is also renmaed to `to`, so the new usage will be:

    ```html
    <Teleport to="#modal-layer" :disabled="isMobile">
      <div class="modal">
        hello
      </div>
    </Teleport>
    ```

    The primary reason for the renaming is to avoid potential naming
    conflict with [native portals](https://wicg.github.io/portals/).
2020-04-01 21:55:19 -04:00
Igor Randjelovic d425818901
fix(runtime-dom): invalid lineGradient svg tag (#863)
close #862
2020-03-21 15:11:04 -04:00
Evan You 7af089d429 test: fix & improve ssr warning assertion 2020-03-10 17:13:27 -04:00
djy0 c11905fe36
chore: fix typo (#764) [ci skip] 2020-02-24 18:01:26 +01:00
Evan You 1b9b235663 fix(compiler-dom): properly stringify class/style bindings when hoisting static strings 2020-02-21 13:10:13 +01:00
Evan You 583f9468fa refactor: extract remove util 2020-02-18 13:52:59 -05:00
Evan You 202532c301 chore: use consistent signature for shared utilities 2020-02-17 14:43:16 -05:00
Evan You 9d2ac6675a refactor: make portal tree-shakeable 2020-02-15 17:44:37 -05:00
Evan You 6df2aca070 refactor(types): move shapeFlags to shared 2020-02-14 01:36:42 -05:00
Evan You 112d8f7d86 refactor: use explicit exports for runtime-core 2020-02-14 00:13:54 -05:00
Evan You 9aaef60ad2 wip(ssr): adjust event hydration flag 2020-02-13 18:28:40 -05:00
Evan You 6b505dcd23 wip(ssr): basic element hydration 2020-02-13 17:47:00 -05:00
Evan You 175f8aae8d feat(compiler): mark hoisted trees with patchFlag 2020-02-12 13:31:29 -05:00
hareku fc7bcca1b3
chore(shared): fix comment (#705) [ci skip] 2020-02-09 13:12:16 -05:00
Evan You c952321fcf wip(compiler-ssr): v-model static types + textarea 2020-02-05 14:23:03 -05:00
Evan You d1eed36452 refactor(ssr): move escapeHtml to shared 2020-02-02 22:08:20 -05:00
Evan You 6e06810add test(ssr): tests for utils and props rendering 2020-01-29 15:10:45 -05:00
Evan You e6e2c58234 fix(runtime-dom/ssr): properly handle xlink and boolean attributes 2020-01-28 22:03:53 -05:00
Evan You 6f43c4b516 wip(ssr): vdom serialization 2020-01-28 18:48:27 -05:00
Evan You 012bc5df9d wip(ssr): restructure 2020-01-27 17:23:42 -05:00
Evan You 066ba82c7f wip(ssr): escape helpers 2020-01-27 16:00:18 -05:00
Evan You 2569890e31 refactor: move mockWarn utility to @vue/shared
close #652
2020-01-22 09:29:45 -05:00
Evan You 02c6d5c4e3 fix: codeframe marker should have min width of 1 2019-12-19 15:42:53 -05:00
Evan You 04e11187b9 perf: cache string helpers 2019-12-17 12:31:38 -05:00
Evan You 49a50d3c9c feat(compiler): accept line offset in codeframe 2019-12-13 18:01:04 -05:00
Evan You 8ffd79c754 fix(compiler-core): handle template root and template v-if as stable fragments 2019-12-12 21:09:47 -05:00
Evan You 4b2610c468 fix: handle empty lines in codeframe 2019-11-14 11:50:16 -05:00
ztplz 3b8566149a chore: improve type (#438) 2019-11-08 21:32:22 -05:00
Evan You d7eab51315 refactor: move dom tag config to shared
Otherwise runtime-dom cjs & esm builds will import compiler-dom
2019-11-06 15:22:46 -05:00
Evan You acbbe3298c refactor: move codeframe to @vue/shared 2019-11-06 15:13:15 -05:00
Evan You 6c7787db7b perf: use makeMap for reserved prop check 2019-10-26 11:24:37 -04:00
Junyan d76cfba7fb refactor(reactivity): reduce code of type check (#377) 2019-10-25 11:15:04 -04:00
Evan You af5a8e1154 feat(compiler-core): re-implement v-once to use cache mechanism 2019-10-23 17:57:40 -04:00
Mayness 18a349ce8c fix(reactivity): account for NaN in value change checks (#361) 2019-10-23 11:53:43 -04:00
Evan You a25b1371ab types: improve types 2019-10-21 23:37:03 -04:00
Evan You bb85aefc03 chore: move dom element config to compiler-dom 2019-10-21 16:25:16 -04:00
Evan You b5194b16bf refactor: rename vnode hooks
So that they can be used as @vnodeMounted="..." in templates
2019-10-18 14:54:35 -04:00
Dmitry Sharshakov 7305f693b1 refactor(runtime-core): extract promise check into shared (#325) 2019-10-17 15:47:26 -04:00
Evan You 74d501829c chore: use webpack-compatible pure annotation 2019-10-15 12:22:32 -04:00
Evan You 7de3aee317 fix: ensure makeMap calls are tree-shakable 2019-10-15 12:19:46 -04:00
Ayush Goyal 58fffcb987 refactor(core): use makeMap for faster string match checks (#282) 2019-10-15 12:11:08 -04:00
Evan You 8df3e0a41e refactor: move looseEqual to vModel 2019-10-14 17:40:56 -04:00
Evan You a42ad6cc9d feat(runtime-dom): v-model directive runtime 2019-10-11 17:55:34 -04:00
月迷津渡 78f60347dc feat(compiler): add isNativeTag option for determining element type (#139) 2019-10-10 14:54:06 -04:00
Evan You 93c6aa4c90 feat: v-once
Note: only compiler transform is tested - integration with runtime
still needs to be tested.
2019-10-09 17:32:58 -04:00
Evan You 954f3f7560 chore: format globals whitelist 2019-10-09 14:16:11 -04:00
蓝色的秋风 f97d6e7d63 refactor(shared): use Array literal instead of split for global whitelist Set creation (#173) 2019-10-09 11:28:52 -04:00
Evan You bfecf2cdce refactor(compiler): use symbols for runtime helpers 2019-10-05 22:48:13 -04:00
Carlos Rodrigues 23ff681418 chore: fix comment typos (#94) 2019-10-05 10:35:19 -04:00
Evan You 227ad034f0 feat(compiler/slot): bail out of optimization mode for non-compiled slots 2019-10-03 15:09:09 -04:00
Evan You 191db785bd refactor: use global whitelist for render proxy has check 2019-10-02 10:37:06 -04:00
Evan You a477594d65 feat(compiler): v-for codegen w/ correct blocks optimization + key flags 2019-10-01 23:19:48 -04:00
Evan You 4fc963bc5a feat(compiler): annotate patchFlags in generated code 2019-10-01 17:53:57 -04:00
Evan You d67418002f feat(compiler): generate patchFlags for runtime 2019-09-30 21:17:12 -04:00
Evan You b3b67b8c7d feat(compiler): ensure interpolation expressions are wrapped with toString() 2019-09-23 15:36:30 -04:00
Evan You a5c1b3283d chore: avoid object.freeze in prod 2019-09-17 16:23:29 -04:00
Evan You 891f21b010 refactor: extract hasOwn helper 2019-09-05 20:48:14 -04:00
Evan You 0f0ca4ae7c wip: vnodeXXX directive hooks 2019-08-31 17:06:39 -04:00
Evan You 966d7b5487 feat: error handling for setup / render / watch / event handlers 2019-08-30 15:05:39 -04:00
Evan You daf67397ae wip: pass attrs fallthrough tests 2019-08-22 22:07:51 -04:00
Evan You 5228f0343b wip: setup context + emit 2019-06-19 16:43:34 +08:00
Evan You 2848f65a7f wip: refs 2019-06-03 13:44:45 +08:00
Evan You 5c069eeae7 wip: scheduler, more component 2019-05-28 17:19:47 +08:00
Evan You ff9cddd46f refactor: move prop decorator into core, expose initial props to initialziers 2019-02-26 21:33:50 -05:00
Evan You 1c42c96d1a refactor: use faster key check 2018-10-17 12:20:54 -04:00
Evan You aac7805b3a refactor: use shared util, remove unused regex 2018-10-16 15:53:23 -04:00
Evan You 149d82d618 refactor: option merging + extract helper functions 2018-10-16 15:47:51 -04:00