]> git.ipfire.org Git - thirdparty/vuejs/core.git/log
thirdparty/vuejs/core.git
20 months agorefactor: restore SourceLocation.source
Evan You [Sat, 25 Nov 2023 11:22:39 +0000 (19:22 +0800)] 
refactor: restore SourceLocation.source

this is used extensively in @vue/language-tools and does not have
noticeable impact on performance

20 months agorefactor: preserve source location convention in sfc mode for base parser
Evan You [Sat, 25 Nov 2023 10:07:17 +0000 (18:07 +0800)] 
refactor: preserve source location convention in sfc mode for base parser

For compatibility w/ usage like https://github.com/vue-macros/vue-macros/blob/main/packages/setup-block/src/core/index.ts

20 months agochore: remove isSelfClosing property
Evan You [Sat, 25 Nov 2023 10:03:22 +0000 (18:03 +0800)] 
chore: remove isSelfClosing property

20 months agofix: avoid confusing breakage in @vitejs/plugin-vue
Evan You [Sat, 25 Nov 2023 08:39:30 +0000 (16:39 +0800)] 
fix: avoid confusing breakage in @vitejs/plugin-vue

20 months agochore: restructure parser files
Evan You [Fri, 24 Nov 2023 13:53:35 +0000 (21:53 +0800)] 
chore: restructure parser files

20 months agoperf(codegen): optimize source map generation
Evan You [Fri, 24 Nov 2023 12:48:12 +0000 (20:48 +0800)] 
perf(codegen): optimize source map generation

20 months agoperf(codegen): optimize line / column calculation during codegen
Evan You [Thu, 23 Nov 2023 16:58:47 +0000 (00:58 +0800)] 
perf(codegen): optimize line / column calculation during codegen

Previously, many CodegenContext.push() calls were unnecessarily
iterating through the entire pushed string to find newlines, when we
already know the newline positions for most of calls. Providing fast
paths for these calls significantly improves codegen performance when
source map is needed.

In benchmarks, this PR improves full SFC compilation performance by ~6%.

20 months agoperf(compiler-sfc): remove magic-string trim on script
Evan You [Thu, 23 Nov 2023 15:18:23 +0000 (23:18 +0800)] 
perf(compiler-sfc): remove magic-string trim on script

magic-string's trim method uses a regex check for aborting which turns
out to be extremely expensive - it cna take up to 10% time in total SFC
compilation! The usage here is purely aesthetic so simply removing it
for a big perf gain is well worth it.

20 months agoperf: optimize position cloning
Evan You [Thu, 23 Nov 2023 15:07:51 +0000 (23:07 +0800)] 
perf: optimize position cloning

20 months agowip: should not reuse AST when using custom compiler
Evan You [Wed, 22 Nov 2023 09:00:39 +0000 (17:00 +0800)] 
wip: should not reuse AST when using custom compiler

20 months agowip: parser v2 compat
Evan You [Wed, 22 Nov 2023 07:19:06 +0000 (15:19 +0800)] 
wip: parser v2 compat

20 months agochore: document rationale for ignoring some parsing errors
Evan You [Wed, 22 Nov 2023 06:04:31 +0000 (14:04 +0800)] 
chore: document rationale for ignoring some parsing errors

20 months agowip: shorten some method names
Evan You [Wed, 22 Nov 2023 06:01:20 +0000 (14:01 +0800)] 
wip: shorten some method names

20 months agowip: parse error tests
Evan You [Wed, 22 Nov 2023 05:58:50 +0000 (13:58 +0800)] 
wip: parse error tests

20 months agowip: force re-parse on reused sfc template ast
Evan You [Tue, 21 Nov 2023 14:28:06 +0000 (22:28 +0800)] 
wip: force re-parse on reused sfc template ast

20 months agowip: should parse sfc template with lang=html
Evan You [Tue, 21 Nov 2023 14:27:35 +0000 (22:27 +0800)] 
wip: should parse sfc template with lang=html

20 months agorefactor: use more efficient walk for importUsageCheck
Evan You [Tue, 21 Nov 2023 14:10:00 +0000 (22:10 +0800)] 
refactor: use more efficient walk for importUsageCheck

20 months agowip: compiler-sfc should not attach ast on template with src import
Evan You [Tue, 21 Nov 2023 14:09:38 +0000 (22:09 +0800)] 
wip: compiler-sfc should not attach ast on template with src import

