Skip to content

Commit 7990f81

Browse files
authored
chore(maintenance): bump dependencies & drop nodejs14x (#1687)
1 parent f54f0aa commit 7990f81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1886
-2961
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Bug report
22
description: Report a reproducible bug to help us improve
3-
title: "Bug: TITLE"
4-
labels: ["type/bug", "triage"]
5-
projects: ["aws-powertools/7"]
3+
title: 'Bug: TITLE'
4+
labels: ['type/bug', 'triage']
5+
projects: ['aws-powertools/7']
66
body:
77
- type: markdown
88
attributes:
99
value: |
1010
Thank you for submitting a bug report. Before you start, make sure that [the bug hasn't been reported already](https://github.com/aws-powertools/powertools-lambda-typescript/issues).
11-
11+
1212
Please add as much information as possible to help us reproduce, and remove any potential sensitive data.
1313
- type: textarea
1414
id: expected_behaviour
@@ -58,7 +58,7 @@ body:
5858
id: version
5959
attributes:
6060
label: Powertools for AWS Lambda (TypeScript) version
61-
placeholder: "latest, 1.3.0"
61+
placeholder: 'latest, 2.0.0'
6262
value: latest
6363
validations:
6464
required: true
@@ -67,9 +67,9 @@ body:
6767
attributes:
6868
label: AWS Lambda function runtime
6969
options:
70+
- 20.x
7071
- 18.x
7172
- 16.x
72-
- 14.x
7373
validations:
7474
required: true
7575
- type: dropdown
@@ -95,4 +95,4 @@ body:
9595
value: |
9696
---
9797
98-
**Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected.
98+
**Disclaimer**: After creating an issue, please wait until it is triaged and confirmed by a maintainer before implementing it. This will reduce amount of rework and the chance that a pull request gets rejected.

Diff for: .github/scripts/setup_tmp_layer_files.sh

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
#!/usr/bin/env bash
22
rm -rf tmp/nodejs
33
mkdir -p tmp/nodejs
4+
npm run build -w packages/commons
5+
npm pack -w packages/commons
6+
mv aws-lambda-powertools-commons-*.tgz tmp/nodejs
7+
npm run build -w packages/logger
8+
npm pack -w packages/logger
9+
mv aws-lambda-powertools-logger-*.tgz tmp/nodejs
10+
npm run build -w packages/metrics
11+
npm pack -w packages/metrics
12+
mv aws-lambda-powertools-metrics-*.tgz tmp/nodejs
13+
npm run build -w packages/tracer
14+
npm pack -w packages/tracer
15+
mv aws-lambda-powertools-tracer-*.tgz tmp/nodejs
416
cd tmp/nodejs
517
npm init -y
618
npm i \
7-
@aws-lambda-powertools/logger@$VERSION \
8-
@aws-lambda-powertools/metrics@$VERSION \
9-
@aws-lambda-powertools/tracer@$VERSION
19+
aws-lambda-powertools-commons-*.tgz \
20+
aws-lambda-powertools-logger-*.tgz \
21+
aws-lambda-powertools-metrics-*.tgz \
22+
aws-lambda-powertools-tracer-*.tgz
1023
rm -rf node_modules/@types \
1124
package.json \
12-
package-lock.json
13-
cd ../..
25+
package-lock.json \
26+
aws-lambda-powertools-commons-*.tgz \
27+
aws-lambda-powertools-logger-*.tgz \
28+
aws-lambda-powertools-metrics-*.tgz \
29+
aws-lambda-powertools-tracer-*.tgz
30+
cd ../..
31+
git restore .

Diff for: .github/workflows/reusable-run-linting-check-and-unit-tests.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
NODE_ENV: dev
1111
strategy:
1212
matrix:
13-
version: [14, 16, 18]
13+
version: [16, 18]
1414
fail-fast: false
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
17+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
1818
- name: Setup NodeJS
1919
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
2020
with:
2121
node-version: ${{ matrix.version }}
22-
cache: "npm"
22+
cache: 'npm'
2323
- name: Setup dependencies
2424
uses: ./.github/actions/cached-node-modules
2525
with:
@@ -34,19 +34,19 @@ jobs:
3434
NODE_ENV: dev
3535
strategy:
3636
matrix:
37-
example: ["sam", "cdk"]
37+
example: ['sam', 'cdk']
3838
fail-fast: false
3939
defaults:
4040
run:
4141
working-directory: examples/${{ matrix.example }}
4242
steps:
4343
- name: Checkout code
44-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
44+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4545
- name: Setup NodeJS
4646
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
4747
with:
4848
node-version: 18
49-
cache: "npm"
49+
cache: 'npm'
5050
- name: Setup dependencies
5151
uses: ./.github/actions/cached-node-modules
5252
- name: Run linting
@@ -59,12 +59,12 @@ jobs:
5959
NODE_ENV: dev
6060
steps:
6161
- name: Checkout code
62-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
62+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
6363
- name: Setup NodeJS
6464
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
6565
with:
6666
node-version: 18
67-
cache: "npm"
67+
cache: 'npm'
6868
- name: Setup dependencies
6969
uses: ./.github/actions/cached-node-modules
7070
- name: Run linting
@@ -81,12 +81,12 @@ jobs:
8181
NODE_ENV: dev
8282
steps:
8383
- name: Checkout code
84-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
84+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
8585
- name: Setup NodeJS
8686
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
8787
with:
8888
node-version: 18
89-
cache: "npm"
89+
cache: 'npm'
9090
- name: Setup dependencies
9191
uses: ./.github/actions/cached-node-modules
9292
- name: Run linting

Diff for: .github/workflows/run-e2e-tests.yml

+14-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
prNumber:
7-
description: "(Optional) PR Number. If you specify a value the value of the branch field will be ignored."
7+
description: '(Optional) PR Number. If you specify a value the value of the branch field will be ignored.'
88
required: false
9-
default: ""
9+
default: ''
1010

1111
jobs:
1212
run-e2e-tests-on-utils:
@@ -19,12 +19,20 @@ jobs:
1919
contents: read
2020
strategy:
2121
matrix:
22-
package: [layers, packages/logger, packages/metrics, packages/tracer, packages/parameters, packages/idempotency]
23-
version: [14, 16, 18]
22+
package:
23+
[
24+
layers,
25+
packages/logger,
26+
packages/metrics,
27+
packages/tracer,
28+
packages/parameters,
29+
packages/idempotency,
30+
]
31+
version: [16, 18]
2432
fail-fast: false
2533
steps:
2634
- name: Checkout Repo
27-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
35+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2836
# If we pass a PR Number when triggering the workflow we will retrieve the PR info and get its headSHA
2937
- name: Extract PR details
3038
id: extract_PR_details
@@ -38,7 +46,7 @@ jobs:
3846
# we checkout the PR at that point in time
3947
- name: Checkout PR code
4048
if: ${{ inputs.prNumber != '' }}
41-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
49+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4250
with:
4351
ref: ${{ steps.extract_PR_details.outputs.headSHA }}
4452
- name: Setup NodeJS

Diff for: docs/snippets/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"version": "1.9.0",
3+
"version": "2.0.0",
44
"description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs",
55
"author": {
66
"name": "Amazon Web Services",

Diff for: examples/cdk/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cdk-sample",
3-
"version": "1.12.1",
3+
"version": "2.0.0",
44
"author": {
55
"name": "Amazon Web Services",
66
"url": "https://aws.amazon.com"
@@ -49,4 +49,4 @@
4949
"phin": "^3.7.0",
5050
"source-map-support": "^0.5.21"
5151
}
52-
}
52+
}

Diff for: examples/sam/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sam-example",
3-
"version": "1.12.1",
3+
"version": "2.0.0",
44
"author": {
55
"name": "Amazon Web Services",
66
"url": "https://aws.amazon.com"
@@ -41,4 +41,4 @@
4141
"esbuild": "^0.19.3",
4242
"phin": "^3.7.0"
4343
}
44-
}
44+
}

