Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 9799d56

Browse files
authored
fix: allow use <= in script, close #68 (#73)
1 parent 595d749 commit 9799d56

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@vue/ref-transform": "^3.2.21",
5454
"@vue/shared": "^3.2.21",
5555
"defu": "^5.0.0",
56-
"htmlparser2": "^7.2.0",
56+
"htmlparser2": "5.0.1",
5757
"magic-string": "^0.25.7",
5858
"unplugin": "^0.2.21"
5959
},

pnpm-lock.yaml

+20-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/__snapshots__/transform.test.ts.snap

+20
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,26 @@ export default __sfc_main;
649649
"
650650
`;
651651
652+
exports[`transform fixtures test/fixtures/ScriptLessThanOrEqualTo.vue 1`] = `
653+
"<script lang=\\"ts\\">
654+
const __sfc_main = {};
655+
656+
__sfc_main.setup = (__props, __ctx) => {
657+
const val: boolean = 1 <= 2;
658+
return {
659+
val
660+
};
661+
};
662+
663+
export default __sfc_main;
664+
</script>
665+
666+
<template>
667+
<div>{{ val }}</div>
668+
</template>
669+
"
670+
`;
671+
652672
exports[`transform fixtures test/fixtures/ScriptOnly.vue 1`] = `
653673
"<script lang=\\"ts\\">
654674
// <script setup> in comment should not be matched
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup lang="ts">
2+
const val: boolean = 1 <= 2
3+
</script>
4+
5+
<template>
6+
<div>{{ val }}</div>
7+
</template>

0 commit comments

Comments
 (0)