diff --git a/.changeset/plenty-apes-give.md b/.changeset/plenty-apes-give.md new file mode 100644 index 000000000..1bf5aef12 --- /dev/null +++ b/.changeset/plenty-apes-give.md @@ -0,0 +1,5 @@ +--- +"flowbite-react": patch +--- + +fix: (node:50743) [DEP0190] DeprecationWarning diff --git a/bun.lock b/bun.lock index 5d28f8455..75668525a 100644 --- a/bun.lock +++ b/bun.lock @@ -110,7 +110,7 @@ }, "packages/ui": { "name": "flowbite-react", - "version": "0.12.3", + "version": "0.12.4", "bin": { "flowbite-react": "./dist/cli/bin.js", }, diff --git a/packages/ui/src/cli/utils/exec-command.ts b/packages/ui/src/cli/utils/exec-command.ts index b272d88ef..8a2a1ccf9 100644 --- a/packages/ui/src/cli/utils/exec-command.ts +++ b/packages/ui/src/cli/utils/exec-command.ts @@ -1,7 +1,7 @@ import { spawn, type SpawnOptions } from "child_process"; /** - * Runs a shell command asynchronously and captures its output. + * Runs a command asynchronously and captures its output. * * @param {string} command - The command to execute (e.g., "npm"). * @param {string[]} [args=[]] - Arguments for the command (e.g., ["install", "package-name"]). @@ -15,7 +15,7 @@ export function execCommand( options: SpawnOptions = {}, ): Promise<{ stdout: string; stderr: string; exitCode: number }> { return new Promise((resolve, reject) => { - const child = spawn(command, args, { ...options, shell: true }); + const child = spawn(command, args, options); let stdout = ""; let stderr = ""; diff --git a/packages/ui/src/components/Datepicker/Datepicker.test.tsx b/packages/ui/src/components/Datepicker/Datepicker.test.tsx index 050b52f06..0028a2da5 100644 --- a/packages/ui/src/components/Datepicker/Datepicker.test.tsx +++ b/packages/ui/src/components/Datepicker/Datepicker.test.tsx @@ -200,7 +200,10 @@ describe("Components / Datepicker", () => { await userEvent.click(screen.getByRole("textbox")); - expect(screen.getByText(tomorrow.getDate())).toBeDisabled(); + const dateButtons = screen.getAllByText(tomorrow.getDate().toString()); + const disabledButton = dateButtons.find((button) => button.hasAttribute("disabled")); + expect(disabledButton).toBeInTheDocument(); + expect(disabledButton).toBeDisabled(); }); it("should focus the input when ref.current.focus is called", () => {