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.3 in /source/image-handler #382

Conversation

dependabot[bot]
Copy link

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

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

Release notes

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

v2.0.3

Summary

This release brings a couple of bug fixes related to our new ESM builds as well as minor improvements in how Logger formats error stack traces.

Idempotency

Due to a misconfiguration in our build process some components of the Idempotency utility were not being transformed correctly when bundling our TypeScript source code to ESM-formatted JavaScript. This caused runtime errors when importing the ESM build of the utility.

With this release we have fixed the build process and resolved the issue so that the Idempotency utility can now be used with functions using ESM.

Layers

Since the v2 release we have started including ESM builds to our public Lambda Layers, however we failed to include a polyfill for the require keyword

Based on our tests the presence of this polyfill should not impact your code but only code paths evaluated as a result of importing Powertools utilities from the layer itself. If you encounter issues with this change please let us know by opening an issue.

Logger

As part of this release have improved the regular expression used to extract the file and line locations of an error from its stack trace. The change didn't result in any chance in the way errors are formatted, so you should not see any difference in your logs.

Acknowledgements

Special thanks to @​karthikeyanjp and @​miguel-martinr for their contributions as well as @​AllyMurray for reporting the issue with bundling.

Changes

🌟New features and non-breaking changes

🌟 Minor Changes

📜 Documentation updates

... (truncated)

Changelog

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

2.0.3 (2024-03-15)

feat(logger): improve regex in stack trace parsing (#2121) (ebe5eef) fix(idempotency): transform private class fields (#2230) (aa6e6e0) improv(commons):: expand type utils functions (#2191) (9208393) feat(commons): add fromBase64 helper function (#2188) (133159b) fix(layers):: add createRequire banner in esm build (#2231) (730bcc9)

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)

... (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

End of support v1

!!! warning "On March 13th, 2024, Powertools for AWS Lambda (TypeScript) v1 entered maintenance mode, and will reach end-of-life on September 1st, 2024. If you are still using v1, we strongly recommend you to read our upgrade guide and update to the latest version."

Given our commitment to all of our customers using Powertools for AWS Lambda (TypeScript), we will keep npm v1 releases and documentation 1.x versions to prevent any disruption.

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) => {
// ...
</tr></table>

... (truncated)

Commits
  • 8138df1 chore(ci): bump version to 2.0.3 (#2240)
  • a88ec79 chore(deps): bump the aws-cdk group with 2 updates (#2238)
  • de0e759 chore(deps): bump the aws-sdk group with 2 updates (#2237)
  • 99d7821 chore(deps): bump esbuild from 0.20.1 to 0.20.2 (#2239)
  • 3c90a04 chore(deps-dev): bump aws-sdk from 2.1576.0 to 2.1578.0 (#2236)
  • 6929c16 chore(deps-dev): bump @​types/node from 20.11.26 to 20.11.28 (#2235)
  • e29088d chore(deps-dev): bump follow-redirects from 1.15.5 to 1.15.6 (#2234)
  • 02cbaf9 chore(deps): bump the aws-sdk group with 9 updates (#2227)
  • 730bcc9 fix(layers): add createRequire banner in esm (#2232)
  • aa6e6e0 fix(idempotency): transform private class fields (#2233)
  • 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.3.
- [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.3)

---
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 18, 2024
@dependabot dependabot bot requested a review from a team March 18, 2024 11:51
Copy link
Author

dependabot bot commented on behalf of github Apr 15, 2024

Superseded by #398.

@dependabot dependabot bot closed this Apr 15, 2024
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/source/image-handler/aws-lambda-powertools/logger-2.0.3 branch April 15, 2024 11:30
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