Skip to content

Commit 1c01670

Browse files
dependabot[bot]IzumiSyCopilot
authored
Chore(deps): bump tsdown from 0.21.7 to 0.22.0 (#268)
* Chore(deps): bump tsdown from 0.21.7 to 0.22.0 Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.21.7 to 0.22.0. - [Release notes](https://github.com/rolldown/tsdown/releases) - [Commits](rolldown/tsdown@v0.21.7...v0.22.0) --- updated-dependencies: - dependency-name: tsdown dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update lockfile * chore: use pnpm catalog for tsdown in package manifests Agent-Logs-Url: https://github.com/tailor-platform/app-shell/sessions/ff0878c7-429c-4fe6-b611-7ab0da0ca408 Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com> * fix: resolve flaky sidebar test by awaiting deferred nav items The test was racing against the async navigation loader. The waitFor now retries until the sidebar link actually renders instead of passing early when the route component text appears. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: IzumiSy <beetle-noise@gmx.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IzumiSy <982850+IzumiSy@users.noreply.github.com>
1 parent bf42547 commit 1c01670

5 files changed

Lines changed: 232 additions & 201 deletions

File tree

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
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",
4848
"vitest": "catalog:"
4949
},

packages/vite-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"devDependencies": {
5050
"@types/node": "catalog:",
51-
"tsdown": "^0.21.7",
51+
"tsdown": "catalog:",
5252
"typescript": "^5",
5353
"vite": "catalog:",
5454
"vitest": "catalog:"

0 commit comments

Comments
 (0)