Skip to content

Commit 66cb1e0

Browse files
authored
chore(parser): add util-dynamodb as optional dependency (#3493)
1 parent bd6b24a commit 66cb1e0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Diff for: package-lock.json

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/parser/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@
365365
"typescript",
366366
"nodejs"
367367
],
368+
"dependencies": {
369+
"@aws-lambda-powertools/commons": "^2.13.0"
370+
},
368371
"peerDependencies": {
369-
"@aws-sdk/util-dynamodb": ">=3.x",
370372
"@middy/core": "4.x || 5.x || 6.x",
371373
"zod": ">=3.x"
372374
},

Diff for: packages/parser/src/helpers/dynamodb.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { unmarshallDynamoDB } from '@aws-lambda-powertools/commons/utils/unmarshallDynamoDB';
12
import type { AttributeValue } from '@aws-sdk/client-dynamodb';
2-
import { unmarshall } from '@aws-sdk/util-dynamodb';
33
import { type ZodTypeAny, z } from 'zod';
44

55
/**
@@ -69,7 +69,7 @@ const DynamoDBMarshalled = <T extends ZodTypeAny>(schema: T) =>
6969
])
7070
.transform((str, ctx) => {
7171
try {
72-
return unmarshall(str);
72+
return unmarshallDynamoDB(str);
7373
} catch (err) {
7474
ctx.addIssue({
7575
code: 'custom',

0 commit comments

Comments
 (0)