# compat-workspaces This directory contains the pnpm sub-workspace used to install legacy Fluid Framework packages for compatibility testing. The workspace is installed automatically when `pnpm install` is run from the repo root (via the `postinstall` hook in `test-version-utils/package.json`). ## Structure ``` compat-workspaces/ explicit-versions.mjs # Human-maintained: pinned versions needed by specific tests generated-versions.cjs # Machine-generated: resolved version manifest (do not edit) full/ package.json # Workspace root pnpm-workspace.yaml # Workspace config .npmrc # Registry config pnpm-lock.yaml # Committed lockfile (regenerated by update-compat-versions) / package.json # Per-version dependencies (machine-generated) ``` ## Machine-generated files **`generated-versions.cjs`** — Written on every `update-compat-versions` run. Contains exact versions resolved from the registry for: - **N-1:** the latest release in the previous release band. - **OCV:** the exact `oldestCompatibleVersion` in [`src/compatConfig.ts`](../src/compatConfig.ts). - **Cross-client:** the latest patch of each selected checkpoint's earliest minor, resolved independently of OCV. - **FULL:** the latest release in each band from **N-2** down to the OCV floor. These versions are installed for opt-in FULL testing; they are not part of the default matrix. The manifest also includes any pinned versions from `explicit-versions.mjs`. See the [version-selection documentation](../README.md#legacy-version-defaults-and-installation) for release-band rules. Do not edit the manifest by hand. **`full//package.json`** — One file per version, listing the Fluid packages to install for that version. Regenerated by the update script. Do not edit by hand. **`full/pnpm-lock.yaml`** — Committed lockfile. Regenerated by `pnpm install --no-frozen-lockfile` at the end of each update-compat-versions run. ## Updating compat versions After a Fluid Framework version bump, run from `packages/test/test-version-utils`: ``` pnpm run update-compat-versions ``` Then commit all changed files in this directory, including `generated-versions.cjs` and `pnpm-lock.yaml`. See `scripts/updateCompatVersions.ts` for details on what the script does.