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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
if: ${{ failure() }}
with:
name: e2e-attachments-${{ matrix.browser }}-${{ matrix.shardIndex }}
path: tests/.vitest-attachments/
path: tests/.vitest/attachments/
# The attachments dir is a dot-directory; without this the action
# silently uploads nothing ("No files were found").
include-hidden-files: true
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
if: ${{ failure() }}
with:
name: e2e-attachments-pdf-${{ matrix.browser }}
path: tests/.vitest-attachments/
path: tests/.vitest/attachments/
include-hidden-files: true
retention-days: 7

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ examples/*/types
tsconfig.tsbuildinfo
# testing
coverage
# Vitest 5 reports, attachments, and failure screenshots.
.vitest/
# Vitest's attachment store (failure screenshots / diffs). Accumulates across
# runs; the HTML reporter copies what it needs into playwright-report/data,
# so the originals are unreferenced cruft.
Expand Down Expand Up @@ -47,4 +49,4 @@ release
.claude/*
!.claude/skills
.playwright-cli
.claude/skills/playwright-cli/screenshots
.claude/skills/playwright-cli/screenshots
18 changes: 11 additions & 7 deletions packages/ariakit/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/ariakit"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/ariakit"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
environment: "jsdom",
setupFiles: ["./vitestSetup.ts"],
},
Expand Down
18 changes: 11 additions & 7 deletions packages/code-block/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/code-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/code-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
setupFiles: ["./vitestSetup.ts"],
},
plugins: [webpackStats() as any],
Expand Down
18 changes: 11 additions & 7 deletions packages/core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ export default defineConfig({
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/core"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/core"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
environment: "jsdom",
setupFiles: ["./vitestSetup.ts"],
// `.browser.test` files need a real browser; the tests package's browser
Expand Down
86 changes: 46 additions & 40 deletions packages/dev-scripts/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,58 @@ export default defineConfig({
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir .",
input: [
...buildCacheInputs("packages/dev-scripts"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/dev-scripts"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
"gen:examples": {
command: "tsx examples/gen.ts",
input: [
{ pattern: "examples/*/*/.bnexample.json", base: "workspace" },
{ pattern: "examples/*/*/README.md", base: "workspace" },
{ pattern: "examples/*/*/src/**", base: "workspace" },
{ pattern: "packages/dev-scripts/examples/**", base: "workspace" },
// The testDocumentBlocks template copies this file verbatim into
// the examples - edits to it must re-run generation.
{ pattern: "shared/testDocumentBlocks.ts", base: "workspace" },
],
output: [
{ pattern: "examples/*/*/package.json", base: "workspace" },
{ pattern: "examples/*/*/tsconfig.json", base: "workspace" },
{ pattern: "examples/*/*/vite.config.ts", base: "workspace" },
{ pattern: "examples/*/*/index.html", base: "workspace" },
{ pattern: "examples/*/*/main.tsx", base: "workspace" },
{ pattern: "examples/*/*/tailwind.css", base: "workspace" },
{
pattern: "examples/*/*/src/testDocumentBlocks.ts",
base: "workspace",
},
{ pattern: "playground/src/examples.gen.tsx", base: "workspace" },
],
cache: {
input: [
{ pattern: "examples/*/*/.bnexample.json", base: "workspace" },
{ pattern: "examples/*/*/README.md", base: "workspace" },
{ pattern: "examples/*/*/src/**", base: "workspace" },
{ pattern: "packages/dev-scripts/examples/**", base: "workspace" },
// The testDocumentBlocks template copies this file verbatim into
// the examples - edits to it must re-run generation.
{ pattern: "shared/testDocumentBlocks.ts", base: "workspace" },
],
output: [
{ pattern: "examples/*/*/package.json", base: "workspace" },
{ pattern: "examples/*/*/tsconfig.json", base: "workspace" },
{ pattern: "examples/*/*/vite.config.ts", base: "workspace" },
{ pattern: "examples/*/*/index.html", base: "workspace" },
{ pattern: "examples/*/*/main.tsx", base: "workspace" },
{ pattern: "examples/*/*/tailwind.css", base: "workspace" },
{
pattern: "examples/*/*/src/testDocumentBlocks.ts",
base: "workspace",
},
{ pattern: "playground/src/examples.gen.tsx", base: "workspace" },
],
},
},
"gen:docs": {
command: "tsx examples/genDocs.ts",
input: [
{ pattern: "examples/*/*/.bnexample.json", base: "workspace" },
{ pattern: "examples/*/*/README.md", base: "workspace" },
{ pattern: "examples/*/*/src/**", base: "workspace" },
{ pattern: "packages/dev-scripts/examples/**", base: "workspace" },
],
output: [
{
pattern: "docs/components/example/generated/**",
base: "workspace",
},
{ pattern: "docs/content/examples/**", base: "workspace" },
],
cache: {
input: [
{ pattern: "examples/*/*/.bnexample.json", base: "workspace" },
{ pattern: "examples/*/*/README.md", base: "workspace" },
{ pattern: "examples/*/*/src/**", base: "workspace" },
{ pattern: "packages/dev-scripts/examples/**", base: "workspace" },
],
output: [
{
pattern: "docs/components/example/generated/**",
base: "workspace",
},
{ pattern: "docs/content/examples/**", base: "workspace" },
],
},
},
},
},
Expand Down
18 changes: 11 additions & 7 deletions packages/diagram-block/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/diagram-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/diagram-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
setupFiles: ["./vitestSetup.ts"],
// `.browser.test` files need a real browser; the tests package's
// browser suite runs them.
Expand Down
18 changes: 11 additions & 7 deletions packages/mantine/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/mantine"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/mantine"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
environment: "jsdom",
setupFiles: ["./vitestSetup.ts"],
},
Expand Down
18 changes: 11 additions & 7 deletions packages/math-block/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/math-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/math-block"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
setupFiles: ["./vitestSetup.ts"],
// `.browser.test` files need a real browser; the tests package's
// browser suite runs them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,14 @@ describe("VersioningSidebar", () => {
});
await expect
.element(page.getByRole("alert"))
.toHaveTextContent(de.versioning.history_load_failed);
.toMatchTextContent(de.versioning.history_load_failed);
expect(listSnapshots).toHaveBeenCalledTimes(3);
await act(async () => {
await userEvent.click(rows()[1]!);
});
await expect
.element(page.getByRole("status", { name: "Preview" }))
.toHaveTextContent("a");
.toMatchTextContent("a");
await expect.element(loadMore).toBeEnabled();
await act(async () => {
await loadMore.click();
Expand All @@ -505,7 +505,7 @@ describe("VersioningSidebar", () => {
});
await expect
.element(page.getByRole("status", { name: "Preview" }))
.toHaveTextContent("a / b");
.toMatchTextContent("a / b");
});

it.each([undefined, "Published"])(
Expand Down
18 changes: 11 additions & 7 deletions packages/react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/react"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/react"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
environment: "jsdom",
setupFiles: ["./vitestSetup.ts"],
// `.browser.test` files need a real browser; the tests package's
Expand Down
18 changes: 11 additions & 7 deletions packages/server-util/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ export default defineConfig(
build: {
command:
"tsc --project tsconfig.json --composite false --incremental false --rootDir . && vp build",
input: [
...buildCacheInputs("packages/server-util"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
cache: {
input: [
...buildCacheInputs("packages/server-util"),
{ pattern: "!**/*.tsbuildinfo", base: "workspace" },
],
// `types/**` must be declared too: a cache replay that restores only
// dist/ leaves consumers without declarations (tsc is skipped).
output: ["dist/**", "types/**", "!dist/*.tsbuildinfo"],
},
},
},
},
test: {
// Preserve Vitest 4 mock history during the toolchain upgrade.
clearMocks: false,
setupFiles: ["./vitestSetup.ts"],
},
plugins: [webpackStats() as any],
Expand Down
Loading
Loading