Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ Bump @aws-lambda-powertools/parameters from 2.0.4 to 2.1.0 (#823)
Bumps [@aws-lambda-powertools/parameters](https://github.com/aws-powertools/powertools-lambda-typescript) from 2.0.4 to 2.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/aws-powertools/powertools-lambda-typescript/releases"><code>@aws-lambda-powertools/parameters</code>'s releases</a>.</em></p> <blockquote> <h2>v2.1.0</h2> <h2>Summary</h2> <p>This release marks the first beta release of the new <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/"><strong>Parser utility</strong></a> 🎉 and adds custom JMESPath functions to the Idempotency utility.</p> <h3>Parser</h3> <table> <thead> <tr> <th align="left">⚠️ <strong>WARNING: Do not use this utility in production just yet!</strong>⚠️ </th> </tr> </thead> <tbody> <tr> <td align="left">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 <a href="https://github.com/aws-powertools/powertools-lambda-typescript/milestone/16">before the GA release</a>.</td> </tr> </tbody> </table> <p>We are excited to announce the first public beta for the Parser utility, which brings data validation and parsing using <a href="https://zod.dev/">Zod</a>, a TypeScript-first schema declaration library.</p> <h4>Key features</h4> <ul> <li>Define data schema as Zod schema, then parse, validate and extract only what you want</li> <li>Built-in <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-schemas">schemas</a> and <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#envelopes">envelopes</a> to unwrap and validate popular AWS event sources payloads</li> <li><a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#extend-built-in-schemas">Extend and customize</a> envelopes to fit your needs</li> <li><a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#safe-parsing">Safe parsing</a> option to avoid throwing errors and custom error handling</li> <li>Available as a <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#middy-middleware">Middy.js middleware</a>, TypeScript <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#decorator">class method decorator</a>, and <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#manual-parsing">standalone function</a></li> </ul> <p>To get started install the utility together with Zod 3.x:</p> <pre><code>npm i @aws-lambda-powertools/parser zod@~3 </code></pre> <p>Next, define your schema that models your event, for example:</p> <pre lang="typescript"><code>import { z } from 'zod'; <p>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(), }); </code></pre></p> <p>The utility comes with <a href="https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parser/#built-in-schemas">built-in schemas</a> 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:</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md"><code>@aws-lambda-powertools/parameters</code>'s changelog</a>.</em></p> <blockquote> <h1><a href="https://github.com/aws-powertools/powertools-lambda-typescript/compare/v2.0.4...v2.1.0">2.1.0</a> (2024-04-17)</h1> <h3>Bug Fixes</h3> <ul> <li><strong>jmespath:</strong> refactor custom function introspection to work with minification (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2384">#2384</a>) (<a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/21ecc4f736ccba85c276889163860a98613174cc">21ecc4f</a>)</li> </ul> <h3>Features</h3> <ul> <li><strong>idempotency:</strong> add custom JMESPath functions (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2364">#2364</a>) (<a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/9721e7c01fc010944eb477bdbc24b9e06a5c4571">9721e7c</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/8b1a9ad114530d9144343d7807a52a635309283c"><code>8b1a9ad</code></a> chore(ci): bump version to 2.1.0 (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2392">#2392</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/ba2f897f4f48eb7d6223e67b46e7364b5843fa32"><code>ba2f897</code></a> chore(ci): fetch entire history for lerna versioning (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2391">#2391</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/84a5ff84e4202a89cc8ff3f5a281eddab6f47ceb"><code>84a5ff8</code></a> test(maintenance): add ESM output to e2e test (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2370">#2370</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/21ecc4f736ccba85c276889163860a98613174cc"><code>21ecc4f</code></a> fix(jmespath): refactor custom function introspection to work with minificati...</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/8145bc10d6e34098938771cbdcc9d4981e26cd2d"><code>8145bc1</code></a> chore(parser): add parser to release steps (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2382">#2382</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/95055449e2dcf044dbb0563d584f30c26dfdd31e"><code>9505544</code></a> chore(deps): bump mkdocs-material from 9.5.17 to 9.5.18 in /docs (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2371">#2371</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/b7f08f4ce163287133645c3964d402bfb812a3dd"><code>b7f08f4</code></a> chore(deps): bump squidfunk/mkdocs-material in /docs (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2373">#2373</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/48bb9a71f8be950bb25468be6495bb2d1e7f87e2"><code>48bb9a7</code></a> refactor(jmespath): rename jmespath parsing options type (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2367">#2367</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/9721e7c01fc010944eb477bdbc24b9e06a5c4571"><code>9721e7c</code></a> feat(idempotency): add custom JMESPath functions (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2364">#2364</a>)</li> <li><a href="https://github.com/aws-powertools/powertools-lambda-typescript/commit/fc2d70925925846b0eab63111b05c22e086d2b5f"><code>fc2d709</code></a> chore(deps-dev): bump aws-sdk from 2.1598.0 to 2.1599.0 (<a href="https://redirect.github.com/aws-powertools/powertools-lambda-typescript/issues/2365">#2365</a>)</li> <li>Additional commits viewable in <a href="https://github.com/aws-powertools/powertools-lambda-typescript/compare/v2.0.4...v2.1.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@aws-lambda-powertools/parameters&package-manager=npm_and_yarn&previous-version=2.0.4&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information