AWS CDK is a great “Infrastructure as Code” tool that makes many developers' lives happier. Like any great tool, it is moving fast. New versions keep popping up weekly with regular bug fixes and cool new features.
This is generally great until you are in charge of maintaining a relatively large AWS CDK-based application. Then your project’s package.json includes 10–20 AWS CDK packages as dependencies. Dependencies that you have to keep updated. Usually, AWS CDK packages are declared in your package.json in the following way:
A regular npm install command will install all these packages, up to the latest available “patch” version of 1.96.xxx. However, as version 1.97 is released, do you go and change all these strings inside the package.json file?
This will work, but I find it a bit tedious. A better command for upgrading all AWS CDK packages is the following:
npx ncu -u