diff --git a/.changeset/healthy-jokes-explain.md b/.changeset/healthy-jokes-explain.md new file mode 100644 index 000000000..702d3c963 --- /dev/null +++ b/.changeset/healthy-jokes-explain.md @@ -0,0 +1,5 @@ +--- +"shadcn-svelte": patch +--- + +- Strip unicode characters from CLI input diff --git a/packages/cli/src/utils/get-config.ts b/packages/cli/src/utils/get-config.ts index faf387b87..24d6c1900 100644 --- a/packages/cli/src/utils/get-config.ts +++ b/packages/cli/src/utils/get-config.ts @@ -25,8 +25,12 @@ export const rawConfigSchema = z // cssVariables: z.boolean().default(true) }), aliases: z.object({ - components: z.string(), - utils: z.string() + components: z + .string() + .transform((v) => v.replace(/[\u{0080}-\u{FFFF}]/gu, "")), + utils: z + .string() + .transform((v) => v.replace(/[\u{0080}-\u{FFFF}]/gu, "")) }) }) .strict();