Skip to content
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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
verify:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
- run: bun install --frozen-lockfile
- run: bun run typecheck
- run: bun run lint
- run: bun run dep-guard
- run: bun test
- run: bun run build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Licensed LGPL-2.1-only (see `LICENSE`).

## Install

Not published to npm yet.
Not published to npm yet. Requires Node.js 24 LTS or later.


```bash
bun add github:corbitsdev/react-ui react react-dom lucide-react sonner @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-slot @radix-ui/react-tooltip
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"description": "React components for agent and workflow surfaces.",
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
"license": "LGPL-2.1-only",
"engines": {
"node": ">=24"
},
"type": "module",
"sideEffects": [
"**/*.css"
Expand Down
8 changes: 6 additions & 2 deletions src/hooks/use-controllable-state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ describe("useControllableState", () => {

describe("controlled/uncontrolled transition warning", () => {
let errorSpy: ReturnType<typeof mock>;
const originalError = console.error;

beforeEach(() => {
errorSpy = mock(() => {});
console.error = errorSpy as unknown as typeof console.error;
});

afterEach(() => {
// @ts-expect-error restoring the built-in after stubbing it above
delete console.error;
console.error = originalError;
});

test("logs once when an uncontrolled caller starts passing a value", () => {
Expand Down Expand Up @@ -107,4 +107,8 @@ describe("useControllableState", () => {
controlled.unmount();
});
});

test("console.error is a function after warning spies restore", () => {
expect(typeof console.error).toBe("function");
});
});
8 changes: 6 additions & 2 deletions src/hooks/use-dismissable-popover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ describe("useDismissablePopover", () => {

describe("controlled/uncontrolled transition warning", () => {
let errorSpy: ReturnType<typeof mock>;
const originalError = console.error;

beforeEach(() => {
errorSpy = mock(() => {});
console.error = errorSpy as unknown as typeof console.error;
});

afterEach(() => {
// @ts-expect-error restoring the built-in after stubbing it above
delete console.error;
console.error = originalError;
});

test("logs once when an uncontrolled caller starts passing open", () => {
Expand All @@ -143,4 +143,8 @@ describe("useDismissablePopover", () => {
handle.unmount();
});
});

test("console.error is a function after warning spies restore", () => {
expect(typeof console.error).toBe("function");
});
});
Loading