20 months agorefactor: better naming for baseCompile argument
Evan You [Tue, 21 Nov 2023 14:08:49 +0000 (22:08 +0800)] 
refactor: better naming for baseCompile argument

20 months agorefactor: fix v-bind no-exp shorthand for new parser
Evan You [Tue, 21 Nov 2023 10:37:47 +0000 (18:37 +0800)] 
refactor: fix v-bind no-exp shorthand for new parser

20 months agowip: treat template with preprocessor as plain text
Evan You [Mon, 20 Nov 2023 14:49:16 +0000 (22:49 +0800)] 
wip: treat template with preprocessor as plain text

20 months agowip: support reusing template ast from sfc descriptor
Evan You [Mon, 20 Nov 2023 14:05:27 +0000 (22:05 +0800)] 
wip: support reusing template ast from sfc descriptor

20 months agowip: decodeEntities test
Evan You [Mon, 20 Nov 2023 13:43:05 +0000 (21:43 +0800)] 
wip: decodeEntities test

20 months agowip: pass all compiler-sfc tests
Evan You [Mon, 20 Nov 2023 09:38:00 +0000 (17:38 +0800)] 
wip: pass all compiler-sfc tests

20 months agowip: pass all compiler-ssr tests
Evan You [Mon, 20 Nov 2023 07:33:03 +0000 (15:33 +0800)] 
wip: pass all compiler-ssr tests

20 months agowip: pass all compiler-dom tests
Evan You [Sun, 19 Nov 2023 03:46:44 +0000 (11:46 +0800)] 
wip: pass all compiler-dom tests

20 months agofeat(compiler-core): support specifying root namespace when parsing
Evan You [Sun, 19 Nov 2023 03:20:05 +0000 (11:20 +0800)] 
feat(compiler-core): support specifying root namespace when parsing

20 months agowip: pass more compiler-dom tests
Evan You [Sun, 19 Nov 2023 02:39:11 +0000 (10:39 +0800)] 
wip: pass more compiler-dom tests

20 months agowip: entities parsing in browser
Evan You [Sat, 18 Nov 2023 13:39:31 +0000 (21:39 +0800)] 
wip: entities parsing in browser

20 months agowip: tune perf
Evan You [Sat, 18 Nov 2023 04:01:55 +0000 (12:01 +0800)] 
wip: tune perf

20 months agowip: pass all compiler-core tests
Evan You [Sat, 18 Nov 2023 03:22:15 +0000 (11:22 +0800)] 
wip: pass all compiler-core tests

20 months agowip: more tests passing
Evan You [Sat, 18 Nov 2023 02:49:29 +0000 (10:49 +0800)] 
wip: more tests passing

20 months agowip: pass all non-error parsing tests
Evan You [Fri, 17 Nov 2023 09:46:47 +0000 (17:46 +0800)] 
wip: pass all non-error parsing tests

20 months agorefactor: swap to new template parser
Evan You [Fri, 17 Nov 2023 06:17:30 +0000 (14:17 +0800)] 
refactor: swap to new template parser

- get rid of SourceLocation.source for memory efficiency
- move source location generation logic transform phase into the parser
  itself so that SourceLocation.source is no longer needed
  - move v-for expression parsing into the parser itself
  - added nameLoc on AttributeNode for use in transformElement

Tests are not passing yet.

20 months agowip: parse mode
Evan You [Fri, 17 Nov 2023 01:22:12 +0000 (09:22 +0800)] 
wip: parse mode

20 months agoperf: optimize away isBuiltInType
Evan You [Thu, 16 Nov 2023 09:30:00 +0000 (17:30 +0800)] 
perf: optimize away isBuiltInType

20 months agochore: disable parser tests for now
Evan You [Thu, 16 Nov 2023 09:29:31 +0000 (17:29 +0800)] 
chore: disable parser tests for now

20 months agowip: parseMode
Evan You [Thu, 16 Nov 2023 09:04:07 +0000 (17:04 +0800)] 
wip: parseMode

20 months agoperf: optimize makeMap
Evan You [Thu, 16 Nov 2023 09:02:17 +0000 (17:02 +0800)] 
perf: optimize makeMap

20 months agowip: getting ready for textmode handling
Evan You [Thu, 16 Nov 2023 08:28:56 +0000 (16:28 +0800)] 
wip: getting ready for textmode handling

20 months agowip: comments
Evan You [Thu, 16 Nov 2023 03:05:31 +0000 (11:05 +0800)] 
wip: comments

