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.1.0 in /source/image-handler #404

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Apr 22, 2024

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

Release notes

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

v2.1.0

Summary

This release marks the first beta release of the new Parser utility 🎉 and adds custom JMESPath functions to the Idempotency utility.

Parser

⚠️ WARNING: Do not use this utility in production just yet! ⚠️
This AWS Lambda Powertools for TypeScript utility is currently released as beta developer preview and is intended strictly for feedback and testing purposes only. This version is not stable, and significant breaking changes might incur before the GA release.

We are excited to announce the first public beta for the Parser utility, which brings data validation and parsing using Zod, a TypeScript-first schema declaration library.

Key features

To get started install the utility together with Zod 3.x:

npm i @aws-lambda-powertools/parser zod@~3

Next, define your schema that models your event, for example:

import { z } from 'zod';
const orderSchema = z.object({
id: z.number().positive(),
description: z.string(),
items: z.array(
z.object({
id: z.number().positive(),
quantity: z.number(),
description: z.string(),
})
),
optionalField: z.string().optional(),
});

The utility comes with built-in schemas for many AWS events (API GW, ALB, SQS, SNS, EventBridge, Kafka, Kinesis, and more) that you can use or extended with your own payloads. For example, when working with events coming from Amazon EventBridge you can provide a custom schema for the detail field:

... (truncated)

Changelog

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

2.1.0 (2024-04-17)

Bug Fixes

  • jmespath: refactor custom function introspection to work with minification (#2384) (21ecc4f)

Features

  • idempotency: add custom JMESPath functions (#2364) (9721e7c)

2.0.4 (2024-04-10)

Bug Fixes

idempotency: return correct value from in-memory cache (#2309) (5b4c103) logger: buffer logs emitted during init (#2269) (1439867)

Features

tracer: support tracing fetch requests (#1619) (607548b) jmespath public release of JMESPAth utility (#1645) (233ff9b)

Minor Changes

logger: use template literal instead of node:util format (#2283) (961ace1)

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)

... (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
  • 8b1a9ad chore(ci): bump version to 2.1.0 (#2392)
  • ba2f897 chore(ci): fetch entire history for lerna versioning (#2391)
  • 84a5ff8 test(maintenance): add ESM output to e2e test (#2370)
  • 21ecc4f fix(jmespath): refactor custom function introspection to work with minificati...
  • 8145bc1 chore(parser): add parser to release steps (#2382)
  • 9505544 chore(deps): bump mkdocs-material from 9.5.17 to 9.5.18 in /docs (#2371)
  • b7f08f4 chore(deps): bump squidfunk/mkdocs-material in /docs (#2373)
  • 48bb9a7 refactor(jmespath): rename jmespath parsing options type (#2367)
  • 9721e7c feat(idempotency): add custom JMESPath functions (#2364)
  • fc2d709 chore(deps-dev): bump aws-sdk from 2.1598.0 to 2.1599.0 (#2365)
  • 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.1.0.
- [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.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 22, 2024
@dependabot dependabot bot requested a review from a team April 22, 2024 11:36
Copy link
Author

dependabot bot commented on behalf of github Oct 28, 2024

Superseded by #416.

@dependabot dependabot bot closed this Oct 28, 2024
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/source/image-handler/aws-lambda-powertools/logger-2.1.0 branch October 28, 2024 11:41
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