Closed plumdog closed 3 years ago
Hey @plumdog - thanks for this PR. I'm sure there's some version earlier than 1.64.1 that breaks this library but I'm OK with loosening this requirement as long as there's a note about compatibility.
Would you be willing to do two things with this PR?
Thanks for your contribution!
It does indeed work fine with 1.55.0, based on my testing - which is to say: it successfully creates the stacks I expect, and metrics and logs are arriving in Datadog, so I consider that "passed testing". I've added a note to the README to say as much.
I believe that the version constraints already in package.json
do exclude a new major version. NPM's docs have the example:
^1.2.3
:=>=1.2.3 <2.0.0
so I think the version constraint is already set to the right thing. See https://docs.npmjs.com/cli/v7/using-npm/semver#caret-ranges-123-025-004 for excessive detail.
Sadly, it appears that the build is broken now, so the release did not succeed. I don't have time to take a look at it for a few days, so I opened https://github.com/blimmer/cdk-datadog-integration/issues/29
@plumdog - sorry for the delay in taking a look at this. 1.21.0 should work for you now. Thanks again for your contribution!
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.