Skip to content

Commit 48f3487

Browse files
authored
feat(logger): adopted Utility class & updated unit tests (#550)
* feat: adopted Utility class & updated unit tests * docs: added notice in docs * WIP * build: added commons dependency * deps: fixed lock * rebuilt lock after rebase * chore: update commented * set explicit packages order * amend lock * run with older * removed commons from workspace * build: added foreground-scripts flag to CI * fix: issue with workflows * fix: lock file
1 parent a58e636 commit 48f3487

12 files changed

+10560
-14386
lines changed

Diff for: .github/workflows/on-merge-to-main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
3434
- name: Install monorepo packages
3535
# This installs all the dependencies of ./packages/*
36-
run: npm ci
36+
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
37+
run: npm ci --foreground-scripts
3738
- name: Install example packages
3839
# Since we are not managing the cdk examples with npm workspaces we install
3940
# the dependencies in a separate step

Diff for: .github/workflows/on-release-prod.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
3131
- name: Install monorepo packages
3232
# This installs all the dependencies of ./packages/*
33-
run: npm ci
33+
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
34+
run: npm ci --foreground-scripts
3435
- name: Install example packages
3536
# Since we are not managing the cdk examples with npm workspaces we install
3637
# the dependencies in a separate step

Diff for: .github/workflows/pr_lint_and_test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
2121
- name: Install monorepo packages
2222
# This installs all the dependencies of ./packages/*
23-
run: npm ci
23+
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
24+
run: npm ci --foreground-scripts
2425
- name: Install example packages
2526
# Since we are not managing the cdk examples with npm workspaces we install
2627
# the dependencies in a separate step

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
run: npm i -g npm@next-8
2828
- name: Install monorepo packages
2929
# This installs all the dependencies of ./packages/*
30-
run: npm ci
30+
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
31+
run: npm ci --foreground-scripts
3132
- name: Install example packages
3233
# Since we are not managing the cdk examples with npm workspaces we install
3334
# the dependencies in a separate step

Diff for: docs/core/logger.md

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ For a **complete list** of supported environment variables, refer to [this secti
4444

4545
#### Example using AWS Serverless Application Model (SAM)
4646

47+
The `Logger` utility is instantiated outside of the Lambda handler. In doing this, the same instance can be used across multiple invocations inside the same execution environment. This allows `Metrics` to be aware of things like whether or not a given invocation had a cold start or not.
48+
4749
=== "handler.ts"
4850

4951
```typescript hl_lines="1 4"

0 commit comments

Comments
 (0)