Skip to content

Releases: aws-powertools/powertools-lambda-typescript

v0.5.1

09 Feb 15:14
Compare
Choose a tag to compare
v0.5.1 Pre-release
Pre-release

Summary

This small release mainly fixes a bug introduced in the previous version. The bug, described in detail in this issue (#524), made it so that when patching an AWS.DynamoDB.DocumentClient with Tracer the returned AWS SDK client would be an instance of AWS.DynamoDB instead. We have corrected the bug and tightened our unit & integration tests around the feature to catch any potential regression around this feature in future iterations.

The rest of the changes are all housekeeping related to internal tooling, thanks @saragerion for taking care of that!

Changes

  • Revert "build(deps-dev): bump aws-cdk from 1.139.0 to 1.143.0" (#544) by @saragerion
  • Revert "build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.139.0 to 1.143.0" (#545) by @saragerion

🐛 Bug and hot fixes

  • fix(tracer): properly return DynamoDB.DocumentClient (#528) by @dreamorosi

🔧 Maintenance

  • build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.9.1 to 5.11.0 (#539) by @dependabot
  • build(deps-dev): bump @typescript-eslint/parser from 5.9.1 to 5.11.0 (#538) by @dependabot
  • build(deps-dev): bump aws-cdk from 1.139.0 to 1.143.0 (#532) by @dependabot
  • build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.139.0 to 1.143.0 (#531) by @dependabot
  • build(deps): bump actions/setup-python from 2.3.1 to 2.3.2 (#537) by @dependabot
  • build(deps): bump release-drafter/release-drafter from 5.17.6 to 5.18.1 (#536) by @dependabot
  • build(deps-dev): bump eslint from 8.6.0 to 8.8.0 (#526) by @dependabot

This release was made possible by the following contributors:

@dreamorosi and @saragerion

v0.5.0

26 Jan 15:09
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release

Summary

With this version we have made @middy/core an opt-in dependency only for those who want to use the middleware pattern. This allows other users who prefer decorators or classic functions to avoid bundling an unnecessary dependency. This is a breaking change and if you were using one of the Middy middleware in Powertools you should now make sure to add @middy/core to your package.json file.

Another small DX improvement that comes from a community feedback is the ability to trace DynamoDB's DocumentClient just like any other aws-sdk client:

Before

carbon-3

After

carbon-2

Additionally we have also been doing some work to improve our contributing guidelines and documenting our development setup (#492, #485).

Changes

🌟New features and non-breaking changes

🌟 Minor Changes

  • feat(tracer): add support for capturing DynamoDB DocumentClient (#450) by @dreamorosi

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

  • feat(all): make @middy/core optional (#511) by @dreamorosi
  • build(deps): bump aws-actions/configure-aws-credentials from 1.6.0 to 1.6.1 (#503) by @dependabot
  • build(deps): bump release-drafter/release-drafter from 5.15.0 to 5.17.6 (#504) by @dependabot
  • build(deps-dev): bump @types/node from 17.0.8 to 17.0.10 (#488) by @dependabot
  • build(deps-dev): bump typescript from 4.5.4 to 4.5.5 (#507) by @dependabot
  • build(deps): bump @aws-sdk/client-sts from 3.46.0 to 3.48.0 (#505) by @dependabot
  • build(deps): bump aws-sdk from 2.1056.0 to 2.1062.0 (#506) by @dependabot
  • chore(examples): fix version bumping of examples (#498) by @flochaz

This release was made possible by the following contributors:

@dreamorosi, @flochaz, @michaelbrewer and @saragerion

v0.4.0

20 Jan 13:30
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release

Summary

First time contributor @JavierMendozaGomez made an improvement of the unit tests of our Logger utility by adding support for URIError formatting 🎉🥳🍾

We updated our Tenets section same as the AWS Lambda Powertools for Python, to clarify that core utilities such as Tracer, Logger, Metrics, and Event Handler will be available across all Lambda Powertools runtimes. Additional utilities are subjective to each language ecosystem and customer demand.
Thanks @dreamorosi!

Thanks to @flochaz, our CDK examples are linted and built the same way as the other utilities.
He also made a small update to our PR's workflow to make sure community PR's are properly lint and tested.

@michaelbrewer fixed a number of markdown errors, code examples not working, and added some small improvements to our documentation.

Following security advisory GHSA-5v2h-r2cx-5xgj that impacted marked a dependency of typedoc which we use to generate the docs for the project's API, @dreamorosi bumped up the version of typedoc to v0.22.11 which in turn uses marked@4.0.10 (see PR) that patches the vulnerability.

Lastly, @saragerion added support JSDOCS in the Logger utility. This should result in better DX and IDE experience, together with the value of a more granular documentation of our API.

Screenshot 2022-01-20 at 14 01 17

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🔧 Maintenance

  • chore(cicd): fix trigger for gh actions linting andctesting PR from fork (#464) by @flochaz
  • chore(examples): integrate in CI flow with lint and build (#446) by @flochaz
  • build(deps-dev): bump typedoc from 0.22.10 to 0.22.11 (#481) by @dreamorosi

This release was made possible by the following contributors:

@JavierMendozaGomez, @dreamorosi, @flochaz, @michaelbrewer and @saragerion

v0.3.2 & v0.3.3

17 Jan 17:50
Compare
Choose a tag to compare
v0.3.2 & v0.3.3 Pre-release
Pre-release

Summary

In this release we have continued improving our CDK examples and properly exported the LogFormatter class in Logger so that you can extend it and bring your own formatter.

As you'll notice from the title of the release we are merging together two tags. During the release of v0.3.2 we discovered an issue with our workflow that prevented some packages from being published to npm. The issue has been fixed (#480) and v0.3.3 has been released as result.

Changes

📜 Documentation updates

  • docs: Improve examples/cdk/README.md (#467) by @alex-m-aws
  • fix: updated CDK examples to remove old references & improve comments (#439) by @dreamorosi

🐛 Bug and hot fixes

  • fix(logger): correctly export LogFormatter (#479) by @dreamorosi
  • fix: updated CDK examples to remove old references & improve comments (#439) by @dreamorosi

🔧 Maintenance

  • chore(cicd): fix lerna version not bumping and publishing all packages (#480) by @flochaz

This release was made possible by the following contributors:

@alex-m-aws, @dreamorosi, @flochaz

v0.3.1

14 Jan 18:31
Compare
Choose a tag to compare
v0.3.1 Pre-release
Pre-release

Summary

This release fixes a bug introduced in v0.3.0 where @aws-lambda-powertools/commons module got corrupted due to a change in generated package structure. We reverted the commit and are adding checks to make sure it got caught before release.

Apologies for any inconvenience this might have caused.

Changes

🐛 Bug and hot fixes

  • fix(all): fix latest release broken by change of npm pack result on common (#470) by @flochaz

🔧 Maintenance

This release was made possible by the following contributors:

@flochaz

v0.3.0

14 Jan 12:36
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release

Summary

This new release brings a series of housekeeping changes and comes with the first breaking change in the Metrics utility.

If you wanted to ensure that at least one metric is emitted before you send flush them, you can do so by passing a specific parameter to the middleware or decorator. Previous to this release the parameter was called raiseOnEmptyMetrics, it has now been renamed to throwOnEmptyMetrics to better conform with the way errors are called in Javascript.

carbon

This change applies also to the Tracer.throwOnEmptyMetrics() method that you can use when not using decorators or middlewares.

Special thanks to all the community members that engaged and contributed with the project since launch!

Changes

💥 Breaking changes

  • refactor(metrics): rename option property from raiseOnEmptyMetrics to throwOnEmptyMetrics (#416) by @kozub

🌟 Minor Changes

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(tracer): avoid throwing errors in manual instrumentation when running outside of AWS Lambda (#442) by @dreamorosi
  • fix(metrics): Rename leftover reference to purgeStoredMetrics() function (#424) by @ijemmy

🔧 Maintenance

  • fix(build): Fix linting issue and add linting to the pre-push hook (#440) by @ijemmy
  • build(deps-dev): bump aws-sdk from 2.1055.0 to 2.1056.0 (#462) by @dependabot
  • build(deps-dev): bump @commitlint/cli from 15.0.0 to 16.0.2 (#461) by @dependabot
  • build(deps-dev): bump aws-sdk from 2.1052.0 to 2.1055.0 (#460) by @dependabot
  • build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.138.0 to 1.139.0 (#457) by @dependabot
  • build(deps-dev): bump aws-cdk from 1.138.0 to 1.139.0 (#456) by @dependabot
  • build(deps-dev): bump esbuild from 0.14.5 to 0.14.11 (#459) by @dependabot
  • build(deps-dev): bump @typescript-eslint/parser from 5.9.0 to 5.9.1 (#455) by @dependabot
  • build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.8.1 to 5.9.1 (#454) by @dependabot
  • build(deps-dev): bump @aws-sdk/client-sts from 3.45.0 to 3.46.0 (#449) by @dependabot
  • build(deps-dev): bump @types/node from 17.0.5 to 17.0.8 (#436) by @dependabot
  • build(deps-dev): bump eslint from 8.5.0 to 8.6.0 (#434) by @dependabot
  • build(deps): bump hosted-git-info from 4.0.2 to 4.1.0 (#432) by @dependabot
  • build(deps-dev): bump aws-cdk from 1.137.0 to 1.138.0 (#437) by @dependabot
  • build(deps-dev): bump @aws-cdk/aws-lambda-nodejs from 1.137.0 to 1.138.0 (#430) by @dependabot
  • build(deps-dev): bump @aws-cdk/core from 1.137.0 to 1.138.0 (#433) by @dependabot
  • build(deps-dev): bump jest from 27.4.5 to 27.4.7 (#429) by @dependabot
  • build(deps-dev): bump aws-sdk from 2.1048.0 to 2.1052.0 (#428) by @dependabot
  • build(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4 (#408) by @dependabot
  • build(deps-dev): bump @typescript-eslint/parser from 5.8.1 to 5.9.0 (#407) by @dependabot
  • build(deps): bump @middy/core from 2.5.3 to 2.5.4 (#400) by @dependabot
  • build(deps-dev): bump @types/jest from 27.0.3 to 27.4.0 (#409) by @dependabot
  • chore: update changelogs (#410) by @dreamorosi
  • chore: make all npm packages public (#402) by @flochaz

This release was made possible by the following contributors:

@dreamorosi, @flochaz, @ijemmy, @kozub and @michaelbrewer

v0.2.0

05 Jan 15:48
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release

Summary

Introducing AWS Lambda Powertools for Typescript, a suite of utilities for AWS Lambda functions running on the Node.js runtime, to ease the adoption of best practices such as tracing, structured logging, custom metrics, and more.

⚠️ Do not use this library for production workloads. ⚠️
AWS Lambda Powertools for TypeScript is currently released as a beta developer preview and is intended strictly for feedback purposes only.
This version is not stable, and significant breaking changes might incur as part of the upcoming production-ready release.

--

Quick links: 📜 Documentation | ⬇️ NPM | 💬 Feature request | 🐛 Bug Report | ⚡️ CDK Examples

Logger

🤩 Key features 🤩

  • Capture key fields from Lambda context, cold start and structures logging output as JSON
  • Log Lambda context when instructed (disabled by default)
  • Log sampling logs from all levels for a percentage of invocations (disabled by default)
  • Append additional keys to structured log at any point in time

Metrics

🤩 Key features 🤩

  • Aggregate up to 100 metrics using a single CloudWatch EMF object (large JSON blob)
  • Validate against common metric definitions mistakes (metric unit, values, max dimensions, max metrics, etc)
  • Metrics are created asynchronously by CloudWatch service, no custom stacks needed
  • Context manager to create a one off metric with a different dimension

Tracer

🤩 Key features 🤩

  • Auto capture cold start and service name as annotations, and responses or full exceptions as metadata
  • Auto-disable when not running in AWS Lambda environment
  • Support tracing functions via decorators, middleware, and manual instrumentation
  • Support tracing AWS SDK v2 and v3 via AWS X-Ray SDK for Node.js

This release was made possible by the following contributors:

@alan-churley, @bahrmichael, @dreamorosi, @flochaz, @github-actions[bot], @heitorlessa, @ijemmy and @saragerion

Credits

Credits for the Lambda Powertools idea go to DAZN with their DAZN Lambda Powertools.