20 months agowip: refine element type
Evan You [Thu, 16 Nov 2023 02:54:54 +0000 (10:54 +0800)] 
wip: refine element type

20 months agowip: v-pre handling
Evan You [Wed, 15 Nov 2023 17:31:52 +0000 (01:31 +0800)] 
wip: v-pre handling

20 months agowip: pre tag handling
Evan You [Wed, 15 Nov 2023 15:55:50 +0000 (23:55 +0800)] 
wip: pre tag handling

20 months agowip: parse interpolation
Evan You [Wed, 15 Nov 2023 15:33:57 +0000 (23:33 +0800)] 
wip: parse interpolation

20 months agowip: check duplicated attributes
Evan You [Wed, 15 Nov 2023 11:36:05 +0000 (19:36 +0800)] 
wip: check duplicated attributes

20 months agowip: remove htmlMode
Evan You [Wed, 15 Nov 2023 11:15:04 +0000 (19:15 +0800)] 
wip: remove htmlMode

20 months agowip: remove foreignContext check
Evan You [Wed, 15 Nov 2023 11:13:28 +0000 (19:13 +0800)] 
wip: remove foreignContext check

20 months agowip: modifiers
Evan You [Wed, 15 Nov 2023 09:57:28 +0000 (17:57 +0800)] 
wip: modifiers

20 months agowip: source location for props
Evan You [Wed, 15 Nov 2023 09:45:42 +0000 (17:45 +0800)] 
wip: source location for props

20 months agowip: parse directive in tokenizer
Evan You [Tue, 14 Nov 2023 17:14:36 +0000 (01:14 +0800)] 
wip: parse directive in tokenizer

20 months agowip: optimize condenseWhitespace
Evan You [Tue, 14 Nov 2023 13:55:16 +0000 (21:55 +0800)] 
wip: optimize condenseWhitespace

20 months agowip: parse directives
Evan You [Tue, 14 Nov 2023 12:39:08 +0000 (20:39 +0800)] 
wip: parse directives

20 months agowip: loc for elements
Evan You [Tue, 14 Nov 2023 10:03:00 +0000 (18:03 +0800)] 
wip: loc for elements

20 months agowip: refactor line / column generation
Evan You [Tue, 14 Nov 2023 08:35:52 +0000 (16:35 +0800)] 
wip: refactor line / column generation

20 months agowip: save
Evan You [Mon, 13 Nov 2023 17:14:33 +0000 (01:14 +0800)] 
wip: save

20 months agowip: port parser
Evan You [Mon, 13 Nov 2023 13:03:39 +0000 (21:03 +0800)] 
wip: port parser

20 months agowip: remove unused options
Evan You [Sun, 12 Nov 2023 13:42:27 +0000 (21:42 +0800)] 
wip: remove unused options

20 months agowip: strip xmlMode / htmlMode
Evan You [Sun, 12 Nov 2023 09:01:05 +0000 (17:01 +0800)] 
wip: strip xmlMode / htmlMode

20 months agowip: setup
Evan You [Sun, 12 Nov 2023 08:58:24 +0000 (16:58 +0800)] 
wip: setup