Diff for: layers/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "layers",
3-
"version": "1.12.1",
3+
"version": "2.0.0",
44
"bin": {
55
"layer": "bin/layers.js"
66
},
@@ -41,4 +41,4 @@
4141
"aws-cdk-lib": "^2.96.1",
4242
"esbuild": "^0.19.3"
4343
}
44-
}
44+
}

Diff for: layers/src/canary-stack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class CanaryStack extends Stack {
4141
'../tests/e2e/layerPublisher.class.test.functionCode.ts'
4242
),
4343
handler: 'handler',
44-
runtime: Runtime.NODEJS_14_X,
44+
runtime: Runtime.NODEJS_16_X,
4545
functionName: `canary-${suffix}`,
4646
timeout: Duration.seconds(30),
4747
bundling: {

Diff for: layers/src/layer-publisher-stack.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ export class LayerPublisherStack extends Stack {
3333
this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', {
3434
layerVersionName: props?.layerName,
3535
description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`,
36-
compatibleRuntimes: [
37-
Runtime.NODEJS_14_X,
38-
Runtime.NODEJS_16_X,
39-
Runtime.NODEJS_18_X,
40-
],
36+
compatibleRuntimes: [Runtime.NODEJS_16_X, Runtime.NODEJS_18_X],
4137
license: 'MIT-0',
4238
// This is needed because the following regions do not support the compatibleArchitectures property #1400
4339
// ...(![ 'eu-south-2', 'eu-central-2', 'ap-southeast-4' ].includes(Stack.of(this).region) ? { compatibleArchitectures: [Architecture.X86_64] } : {}),

Diff for: layers/tests/unit/layer-publisher.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('Class: LayerPublisherStack', () => {
2424
// Assess
2525
template.resourceCountIs('AWS::Lambda::LayerVersion', 1);
2626
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
27-
CompatibleRuntimes: ['nodejs14.x', 'nodejs16.x', 'nodejs18.x'],
27+
CompatibleRuntimes: ['nodejs16.x', 'nodejs18.x'],
2828
LicenseInfo: 'MIT-0',
2929
/* CompatibleArchitectures: [
3030
'x86_64',

Diff for: lerna.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"packages/testing",
1111
"examples/cdk",
1212
"examples/sam",
13-
"layers"
13+
"layers",
14+
"docs/snippets"
1415
],
15-
"version": "1.12.1",
16+
"version": "2.0.0",
1617
"npmClient": "npm",
1718
"message": "chore(release): %s [skip ci]"
18-
}
19+
}

0 commit comments

Comments
 (0)