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: fixed an error in the vue component editor(https://github.com/wi… #10283

Closed
wants to merge 3 commits into from

Conversation

phk422
Copy link
Contributor

@phk422 phk422 commented Mar 1, 2024

…thastro/language-tools/issues/758)

Changes

  • Modify the regular expression for matching defineProps
  • Removes the condition where comments exist when working with code
  • Fixed an issue with 'defineProps' import error

Copy link

changeset-bot bot commented Mar 1, 2024

⚠️ No Changeset found

Latest commit: 4c31d3d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/phk422/astro/new/main?filename=.changeset/plenty-jokes-wink.md&value=---%0A%22%40fake-scope%2Ffake-pkg%22%3A%20patch%0A---%0A%0Afix%3A%20fixed%20an%20error%20in%20the%20vue%20component%20editor(https%3A%2F%2Fgithub.com%2Fwi%E2%80%A6%0A)

@Princesseuh
Copy link
Member

Awesome, thank you! Would it be possible to add tests? Essentially, add a new x.test.js file in the test folder of the package, import toTSX and make sure the code generated is valid.

@phk422
Copy link
Contributor Author

phk422 commented Mar 1, 2024

Awesome, thank you! Would it be possible to add tests? Essentially, add a new x.test.js file in the test folder of the package, import toTSX and make sure the code generated is valid.

I have already added it and verified it myself in the editor without any problems.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

The new tests use an assertion library that we don't use anymore.

@@ -49,6 +49,7 @@
"@types/chai": "^4.3.10",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.10",
Copy link
Member

Choose a reason for hiding this comment

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

We don't use chai anymore, you'll have to use node:assert/strict

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok!

@phk422 phk422 requested a review from ematipico March 1, 2024 13:44
Copy link
Member

Choose a reason for hiding this comment

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

You have to revert this file too @phk422

@phk422 phk422 closed this by deleting the head repository Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants