From 03948ded7f578d81f92c5288c5e91ee9771b99ae Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Nov 2026 15:38:52 +0100 Subject: [PATCH 1/3] chore(ai): document `typecheck:tests` and the checks to run before pushing (AI-assisted) Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index c4d0e3d8690e..31d2bfb00e83 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,6 +83,7 @@ The main CLI commands available - `pnpm test` - Run all Vitest tests - `pnpm test ` - Run single test file - `pnpm --filter test` - Run tests in a specific package: +- `pnpm typecheck:tests` - Type check the test files, which Vitest strips without checking. Needs built packages When a test is failing, run only that test file until it passes. Make sure to run all tests at the end to ensure there's no unexpected failure in other places. @@ -105,6 +106,8 @@ Update Vitest failing snapshots with the `-u` option. Do not blindly update snap - `pnpm lint:deps` - Check that `pnpm-lock.yaml` is deduplicated (`pnpm dedupe --check`) - Add `:fix` suffix to auto-fix issues (e.g., `pnpm lint:js:fix`) +Before pushing, run `pnpm lint`, `pnpm typecheck:tests` and the tests of the code you changed, as CI does. + The exports of package entry points (`package.json` `main` and `exports`) are public API, even when undocumented (see the comments in `packages/docusaurus-theme-common/src/index.ts`) or unused by the monorepo: third-party sites, plugins and themes use them. Never remove them as dead code: report them, and only remove one when the maintainer explicitly decides to, as a breaking change. `/internal` entry points (like `@docusaurus/theme-common/internal`) have no stability guarantee, but removing their exports is still a breaking change PR. To fix CSpell unknown words, don't run `pnpm lint:spelling:fix`: it checks the whole repository and is slow. Instead: From 643cce97645d2fd9b9cba5d415f7c4a1b24a11e2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Nov 2026 15:49:47 +0100 Subject: [PATCH 2/3] chore(ai): mention the website typecheck for website tests (AI-assisted) Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 31d2bfb00e83..1008e5991c21 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,7 +83,7 @@ The main CLI commands available - `pnpm test` - Run all Vitest tests - `pnpm test ` - Run single test file - `pnpm --filter test` - Run tests in a specific package: -- `pnpm typecheck:tests` - Type check the test files, which Vitest strips without checking. Needs built packages +- `pnpm typecheck:tests` - Type check the test files, which Vitest strips without checking. Needs built packages. Website tests are type checked by `pnpm --filter website typecheck` When a test is failing, run only that test file until it passes. Make sure to run all tests at the end to ensure there's no unexpected failure in other places. @@ -106,7 +106,7 @@ Update Vitest failing snapshots with the `-u` option. Do not blindly update snap - `pnpm lint:deps` - Check that `pnpm-lock.yaml` is deduplicated (`pnpm dedupe --check`) - Add `:fix` suffix to auto-fix issues (e.g., `pnpm lint:js:fix`) -Before pushing, run `pnpm lint`, `pnpm typecheck:tests` and the tests of the code you changed, as CI does. +Before pushing, run `pnpm lint`, `pnpm typecheck:tests` (and `pnpm --filter website typecheck` for website changes) and the tests of the code you changed, as CI does. The exports of package entry points (`package.json` `main` and `exports`) are public API, even when undocumented (see the comments in `packages/docusaurus-theme-common/src/index.ts`) or unused by the monorepo: third-party sites, plugins and themes use them. Never remove them as dead code: report them, and only remove one when the maintainer explicitly decides to, as a breaking change. `/internal` entry points (like `@docusaurus/theme-common/internal`) have no stability guarantee, but removing their exports is still a breaking change PR. From db532ac7d4d6779874cada54c1e9612f1685c3fc Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Nov 2026 18:36:12 +0100 Subject: [PATCH 3/3] chore(ai): also run the website typecheck for package changes Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 1008e5991c21..cbfa5ca6ba3a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -106,7 +106,7 @@ Update Vitest failing snapshots with the `-u` option. Do not blindly update snap - `pnpm lint:deps` - Check that `pnpm-lock.yaml` is deduplicated (`pnpm dedupe --check`) - Add `:fix` suffix to auto-fix issues (e.g., `pnpm lint:js:fix`) -Before pushing, run `pnpm lint`, `pnpm typecheck:tests` (and `pnpm --filter website typecheck` for website changes) and the tests of the code you changed, as CI does. +Before pushing, run `pnpm lint`, `pnpm typecheck:tests` (and `pnpm --filter website typecheck` for website or package changes, after building the changed packages) and the tests of the code you changed, as CI does. The exports of package entry points (`package.json` `main` and `exports`) are public API, even when undocumented (see the comments in `packages/docusaurus-theme-common/src/index.ts`) or unused by the monorepo: third-party sites, plugins and themes use them. Never remove them as dead code: report them, and only remove one when the maintainer explicitly decides to, as a breaking change. `/internal` entry points (like `@docusaurus/theme-common/internal`) have no stability guarantee, but removing their exports is still a breaking change PR.