From 33a4e26a608eba2c7e9c0df923d4f71d5ac46133 Mon Sep 17 00:00:00 2001 From: Gowri Date: Tue, 26 Sep 2023 10:26:21 +0930 Subject: [PATCH] DO-1531: use node 20 and fix lint --- .github/workflows/build.yml | 4 ++-- packages/static-hosting/lib/static-hosting.ts | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca87f011..7d81845b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,10 +9,10 @@ jobs: - uses: actions/checkout@v2 with: ref: ${{ github.event.release.target_commitish }} - - name: Use Node.js 16 + - name: Use Node.js 20 uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 20 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run lint:check && npm run format:check diff --git a/packages/static-hosting/lib/static-hosting.ts b/packages/static-hosting/lib/static-hosting.ts index 0836a7fc..8e37f46f 100644 --- a/packages/static-hosting/lib/static-hosting.ts +++ b/packages/static-hosting/lib/static-hosting.ts @@ -286,14 +286,10 @@ export class StaticHosting extends Construct { ], }); - const cloudFrontInvalidationPolicy = new Policy( - this, - "CloudFrontInvalidationPolicy", - { - groups: [publisherGroup], - statements: [cloudFrontInvalidationPolicyStatement], - } - ); + new Policy(this, "CloudFrontInvalidationPolicy", { + groups: [publisherGroup], + statements: [cloudFrontInvalidationPolicyStatement], + }); } new CfnOutput(this, "DistributionId", { description: "DistributionId",