From bbdfcc136ea6151cc21c1f9420e3a9fbe6051f5f Mon Sep 17 00:00:00 2001 From: Sutu Sebastian Date: Mon, 28 Jul 2025 11:36:54 +0300 Subject: [PATCH 1/3] fix node deprecation warning --- bun.lock | 2 +- packages/ui/src/cli/utils/exec-command.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 = ""; From 0f0841fdeba84aa1b57375d83b1b15154f74e785 Mon Sep 17 00:00:00 2001 From: Sutu Sebastian Date: Mon, 28 Jul 2025 11:40:05 +0300 Subject: [PATCH 2/3] add changeset --- .changeset/plenty-apes-give.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/plenty-apes-give.md 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 From f9b359ae2d641f6dd4dc1c886f2e35a74749819c Mon Sep 17 00:00:00 2001 From: Sutu Sebastian Date: Mon, 28 Jul 2025 11:59:12 +0300 Subject: [PATCH 3/3] test(Datepicker): fix disabled button check in tests --- packages/ui/src/components/Datepicker/Datepicker.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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", () => {