From 039a7d37aee5bfde0d28baf2cf5f8db3ccbe01b3 Mon Sep 17 00:00:00 2001 From: Joel Sahleen Date: Mon, 10 Aug 2026 21:05:34 -0600 Subject: [PATCH] document: add Installation section for msg peer dependency Tell consumers to install @worldware/msg alongside msg-react and note the peer relationship in project/info.md. Refs #7. Co-authored-by: Cursor --- README.md | 10 ++++++++++ project/info.md | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3b6bcd..7e3203c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ React components for rendering messages from [`@worldware/msg`](https://www.npmjs.com/package/@worldware/msg). +## Installation + +`@worldware/msg` is a **peer dependency** of `@worldware/msg-react` (and is marked external in the build). Install both packages in your app: + +```bash +npm install @worldware/msg @worldware/msg-react +``` + +That keeps a single shared `@worldware/msg` instance and types in the dependency tree and avoids duplicate copies. + ## Components ### `MsgResourceProvider` diff --git a/project/info.md b/project/info.md index 96b8ef6..8bf8848 100644 --- a/project/info.md +++ b/project/info.md @@ -19,7 +19,8 @@ process in `project/process.md`. Keep it accurate — the process depends on it. - **UI:** React 19 (peer/dev dependency for components and tests). - **Test runner:** [Vitest](https://vitest.dev) with `@vitest/coverage-v8`, jsdom, and Testing Library (`@testing-library/react`). Config in `vitest.config.js`; setup in `src/test/setup.ts`. - **Build:** [tsup](https://tsup.egoist.dev) for dual ESM/CJS bundles, plus `tsc -p tsconfig.build.json` for declaration files (`npm run build` → `dist/`). Config in `tsup.config.ts`. -- **Key dependencies:** `@worldware/msg`, `react`, `react-dom`, `messageformat`. +- **Key dependencies:** `@worldware/msg` (peer + dev; consumers must install it + alongside this package), `react`, `react-dom`, `messageformat`. ## Repository structure