fix: update

This commit is contained in:
Dunqing 2024-05-13 14:18:09 +08:00
parent e4280baa97
commit 6df17bda2b
7 changed files with 36 additions and 40 deletions

View File

@ -31,6 +31,7 @@
"@antfu/eslint-config": "^2.15.0", "@antfu/eslint-config": "^2.15.0",
"@commitlint/cli": "^19.3.0", "@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2", "@commitlint/config-conventional": "^19.2.2",
"@vitest/ui": "^1.6.0",
"bumpp": "^9.4.0", "bumpp": "^9.4.0",
"eslint": "^9.1.1", "eslint": "^9.1.1",
"lint-staged": "^15.2.2", "lint-staged": "^15.2.2",

View File

@ -74,7 +74,6 @@
"@types/lodash-es": "^4.5.3", "@types/lodash-es": "^4.5.3",
"@types/node": "^20.11.30", "@types/node": "^20.11.30",
"@types/prompts": "^2.4.9", "@types/prompts": "^2.4.9",
"@vitest/ui": "^1.6.0",
"tsup": "^8.0.2", "tsup": "^8.0.2",
"type-fest": "^4.16.0", "type-fest": "^4.16.0",
"typescript": "^5.4.5", "typescript": "^5.4.5",

View File

@ -1,22 +1,22 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transform css vars 1`] = ` exports[`transform css vars 1`] = `
"<script setup lang=\\"ts\\"></script> "<script setup lang="ts"></script>
<template> <template>
<div class=\\"bg-background hover:bg-muted text-primary-foreground sm:focus:text-accent-foreground\\">foo</div> <div class="bg-background hover:bg-muted text-primary-foreground sm:focus:text-accent-foreground">foo</div>
</template>\\"" </template>""
`; `;
exports[`transform css vars 2`] = ` exports[`transform css vars 2`] = `
"<script setup lang=\\"ts\\"></script> "<script setup lang="ts"></script>
<template> <template>
<div class=\\"bg-white hover:bg-stone-100 text-stone-50 sm:focus:text-stone-900 dark:bg-stone-950 dark:hover:bg-stone-800 dark:text-stone-900 dark:sm:focus:text-stone-50\\">foo</div> <div class="bg-white hover:bg-stone-100 text-stone-50 sm:focus:text-stone-900 dark:bg-stone-950 dark:hover:bg-stone-800 dark:text-stone-900 dark:sm:focus:text-stone-50">foo</div>
</template>\\"" </template>""
`; `;
exports[`transform css vars 3`] = ` exports[`transform css vars 3`] = `
"<script setup lang=\\"ts\\"></script> "<script setup lang="ts"></script>
<template> <template>
<div :class=\\"cn('bg-white hover:bg-stone-100 dark:bg-stone-950 dark:hover:bg-stone-800', true && 'text-stone-50 sm:focus:text-stone-900 dark:text-stone-900 dark:sm:focus:text-stone-50')\\">foo</div> <div :class="cn('bg-white hover:bg-stone-100 dark:bg-stone-950 dark:hover:bg-stone-800', true && 'text-stone-50 sm:focus:text-stone-900 dark:text-stone-900 dark:sm:focus:text-stone-50')">foo</div>
</template>\\"" </template>""
`; `;

View File

@ -1,33 +1,33 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transform import 1`] = ` exports[`transform import 1`] = `
"import { Foo } from \\"bar\\" "import { Foo } from "bar"
import { Button } from \\"@/components/ui/button\\" import { Button } from "@/components/ui/button"
import { Label} from \\"ui/label\\" import { Label} from "ui/label"
import { Box } from \\"@/components/box\\" import { Box } from "@/components/box"
import { cn } from \\"@/lib/utils\\" import { cn } from "@/lib/utils"
" "
`; `;
exports[`transform import 2`] = ` exports[`transform import 2`] = `
"import { Foo } from \\"bar\\" "import { Foo } from "bar"
import { Button } from \\"~/src/components/ui/button\\" import { Button } from "~/src/components/ui/button"
import { Label} from \\"ui/label\\" import { Label} from "ui/label"
import { Box } from \\"~/src/components/box\\" import { Box } from "~/src/components/box"
import { cn, foo, bar } from \\"~/lib\\" import { cn, foo, bar } from "~/lib"
import { bar } from \\"@/lib/utils/bar\\" import { bar } from "@/lib/utils/bar"
" "
`; `;
exports[`transform import 3`] = ` exports[`transform import 3`] = `
"import { Foo } from \\"bar\\" "import { Foo } from "bar"
import { Button } from \\"~/src/components/ui/button\\" import { Button } from "~/src/components/ui/button"
import { Label} from \\"ui/label\\" import { Label} from "ui/label"
import { Box } from \\"~/src/components/box\\" import { Box } from "~/src/components/box"
import { cn } from \\"~/src/utils\\" import { cn } from "~/src/utils"
import { bar } from \\"@/lib/utils/bar\\" import { bar } from "@/lib/utils/bar"
" "
`; `;

