Check whether this card's code meets the acceptance criteria
日本語の概要は準備中です。原文の説明を表示しています。
Update npm/yarn/pnpm dependencies using manifest-first, lockfile-aware workflows. Prefer declared version bumps over resolution overrides. Use when updating, upgrading, or patching dependencies; fixing transitive dependency versions; addressing npm audit or CVE findings; or removing stale overrides.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Package-manager agnostic workflow for bumping dependencies safely in monorepos and single-package repos.
Avoid overriding resolutions. Always prefer updating the declared dependency version in the
manifest (package.json or equivalent).
Check, in order:
packageManager field in the root manifestpackage-lock.json (npm), yarn.lock (Yarn), pnpm-lock.yaml (pnpm),
deno.lock (Deno), bun.lockb (Bun)Use that manager's install and dependency-inspection commands throughout.
| Task | npm | Yarn | pnpm |
|---|---|---|---|
| Install | npm install | yarn install | pnpm install |
| Why is X installed? | npm explain pkg | yarn why --recursive pkg@ver | pnpm why pkg |
| List tree | npm ls pkg | yarn why pkg | pnpm list pkg |
Prefer one dependency bump per PR (or a small cluster when deps must move together, e.g. React + react-dom, or a plugin + its host package).
Before starting, check whether an existing override/resolution already pins the dependency. Consider removing it in favour of steps 1–3 in the update cascade below.
Follow this order. Stop as soon as the target version is satisfied.
If the dependency is declared in dependencies, devDependencies, or optionalDependencies:
In a workspace/monorepo, find every workspace manifest that declares the package. As much as reasonably possible, use the same version range across internal packages. Watch peer dependency constraints — especially for React Native packages, where mismatched peers break installs or runtime.
If the target is transitive:
npm explain lodash,
yarn why --recursive lodash@4.18.1).Version bump risk:
Repeat for intermediate owners if the chain has multiple levels.
If the owning direct dependency is already up to date and its declared range allows the target transitive version, but the lockfile still pins an older one:
Do not use this to install a version outside the range declared by the owning dependency — that requires step 1 or 2, or step 4 for security exceptions.
Set an override only when:
Document why the override exists and what would remove it.
When touching existing overrides, ask whether each can be removed in favour of steps 1–3. Some
overrides are genuine pins (e.g. forcing a single @mui/* or styled-components version to avoid
duplicate runtime copies). Treat those as intentional unless the user wants to unwind them.
Task progress:
- [ ] Identify target package and desired version (or "latest safe" / patched)
- [ ] Classify: direct or transitive?
- [ ] If transitive: trace owners; try direct-dep bump first
- [ ] Update manifest(s); align ranges across workspaces if applicable
- [ ] Install dependencies; verify lockfile
- [ ] Run validation (see below)
- [ ] One dep (or tight cluster) per PR; note override rationale if any
After any dependency change, run the broadest reasonable CI checks for the affected scope — not install-only.
Narrow scope when possible (e.g. npm workspace filters for one package). Expand to root-level scripts when the bump is shared (React, TypeScript, ESLint, etc.) or ownership is unclear.
Root manifest uses npm workspaces and package-lock.json. Common commands:
| Scope | Example |
|---|---|
| Full build | npm run build |
| Full test suite | npm run test |
| Lint | npm run lint-all |
| Single package | npm run facility-test, npm run central-test, npm run web-unit-test, etc. |
| Workspace scope | npm run build --workspace=@tamanu/facility-server |
Existing root overrides pin shared versions (React, MUI, axios, etc.). Prefer manifest bumps that
make an override unnecessary; do not add new overrides without the security exception above.
PR/commits: use deps scope if the repo allows, otherwise try chore(deps), then fall back to
asking the user. For example, ‘deps: bump concurrently 9.2.3 → 10.0.3’.
When you cannot complete a bump without substantial work, report:
overrides/resolutions when a manifest bump or direct-dep update would workまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Check whether this card's code meets the acceptance criteria
日本語の概要は準備中です。原文の説明を表示しています。
Summarise the unit and e2e tests a branch/PR adds, run only those, and produce a paste-ready report (e.g. for a Linear card). Use when asked to 'summarise added tests', 'run the new tests', 'what tests did this PR add', or to prove a card's test coverage.
日本語の概要は準備中です。原文の説明を表示しています。
Run a quick UX/UI workshop using ASCII-art sketches
日本語の概要は準備中です。原文の説明を表示しています。
Write automated tests for unticked scenarios in this card's test cases
日本語の概要は準備中です。原文の説明を表示しています。
Review code changes on this card for likely bugs, regressions, and missed edges
日本語の概要は準備中です。原文の説明を表示しています。
Maintain a support docs pack — dedup, length budgets, and no splintering — and land changes as a reviewed pull request. Use when a support thread, or a hand-off from Support assist, surfaces a new resolution, a correction to an existing one, or a deployment quirk worth recording. Not for ordinary code changes.
日本語の概要は準備中です。原文の説明を表示しています。