Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-sfc): properly handle dynamic directive arguments usage check #9495

Merged
merged 6 commits into from
Nov 6, 2023

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Oct 28, 2023

close #9493

Due to the dynamic directive argument cannot contain spaces, this means it cannot be a possible TypeScript expression. I think it just need to strip out the string.

@github-actions
Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 86.5 kB 32.9 kB 29.7 kB
vue.global.prod.js 132 kB 49.6 kB 44.5 kB

Usages

Name Size Gzip Brotli
createApp 47.9 kB 18.9 kB 17.2 kB
createSSRApp 51.2 kB 20.2 kB 18.4 kB
defineCustomElement 50.3 kB 19.7 kB 17.9 kB
overall 61.3 kB 23.7 kB 21.6 kB

@haoqunjiang haoqunjiang requested a review from sxzz October 30, 2023 06:55
Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the right fix.
In processExp, dir only matters if the exp is a possible TypeScript expression. So this PR only fixes the original issue because the template literal contains a :.

(Sidenote: your test case omits the :, therefore it will pass with or without the change.)

@edison1105
Copy link
Member Author

@sodatea
due to the dynamic directive argument cannot contain spaces, this means it cannot be a possible TypeScript expression. I think it just need to strip out the string.

@haoqunjiang haoqunjiang added the ready for review This PR requires more reviews label Nov 4, 2023
@yyx990803 yyx990803 merged commit b39fa1f into vuejs:main Nov 6, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR requires more reviews
Projects
Development

Successfully merging this pull request may close these issues.

"Invalid left-hand binding in function parameter list." Occurs in versions after v3.3.5
3 participants