Skip to content

Commit

Permalink
chore(maintenance): bump dependencies & drop nodejs14x (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamorosi authored Sep 16, 2023
1 parent f54f0aa commit 7990f81
Show file tree
Hide file tree
Showing 43 changed files with 1,886 additions and 2,961 deletions.
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Bug report
description: Report a reproducible bug to help us improve
title: "Bug: TITLE"
labels: ["type/bug", "triage"]
projects: ["aws-powertools/7"]
title: 'Bug: TITLE'
labels: ['type/bug', 'triage']
projects: ['aws-powertools/7']
body:
- type: markdown
attributes:
value: |
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).
Please add as much information as possible to help us reproduce, and remove any potential sensitive data.
- type: textarea
id: expected_behaviour
Expand Down Expand Up @@ -58,7 +58,7 @@ body:
id: version
attributes:
label: Powertools for AWS Lambda (TypeScript) version
placeholder: "latest, 1.3.0"
placeholder: 'latest, 2.0.0'
value: latest
validations:
required: true
Expand All @@ -67,9 +67,9 @@ body:
attributes:
label: AWS Lambda function runtime
options:
- 20.x
- 18.x
- 16.x
- 14.x
validations:
required: true
- type: dropdown
Expand All @@ -95,4 +95,4 @@ body:
value: |
---
**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.
**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.
28 changes: 23 additions & 5 deletions .github/scripts/setup_tmp_layer_files.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
#!/usr/bin/env bash
rm -rf tmp/nodejs
mkdir -p tmp/nodejs
npm run build -w packages/commons
npm pack -w packages/commons
mv aws-lambda-powertools-commons-*.tgz tmp/nodejs
npm run build -w packages/logger
npm pack -w packages/logger
mv aws-lambda-powertools-logger-*.tgz tmp/nodejs
npm run build -w packages/metrics
npm pack -w packages/metrics
mv aws-lambda-powertools-metrics-*.tgz tmp/nodejs
npm run build -w packages/tracer
npm pack -w packages/tracer
mv aws-lambda-powertools-tracer-*.tgz tmp/nodejs
cd tmp/nodejs
npm init -y
npm i \
@aws-lambda-powertools/logger@$VERSION \
@aws-lambda-powertools/metrics@$VERSION \
@aws-lambda-powertools/tracer@$VERSION
aws-lambda-powertools-commons-*.tgz \
aws-lambda-powertools-logger-*.tgz \
aws-lambda-powertools-metrics-*.tgz \
aws-lambda-powertools-tracer-*.tgz
rm -rf node_modules/@types \
package.json \
package-lock.json
cd ../..
package-lock.json \
aws-lambda-powertools-commons-*.tgz \
aws-lambda-powertools-logger-*.tgz \
aws-lambda-powertools-metrics-*.tgz \
aws-lambda-powertools-tracer-*.tgz
cd ../..
git restore .
20 changes: 10 additions & 10 deletions .github/workflows/reusable-run-linting-check-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
NODE_ENV: dev
strategy:
matrix:
version: [14, 16, 18]
version: [16, 18]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ matrix.version }}
cache: "npm"
cache: 'npm'
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
with:
Expand All @@ -34,19 +34,19 @@ jobs:
NODE_ENV: dev
strategy:
matrix:
example: ["sam", "cdk"]
example: ['sam', 'cdk']
fail-fast: false
defaults:
run:
working-directory: examples/${{ matrix.example }}
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 18
cache: "npm"
cache: 'npm'
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
- name: Run linting
Expand All @@ -59,12 +59,12 @@ jobs:
NODE_ENV: dev
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 18
cache: "npm"
cache: 'npm'
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
- name: Run linting
Expand All @@ -81,12 +81,12 @@ jobs:
NODE_ENV: dev
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 18
cache: "npm"
cache: 'npm'
- name: Setup dependencies
uses: ./.github/actions/cached-node-modules
- name: Run linting
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
prNumber:
description: "(Optional) PR Number. If you specify a value the value of the branch field will be ignored."
description: '(Optional) PR Number. If you specify a value the value of the branch field will be ignored.'
required: false
default: ""
default: ''

