chore(cli): update vitest and snapshots

This commit is contained in:
shadcn
2024-08-13 14:53:23 +04:00
parent 9f156a1b89
commit 6684b40e4c
6 changed files with 683 additions and 357 deletions

View File

@@ -63,7 +63,7 @@
"tsx": "^4.1.4",
"turbo": "^1.9.9",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.31.1"
"vitest": "^2.0.5"
},
"devDependencies": {
"@types/node": "^20.11.27",

View File

@@ -1,33 +1,33 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transform css vars 1`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return <div className=\\"bg-background hover:bg-muted text-primary-foreground sm:focus:text-accent-foreground\\">foo</div>
}\\"
return <div className="bg-background hover:bg-muted text-primary-foreground sm:focus:text-accent-foreground">foo</div>
}"
"
`;
exports[`transform css vars 2`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return <div className=\\"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>
}\\"\\"
return <div className="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>
}""
"
`;
exports[`transform css vars 3`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return <div className={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>
}\\"\\"
return <div className={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>
}""
"
`;
exports[`transform css vars 4`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return <div className={cn(\\"bg-white border border-stone-200 dark:bg-stone-950 dark:border-stone-800\\")}>foo</div>
}\\"\\"
return <div className={cn("bg-white border border-stone-200 dark:bg-stone-950 dark:border-stone-800")}>foo</div>
}""
"
`;

View File

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

View File

@@ -1,31 +1,31 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transform rsc 1`] = `
"import * as React from \\"react\\"
import { Foo } from \\"bar\\"
"import * as React from "react"
import { Foo } from "bar"
"
`;
exports[`transform rsc 2`] = `
"\\"use client\\"
""use client"
import * as React from \\"react\\"
import { Foo } from \\"bar\\"
import * as React from "react"
import { Foo } from "bar"
"
`;
exports[`transform rsc 3`] = `
" import * as React from \\"react\\"
import { Foo } from \\"bar\\"
" import * as React from "react"
import { Foo } from "bar"
"
`;
exports[`transform rsc 4`] = `
"\\"use foo\\"
""use foo"
import * as React from \\"react\\"
import { Foo } from \\"bar\\"
import * as React from "react"
import { Foo } from "bar"
\\"use client\\"
"use client"
"
`;

View File

@@ -1,35 +1,35 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transform tailwind prefix 1`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return (
<div
className=\\"tw-bg-background hover:tw-bg-muted tw-text-primary-foreground sm:focus:tw-text-accent-foreground\\">foo</div>
className="tw-bg-background hover:tw-bg-muted tw-text-primary-foreground sm:focus:tw-text-accent-foreground">foo</div>
);
}
"
`;
exports[`transform tailwind prefix 2`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return (
<div
className=\\"tw-bg-white hover:tw-bg-stone-100 tw-text-stone-50 sm:focus:tw-text-stone-900 dark:tw-bg-stone-950 dark:hover:tw-bg-stone-800 dark:tw-text-stone-900 dark:sm:focus:tw-text-stone-50\\">foo</div>
className="tw-bg-white hover:tw-bg-stone-100 tw-text-stone-50 sm:focus:tw-text-stone-900 dark:tw-bg-stone-950 dark:hover:tw-bg-stone-800 dark:tw-text-stone-900 dark:sm:focus:tw-text-stone-50">foo</div>
);
}
"
`;
exports[`transform tailwind prefix 3`] = `
"import * as React from \\"react\\"
"import * as React from "react"
export function Foo() {
return (
<div
className={cn(
\\"tw-bg-white hover:tw-bg-stone-100 dark:tw-bg-stone-950 dark:hover:tw-bg-stone-800\\",
true && \\"tw-text-stone-50 sm:focus:tw-text-stone-900 dark:tw-text-stone-900 dark:sm:focus:tw-text-stone-50\\"
"tw-bg-white hover:tw-bg-stone-100 dark:tw-bg-stone-950 dark:hover:tw-bg-stone-800",
true && "tw-text-stone-50 sm:focus:tw-text-stone-900 dark:tw-text-stone-900 dark:sm:focus:tw-text-stone-50"
)}>foo</div>
);
}

910
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff