Peer dependency warning for abort-controller dependency in lib-storage
Describe the bug
Installing @aws-sdk/lib-storage results in a missing peer dependency warning for @aws-sdk/abort-controller. @aws-sdk/lib-storage declares a peer dependency on @aws-sdk/abort-controller here. However, it looks like @aws-sdk/abort-controller is optional (lib-storage functions without it, as long as you don't want to abort), and it's also possible to use an alternate AbortController implementation.
Would it be possible to set the peerDependency to optional, using the the same method as this PR? https://github.com/aws/aws-sdk-js-v3/pull/3465 That should take care of unnecessary peer dependency warnings.
Expected Behavior
No peer dependency warning when @aws-sdk/abord-controller is not installed
Current Behavior
There is a peer dependency warning
Reproduction Steps
Add @aws-sdk/lib-storage to a project without @aws-sdk/abort-controller. pnpm is particularly good about showing missing peer dependency warnings.
Possible Solution
Adding a peerDependenciesMeta section to package.json with abort-controller set to optional should fix the issue:
"peerDependenciesMeta": {
"@aws-sdk/abort-controller": {
"optional": true
}
},
Additional Information/Context
No response
SDK version used
3.121.0
Environment details (OS name and version, etc.)
Node 16
@jekh thanks for opening this issue, I can discuss it with the team and open a PR for the solution.
Up
this is no longer applicable since lib-storage has no peerDependency on abort-controller anymore, as of v3.363.0.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.