Skip to content

Commit

Permalink
feat(logger): adopted Utility class & updated unit tests (#550)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dreamorosi committed Feb 28, 2022
1 parent a58e636 commit 48f3487
Show file tree
Hide file tree
Showing 12 changed files with 10,560 additions and 14,386 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Install monorepo packages
# This installs all the dependencies of ./packages/*
run: npm ci
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
run: npm ci --foreground-scripts
- name: Install example packages
# Since we are not managing the cdk examples with npm workspaces we install
# the dependencies in a separate step
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/on-release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Install monorepo packages
# This installs all the dependencies of ./packages/*
run: npm ci
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
run: npm ci --foreground-scripts
- name: Install example packages
# Since we are not managing the cdk examples with npm workspaces we install
# the dependencies in a separate step
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Install monorepo packages
# This installs all the dependencies of ./packages/*
run: npm ci
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
run: npm ci --foreground-scripts
- name: Install example packages
# Since we are not managing the cdk examples with npm workspaces we install
# the dependencies in a separate step
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
run: npm i -g npm@next-8
- name: Install monorepo packages
# This installs all the dependencies of ./packages/*
run: npm ci
# See https://github.com/npm/cli/issues/4475 to see why --foreground-scripts
run: npm ci --foreground-scripts
- name: Install example packages
# Since we are not managing the cdk examples with npm workspaces we install
# the dependencies in a separate step
Expand Down
2 changes: 2 additions & 0 deletions docs/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ For a **complete list** of supported environment variables, refer to [this secti

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

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.

=== "handler.ts"

```typescript hl_lines="1 4"
Expand Down
Loading

0 comments on commit 48f3487

Please sign in to comment.