Commit Graph

65 Commits

Author SHA1 Message Date
Evan You 6257adeaac fix(compiler-core): more robust member expression check in Node 2021-09-22 17:16:21 -04:00
Evan You d23fde3d3b fix(compiler-core): more robust member expression check when running in node
fix #4640
2021-09-21 12:19:27 -04:00
shadowings-zy 32827506ff
fix(compiler-core): fix duplicated component identifier for names with non-ascii chars (#4429)
fix #4422
2021-08-24 11:48:08 -04:00
Evan You 47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
Evan You 3b64508e3b feat: v-memo 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 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 963085d18c fix(v-on): properly detect member expressions with optional chaining
fix #4107
2021-07-15 12:23:07 -04:00
Evan You bc100c5c48 fix(compiler-core): improve member expression check
fix #3910
2021-06-09 11:57:48 -04:00
HcySunYang 9b2e894017
fix(compiler-core): improve the isMemberExpression function (#3675) 2021-05-27 21:07:26 -04:00
Evan You 7dc681c196 wip: filters compat 2021-04-19 12:29:55 -04:00
HcySunYang ebedcccdc0
fix(compiler-core): allow unicode to appear in identifiers (#3443)
fix #3440
2021-03-25 17:24:18 -04:00
Hunter 6d2a1cb64d
fix(compiler-core): fix multiline member expression check (#2436)
fix #2426
2020-10-20 09:31:08 -04:00
ᴜɴвʏтᴇ 692197be33
fix(compiler-core): fix v-if key injection with v-on object syntax (#2368)
fix #2366
2020-10-13 12:04:52 -04:00
Evan You de0c8a7e3e fix(compiler-core): v-if key error should only be checking same key on different branches 2020-08-04 12:01:18 -04:00
Evan You be4df124e6 refactor: move @babel/types to dev deps, reduce install size 2020-07-20 22:14:05 -04:00
Evan You 576344d2c3 refactor(compiler): extract isStaticExp util 2020-07-13 16:48:24 -04:00
Evan You 80c868aefe workflow: setup eslint for prohibited syntax and globals
fix #1285
2020-06-10 16:54:23 -04:00
Carlos Rodrigues 958b6c80cf
fix(compiler-core): allow multiline expression on v-model and v-on (#1234) 2020-06-09 17:24:48 -04:00
Evan You bd0f7da2c6 build: add browser builds for @vue/compiler-sfc 2020-04-26 01:24:25 -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 9ed9bf3687 feat(portal): SSR support for portal disabled prop 2020-03-30 11:24:29 -04: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 e3988b40d8 refactor(compiler-core): use dedicated node type for element codegen
Previously codegen node for elements and components used raw expressions,
which leads to multiple permutations of AST shapes based on whether the
node is a block or has directives. The complexity is spread across the
entire compiler and occurs whenever a transform needs to deal with
element codegen nodes.

This refactor centralizes the handling of all possible permutations
into the codegen phase, so that all elements/components will have a
consistent node type throughout the transform phase.

The refactor is split into two commits (with test updates in a separate
one) so changes can be easier to inspect.
2020-02-11 18:40:42 -05:00
Evan You ee5ed73361 wip(ssr): basic components 2020-02-05 23:07:23 -05:00
Evan You 1f2de9e232 fix(v-model): should use dynamic directive on input with dynamic v-bind 2020-02-05 15:21:47 -05:00
Evan You 63e4486645 wip(compiler-ssr): text and interpolation 2020-02-02 22:28:54 -05:00
Ruijia Tang aca2c2a81e fix(compiler-core): avoid override user keys when injecting branch key (#630) 2020-01-20 10:15:53 -05:00
djy0 ad2a0bde98 perf(compiler-core): simplify `advancePositionWithMutation` (#564) 2019-12-30 11:25:06 -05:00
Evan You 9550302df4 build: esm-bunlder builds should be considered browser builds 2019-12-17 17:34:10 -05:00
Evan You 0e3e07079a feat(transition): properly handle transition & transition-group in compiler 2019-11-29 12:42:04 -05:00
Evan You 353b06df77 perf(compiler): should only perform assertions during tests
Compiler assertions are made to ensure implementation correctness,
but they have performance costs that should not affect users
during development.
2019-11-15 17:29:08 -05:00
Evan You 5eee1152ca types: (wip) improve dts output 2019-11-01 11:32:53 -04:00
Evan You 516501e20e chore: remove unused util function 2019-10-24 15:39:31 -04:00
Evan You 052febc127 feat(compiler): convert text mixed with elements into createVNode calls
This ensures they are tracked as dynamic children when inside blocks.
Also guaruntees compiled vnodes always have vnode children in arrays
so that they can skip normalizeVNode safely in optimized mode.
2019-10-21 15:52:29 -04:00
Evan You 58593c4714 feat(v-on): cache handlers 2019-10-18 21:51:34 -04:00
Evan You 6a75c3463b feat(compiler-core): do not generate TEXT flag if child is constant 2019-10-16 12:00:55 -04:00
Sangeeth Sudheer 96681942c1 types: remove unnecessary types (#234) 2019-10-12 19:33:48 -04:00
月迷津渡 f71d252ffe fix(compiler-core): assest id (#190)
* fix(compile-core): asset id

* test(compile-core): asset id
2019-10-10 13:55:26 -04:00
Evan You f11dadc1d2 refactor(compiler): improve member expression check for v-on & v-model 2019-10-10 11:15:24 -04:00
Rahul Kadyan 87c3d2edae feat(compiler-core): create transform for v-model (#146) 2019-10-10 10:33:58 -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 16da9ae89f fix(compiler): handle block nodes with custom directives + improve ast types 2019-10-08 10:50:10 -04:00
Evan You 82bd9eb1db refactor(compiler): refine codegen node types 2019-10-05 22:48:13 -04:00
Evan You bfecf2cdce refactor(compiler): use symbols for runtime helpers 2019-10-05 22:48:13 -04:00
Evan You 0873254c6c workflow: improve template explorer 2019-10-04 17:43:20 -04:00
Evan You 5047bc8dbe workflow: basic template explorer 2019-10-04 13:08:17 -04:00
Evan You 095f5edf8d feat(compiler): hoist static trees 2019-10-03 23:30:25 -04:00
Evan You aa9245d55c feat(compiler): render <slot/> as block fragments 2019-10-03 12:03:14 -04:00