20 months agofeat!: remove reactivity transform (#9321)
三咲智子 Kevin Deng [Tue, 21 Nov 2023 10:06:42 +0000 (18:06 +0800)] 
feat!: remove reactivity transform (#9321)

BREAKING CHANGE: Reactivity Transform was marked deprecated in 3.3 and is now removed in 3.4. This change does not require a major due to the feature being experimental. Users who wish to continue using the feature can do so via the external plugin at https://vue-macros.dev/features/reactivity-transform.html

20 months agotest: fix keepalive transition out-in test case
Evan You [Tue, 21 Nov 2023 09:57:44 +0000 (17:57 +0800)] 
test: fix keepalive transition out-in test case

20 months agochore: Merge branch 'main' into minor
Evan You [Tue, 21 Nov 2023 01:48:26 +0000 (09:48 +0800)] 
chore: Merge branch 'main' into minor

20 months agochore: exclude private packages from version updates
Evan You [Tue, 21 Nov 2023 01:37:37 +0000 (09:37 +0800)] 
chore: exclude private packages from version updates

20 months agoworkflow: use workspace deps
Evan You [Tue, 21 Nov 2023 01:16:14 +0000 (09:16 +0800)] 
workflow: use workspace deps

20 months agochore(deps): update all non-major dependencies (#9636)
renovate[bot] [Mon, 20 Nov 2023 09:38:13 +0000 (17:38 +0800)] 
chore(deps): update all non-major dependencies (#9636)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update dependency vite to v5 (#9630)
renovate[bot] [Sat, 18 Nov 2023 02:36:56 +0000 (10:36 +0800)] 
chore(deps): update dependency vite to v5 (#9630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
20 months agochore(deps): update dependency tsx to v4 (#9629)
renovate[bot] [Sat, 18 Nov 2023 02:33:45 +0000 (10:33 +0800)] 
chore(deps): update dependency tsx to v4 (#9629)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update lint (#9627)
renovate[bot] [Sat, 18 Nov 2023 02:33:24 +0000 (10:33 +0800)] 
chore(deps): update lint (#9627)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
20 months agochore(deps): update actions/github-script action to v7 (#9628)
renovate[bot] [Sat, 18 Nov 2023 02:31:45 +0000 (10:31 +0800)] 
chore(deps): update actions/github-script action to v7 (#9628)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update dessant/lock-threads action to v5 (#9626)
renovate[bot] [Fri, 17 Nov 2023 23:32:25 +0000 (07:32 +0800)] 
chore(deps): update dessant/lock-threads action to v5 (#9626)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update autofix-ci/action digest to bee19d7 (#9625)
renovate[bot] [Fri, 17 Nov 2023 23:13:04 +0000 (07:13 +0800)] 
chore(deps): update autofix-ci/action digest to bee19d7 (#9625)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore: fix polyfill node conditions in dev
三咲智子 Kevin Deng [Fri, 17 Nov 2023 00:04:52 +0000 (08:04 +0800)] 
chore: fix polyfill node conditions in dev

20 months agodocs: replace rollup-plugin-vue with vite version
三咲智子 Kevin Deng [Wed, 15 Nov 2023 13:43:18 +0000 (21:43 +0800)] 
docs: replace rollup-plugin-vue with vite version

20 months agofix(v-model): unnecessary value binding error should apply to dynamic instead of...
Evan You [Wed, 15 Nov 2023 00:51:50 +0000 (08:51 +0800)] 
fix(v-model): unnecessary value binding error should apply to dynamic instead of static binding

close #3596

20 months agofix(compiler-sfc): malformed filename on windows using path.posix.join() (#9478)
Bogdan Kolesnyk [Mon, 13 Nov 2023 07:48:25 +0000 (08:48 +0100)] 
fix(compiler-sfc): malformed filename on windows using path.posix.join() (#9478)

Closes: #8671, #9583
Not fixed with: #9446

Related: #9473

20 months agochore(deps): update compiler to ^7.23.3 (#9590)
renovate[bot] [Mon, 13 Nov 2023 07:45:51 +0000 (15:45 +0800)] 
chore(deps): update compiler to ^7.23.3 (#9590)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update all non-major dependencies (#9589)
renovate[bot] [Mon, 13 Nov 2023 07:45:29 +0000 (15:45 +0800)] 
chore(deps): update all non-major dependencies (#9589)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agofix(types): revert class type restrictions
Evan You [Mon, 13 Nov 2023 07:23:16 +0000 (15:23 +0800)] 
fix(types): revert class type restrictions

reverts #8012 due to breakage in downstream types

20 months agoworkflow(playground): prod/dev toggle should apply to runtime behavior as well
Evan You [Sun, 12 Nov 2023 08:30:30 +0000 (16:30 +0800)] 
workflow(playground): prod/dev toggle should apply to runtime behavior as well

Previously, the prod/dev toggle in the SFC playground only affects the
SFC compiation behavior, but not the actual runtime. This can make it
confusing when users are trying to reproduce prod/dev behavior
inconsistency in the runtime code instead of the compiler.

20 months agochore: fix dev-sfc-prepare command (#9570)
Rick [Fri, 10 Nov 2023 09:17:17 +0000 (17:17 +0800)] 
chore: fix dev-sfc-prepare command (#9570)

20 months agochore(deps): update dependency puppeteer to ~21.5.1 (#9553)
renovate[bot] [Fri, 10 Nov 2023 09:16:15 +0000 (17:16 +0800)] 
chore(deps): update dependency puppeteer to ~21.5.1 (#9553)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agochore(deps): update lint (#9552)
renovate[bot] [Fri, 10 Nov 2023 09:16:02 +0000 (17:16 +0800)] 
chore(deps): update lint (#9552)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
20 months agofix(types): fix `unref` and `toValue` when input union type contains ComputedRef...
丶远方 [Fri, 10 Nov 2023 08:56:29 +0000 (16:56 +0800)] 
fix(types): fix `unref` and `toValue` when input union type contains ComputedRef (#8748)

close #8747
close #8857

20 months agofix(reactivity): onCleanup also needs to be cleaned (#8655)
花果山大圣 [Fri, 10 Nov 2023 08:47:08 +0000 (16:47 +0800)] 
fix(reactivity): onCleanup also needs to be cleaned (#8655)

close #5151
close #7695

20 months agofix(compiler-sfc): support `:is` and `:where` selector in scoped css rewrite (#8929)
Cong [Fri, 10 Nov 2023 08:44:08 +0000 (16:44 +0800)] 
fix(compiler-sfc): support `:is` and `:where` selector in scoped css rewrite (#8929)

20 months agofix(compiler-sfc): support `:is` and `:where` selector in scoped css rewrite (#8929)
Cong [Fri, 10 Nov 2023 08:44:08 +0000 (16:44 +0800)] 
fix(compiler-sfc): support `:is` and `:where` selector in scoped css rewrite (#8929)

20 months agofix(compiler-sfc): consistently escape type-only prop names (#8654)
auvred [Fri, 10 Nov 2023 08:23:47 +0000 (11:23 +0300)] 
fix(compiler-sfc): consistently escape type-only prop names (#8654)

close #8635
close #8910
close vitejs/vite-plugin-vue#184

20 months agofix(compiler-sfc): support resolve extends interface for defineEmits (#8470)
edison [Fri, 10 Nov 2023 08:00:04 +0000 (16:00 +0800)] 
fix(compiler-sfc): support resolve extends interface for defineEmits (#8470)

close #8465

20 months agofix(types): widen ClassValue type
Evan You [Fri, 10 Nov 2023 07:33:21 +0000 (15:33 +0800)] 
fix(types): widen ClassValue type

20 months agofix(ssr): hydration `__vnode` missing for devtools (#9328)
Anthony Fu [Fri, 10 Nov 2023 07:27:16 +0000 (08:27 +0100)] 
fix(ssr): hydration `__vnode` missing for devtools (#9328)

20 months agochore: remove typeof NULL_DYNAMIC_COMPONENT for type compat with test-utils
Evan You [Fri, 10 Nov 2023 07:25:55 +0000 (15:25 +0800)] 
chore: remove typeof NULL_DYNAMIC_COMPONENT for type compat with test-utils

20 months agofix(types): return type of withDefaults should be readonly (#8601)
zqran [Fri, 10 Nov 2023 07:20:02 +0000 (15:20 +0800)] 
fix(types): return type of withDefaults should be readonly (#8601)

20 months agofix(types): more precise types for class bindings (#8012)
Basil Gor [Fri, 10 Nov 2023 07:15:54 +0000 (23:15 -0800)] 
fix(types): more precise types for class bindings (#8012)

20 months agotest(shared): add test case for escapeHtmlComment (#8065)
丶远方 [Fri, 10 Nov 2023 07:07:24 +0000 (15:07 +0800)] 
test(shared): add test case for escapeHtmlComment (#8065)

20 months agodx(runtime-core): warn if `this` is used in a `<script setup>` template (#7866)
skirtle [Fri, 10 Nov 2023 07:05:39 +0000 (07:05 +0000)] 
dx(runtime-core): warn if `this` is used in a `<script setup>` template (#7866)

20 months agochore: fix formatting + remove duplicated property in jsx type
Evan You [Fri, 10 Nov 2023 06:59:57 +0000 (14:59 +0800)] 
chore: fix formatting + remove duplicated property in jsx type

20 months agorefactor(compiler-dom): use String's built-in repeat method (#6700)
被雨水过滤的空气-Rain [Fri, 10 Nov 2023 06:39:19 +0000 (14:39 +0800)] 
refactor(compiler-dom): use String's built-in repeat method (#6700)

20 months agotest(apiWatch): better indicate array pre & new values are the same object (#7251)
Yuchao [Fri, 10 Nov 2023 06:37:46 +0000 (17:37 +1100)] 
test(apiWatch): better indicate array pre & new values are the same object (#7251)

20 months agodx(runtime-core): warn when the prop type is `[]` (#7608)
skirtle [Fri, 10 Nov 2023 06:32:10 +0000 (06:32 +0000)] 
dx(runtime-core): warn when the prop type is `[]` (#7608)