Open
Description
- When to use
dependencies
,devDependencies
, andpeerDependencies
for controllers- If your controller is talking to another controller via the messenger, you should place that controller in both
devDependencies
andpeerDependencies
. (Explain why.) This trumps all other rules.- Furthermore, the version range in
peerDependencies
should be set to the major to reduce the coupling between packages and makes upgrades in clients easier.
- Furthermore, the version range in
- If you are importing a controller in production code, then you should place that controller in
dependencies
. Yes, this even includes types (because types show up in the published version of the package.) - If you are importing a controller in tests only, then you should place that controller in
devDependencies
.
- If your controller is talking to another controller via the messenger, you should place that controller in both