# Monorepo coupling audit (CFA-1847)

Build/test tooling in this repo that assumes canvas-rce lives inside the
canvas-lms monorepo, and what breaks if it moves to a separate repo/workspace.

## packages/canvas-rce/jest.config.js

References `<rootDir>/../../jest/stubInstUi.js` (canvas-lms's top-level
`jest/` dir). Outside the monorepo there is no `../../jest` to resolve to;
the stub would need to be vendored into canvas-rce itself or published as
a shared dev-dependency.

## script/webpack_watch_es_packages.sh

Hardcodes `PACKAGES=("canvas-rce" "canvas-media")` and drives both builds
with `pnpm --dir packages/$PACKAGE`. This assumes canvas-rce is a workspace
package checked out at `packages/canvas-rce`. Once extracted, canvas-lms's
webpack watch loop would instead need to watch the package's published
`es/` output (e.g. via `pnpm link` or a workspace `file:` dependency during
local dev), and this script would drop canvas-rce from its list entirely.

## packages/canvas-rce/scripts/installTranslations.js

Pulls canvas-rce's translated strings from the sibling monorepo package
`@instructure/translations` via `getTranslationList()` /
`readTranslationFile('canvas-rce', locale)`, and reads TinyMCE's locale
mapping from a local file. Outside the monorepo, canvas-rce would need
`@instructure/translations` as a real published dependency (it's currently
a workspace package resolved by pnpm's workspace linking), and canvas-lms's
translation pipeline would need a separate way to hand canvas-rce its
strings instead of both packages sharing one `@instructure/translations`
checkout.

The script also runs biome against its generated locale files with a
throwaway config written to a tmp dir rather than the repo's
`biome.json`, specifically because biome's config discovery is
cwd-dependent and Jenkins' Docker build stages don't carry the repo's
`biome.json`/`.gitignore` into that stage — this part of the script
already treats canvas-rce as running outside a guaranteed monorepo
context and needs no changes on extraction.

## Not audited here

CI job definitions (Jenkins) and `pnpm-workspace.yaml` inclusion aren't
covered — those are infra config, not build/test tooling, and are handled
separately when the extraction actually happens.
