Currently [`docs/site/`](https://github.com/a2ui-project/a2ui/tree/752120641/docs/site) is managed with `npm` (`package-lock.json`) outside the root Yarn workspaces. Because the root [`package.json`](https://github.com/a2ui-project/a2ui/blob/752120641/package.json#L4) sets `"packageManager": "yarn@4.13.0"`, running `npm` in `docs/site/` requires setting `COREPACK_ENABLE_STRICT=0` both locally and in CI ([`.github/workflows/docs.yml`](https://github.com/a2ui-project/a2ui/blob/752120641/.github/workflows/docs.yml#L96-L97) and [`.github/workflows/docs_site_preview.yml`](https://github.com/a2ui-project/a2ui/blob/752120641/.github/workflows/docs_site_preview.yml#L52-L53)). [`samples/community/`](https://github.com/a2ui-project/a2ui/tree/752120641/samples/community) already shows how to keep a directory isolated from the root workspace (and from `web_ci.yml` / root `yarn.lock`) while still using Yarn Berry (`yarn@4.13.0`): it has its own [`package.json`](https://github.com/a2ui-project/a2ui/blob/752120641/samples/community/package.json#L5), [`yarn.lock`](https://github.com/a2ui-project/a2ui/blob/752120641/samples/community/yarn.lock), and [`.yarnrc.yml`](https://github.com/a2ui-project/a2ui/blob/752120641/samples/community/.yarnrc.yml). ## Proposed changes 1. Add `"packageManager": "yarn@4.13.0"` to [`docs/site/package.json`](https://github.com/a2ui-project/a2ui/blob/752120641/docs/site/package.json). 2. Add `docs/site/.yarnrc.yml` with `nodeLinker: node-modules` (matching the root and `samples/community/` configurations). 3. Replace `docs/site/package-lock.json` with `docs/site/yarn.lock` generated by `yarn --cwd docs/site install`. 4. Update [`.github/workflows/docs.yml`](https://github.com/a2ui-project/a2ui/blob/752120641/.github/workflows/docs.yml), [`.github/workflows/docs_site_preview.yml`](https://github.com/a2ui-project/a2ui/blob/752120641/.github/workflows/docs_site_preview.yml), and `docs/site/README.md` to run `yarn --cwd docs/site ...` instead of `npm --prefix docs/site ...`, switch `setup-node` `cache` from `"npm"` to `"yarn"`, and remove `COREPACK_ENABLE_STRICT: "0"`. ## Verification 1. `yarn --cwd docs/site install --immutable` succeeds without `COREPACK_ENABLE_STRICT=0`. 2. `yarn --cwd docs/site test`, `yarn --cwd docs/site check`, and `yarn --cwd docs/site build` pass. 3. Root `yarn test:all` and `yarn build:all` continue to exclude `docs/site/`.
Activity
[-][BUG]: Consider using yarn for `docs/site`.[/-][+][RFC]: Consider using yarn for `docs/site`.[/+]docs(site): link #4220 in local development section (#4209)
docs: remove docs/public and MkDocs scaffolding (#4209) (#4213)