Skip to content

Commit

Permalink
chore: Use regex to update deps with ncu
Browse files Browse the repository at this point in the history
In #420 we updated the arguments to `ncu` to update the aws-cdk libraries.

Having run the command to try to update to @aws-cdk/* v 1.98.0, it is only updating the library "aws-cdk" rather than "@aws-cdk/*" and "aws-cdk".

This change switches to a regex pattern rather than multiple inputs to `ncu` and things seem much happier.

```console
➜ ./script/update-aws-cdk

> @guardian/[email protected] update-aws-cdk /Users/akash_askoolum/code/cdk
> ncu "/^@?aws-cdk(/.*)?$/" --upgrade --deep && npm install

Upgrading /Users/akash_askoolum/code/cdk/package.json
[====================] 15/15 100%

 @aws-cdk/assert                      1.97.0  →  1.98.0
 @aws-cdk/aws-apigateway              1.97.0  →  1.98.0
 @aws-cdk/aws-autoscaling             1.97.0  →  1.98.0
 @aws-cdk/aws-cloudwatch-actions      1.97.0  →  1.98.0
 @aws-cdk/aws-ec2                     1.97.0  →  1.98.0
 @aws-cdk/aws-elasticloadbalancing    1.97.0  →  1.98.0
 @aws-cdk/aws-elasticloadbalancingv2  1.97.0  →  1.98.0
 @aws-cdk/aws-events-targets          1.97.0  →  1.98.0
 @aws-cdk/aws-iam                     1.97.0  →  1.98.0
 @aws-cdk/aws-kinesis                 1.97.0  →  1.98.0
 @aws-cdk/aws-lambda                  1.97.0  →  1.98.0
 @aws-cdk/aws-lambda-event-sources    1.97.0  →  1.98.0
 @aws-cdk/aws-rds                     1.97.0  →  1.98.0
 @aws-cdk/aws-s3                      1.97.0  →  1.98.0
 @aws-cdk/core                        1.97.0  →  1.98.0

Run npm install to install new versions.

Upgrading /Users/akash_askoolum/code/cdk/eslint/package.json

No dependencies.
Upgrading /Users/akash_askoolum/code/cdk/integration-test/package.json
[====================] 1/1 100%

 aws-cdk  1.97.0  →  1.98.0

Run npm install to install new versions.

> @guardian/[email protected] prepare /Users/akash_askoolum/code/cdk
> tsc

npm WARN @guardian/[email protected] No license field.

updated 24 packages and audited 1807 packages in 17.102s

96 packages are looking for funding
  run `npm fund` for details

found 51 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
```
  • Loading branch information
akash1810 committed Apr 15, 2021
1 parent 01e2742 commit 84c9f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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/.*$/\", aws-cdk --upgrade --deep && npm install"
"update-aws-cdk": "ncu \"/^@?aws-cdk(/.*)?$/\" --upgrade --deep && npm install"
},
"devDependencies": {
"@guardian/eslint-config-typescript": "^0.5.0",
Expand Down

0 comments on commit 84c9f10

Please sign in to comment.