Skip to content

Commit fa24180

Browse files
authored
chore(maintenance): bump dependencies + apply peerDependencies (#1685)
* chore: bump dependencies * chore: remove external deps from examples so they're bundled * chore: update build script to include peerDeps * chore: fix tsconfig examples * chore: downgrade lerna due to nodejs14x * chore: bump version number
1 parent 21d1a91 commit fa24180

File tree

20 files changed

+1012
-1283
lines changed

20 files changed

+1012
-1283
lines changed

Diff for: .github/scripts/release_patch_package_json.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ if (process.argv.length < 3) {
1818
const basePath = resolve(process.argv[2]);
1919
const packageJsonPath = join(basePath, 'package.json');
2020
const alphaPackages = [];
21-
const betaPackages = [
22-
'@aws-lambda-powertools/idempotency',
23-
'@aws-lambda-powertools/batch',
24-
];
21+
const betaPackages = [];
2522

2623
(() => {
2724
try {
@@ -39,6 +36,8 @@ const betaPackages = [
3936
bugs,
4037
keywords,
4138
dependencies,
39+
peerDependencies,
40+
peerDependenciesMeta,
4241
exports,
4342
typesVersions,
4443
main,
@@ -67,6 +66,8 @@ const betaPackages = [
6766
bugs,
6867
keywords,
6968
dependencies,
69+
peerDependencies,
70+
peerDependenciesMeta,
7071
main,
7172
types,
7273
files,

Diff for: docs/snippets/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
},
2929
"homepage": "https://github.com/aws-powertools/powertools-lambda-typescript#readme",
3030
"devDependencies": {
31-
"@aws-sdk/client-appconfigdata": "^3.360.0",
32-
"@aws-sdk/client-dynamodb": "^3.360.0",
33-
"@aws-sdk/client-secrets-manager": "^3.360.0",
34-
"@aws-sdk/client-ssm": "^3.360.0",
35-
"@aws-sdk/util-dynamodb": "^3.360.0",
36-
"aws-sdk": "^2.1405.0",
37-
"aws-sdk-client-mock": "^2.2.0",
38-
"aws-sdk-client-mock-jest": "^2.2.0",
39-
"axios": "^1.2.4",
40-
"hashi-vault-js": "^0.4.13"
31+
"@aws-sdk/client-appconfigdata": "^3.413.0",
32+
"@aws-sdk/client-dynamodb": "^3.413.0",
33+
"@aws-sdk/client-secrets-manager": "^3.413.0",
34+
"@aws-sdk/client-ssm": "^3.413.0",
35+
"@aws-sdk/util-dynamodb": "^3.413.0",
36+
"aws-sdk": "^2.1458.0",
37+
"aws-sdk-client-mock": "^3.0.0",
38+
"aws-sdk-client-mock-jest": "^3.0.0",
39+
"axios": "^1.5.0",
40+
"hashi-vault-js": "^0.4.14"
4141
}
4242
}

Diff for: examples/cdk/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@
3030
"@aws-lambda-powertools/metrics": "^1.12.1",
3131
"@aws-lambda-powertools/parameters": "^1.12.1",
3232
"@aws-lambda-powertools/tracer": "^1.12.1",
33-
"@aws-sdk/client-ssm": "^3.360.0",
34-
"@aws-sdk/lib-dynamodb": "^3.360.0",
35-
"@types/aws-lambda": "^8.10.109",
33+
"@aws-sdk/client-ssm": "^3.413.0",
34+
"@aws-sdk/lib-dynamodb": "^3.413.0",
35+
"@types/aws-lambda": "^8.10.121",
3636
"@types/jest": "^29.5.4",
37-
"@types/node": "18.11.17",
38-
"aws-cdk": "^2.73.0",
39-
"esbuild": "^0.19.2",
37+
"@types/node": "20.6.1",
38+
"aws-cdk": "^2.96.1",
39+
"esbuild": "^0.19.3",
4040
"jest": "^29.7.0",
4141
"ts-jest": "^29.1.1",
4242
"ts-node": "^10.9.1",
4343
"typescript": "^5.2.2"
4444
},
4545
"dependencies": {
4646
"@middy/core": "^3.6.2",
47-
"aws-cdk-lib": "^2.73.0",
48-
"constructs": "^10.1.194",
47+
"aws-cdk-lib": "^2.96.1",
48+
"constructs": "^10.2.70",
4949
"phin": "^3.7.0",
5050
"source-map-support": "^0.5.21"
5151
}

Diff for: examples/cdk/src/example-stack.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ const commonProps: Partial<NodejsFunctionProps> = {
2323
},
2424
bundling: {
2525
externalModules: [
26-
'@aws-sdk/lib-dynamodb',
27-
'@aws-sdk/client-dynamodb',
2826
'@aws-lambda-powertools/commons',
2927
'@aws-lambda-powertools/logger',
3028
'@aws-lambda-powertools/tracer',
3129
'@aws-lambda-powertools/metrics',
30+
'@aws-lambda-powertools/parameters',
3231
],
3332
},
3433
layers: [],
@@ -54,7 +53,7 @@ export class CdkAppStack extends Stack {
5453
'powertools-layer',
5554
`arn:aws:lambda:${
5655
Stack.of(this).region
57-
}:094274105915:layer:AWSLambdaPowertoolsTypeScript:16`
56+
}:094274105915:layer:AWSLambdaPowertoolsTypeScript:18`
5857
)
5958
);
6059

Diff for: examples/cdk/tests/tsconfig.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "../",
5+
"noEmit": true
6+
},
7+
"include": [
8+
"../src/**/*",
9+
"./**/*",
10+
]
11+
}

Diff for: examples/cdk/tsconfig.es.json

-40
This file was deleted.

Diff for: examples/sam/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"*.js": "npm run lint-fix"
2222
},
2323
"devDependencies": {
24-
"@types/aws-lambda": "^8.10.109",
24+
"@types/aws-lambda": "^8.10.121",
2525
"@types/jest": "^29.5.4",
26-
"@types/node": "18.11.17",
26+
"@types/node": "20.6.1",
2727
"jest": "^29.7.0",
2828
"ts-jest": "^29.1.1",
2929
"ts-node": "^10.9.1",
@@ -34,11 +34,11 @@
3434
"@aws-lambda-powertools/metrics": "^1.12.1",
3535
"@aws-lambda-powertools/parameters": "^1.12.1",
3636
"@aws-lambda-powertools/tracer": "^1.12.1",
37-
"@aws-sdk/client-dynamodb": "^3.360.0",
38-
"@aws-sdk/client-ssm": "^3.360.0",
39-
"@aws-sdk/lib-dynamodb": "^3.360.0",
37+
"@aws-sdk/client-dynamodb": "^3.413.0",
38+
"@aws-sdk/client-ssm": "^3.413.0",
39+
"@aws-sdk/lib-dynamodb": "^3.413.0",
4040
"@middy/core": "^3.6.2",
41-
"esbuild": "^0.19.2",
41+
"esbuild": "^0.19.3",
4242
"phin": "^3.7.0"
4343
}
4444
}

Diff for: examples/sam/template.yaml

+16-28
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ Parameters:
3131
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html
3232
Globals:
3333
Function:
34-
Runtime: nodejs18.x
35-
Architectures:
36-
- x86_64
37-
MemorySize: 128
38-
Timeout: 100
34+
Runtime: nodejs18.x
35+
Architectures:
36+
- x86_64
37+
MemorySize: 128
38+
Timeout: 100
3939

4040
# Resources declares the AWS resources that you want to include in the stack
4141
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
@@ -76,11 +76,8 @@ Resources:
7676
BuildMethod: esbuild
7777
BuildProperties:
7878
Minify: true
79-
Target: "ES2020"
79+
Target: 'ES2020'
8080
Sourcemap: true
81-
External:
82-
- "@aws-sdk/lib-dynamodb"
83-
- "@aws-sdk/client-dynamodb"
8481
EntryPoints:
8582
- src/get-all-items.ts
8683

@@ -93,7 +90,8 @@ Resources:
9390
Policies:
9491
# Give Create/Read/Update/Delete Permissions to the SampleTable
9592
- DynamoDBReadPolicy:
96-
TableName: !Ref SampleTable
93+
TableName:
94+
!Ref SampleTable
9795
# add ssm:getParameter permission to the function
9896
- SSMParameterWithSlashPrefixReadPolicy:
9997
ParameterName: !Ref uuidApiUrlParameter
@@ -118,11 +116,8 @@ Resources:
118116
BuildMethod: esbuild
119117
BuildProperties:
120118
Minify: true
121-
Target: "ES2020"
119+
Target: 'ES2020'
122120
Sourcemap: true
123-
External:
124-
- "@aws-sdk/lib-dynamodb"
125-
- "@aws-sdk/client-dynamodb"
126121
EntryPoints:
127122
- src/get-by-id.ts
128123

@@ -156,10 +151,8 @@ Resources:
156151
BuildMethod: esbuild
157152
BuildProperties:
158153
Minify: true
159-
Target: "ES2020"
154+
Target: 'ES2020'
160155
Sourcemap: true
161-
External:
162-
- "uuid"
163156
EntryPoints:
164157
- src/get-uuid.ts
165158

@@ -169,9 +162,8 @@ Resources:
169162
Properties:
170163
Name: /app/uuid-api-url
171164
Type: String
172-
Description: "Example parameter for UUID API URL"
173-
Value: !Sub "https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/"
174-
165+
Description: 'Example parameter for UUID API URL'
166+
Value: !Sub 'https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/'
175167

176168
# This is a Lambda function config associated with the source code: put-item.js
177169
putItemFunction:
@@ -206,11 +198,8 @@ Resources:
206198
BuildMethod: esbuild
207199
BuildProperties:
208200
Minify: true
209-
Target: "ES2020"
201+
Target: 'ES2020'
210202
Sourcemap: true
211-
External:
212-
- "@aws-sdk/lib-dynamodb"
213-
- "@aws-sdk/client-dynamodb"
214203
EntryPoints:
215204
- src/put-item.ts
216205

@@ -226,7 +215,7 @@ Resources:
226215
Type: AWS::ApiGateway::RestApi
227216
Properties:
228217
Name: !Sub ${AWS::StackName}-uuid-api
229-
Description: "Example API for UUID generation"
218+
Description: 'Example API for UUID generation'
230219

231220
apiGatewayDeployment:
232221
Type: AWS::ApiGateway::Deployment
@@ -290,7 +279,6 @@ Resources:
290279
RetentionInDays: 1
291280

292281
Outputs:
293-
294282
UuidWebEndpoint:
295-
Description: "API Gateway endpoint URL for UUID endpoint"
296-
Value: !Sub "https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/"
283+
Description: 'API Gateway endpoint URL for UUID endpoint'
284+
Value: !Sub 'https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/'

Diff for: examples/sam/tests/tsconfig.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "../",
5+
"noEmit": true
6+
},
7+
"include": [
8+
"../src/**/*",
9+
"./**/*",
10+
]
11+
}

Diff for: examples/sam/tsconfig.es.json

-40
This file was deleted.

Diff for: layers/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"source-map-support": "^0.5.21"
3838
},
3939
"dependencies": {
40-
"aws-cdk": "^2.88.0",
41-
"aws-cdk-lib": "^2.88.0",
42-
"esbuild": "^0.18.17"
40+
"aws-cdk": "^2.96.1",
41+
"aws-cdk-lib": "^2.96.1",
42+
"esbuild": "^0.19.3"
4343
}
4444
}

0 commit comments

Comments
 (0)