Skip to content

Commit 05fbe20

Browse files
committed
Update nodejs dependency version.
1 parent c444c81 commit 05fbe20

6 files changed

Lines changed: 838 additions & 6 deletions

File tree

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

bin/template/cloudFormationServerlessTemplate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"FunctionName": { "Ref": "serviceName" },
2929
"Description": { "Ref": "serviceDescription" },
3030
"Handler": "index.handler",
31-
"Runtime": "nodejs18.x",
31+
"Runtime": "nodejs22.x",
3232
"TracingConfig": {
3333
"Mode": "PassThrough"
3434
},

bin/template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949
},
5050
"homepage": "https://source-code.com",
5151
"engines": {
52-
"node": ">=18"
52+
"node": ">=20"
5353
}
5454
}

lib/CloudFormationDeployer.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { CloudFormation, Organizations, EC2 } = require('aws-sdk');
2+
const { CloudFormationClient, DescribeEventsCommand } = require("@aws-sdk/client-cloudformation");
23
const Tmp = require('tmp');
34
Tmp.setGracefulCleanup();
45
const fs = require('fs-extra');
@@ -27,6 +28,7 @@ function getChangeSetName(changeSetName) {
2728
class CloudFormationDeployer {
2829
constructor(region, bucketManager, deploymentBucket) {
2930
this.cloudFormationClient = new CloudFormation({ region });
31+
this.region = region;
3032
this.bucketManager = bucketManager;
3133
this.deploymentBucket = deploymentBucket;
3234
}
@@ -272,7 +274,7 @@ class CloudFormationDeployer {
272274
stackParameters.TemplateBody = templateString;
273275
}
274276

275-
let executeParameters = {
277+
const executeParameters = {
276278
ChangeSetName: getChangeSetName(stackParameters.ChangeSetName),
277279
StackName: options.stackName
278280
};
@@ -294,7 +296,9 @@ class CloudFormationDeployer {
294296
if (!noUpdatesDict[changeSetResponse.StatusReason]) {
295297
let events;
296298
if (changeSetResponse.StatusReason && changeSetResponse.StatusReason.includes('AWS::EarlyValidation::PropertyValidation')) {
297-
events = await this.cloudFormationClient.describeStackEvents({ StackName: options.stackName }).promise();
299+
const client = new CloudFormationClient({ region: this.region });
300+
const response = await client.send(new DescribeEventsCommand({ ChangeSetName: executeParameters.ChangeSetName }));
301+
events = response.OperationEvents;
298302
}
299303

300304
const changeSetFailureError = { title: 'Failed to create changeset, review the stack events', details: changeSetResponse, events };

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"aws-architect": "./bin/aws-architect.js"
1919
},
2020
"dependencies": {
21+
"@aws-sdk/client-cloudformation": "^3.1000.0",
2122
"archiver": "^5.3.0",
2223
"body-parser": "^1.18.2",
2324
"commander": "^2.5.0",
@@ -77,6 +78,6 @@
7778
},
7879
"homepage": "https://github.com/Authress-Engineering/aws-architect.js#readme",
7980
"engines": {
80-
"node": ">=18"
81+
"node": ">=20"
8182
}
8283
}

0 commit comments

Comments
 (0)