|
5 | 5 | This is a working guide for contributors and coding agents in this repository. |
6 | 6 | It captures practical rules that prevent avoidable CI and PR churn. |
7 | 7 |
|
| 8 | +## Repository Layout |
| 9 | + |
| 10 | +- This repository is an npm workspaces monorepo. |
| 11 | + - root package: `testcontainers-monorepo` |
| 12 | + - workspaces: `packages/testcontainers` and `packages/modules/*` |
| 13 | + - shared lockfile: root `package-lock.json` (workspace installs update this single file) |
| 14 | +- For workspace-scoped dependency changes, prefer targeted commands to reduce lockfile churn: |
| 15 | + - `npm install -w @testcontainers/<module>` |
| 16 | + - `npm uninstall -w @testcontainers/<module> <package>` |
| 17 | + |
8 | 18 | ## Development Expectations |
9 | 19 |
|
10 | 20 | - If a public API changes, update the relevant docs in the same PR. |
@@ -41,6 +51,8 @@ It captures practical rules that prevent avoidable CI and PR churn. |
41 | 51 | - If signing fails (for example, passphrase/key issues), stop and ask the user to resolve signing, then retry. |
42 | 52 | 8. Push branch. Ask for explicit user permission before any force push. |
43 | 53 | 9. Open PR against `main` using a human-readable title (no `feat(...)` / `fix(...)` prefixes). |
| 54 | + - When using `gh` to create/edit PR descriptions, prefer `--body-file <path>` over inline `--body`. |
| 55 | + - This avoids shell command substitution issues when the body contains backticks. |
44 | 56 | 10. Add labels for both change type and semantic version impact. |
45 | 57 | 11. Ensure PR body includes: |
46 | 58 | - summary of changes |
@@ -73,16 +85,6 @@ It captures practical rules that prevent avoidable CI and PR churn. |
73 | 85 | - docs-only change: `documentation` + usually `patch` |
74 | 86 | - dependency update: `dependencies` + impact label based on user-facing effect |
75 | 87 |
|
76 | | -## Practical Note |
| 88 | +## Lockfile Hygiene |
77 | 89 |
|
78 | | -- This repository is an npm workspaces monorepo: |
79 | | - - root package: `testcontainers-monorepo` |
80 | | - - workspaces: `packages/testcontainers` and `packages/modules/*` |
81 | | - - shared lockfile: root `package-lock.json` (workspace installs update this single file) |
82 | | -- When changing one workspace dependency, prefer targeted commands to reduce lockfile churn: |
83 | | - - `npm install -w @testcontainers/<module>` |
84 | | - - `npm uninstall -w @testcontainers/<module> <package>` |
85 | | - - targeted tests via `npm run test -- <path-to-spec>` |
86 | 90 | - Recheck `package-lock.json` after `npm install` for unrelated drift and revert unrelated changes. |
87 | | -- When creating/editing PR descriptions with `gh`, do not inline backticks in shell command arguments. |
88 | | - - Prefer `--body-file <path>` with a heredoc-written file to avoid shell command substitution. |
|
0 commit comments