Skip to content

chore(maintenance): bump dependencies + apply peerDependencies #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/scripts/release_patch_package_json.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ if (process.argv.length < 3) {
const basePath = resolve(process.argv[2]);
const packageJsonPath = join(basePath, 'package.json');
const alphaPackages = [];
const betaPackages = [
'@aws-lambda-powertools/idempotency',
'@aws-lambda-powertools/batch',
];
const betaPackages = [];

(() => {
try {
Expand All @@ -39,6 +36,8 @@ const betaPackages = [
bugs,
keywords,
dependencies,
peerDependencies,
peerDependenciesMeta,
exports,
typesVersions,
main,
Expand Down Expand Up @@ -67,6 +66,8 @@ const betaPackages = [
bugs,
keywords,
dependencies,
peerDependencies,
peerDependenciesMeta,
main,
types,
files,
Expand Down
20 changes: 10 additions & 10 deletions docs/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
},
"homepage": "https://github.com/aws-powertools/powertools-lambda-typescript#readme",
"devDependencies": {
"@aws-sdk/client-appconfigdata": "^3.360.0",
"@aws-sdk/client-dynamodb": "^3.360.0",
"@aws-sdk/client-secrets-manager": "^3.360.0",
"@aws-sdk/client-ssm": "^3.360.0",
"@aws-sdk/util-dynamodb": "^3.360.0",
"aws-sdk": "^2.1405.0",
"aws-sdk-client-mock": "^2.2.0",
"aws-sdk-client-mock-jest": "^2.2.0",
"axios": "^1.2.4",
"hashi-vault-js": "^0.4.13"
"@aws-sdk/client-appconfigdata": "^3.413.0",
"@aws-sdk/client-dynamodb": "^3.413.0",
"@aws-sdk/client-secrets-manager": "^3.413.0",
"@aws-sdk/client-ssm": "^3.413.0",
"@aws-sdk/util-dynamodb": "^3.413.0",
"aws-sdk": "^2.1458.0",
"aws-sdk-client-mock": "^3.0.0",
"aws-sdk-client-mock-jest": "^3.0.0",
"axios": "^1.5.0",
"hashi-vault-js": "^0.4.14"
}
}
16 changes: 8 additions & 8 deletions examples/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
"@aws-lambda-powertools/metrics": "^1.12.1",
"@aws-lambda-powertools/parameters": "^1.12.1",
"@aws-lambda-powertools/tracer": "^1.12.1",
"@aws-sdk/client-ssm": "^3.360.0",
"@aws-sdk/lib-dynamodb": "^3.360.0",
"@types/aws-lambda": "^8.10.109",
"@aws-sdk/client-ssm": "^3.413.0",
"@aws-sdk/lib-dynamodb": "^3.413.0",
"@types/aws-lambda": "^8.10.121",
"@types/jest": "^29.5.4",
"@types/node": "18.11.17",
"aws-cdk": "^2.73.0",
"esbuild": "^0.19.2",
"@types/node": "20.6.1",
"aws-cdk": "^2.96.1",
"esbuild": "^0.19.3",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"dependencies": {
"@middy/core": "^3.6.2",
"aws-cdk-lib": "^2.73.0",
"constructs": "^10.1.194",
"aws-cdk-lib": "^2.96.1",
"constructs": "^10.2.70",
"phin": "^3.7.0",
"source-map-support": "^0.5.21"
}
Expand Down
5 changes: 2 additions & 3 deletions examples/cdk/src/example-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ const commonProps: Partial<NodejsFunctionProps> = {
},
bundling: {
externalModules: [
'@aws-sdk/lib-dynamodb',
'@aws-sdk/client-dynamodb',
'@aws-lambda-powertools/commons',
'@aws-lambda-powertools/logger',
'@aws-lambda-powertools/tracer',
'@aws-lambda-powertools/metrics',
'@aws-lambda-powertools/parameters',
],
},
layers: [],
Expand All @@ -54,7 +53,7 @@ export class CdkAppStack extends Stack {
'powertools-layer',
`arn:aws:lambda:${
Stack.of(this).region
}:094274105915:layer:AWSLambdaPowertoolsTypeScript:16`
}:094274105915:layer:AWSLambdaPowertoolsTypeScript:18`
)
);

Expand Down
11 changes: 11 additions & 0 deletions examples/cdk/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"noEmit": true
},
"include": [
"../src/**/*",
"./**/*",
]
}
40 changes: 0 additions & 40 deletions examples/cdk/tsconfig.es.json

This file was deleted.

12 changes: 6 additions & 6 deletions examples/sam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"*.js": "npm run lint-fix"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.109",
"@types/aws-lambda": "^8.10.121",
"@types/jest": "^29.5.4",
"@types/node": "18.11.17",
"@types/node": "20.6.1",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
Expand All @@ -34,11 +34,11 @@
"@aws-lambda-powertools/metrics": "^1.12.1",
"@aws-lambda-powertools/parameters": "^1.12.1",
"@aws-lambda-powertools/tracer": "^1.12.1",
"@aws-sdk/client-dynamodb": "^3.360.0",
"@aws-sdk/client-ssm": "^3.360.0",
"@aws-sdk/lib-dynamodb": "^3.360.0",
"@aws-sdk/client-dynamodb": "^3.413.0",
"@aws-sdk/client-ssm": "^3.413.0",
"@aws-sdk/lib-dynamodb": "^3.413.0",
"@middy/core": "^3.6.2",
"esbuild": "^0.19.2",
"esbuild": "^0.19.3",
"phin": "^3.7.0"
}
}
44 changes: 16 additions & 28 deletions examples/sam/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Parameters:
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html
Globals:
Function:
Runtime: nodejs18.x
Architectures:
- x86_64
MemorySize: 128
Timeout: 100
Runtime: nodejs18.x
Architectures:
- x86_64
MemorySize: 128
Timeout: 100

# Resources declares the AWS resources that you want to include in the stack
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
Expand Down Expand Up @@ -76,11 +76,8 @@ Resources:
BuildMethod: esbuild
BuildProperties:
Minify: true
Target: "ES2020"
Target: 'ES2020'
Sourcemap: true
External:
- "@aws-sdk/lib-dynamodb"
- "@aws-sdk/client-dynamodb"
EntryPoints:
- src/get-all-items.ts

Expand All @@ -93,7 +90,8 @@ Resources:
Policies:
# Give Create/Read/Update/Delete Permissions to the SampleTable
- DynamoDBReadPolicy:
TableName: !Ref SampleTable
TableName:
!Ref SampleTable
# add ssm:getParameter permission to the function
- SSMParameterWithSlashPrefixReadPolicy:
ParameterName: !Ref uuidApiUrlParameter
Expand All @@ -118,11 +116,8 @@ Resources:
BuildMethod: esbuild
BuildProperties:
Minify: true
Target: "ES2020"
Target: 'ES2020'
Sourcemap: true
External:
- "@aws-sdk/lib-dynamodb"
- "@aws-sdk/client-dynamodb"
EntryPoints:
- src/get-by-id.ts

Expand Down Expand Up @@ -156,10 +151,8 @@ Resources:
BuildMethod: esbuild
BuildProperties:
Minify: true
Target: "ES2020"
Target: 'ES2020'
Sourcemap: true
External:
- "uuid"
EntryPoints:
- src/get-uuid.ts

Expand All @@ -169,9 +162,8 @@ Resources:
Properties:
Name: /app/uuid-api-url
Type: String
Description: "Example parameter for UUID API URL"
Value: !Sub "https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/"

Description: 'Example parameter for UUID API URL'
Value: !Sub 'https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/${apiGatewayStageName}/'

# This is a Lambda function config associated with the source code: put-item.js
putItemFunction:
Expand Down Expand Up @@ -206,11 +198,8 @@ Resources:
BuildMethod: esbuild
BuildProperties:
Minify: true
Target: "ES2020"
Target: 'ES2020'
Sourcemap: true
External:
- "@aws-sdk/lib-dynamodb"
- "@aws-sdk/client-dynamodb"
EntryPoints:
- src/put-item.ts

Expand All @@ -226,7 +215,7 @@ Resources:
Type: AWS::ApiGateway::RestApi
Properties:
Name: !Sub ${AWS::StackName}-uuid-api
Description: "Example API for UUID generation"
Description: 'Example API for UUID generation'

apiGatewayDeployment:
Type: AWS::ApiGateway::Deployment
Expand Down Expand Up @@ -290,7 +279,6 @@ Resources:
RetentionInDays: 1

Outputs:

UuidWebEndpoint:
Description: "API Gateway endpoint URL for UUID endpoint"
Value: !Sub "https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/"
Description: 'API Gateway endpoint URL for UUID endpoint'
Value: !Sub 'https://${apiGateway}.execute-api.${AWS::Region}.amazonaws.com/dev/'
11 changes: 11 additions & 0 deletions examples/sam/tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"noEmit": true
},
"include": [
"../src/**/*",
"./**/*",
]
}
40 changes: 0 additions & 40 deletions examples/sam/tsconfig.es.json

This file was deleted.

6 changes: 3 additions & 3 deletions layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"source-map-support": "^0.5.21"
},
"dependencies": {
"aws-cdk": "^2.88.0",
"aws-cdk-lib": "^2.88.0",
"esbuild": "^0.18.17"
"aws-cdk": "^2.96.1",
"aws-cdk-lib": "^2.96.1",
"esbuild": "^0.19.3"
}
}
Loading