Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 23 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,34 @@
"test": "turbo run test"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@eslint/js": "^9.22.0",
"@faker-js/faker": "^9.6.0",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.30.0",
"@eslint/js": "^9.39.4",
"@faker-js/faker": "^9.9.0",
"@tsconfig/node-lts": "^24.0.0",
"@tsconfig/strictest": "^2.0.8",
"@types/aws-lambda": "^8.10.146",
"@types/node": "^24.0.0",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"@vitest/coverage-v8": "^3.0.0",
"@vitest/eslint-plugin": "^1.1.16",
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-import-x": "^4.6.1",
"eslint-plugin-prettier": "^5.2.3",
"@types/aws-lambda": "^8.10.161",
"@types/node": "^24.12.2",
"@typescript-eslint/eslint-plugin": "^8.58.1",
"@typescript-eslint/parser": "^8.58.1",
"@vitest/coverage-v8": "^4.1.4",
"@vitest/eslint-plugin": "^1.6.15",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import-x": "^4.16.2",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-turbo": "^2.4.0",
"eslint-plugin-turbo": "^2.9.6",
"eslint-plugin-unicorn": "^57.0.0",
"fishery": "^2.2.2",
"prettier": "^3.2.4",
"turbo": "^2.0.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.23.0",
"vitest": "^3.0.0"
"fishery": "^2.4.0",
"prettier": "^3.8.2",
"turbo": "^2.9.6",
"typescript": "^6.0.2",
"typescript-eslint": "^8.58.1",
"vite": "^8.0.8",
"vitest": "^4.1.4"
},
"packageManager": "pnpm@10.25.0+sha256.0f3726654b0b5e52e5800904de168afc3c667e2abf84bdb06d9ac1386104bd90",
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
"engines": {
"node": ">=24.11.0"
}
Expand Down
23 changes: 11 additions & 12 deletions packages/lambda-batch-processor/tests/batchProcessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,19 @@ describe('BatchProcessor', () => {
});

it('surfaces failures with the non-retryable errors handler', async () => {
const handlingFunction = vi.fn<[PermanentFailure<SQSRecord>]>(async () => {});
const nonRetryableErrorHandler = new (class Test
implements PermanentFailureHandler<SQSEvent>
{
async handleRejections(accumulator: FailureAccumulator<SQSRecord>) {
try {
for (const failure of accumulator.permanentFailures) {
await handlingFunction(failure);
const handlingFunction = vi.fn<(failure: PermanentFailure) => Promise<void>>(async () => {});
const nonRetryableErrorHandler =
new (class Test implements PermanentFailureHandler<SQSEvent> {
async handleRejections(accumulator: FailureAccumulator<SQSRecord>) {
try {
for (const failure of accumulator.permanentFailures) {
await handlingFunction(failure);
}
} catch {
accumulator.surfacePermanentFailures();
}
} catch {
accumulator.surfacePermanentFailures();
}
}
})();
})();
const p = new TestProcessor(handler, {
nonRetryableErrors: [ValidationError],
nonRetryableErrorHandler,
Expand Down
Loading