View File

@ -6,7 +6,7 @@ const array = [1, 2, 3];
</script> </script>
<template> <template>
<div v-bind=\\"{ array }\\">template</div> <div v-bind="{ array }">template</div>
</template> </template>
<style scoped></style> <style scoped></style>
@ -15,7 +15,7 @@ const array = [1, 2, 3];
exports[`transformSFC > defineEmits 1`] = ` exports[`transformSFC > defineEmits 1`] = `
"<script setup> "<script setup>
const emit = defineEmits([\\"foo\\"]); const emit = defineEmits(["foo"]);
</script> </script>
" "
`; `;
@ -32,7 +32,7 @@ const props = defineProps({
exports[`transformSFC > defineProps with external props 1`] = ` exports[`transformSFC > defineProps with external props 1`] = `
"<script setup> "<script setup>
const props = defineProps({ const props = defineProps({
foo: { type: String, required: false, default: \\"bar\\" }, foo: { type: String, required: false, default: "bar" },
a: { type: String, required: true }, a: { type: String, required: true },
b: { type: Number, required: true }, b: { type: Number, required: true },
}); });
@ -44,7 +44,7 @@ export {};
exports[`transformSFC > defineProps with package props 1`] = ` exports[`transformSFC > defineProps with package props 1`] = `
"<script setup> "<script setup>
const props = defineProps({ const props = defineProps({
foo: { type: String, required: false, default: \\"bar\\" }, foo: { type: String, required: false, default: "bar" },
for: { type: String, required: false }, for: { type: String, required: false },
asChild: { type: Boolean, required: false }, asChild: { type: Boolean, required: false },
as: { type: null, required: false }, as: { type: null, required: false },
@ -57,7 +57,7 @@ export {};
exports[`transformSFC > defineProps with withDefaults 1`] = ` exports[`transformSFC > defineProps with withDefaults 1`] = `
"<script setup> "<script setup>
const props = defineProps({ const props = defineProps({
foo: { type: String, required: true, default: \\"bar\\" }, foo: { type: String, required: true, default: "bar" },
}); });
</script> </script>
" "

View File

@ -44,7 +44,6 @@
"@nuxt/schema": "^3.11.2", "@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "^3.12.1", "@nuxt/test-utils": "^3.12.1",
"@types/node": "^20.12.8", "@types/node": "^20.12.8",
"nuxt": "^3.11.2", "nuxt": "^3.11.2"
"vitest": "^1.6.0"
} }
} }

View File

@ -17,6 +17,9 @@ importers:
'@commitlint/config-conventional': '@commitlint/config-conventional':
specifier: ^19.2.2 specifier: ^19.2.2
version: 19.2.2 version: 19.2.2
'@vitest/ui':
specifier: ^1.6.0
version: 1.6.0(vitest@1.6.0)
bumpp: bumpp:
specifier: ^9.4.0 specifier: ^9.4.0
version: 9.4.0 version: 9.4.0
@ -307,9 +310,6 @@ importers:
'@types/prompts': '@types/prompts':
specifier: ^2.4.9 specifier: ^2.4.9
version: 2.4.9 version: 2.4.9
'@vitest/ui':
specifier: ^1.6.0
version: 1.6.0(vitest@1.6.0)
tsup: tsup:
specifier: ^8.0.2 specifier: ^8.0.2
version: 8.0.2(postcss@8.4.38)(typescript@5.4.5) version: 8.0.2(postcss@8.4.38)(typescript@5.4.5)
@ -350,9 +350,6 @@ importers:
nuxt: nuxt:
specifier: ^3.11.2 specifier: ^3.11.2
version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.8)(@unocss/reset@0.59.4)(axios@0.18.1)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.3))(vue@3.4.24(typescript@5.4.5)))(ioredis@5.4.1)(meow@12.1.1)(optionator@0.9.3)(rollup@4.16.3)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.3)(vite@5.2.10(@types/node@20.12.8)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.8)(terser@5.30.4))(vue-tsc@2.0.14(typescript@5.4.5)) version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.8)(@unocss/reset@0.59.4)(axios@0.18.1)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.3))(vue@3.4.24(typescript@5.4.5)))(ioredis@5.4.1)(meow@12.1.1)(optionator@0.9.3)(rollup@4.16.3)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.3)(vite@5.2.10(@types/node@20.12.8)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.8)(terser@5.30.4))(vue-tsc@2.0.14(typescript@5.4.5))
vitest:
specifier: ^1.6.0
version: 1.6.0(@types/node@20.12.8)(@vitest/ui@1.6.0)(terser@5.30.4)
packages: packages: