Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d625ed2
Integrated Parser for the SQS event type
sdangol Sep 2, 2025
4e69aec
Removed the parsing from the toBatchType function and created it's ow…
sdangol Sep 3, 2025
0a60d4f
Added test to check for invalid event type
sdangol Sep 3, 2025
d0b3d23
Added documentation for the function
sdangol Sep 3, 2025
d6d81f9
Moved the build order of parser before the batch processor
sdangol Sep 3, 2025
b9ef42b
Added condition to do the extended schema parsing only when a zod sch…
sdangol Sep 3, 2025
8c1ad65
Moved the parser as a dev dependency
sdangol Sep 3, 2025
e7c8585
Updated lock file
sdangol Sep 3, 2025
b30e3be
Integrated Parser for the DynamoDB event type
sdangol Sep 3, 2025
f248e9f
Fixed the tests for DynamoDB record processing
sdangol Sep 3, 2025
7120337
Removed unused imports and unused comments
sdangol Sep 3, 2025
b33832f
Integrated Parser for the Kinesis event type
sdangol Sep 4, 2025
f1e8f70
Added tests for parser integration with kinesis and some refactoring
sdangol Sep 4, 2025
8322cdc
Merge branch 'main' into feat/parser-integration-batch-processing
dreamorosi Sep 4, 2025
ce3fc4f
Fixed the SonarQube finding
sdangol Sep 4, 2025
7c4cba8
Merge branch 'feat/parser-integration-batch-processing' of github.com…
sdangol Sep 4, 2025
ee115dd
Marked schema property as protected
sdangol Sep 4, 2025
f36d513
Added braces for the default block
sdangol Sep 4, 2025
29da8ff
Implemented parsing with and without the transformers
sdangol Sep 4, 2025
4f38337
Refactored the tests to reduce duplicate code
sdangol Sep 5, 2025
e73a331
Merge branch 'main' into feat/parser-integration-batch-processing
dreamorosi Sep 5, 2025
b314fb7
Fixed formatting and documentation issues
sdangol Sep 8, 2025
3ec45b2
Merge branch 'feat/parser-integration-batch-processing' of github.com…
sdangol Sep 8, 2025
016394b
Merge branch 'main' into feat/parser-integration-batch-processing
sdangol Sep 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed unused imports and unused comments
  • Loading branch information
sdangol committed Sep 4, 2025
commit 7120337f595b7356be37b501be5bebee8e63465e
1 change: 0 additions & 1 deletion packages/batch/src/BatchProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StandardSchemaV1 } from '@standard-schema/spec';
import type {
AttributeValue,
DynamoDBRecord,
KinesisStreamRecord,
SQSRecord,
Expand Down
15 changes: 4 additions & 11 deletions packages/batch/tests/unit/BatchProcessor.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import {
DynamoDBStreamChangeRecordBase,
DynamoDBStreamRecord,
} from '@aws-lambda-powertools/parser/schemas/dynamodb';
import context from '@aws-lambda-powertools/testing-utils/context';
import type { Context, DynamoDBRecord, SQSRecord } from 'aws-lambda';
import type { Context, SQSRecord } from 'aws-lambda';
import * as v from 'valibot';
import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest';
import { z } from 'zod';
Expand Down Expand Up @@ -508,8 +504,7 @@ describe('Class: AsyncBatchProcessor', () => {
'@aws-lambda-powertools/parser/schemas/sqs'
);
const extendedSchema = SqsRecordSchema.extend({
// biome-ignore lint/suspicious/noExplicitAny: at least for now, we need to broaden the type because the JSONstringified helper method is not typed with StandardSchemaV1 but with ZodSchema
body: JSONStringified(customSchema as any),
body: JSONStringified(customSchema),
});
const customObject1 = {
name: 'test-1',
Expand Down Expand Up @@ -563,8 +558,7 @@ describe('Class: AsyncBatchProcessor', () => {
'@aws-lambda-powertools/parser/schemas/sqs'
);
const extendedSchema = SqsRecordSchema.extend({
// biome-ignore lint/suspicious/noExplicitAny: at least for now, we need to broaden the type because the JSONstringified helper method is not typed with StandardSchemaV1 but with ZodSchema
body: JSONStringified(customSchema as any),
body: JSONStringified(customSchema),
});
const customObject1 = {
name: 'test-1',
Expand Down Expand Up @@ -613,8 +607,7 @@ describe('Class: AsyncBatchProcessor', () => {
'@aws-lambda-powertools/parser/schemas/sqs'
);
const extendedSchema = SqsRecordSchema.extend({
// biome-ignore lint/suspicious/noExplicitAny: at least for now, we need to broaden the type because the JSONstringified helper method is not typed with StandardSchemaV1 but with ZodSchema
body: JSONStringified(customSchema as any),
body: JSONStringified(customSchema),
});
const customObject1 = {
name: 'test-1',
Expand Down