Commit Graph

224 Commits

Author SHA1 Message Date
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
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
HiiTea
22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -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
7d858a9001 test(compiler-core): test dynamic component block 2020-04-22 14:47:31 -04:00
扩散性百万甜面包
70c8c58be2
test(compiler-core): expect onError to be called (#976) 2020-04-17 08:58:38 -04:00
Evan You
1068212cb2 chore: run prettier 2020-04-15 10:51:07 -04:00
Evan You
a6e2b1052a fix(compiler-core): should not generate CLASS/STYLE patch flags on components
ref #677
2020-04-10 10:19:26 -04:00
Evan You
1f6e72b110 fix(compiler): support full range of entity decoding in browser builds
BREAKING CHANGE: compiler options have been adjusted.
    - new option `decodeEntities` is added.
    - `namedCharacterReferences` option has been removed.
    - `maxCRNameLength` option has been rmeoved.
2020-04-08 18:51:25 -04:00
Evan You
d531686f91 fix(compiler-core): elements with dynamic keys should be forced into blocks
fix #916
2020-04-07 18:44:21 -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
Evan You
a022b63605 fix(compiler-core/slots): should support on-component named slots 2020-04-01 20:44:53 -04:00
Evan You
b8ffbffaf7 feat(compiler-core): support v-is
see https://github.com/vuejs/rfcs/pull/149 for details
2020-03-27 16:38:31 -04:00
Evan You
f529dbde23 fix: dynamic component fallback to native element
fix #870
2020-03-23 14:47:04 -04:00
ysj16
a3601e9fa7
perf(transform-vif): don't need to createBlock for a component (#853) 2020-03-20 11:29:44 -04:00
Evan You
a1da9c28a0 fix(compiler-core): assign patchFlag for template v-if fragment
fix #850
2020-03-17 11:36:56 -04:00
Evan You
4dc8ffc378 fix: simplify and use correct ctx in withCtx 2020-03-16 13:06:46 -04:00
Evan You
19228a469a refactor: simplify resolveDyanmicComponent 2020-03-16 13:06:46 -04:00
Evan You
9ad65b1653 refactor(template-ref): improve template ref handling
close #836, close #839
2020-03-16 13:06:46 -04:00
Evan You
ecd7ce60d5 feat(compiler-core): wrap slot functions with render context 2020-03-16 13:06:46 -04:00
Evan You
586e5bb800 fix(compiler-core): fix property shorthand detection
fix #845
2020-03-16 10:27:03 -04:00
Evan You
1f9c9c14ae chore: move hydration tests 2020-03-13 13:05:05 -04:00
Evan You
a05d41c940 refactor(ssr): adjust ssr fragment anchor content 2020-03-13 13:05:05 -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
Evan You
dd2d25fee1 test(ssr): test for hydration mismatch handling 2020-03-06 15:39:54 -05:00
Evan You
f7a026109d test(ssr): ssr + hydration integration test 2020-03-06 15:14:12 -05:00
Evan You
08bba093af test(ssr): more hydration tests 2020-03-05 10:29:50 -06:00
Evan You
fb4856b363 test(ssr): hydratioon tests (wip) 2020-03-04 17:06:50 -06:00
Evan You
8449a9727c feat(compiler-core): switch to @babel/parser for expression parsing
This enables default support for parsing bigInt, optional chaining
    and nullish coalescing, and also adds the `expressionPlugins`
    compiler option for enabling additional parsing plugins listed at
    https://babeljs.io/docs/en/next/babel-parser#plugins.
2020-02-27 16:53:51 -05:00
Evan You
3eab143843 fix(template-ref): fix string template refs inside slots 2020-02-25 18:29:51 -05:00
Evan You
1b9b235663 fix(compiler-dom): properly stringify class/style bindings when hoisting static strings 2020-02-21 13:10:13 +01:00
likui
7b987d9450
fix(compiler-core): should alias name in helperString (#743)
fix #740
2020-02-19 09:49:46 -05:00
Evan You
e0f3c6b352 fix(compiler-core): should apply text transform to if branches
fix #725
2020-02-14 15:57:14 -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
1389d7b88c refactor(compiler-core): use more concise marker for compiled slots 2020-02-12 13:45:35 -05:00
Evan You
175f8aae8d feat(compiler): mark hoisted trees with patchFlag 2020-02-12 13:31:29 -05:00
Evan You
e861c6da90 test: test updates for d40c642 2020-02-11 18:40:42 -05:00
Evan You
f4c54a888b refactor(compiler-core): hoist static text calls between elements 2020-02-10 18:32:11 -05:00
Evan You
12fcf9ab95 fix(compiler): fix v-for fragment openBlock argument 2020-02-10 18:19:49 -05:00
Evan You
47e984d31f refactor(compiler): provide _ctx and _cache via arguments 2020-02-10 17:29:12 -05:00
Evan You
ade07c64a1 fix(compiler-core): fix keep-alive when used in templates
fix #715
2020-02-10 16:49:37 -05:00
Evan You
571ed4226b feat(compiler-core/v-on): support @vnode-xxx usage for vnode hooks 2020-02-10 11:00:37 -05:00
djy0
782db6d7f5
chore(compiler-core/codegen): avoid generate indent spaces of empty lines. (#701) 2020-02-10 09:33:04 -05:00
Evan You
8b2d6a35d0 test: update tests and snapshots for helper prefixing 2020-02-07 19:04:55 -05:00
Evan You
ee5ed73361 wip(ssr): basic components 2020-02-05 23:07:23 -05:00
Evan You
7a63103a11 chore: fix snapshot 2020-02-05 17:29:41 -05:00
Evan You
8f9e85afb1 test: fix tests w/ nested CompoundExpressions 2020-02-05 14:30:34 -05:00
Evan You
c441e88469 chore: fix snapshots 2020-02-04 22:56:53 -05:00