Skip to content

Commit

Permalink
chore(deps): Configure Dependabot to ignore constructs
Browse files Browse the repository at this point in the history
Users of `@guardian/cdk` must be on the exact version of the `aws-cdk` and `construct` dependencies,
else they see issues like this in CI (source guardian/cdk-playground#192):

```console
    lib/cdk-playground.ts:17:52 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'IConstruct'.
      Type 'CdkPlayground' is not assignable to type 'IConstruct'.
        Types of property 'node' are incompatible.
          Type 'import("/home/runner/work/cdk-playground/cdk-playground/cdk/node_modules/constructs/lib/construct").Node' is not assignable to type 'import("/home/runner/work/cdk-playground/cdk-playground/cdk/node_modules/@guardian/cdk/node_modules/constructs/lib/construct").Node'.
            Types have separate declarations of a private property 'host'.

    17     AppIdentity.taggedConstruct(CdkPlayground.app, this);
```

The above was caused by merging #1195 w/out creating a new major version release,
and it consequently being included in the 41.0.1 patch.

In this change, we remove management of `constructs` from Dependabot in favour of bumping the version ourselves (and creating a new major release when doing so).
  • Loading branch information
akash1810 committed Apr 26, 2022
1 parent 8adb88b commit 9bd6205
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ updates:
interval: 'weekly'
commit-message:
prefix: "chore(deps): "

- package-ecosystem: 'npm'
directory: '/'
schedule:
Expand All @@ -18,9 +19,16 @@ updates:
prefix: "chore(deps): "
# force the lockfile and package.json to be updated
versioning-strategy: increase
# We update AWS CDK libraries ourselves (via `script/update-aws-cdk`) as this is a breaking change for users, and it results in a new major version being released

# Users of `@guardian/cdk` must be on the exact version of these dependencies.
# Any update to them in `package.json` should create a new major version of `@guardian/cdk`.
# New versions of these dependencies are published quite often. In the case of `constructs`, see https://github.com/aws/constructs/issues/970.
# In order to reduce the frequency of new major versions of `@guardian/cdk`, we'll manage these dependencies ourselves via `script/update-aws-cdk`.
ignore:
- dependency-name: "aws-cdk"
- dependency-name: "aws-cdk-lib"
- dependency-name: "constructs"

- package-ecosystem: 'npm'
directory: '/tools/integration-test'
schedule:
Expand All @@ -34,3 +42,4 @@ updates:
ignore:
- dependency-name: "aws-cdk"
- dependency-name: "aws-cdk-lib"
- dependency-name: "constructs"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"release": "semantic-release",
"release:docs": "rm -rf target && typedoc && gh-pages -d target -u \"github-actions-bot <[email protected]>\"",
"serve:docs": "rm -rf target && typedoc && serve target",
"update-aws-cdk": "ncu \"aws-cdk-lib\" \"aws-cdk\" --upgrade --deep --target minor",
"update-aws-cdk": "ncu \"aws-cdk-lib\" \"aws-cdk\" \"constructs\" --upgrade --deep --target minor",
"cli:dev": "ts-node src/bin/index.ts"
},
"devDependencies": {
Expand Down

0 comments on commit 9bd6205

Please sign in to comment.