Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @aws-lambda-powertools/logger from 1.14.0 to 2.0.2 in /source/image-handler #376

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Mar 11, 2024

Bumps @aws-lambda-powertools/logger from 1.14.0 to 2.0.2.

Release notes

Sourced from @​aws-lambda-powertools/logger's releases.

v2.0.2

Summary

This patch release fixes a bug affecting customers using Tracer in a JavaScript ESM environment.

Tracer

In v2.0.0 we launched ESM support and most of our focus went on customers using Powertools with TypeScript and bundlers (i.e. esbuild). This introduced a bug that prevented customers using plain JavaScript with ESM from successfully importing the utility.

This release changes the way that the AWS X-Ray SDK for Node.js is imported within the Tracer utility so that customers using ESM with JavaScript can import the utility correctly.

Special thanks to @​webdeveric for reporting the issue and suggesting a fix.

Changes

🐛 Bug and hot fixes

This release was made possible by the following contributors:

@​dreamorosi

v2.0.1

Summary

This is a patch release we had to make to align the new Lambda Layer ARNs to the v2.0.0 major release.

The ARN for the new major version will use this format: arn:aws:lambda:{region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:1.

You can find a list of changes introduced with v2 in the v2.0.0 release notes.

Changes

This release was made possible by the following contributors:

@​dreamorosi, @​am29d

v2.0.0

Summary

We are super happy to announce our next major version – v2.0.0 🎉🎉!

The most requested feature by customers was enabling ESM support. The ecosystem is gradually moving to ESM and today 1 in 5 of the popular packages on npm contains ESM. You can now take advantage of modern features like top-level await, and advanced techniques like tree shaking to benefit from smaller bundles.

Using CommonJS? We have your back! v2 supports both CommonJS and ESM, as we know the ecosystem is in a transition phase as we speak.

The second most requested feature was further Logger customizations. Extending logger to customize log attributes became easier – we now differentiate between standard and custom log attributes. Based on your feedback, we’ve also improved typing and made it more intuitive to decide what the final output should be.

... (truncated)

Changelog

Sourced from @​aws-lambda-powertools/logger's changelog.

2.0.2 (2024-03-05)

Bug Fixes

  • tracer: modify aws-xray-sdk-core import for js (#2164) (29630b5)

2.0.1 (2024-03-04)

Note: Version bump only for package aws-lambda-powertools-typescript

2.0.0 (2024-03-04)

Note: Version bump only for package aws-lambda-powertools-typescript

1.18.1 (2024-02-20)

Note: Version bump only for package aws-lambda-powertools-typescript

1.18.0 (2024-01-26)

Features

layers: add ca-west-1 region (#1836) (55ff4df)

1.17.0 (2023-11-24)

maintenance: drop support for Node.js 14 (#1664) (e2a0923)

1.16.0 (2023-11-16)

Features

  • logger: add support for AWS_LAMBDA_LOG_LEVEL and POWERTOOLS_LOG_LEVEL (#1795) (e69abfb)

... (truncated)

Upgrade guide

Sourced from @​aws-lambda-powertools/logger's upgrade guide.


title: Upgrade guide description: Guide to update between major Powertools for AWS Lambda (TypeScript) versions

Migrate from v1 to v2

V2 is focused on official support for ESM (ECMAScript modules). We've made other minimal breaking changes to make your transition to v2 as smooth as possible.

Quick summary

Area Change Code change required
ESM support Added ESM support via dual CommonJS and ESM bundling, enabling top-level await and tree-shaking. -
Middy.js Updated import path for Middy.js middlewares to leverage subpath exports - i.e. @aws-lambda-powertools/tracer/middleware. Yes
Types imports Updated import path for TypeScript types to leverage subpath exports - i.e. @aws-lambda-powertools/logger/types. Yes
Logger Changed log sampling to dynamically switch log level to DEBUG on a percentage of requests. -
Logger Updated custom log formatter to include standard as well as persistent keys. Yes
Logger Removed ContextExamples from @aws-lambda-powertools/commons package. Yes
Logger and Tracer Removed deprecated createLogger and createTracer helper functions in favor of direct instantiation. Yes

First steps

Before you start, we suggest making a copy of your current working project or create a new git branch.

  1. Upgrade Node.js to v16 or higher, Node.js v20 is recommended.
  2. Ensure that you have the latest Powertools for AWS Lambda (TypeScript) version via Lambda Layer or npm.
  3. Review the following sections to confirm whether they apply to your codebase.

ESM support

With support for ES Modules in v2, you can now use import instead of require syntax.

This is especially useful when you want to run asynchronous code during the initialization phase by using top-level await.

import { getSecret } from '@aws-lambda-powertools/parameters/secrets';
// This code will run during the initialization phase of your Lambda function
const myApiKey = await getSecret('my-api-key', { transform: 'json' });
export const handler = async (_event: unknown, _context: unknown) => {
// ...
};

In v2, we improved tree-shaking support to help you reduce your function bundle size. We would love to hear your feedback on further improvements we could make.

Unable to use ESM?

... (truncated)

Commits
  • 047ad5c chore(ci): bump version to 2.0.2 (#2165)
  • 29630b5 fix(tracer): modify aws-xray-sdk-core import for js (#2164)
  • 303428a chore(ci): bump version to 2.0.1 (#2162)
  • c3800e3 chore(docs): mark docs/snippets package as private (#2161)
  • e23bd55 chore(ci): bump version to 2.0.0 (#2156)
  • d8bb870 chore(deps): bump github/codeql-action from 3.24.5 to 3.24.6 (#2152)
  • 061a584 chore(deps-dev): bump aws-sdk from 2.1567.0 to 2.1568.0 (#2149)
  • 6386ad2 chore(deps-dev): bump @​types/aws-lambda from 8.10.133 to 8.10.134 (#2151)
  • 89530ac chore(deps): bump squidfunk/mkdocs-material in /docs (#2148)
  • c20e350 chore(deps): bump mkdocs-material from 9.5.9 to 9.5.11 in /docs (#2139)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by aws-powertools-bot, a new releaser for @​aws-lambda-powertools/logger since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@aws-lambda-powertools/logger](https://github.com/aws-powertools/powertools-lambda-typescript) from 1.14.0 to 2.0.2.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md)
- [Upgrade guide](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/docs/upgrade.md)
- [Commits](aws-powertools/powertools-lambda-typescript@v1.14.0...v2.0.2)

---
updated-dependencies:
- dependency-name: "@aws-lambda-powertools/logger"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Mar 11, 2024
@dependabot dependabot bot requested a review from a team March 11, 2024 11:18
Copy link
Author

dependabot bot commented on behalf of github Mar 18, 2024

Superseded by #382.

@dependabot dependabot bot closed this Mar 18, 2024
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/source/image-handler/aws-lambda-powertools/logger-2.0.2 branch March 18, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants