Skip to content

Commit 108c64a

Browse files
Merge branch 'main' into feat/auth/loading-component
2 parents f918ed3 + 6bbe10c commit 108c64a

12 files changed

Lines changed: 744 additions & 745 deletions

File tree

.github/workflows/ci-e2e.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
2222
persist-credentials: false
23+
# Running in a container causes git "dubious ownership" errors because the
24+
# workspace owner differs from the container user. Mark it as safe so that
25+
# lefthook install (triggered by pnpm prepare) can run git commands.
26+
- name: Fix git ownership
27+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2328
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
2429
with:
2530
run_install: false

e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@types/react-dom": "catalog:",
1919
"@vitejs/plugin-react": "catalog:",
2020
"dotenv": "^16.5.0",
21-
"react": "^19.2.5",
22-
"react-dom": "^19.2.5",
21+
"react": "catalog:",
22+
"react-dom": "catalog:",
2323
"tailwindcss": "catalog:",
2424
"typescript": "catalog:",
2525
"vite": "catalog:"

examples/nextjs-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"@hookform/resolvers": "^5.2.2",
1313
"@tailor-platform/app-shell": "workspace:*",
1414
"next": "16.2.6",
15-
"react": "^19.2.5",
16-
"react-dom": "^19.2.5",
15+
"react": "catalog:",
16+
"react-dom": "catalog:",
1717
"react-hook-form": "^7.71.2",
1818
"zod": "^4.4.3"
1919
},

examples/vite-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"dependencies": {
1313
"@tailor-platform/app-shell": "workspace:*",
1414
"lucide-react": "^1.8.0",
15-
"react": "^19.2.5",
16-
"react-dom": "^19.2.5",
15+
"react": "catalog:",
16+
"react-dom": "catalog:",
1717
"tailwindcss": "catalog:"
1818
},
1919
"devDependencies": {

lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pre-commit:
2+
parallel: true
3+
commands:
4+
oxfmt:
5+
glob: "*.{ts,tsx,js,jsx,mjs,cjs,json,jsonc,md,mdx,yaml,yml,css,html}"
6+
# --no-error-on-unmatched-pattern: oxfmt has built-in ignore rules (lock files,
7+
# CHANGELOGs, etc.) that may exclude all staged files after lefthook's glob
8+
# matches them. Without this flag, oxfmt exits with code 2 when no files remain.
9+
run: pnpm exec oxfmt --no-error-on-unmatched-pattern {staged_files}
10+
stage_fixed: true

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
"fmt": "oxfmt",
1111
"fmt:check": "oxfmt --check",
1212
"changeset:create": "changeset",
13-
"changeset:publish": "pnpm build && changeset publish"
13+
"changeset:publish": "pnpm build && changeset publish",
14+
"prepare": "lefthook install"
1415
},
1516
"devDependencies": {
1617
"@changesets/cli": "^2.31.0",
18+
"lefthook": "2.1.6",
1719
"oxfmt": "catalog:",
1820
"oxlint": "catalog:",
1921
"turbo": "^2.9.14"

packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"react-hook-form": "^7.71.2",
6464
"react-router": "^7.14.1",
6565
"sonner": "^2.0.7",
66-
"tailwind-merge": "^3.5.0"
66+
"tailwind-merge": "^3.6.0"
6767
},
6868
"devDependencies": {
6969
"@tailwindcss/postcss": "catalog:",
@@ -77,16 +77,16 @@
7777
"@vitejs/plugin-react": "catalog:",
7878
"happy-dom": "^20.6.2",
7979
"postcss": "^8",
80-
"react": "^19.2.5",
81-
"react-dom": "^19.2.5",
80+
"react": "catalog:",
81+
"react-dom": "catalog:",
8282
"tailwindcss": "catalog:",
8383
"tw-animate-css": "^1.4.0",
8484
"typescript": "^5",
8585
"vite": "catalog:",
8686
"vite-plugin-dts": "^4.5.0",
8787
"vite-plugin-externalize-deps": "^0.10.0",
8888
"vite-tsconfig-paths": "^6.1.1",
89-
"vitest": "^4.1.4"
89+
"vitest": "catalog:"
9090
},
9191
"peerDependencies": {
9292
"react": ">= 19",

packages/core/src/components/sidebar/default-sidebar.test.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render, screen, cleanup, waitFor } from "@testing-library/react";
2-
import { describe, it, expect, afterEach } from "vitest";
2+
import { describe, it, expect, afterEach, assert } from "vitest";
33
import { MemoryRouter } from "react-router";
44
import { SidebarProvider } from "@/components/sidebar";
55
import { AppShellConfigContext, type RootConfiguration } from "@/contexts/appshell-context";
@@ -129,16 +129,17 @@ describe("DefaultSidebar auto-generation", () => {
129129
</AppShell>,
130130
);
131131

132-
await waitFor(() => {
133-
expect(screen.getAllByText("Overview").length).toBeGreaterThan(0);
132+
// waitFor retries until the callback stops throwing, so the assert
133+
// must stay inside to wait for the deferred nav items to render.
134+
const overviewLink = await waitFor(() => {
135+
const sidebar = document.querySelector('[data-slot="sidebar"]')!;
136+
const links = sidebar.querySelectorAll("a");
137+
const link = Array.from(links).find((el) => el.textContent === "Overview");
138+
assert(link, "Expected 'Overview' link to be rendered in the sidebar");
139+
return link;
134140
});
135141

136-
const sidebar = document.querySelector('[data-slot="sidebar"]')!;
137-
const links = sidebar.querySelectorAll("a");
138-
const overviewLink = Array.from(links).find((link) => link.textContent === "Overview");
139-
140-
expect(overviewLink).toBeDefined();
141-
expect(overviewLink!.className).toContain("astw:bg-sidebar-accent");
142+
expect(overviewLink.className).toContain("astw:bg-sidebar-accent");
142143
});
143144

144145
it("excludes componentless resources from sidebar links", async () => {

packages/sdk-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
"@tailor-platform/app-shell": "workspace:*",
4444
"@tailor-platform/sdk": "^1.45.1",
4545
"oxlint": "catalog:",
46-
"tsdown": "^0.21.7",
46+
"tsdown": "catalog:",
4747
"typescript": "^5",
48-
"vitest": "^4"
48+
"vitest": "catalog:"
4949
},
5050
"peerDependencies": {
5151
"@tailor-platform/sdk": ">= 1.0.0"

packages/vite-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
},
4949
"devDependencies": {
5050
"@types/node": "catalog:",
51-
"tsdown": "^0.21.7",
51+
"tsdown": "catalog:",
5252
"typescript": "^5",
5353
"vite": "catalog:",
54-
"vitest": "^4.1.4"
54+
"vitest": "catalog:"
5555
},
5656
"peerDependencies": {
5757
"vite": ">= 5"

0 commit comments

Comments
 (0)