Skip to content

fix: (node:50743) [DEP0190] DeprecationWarning #1608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plenty-apes-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"flowbite-react": patch
---

fix: (node:50743) [DEP0190] DeprecationWarning
2 changes: 1 addition & 1 deletion bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
},
"packages/ui": {
"name": "flowbite-react",
"version": "0.12.3",
"version": "0.12.4",
"bin": {
"flowbite-react": "./dist/cli/bin.js",
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/cli/utils/exec-command.ts
Original file line number Diff line number Diff line change
@@ -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"]).
Expand All @@ -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 = "";
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/components/Datepicker/Datepicker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Loading