Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@vue/ref-transform": "^3.2.21",
"@vue/shared": "^3.2.21",
"defu": "^5.0.0",
"htmlparser2": "^7.2.0",
"htmlparser2": "5.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait what? Downgrading a dependency doesn't feel right 🤔 does it?
Maybe the issue is then in the dependency and not in this repo?
Maybe it's better to fix the problem in the root.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Shinigami92 When I fix the htmlparser2 bug, I'll update the dependency to latest.

"magic-string": "^0.25.7",
"unplugin": "^0.2.21"
},
Expand Down
22 changes: 20 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions test/__snapshots__/transform.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,26 @@ export default __sfc_main;
"
`;

exports[`transform fixtures test/fixtures/ScriptLessThanOrEqualTo.vue 1`] = `
"<script lang=\\"ts\\">
const __sfc_main = {};

__sfc_main.setup = (__props, __ctx) => {
const val: boolean = 1 <= 2;
return {
val
};
};

export default __sfc_main;
</script>

<template>
<div>{{ val }}</div>
</template>
"
`;

exports[`transform fixtures test/fixtures/ScriptOnly.vue 1`] = `
"<script lang=\\"ts\\">
// <script setup> in comment should not be matched
Expand Down
7 changes: 7 additions & 0 deletions test/fixtures/ScriptLessThanOrEqualTo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup lang="ts">
const val: boolean = 1 <= 2
</script>

<template>
<div>{{ val }}</div>
</template>