jobs:
run-e2e-tests-on-utils:
Expand All @@ -19,12 +19,20 @@ jobs:
contents: read
strategy:
matrix:
package: [layers, packages/logger, packages/metrics, packages/tracer, packages/parameters, packages/idempotency]
version: [14, 16, 18]
package:
[
layers,
packages/logger,
packages/metrics,
packages/tracer,
packages/parameters,
packages/idempotency,
]
version: [16, 18]
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# If we pass a PR Number when triggering the workflow we will retrieve the PR info and get its headSHA
- name: Extract PR details
id: extract_PR_details
Expand All @@ -38,7 +46,7 @@ jobs:
# we checkout the PR at that point in time
- name: Checkout PR code
if: ${{ inputs.prNumber != '' }}
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
ref: ${{ steps.extract_PR_details.outputs.headSHA }}
- name: Setup NodeJS
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "1.9.0",
"version": "2.0.0",
"description": "A collection code snippets for the Powertools for AWS Lambda (TypeScript) docs",
"author": {
"name": "Amazon Web Services",
Expand Down
4 changes: 2 additions & 2 deletions examples/cdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cdk-sample",
"version": "1.12.1",
"version": "2.0.0",
"author": {
"name": "Amazon Web Services",
"url": "https://aws.amazon.com"
Expand Down Expand Up @@ -49,4 +49,4 @@
"phin": "^3.7.0",
"source-map-support": "^0.5.21"
}
}
}
4 changes: 2 additions & 2 deletions examples/sam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sam-example",
"version": "1.12.1",
"version": "2.0.0",
"author": {
"name": "Amazon Web Services",
"url": "https://aws.amazon.com"
Expand Down Expand Up @@ -41,4 +41,4 @@
"esbuild": "^0.19.3",
"phin": "^3.7.0"
}
}
}
4 changes: 2 additions & 2 deletions layers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "layers",
"version": "1.12.1",
"version": "2.0.0",
"bin": {
"layer": "bin/layers.js"
},
Expand Down Expand Up @@ -41,4 +41,4 @@
"aws-cdk-lib": "^2.96.1",
"esbuild": "^0.19.3"
}
}
}
2 changes: 1 addition & 1 deletion layers/src/canary-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class CanaryStack extends Stack {
'../tests/e2e/layerPublisher.class.test.functionCode.ts'
),
handler: 'handler',
runtime: Runtime.NODEJS_14_X,
runtime: Runtime.NODEJS_16_X,
functionName: `canary-${suffix}`,
timeout: Duration.seconds(30),
bundling: {
Expand Down
6 changes: 1 addition & 5 deletions layers/src/layer-publisher-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ export class LayerPublisherStack extends Stack {
this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', {
layerVersionName: props?.layerName,
description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`,
compatibleRuntimes: [
Runtime.NODEJS_14_X,
Runtime.NODEJS_16_X,
Runtime.NODEJS_18_X,
],
compatibleRuntimes: [Runtime.NODEJS_16_X, Runtime.NODEJS_18_X],
license: 'MIT-0',
// This is needed because the following regions do not support the compatibleArchitectures property #1400
// ...(![ 'eu-south-2', 'eu-central-2', 'ap-southeast-4' ].includes(Stack.of(this).region) ? { compatibleArchitectures: [Architecture.X86_64] } : {}),
Expand Down
2 changes: 1 addition & 1 deletion layers/tests/unit/layer-publisher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Class: LayerPublisherStack', () => {
// Assess
template.resourceCountIs('AWS::Lambda::LayerVersion', 1);
template.hasResourceProperties('AWS::Lambda::LayerVersion', {
CompatibleRuntimes: ['nodejs14.x', 'nodejs16.x', 'nodejs18.x'],
CompatibleRuntimes: ['nodejs16.x', 'nodejs18.x'],
LicenseInfo: 'MIT-0',
/* CompatibleArchitectures: [
'x86_64',
Expand Down
7 changes: 4 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"packages/testing",
"examples/cdk",
"examples/sam",
"layers"
"layers",
"docs/snippets"
],
"version": "1.12.1",
"version": "2.0.0",
"npmClient": "npm",
"message": "chore(release): %s [skip ci]"
}
}
Loading

0 comments on commit 7990f81

Please sign in to comment.