Looser peerDependencies for CDK modules #23
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While I don't believe this is totally accurate, as such, I suspect that there are CDK versions below 1.64 where this module will work fine, but it looks like npm is now stricter when peer dependencies are not satisfied.
Attempting to install this module where I'm using an older version of CDK, I get an error like:
That is, npm is - not unreasonably - complaining because my
package.json
has"@aws-cdk/aws-ec2": "1.55.0"
but this module has"@aws-cdk/aws-cloudformation": "^1.64.1"
, and each of those wants a compatible@aws-cdk/aws-cloudwatch
, which are incompatible. It looks like this is different behaviour between npm 6 and 7, where 6 was more lenient, but 7 errors.One option would be for me to upgrade CDK. In my case that is not possible.
Another would be to update this modules
package.json
to have the loosest functioning peer dependencies, but alas, I'm just not that diligent.Thus, I have arrived at the changes that I have here.