Commit Graph

132 Commits

Author SHA1 Message Date
Evan You eded94712e feat(compiler-sfc): improve runtime props inference for enum 2023-03-28 17:29:31 +08:00
Evan You 5fb406e3e1 fix(compiler-sfc): properly handle unknown types in runtime prop inference
fix #7511
2023-03-28 17:15:25 +08:00
Evan You 6f5698c932 Revert "fix(compiler-sfc): infer correct type for enums"
This reverts commit 2e074a7009.
2023-03-28 16:55:19 +08:00
Evan You 2e074a7009 fix(compiler-sfc): infer correct type for enums
fix #7511
2023-03-28 16:39:13 +08:00
三咲智子 Kevin Deng 0002567728
feat(compiler-sfc): support module string names syntax (#7428)
https://github.com/tc39/ecma262/pull/2154
2023-03-28 16:28:06 +08:00
三咲智子 Kevin Deng d60e58c9f6
fix(compiler-sfc): fix edge case of default export call with no args (#7536)
closes #7534
2023-03-28 16:27:34 +08:00
三咲智子 Kevin Deng 336a3d7b91
fix(compiler-sfc): properly remove comma of multiple macros in the same declaration (#7423)
closes #7422
reverts #6778
2023-03-28 16:23:39 +08:00
三咲智子 Kevin Deng 9f5e20ccff
fix(compiler-sfc): allow `<script>` with lang='js' (#7398) 2023-03-28 15:48:41 +08:00
Evan You 4355d2492d fix(compiler-sfc): handle more TS built-in utilities in defineProps inference 2023-03-28 15:41:24 +08:00
三咲智子 Kevin Deng 151a8ad6b9
fix(compiler-sfc): infer TSIntersectionType in defineProps (#7394) 2023-03-28 15:40:03 +08:00
三咲智子 Kevin Deng 1b69d5f2f4
fix(compiler-sfc): unwrap TS node for defineProps (#7340) 2023-03-28 15:22:01 +08:00
三咲智子 Kevin Deng 6391daf658
fix(compiler-sfc): infer TS Extract&Exclude runtime type (#7339)
closes #7337
closes #6252
2023-03-28 15:19:14 +08:00
三咲智子 Kevin Deng 3a7572cdb2
fix(compiler-sfc): infer function prop type from type literal w/ callable signature (#7119) 2023-03-28 11:59:21 +08:00
三咲智子 Kevin Deng 7def8b15b8
feat(complier-sfc): hoist literal constants for script (#5752)
- Support using literal constants in macros
- fix useCssVars insert position edge case
- fix non-literal-const enum hoisting

close #5750
2023-03-28 11:34:29 +08:00
三咲智子 Kevin Deng bcf5841dde
feat(compiler-sfc): add defineOptions macro (#5738) 2023-03-28 10:43:51 +08:00
edison 30399d46b1
fix(compiler-sfc): support resolving type declaration from normal script (#5831)
fix #5830
2023-02-01 04:24:50 -05:00
三咲智子 Kevin Deng 4e5d9cdb82
refactor(compiler-sfc): drop Function prop type when no static default value (#7125) 2022-11-13 20:15:17 -05:00
三咲智子 Kevin Deng 584eae60d1
fix(compiler-sfc): always generate runtime prop type for Function (#7112)
fix #7111
2022-11-13 19:36:03 -05:00
Evan You 0594400980 fix(sfc): also generate getter for import bindings during dev 2022-11-10 17:32:06 +08:00
Evan You 5a3d45ae29 fix(sfc): ensure consistent dev/prod behavior for non-reactive variables declared in `<script setup>`
fix #5655
2022-11-10 17:02:45 +08:00
Evan You 15e889afaf fix(v-model): fix incorrect codegen for non-ref bindings
fix #6241
2022-11-10 15:32:58 +08:00
三咲智子 Kevin Deng 8a882ce0a1
fix(compiler-sfc): handle method shorthand syntax in withDefaults (#6972)
fix #6971
2022-11-08 22:12:54 -05:00
三咲智子 Kevin Deng 910fa7677f
fix(compiler-sfc): resolve computed object key (#6963) 2022-11-08 21:57:40 -05:00
Evan You 6861d2380b refactor(compiler-sfc): optimize import alias check for binding analysis 2022-11-08 17:47:47 +08:00
Evan You 8d1f526174 fix(compiler-sfc): fix binding analysis for aliased late import 2022-11-08 17:19:45 +08:00
三咲智子 Kevin Deng 4a00fddfed
fix(compiler-sfc): check import source during binding analysation (#6826)
fix #6825
2022-11-08 04:07:28 -05:00
花果山大圣 99b6697fb4
fix(compiler-sfc): fix macro usage in multi-variable declaration (#6778)
fix #6757
2022-11-07 22:16:21 -05:00
ygj6 eab76046e3
fix(compiler-sfc): allow type annotation for defineEmits variable (#5394)
fix #5393
2022-10-26 05:12:55 -04:00
edison 83f7e6f8a6
fix(compiler-sfc): support using extends interface with defineProps() (#4512)
fix #4498
2022-10-26 04:44:30 -04:00
Kid 96ba71d0cf
chore: fix typos (#6708) 2022-09-24 15:13:39 +08:00
Evan You 769e5555f9 fix(compiler-sfc): fix template usage check edge case for v-on statements
ref: https://github.com/vuejs/vue/issues/12591
2022-07-04 11:49:47 +08:00
Evan You 9734b31c31 fix(sfc): avoid auto name inference leading to unwanted recursion
fix #5965
fix #6027
fix #6029
2022-06-06 17:36:49 +08:00
Evan You 583b625987 fix(compiler-sfc): fix usage detection for types in v-for/v-slot expressions
fix #5959
2022-05-21 00:09:15 +08:00
Evan You efea4a8b57 fix(ssr/sfc-css-vars): fix v-bind css vars codegen for SSR
fix #5443
close #5444
2022-05-17 09:21:44 +08:00
liulinboyi a0290fe781 fix(compiler-sfc): add test for #5808 2022-05-13 15:41:49 +08:00
liulinboyi 3b7b107120 fix(compiler-sfc): <script> after <script setup> the script content not end with `\\n` 2022-05-13 11:04:24 +08:00
Evan You 8a123ac34f fix(compiler-sfc): fix treeshaking of namespace import when used in template
fix #5209
2022-05-12 18:56:54 +08:00
Evan You ccf92564d3 fix(compiler-sfc): fix template usage check false positives on types
fix #5414
2022-05-12 18:23:10 +08:00
Evan You 410144149f fix(compiler-sfc): defineProps return binding or rest binding should be considered reactive 2022-05-10 17:34:15 +08:00
那里好脏不可以 6042ab0f2f
chore: type [ci skip] 2022-05-09 22:51:51 -04:00
ygj6 16939241b0
fix(compiler-sfc): automatically infer component name from filename when using script setup (#4997)
close #4993
2022-05-09 21:16:28 -04:00
木杉 8e29ef6019
fix(compiler-sfc): handle type modifier in import specifiers (#5498) 2022-04-13 22:10:26 -04:00
Evan You ae4b0783d7 chore: update repo references 2022-01-18 16:43:59 +08:00
Evan You fef191fb07 chore: remove stale references of ref-transform 2021-12-23 16:56:36 +08:00
Evan You 7e4f0a8694 fix(compiler-sfc): generate valid TS in script and script setup co-usage with TS
fix #5094
2021-12-12 09:53:52 +08:00
Evan You 198ca14f19 feat(reactivity-transform): $$() escape for destructured prop bindings 2021-12-11 17:50:09 +08:00
Cédric Exbrayat c17cbdc28f
refactor: use refTransform instead of deprecated refSugar (#4957) 2021-11-25 04:39:36 -05:00
Evan You d4c04e9799 fix(compiler-sfc): fix props codegen w/ leading import
fix #4764
2021-10-08 12:52:48 -04:00
edison f66d456b7a
fix(compiler-sfc): support runtime Enum in normal script (#4698) 2021-10-08 11:57:39 -04:00
Evan You 686d0149b6 fix(compiler-core): generate TS-cast safe assignment code for v-model
fix #4655
2021-09-22 16:55:06 -04:00