From f760e80ab0e188e5733fac2205d55d075a932670 Mon Sep 17 00:00:00 2001
From: gaokefei <260480378@qq.com>
Date: Sun, 3 Dec 2023 02:06:40 +0800
Subject: [PATCH 1/2] fix(jsx-directive): execute self-closing-tag first
---
playground/src/components/Comp.vue | 2 +-
src/index.ts | 1 +
src/rules/jsx-directive/v-tag.yml | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/playground/src/components/Comp.vue b/playground/src/components/Comp.vue
index 8a219fe..c4b46ee 100644
--- a/playground/src/components/Comp.vue
+++ b/playground/src/components/Comp.vue
@@ -5,7 +5,7 @@
bottom
-
+
Fragment
diff --git a/src/index.ts b/src/index.ts
index 3f46c61..290e24a 100755
--- a/src/index.ts
+++ b/src/index.ts
@@ -96,6 +96,7 @@ async function useTsx(cb = () => {}, action = 'clean') {
}
if (['jsx-directive', 'setup-sfc'].includes(macro)) {
+ await $`${sg} scan -c ${config}.yml -U --filter '^self-closing-tag' ${target}`
await $`${sg} scan -c ${config}.yml -U --filter '^v-' ${target}`
await $`${sg} scan -c ${config}.yml -U --filter '^${macro === 'setup-sfc' ? 'export-render' : render}' ${target}`
await useTsx(async () => {
diff --git a/src/rules/jsx-directive/v-tag.yml b/src/rules/jsx-directive/v-tag.yml
index 884b96f..912cc05 100644
--- a/src/rules/jsx-directive/v-tag.yml
+++ b/src/rules/jsx-directive/v-tag.yml
@@ -1,4 +1,4 @@
-id: v-self-closing-tag
+id: self-closing-tag
language: html
rule:
kind: start_tag
From 53c0dc11dbce661a76e2d16a813795b3db9692ac Mon Sep 17 00:00:00 2001
From: gaokefei <260480378@qq.com>
Date: Sun, 3 Dec 2023 02:07:34 +0800
Subject: [PATCH 2/2] chore: release v1.0.10
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9b91a84..370bec4 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@vue-macros/cli",
"type": "module",
- "version": "1.0.9",
+ "version": "1.0.10",
"packageManager": "pnpm@8.10.5",
"description": "Rewriting at vue macros powered by ast-grep.",
"author": "zhiyuanzmj ",