Skip to content

Commit 6dad13b

Browse files
committed
Merge branch '751-feature-logger-pretty-printing-logs-in-local-and-non-prod-env' of https://github.com/shdq/aws-lambda-powertools-typescript into 751-feature-logger-pretty-printing-logs-in-local-and-non-prod-env
2 parents 1c2ef89 + a01459b commit 6dad13b

Some content is hidden

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

49 files changed

+9788
-668
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"ms-azuretools.vscode-docker"
2727
],
2828
// Use 'postCreateCommand' to run commands after the container is created.
29-
"postCreateCommand": "npm ci --foreground-scripts; cd examples/cdk; npm ci; cd ../sam; npm ci; cd ../../; npm run init-environment",
29+
"postCreateCommand": "npm run setup-local",
3030
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3131
"remoteUser": "node"
3232
}

.github/ISSUE_TEMPLATE/maintenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ body:
5353
options:
5454
- label: This request meets [Lambda Powertools Tenets](https://awslabs.github.io/aws-lambda-powertools-typescript/latest/#tenets)
5555
required: true
56-
- label: Should this be considered in other Lambda Powertools languages? i.e. [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/), [Java](https://github.com/awslabs/aws-lambda-powertools-java/)
56+
- label: Should this be considered in other Lambda Powertools languages? i.e. [Python](https://github.com/awslabs/aws-lambda-powertools-python/), [Java](https://github.com/awslabs/aws-lambda-powertools-java/)
5757
required: false
5858
- type: markdown
5959
attributes:

.github/workflows/make-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ concurrency:
55
group: on-release-publish
66
jobs:
77
run-unit-tests:
8-
uses: ./.github/workflows/reusable-run-unit-tests.yml
8+
uses: ./.github/workflows/reusable-run-linting-check-and-unit-tests.yml
99
publish-npm:
1010
needs: run-unit-tests
1111
runs-on: ubuntu-latest

.github/workflows/on-merge-to-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run-unit-tests:
2121
needs: get_pr_details
2222
if: ${{ needs.get_pr_details.outputs.prIsMerged == 'true' }}
23-
uses: ./.github/workflows/reusable-run-unit-tests.yml
23+
uses: ./.github/workflows/reusable-run-linting-check-and-unit-tests.yml
2424
publish:
2525
needs:
2626
[get_pr_details, run-unit-tests]

.github/workflows/pr_lint_and_test.yml renamed to .github/workflows/pr-run-linting-check-and-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ on:
55
types: [opened, synchronize]
66
jobs:
77
run-unit-tests:
8-
uses: ./.github/workflows/reusable-run-unit-tests.yml
8+
uses: ./.github/workflows/reusable-run-linting-check-and-unit-tests.yml

.github/workflows/reusable-run-unit-tests.yml renamed to .github/workflows/reusable-run-linting-check-and-unit-tests.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7-
run-unit-tests-on-utils:
7+
run-linting-check-and-unit-tests-on-utilities:
88
runs-on: ubuntu-latest
99
env:
1010
NODE_ENV: dev
@@ -29,21 +29,21 @@ jobs:
2929
path: "./node_modules"
3030
# Use the combo between node version, name, and SHA-256 hash of the lock file as cache key so that
3131
# if one of them changes the cache is invalidated/discarded
32-
key: ${{ matrix.version }}-cache-utils-node-modules-${{ hashFiles('./package-lock.json') }}
32+
key: ${{ matrix.version }}-cache-utilities-node-modules-${{ hashFiles('./package-lock.json') }}
3333
- name: Install dependencies
34-
# We can skip the install if there was a cache hit
34+
# We can skip the installation if there was a cache hit
3535
if: steps.cache-node-modules.outputs.cache-hit != 'true'
3636
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
3737
run: npm ci --foreground-scripts
3838
- name: Build packages
3939
# If there's a cache hit we still need to manually build the packages
4040
# this would otherwise have been done automatically as a part of the
41-
# postinstall npm hook
41+
# post-install npm hook
4242
if: steps.cache-node-modules.outputs.cache-hit == 'true'
4343
run: |
4444
npm run build -w packages/commons
4545
npm run build -w packages/logger & npm run build -w packages/tracer & npm run build -w packages/metrics
46-
- name: Lint
46+
- name: Run linting
4747
run: npm run lint -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics
4848
- name: Run unit tests
4949
run: npm t -w packages/commons -w packages/logger -w packages/tracer -w packages/metrics
@@ -77,9 +77,11 @@ jobs:
7777
# invalidated/discarded for all.
7878
key: ${{ matrix.example }}-cache-examples-node-modules-${{ hashFiles('./examples/*/package-lock.json') }}
7979
- name: Install dependencies
80-
# We can skip the install if there was a cache hit
80+
# We can skip the installation if there was a cache hit
8181
if: steps.cache-node-modules.outputs.cache-hit != 'true'
8282
run: npm ci
83+
- name: Run linting
84+
run: npm run lint
8385
- name: Run tests
8486
run: npm t
8587
check-layer-publisher:
@@ -103,8 +105,12 @@ jobs:
103105
with:
104106
path: "./layer-publisher/node_modules"
105107
# Use the combo between example, name, and SHA-256 hash of the layer-publisher lock files as cache key.
106-
key: cache-layer-publisher-node-modules-${{ hashFiles('./layer-publisher/*/package-lock.json') }}
108+
key: cache-layer-publisher-node-modules-${{ hashFiles('./layer-publisher/package-lock.json') }}
107109
- name: Install Layer publisher
108-
# We can skip the install if there was a cache hit
110+
# We can skip the installation if there was a cache hit
109111
if: steps.cache-node-modules.outputs.cache-hit != 'true'
110112
run: npm ci
113+
- name: Run linting
114+
run: npm run lint
115+
- name: Run tests
116+
run: npm t

.gitpod.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,13 @@ tasks:
55
nvm use
66
# Install npm 8.x
77
npm i -g npm@next-8
8-
# Install monorepo packages
9-
npm ci --foreground-scripts
10-
# Install CDK exampels dependencies
11-
cd examples/cdk
12-
npm ci
13-
# Install SAM exampels dependencies
14-
cd ../sam
15-
npm ci
168
# Install AWS SAM CLI
179
wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip
1810
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation
1911
sudo ./sam-installation/install
2012
rm -rf sam-installation aws-sam-cli-linux-*
21-
cd ../../
22-
# Setup husky hooks
23-
npm run init-environment
13+
# Install repo dependencies
14+
npm run setup-local
2415
vscode:
2516
extensions:
2617
- dbaeumer.vscode-eslint

.husky/pre-commit

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run lerna-lint-fix
4+
npm run lint-fix -ws
5+
cd examples/sam && npm run lint-fix
6+
cd ../..
7+
cd examples/cdk && npm run lint-fix
8+
cd ../..
9+
cd layer-publisher && npm run lint-fix
10+
cd ..

.husky/pre-push

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run lerna-lint-fix
5-
npm run test
4+
npm t -ws

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.4.1](https://github.com/awslabs/aws-lambda-powertools-typescript/compare/v1.4.0...v1.4.1) (2022-11-09)
7+
8+
9+
### Bug Fixes
10+
11+
* **metrics:** store service name in defaultDimensions to avoid clearing it ([#1146](https://github.com/awslabs/aws-lambda-powertools-typescript/issues/1146)) ([a979202](https://github.com/awslabs/aws-lambda-powertools-typescript/commit/a979202ae0563f8ce00dee98bbf15d0bcfcfd3cc))
12+
13+
14+
15+
16+
617
# [1.4.0](https://github.com/awslabs/aws-lambda-powertools-typescript/compare/v1.3.0...v1.4.0) (2022-10-27)
718

819

0 commit comments

Comments
 (0)