From f685a92292d477254311878787b1d3a48b19f072 Mon Sep 17 00:00:00 2001 From: Cristian Petre Date: Tue, 14 May 2024 19:38:46 +0100 Subject: [PATCH 1/2] docs: mention optional types --- .changeset/two-suns-bathe.md | 7 +++++++ packages/aws-event-factory/README.md | 9 +++++++++ packages/lambda-batch-processor/README.md | 12 ++++++++++-- packages/sqs-permanent-failure-dlq/README.md | 9 +++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .changeset/two-suns-bathe.md diff --git a/.changeset/two-suns-bathe.md b/.changeset/two-suns-bathe.md new file mode 100644 index 0000000..e52a363 --- /dev/null +++ b/.changeset/two-suns-bathe.md @@ -0,0 +1,7 @@ +--- +"@driimus/aws-event-factory": patch +"@driimus/lambda-batch-processor": patch +"@driimus/sqs-permanent-failure-dlq": patch +--- + +docs: mention optional types diff --git a/packages/aws-event-factory/README.md b/packages/aws-event-factory/README.md index 2848e45..2c5fc49 100644 --- a/packages/aws-event-factory/README.md +++ b/packages/aws-event-factory/README.md @@ -33,6 +33,15 @@ explicit inputs should always be provided for the parts of an event that you rea pnpm add --save-dev @faker-js/faker fishery @driimus/aws-event-factory ``` +### Type hints + +For types to work as expected, `@types/aws-lambda` must be installed: + +```sh +pnpm add --save-dev @types/aws-lambda + +``` + ## Usage Make sure to check out fishery's [documentation](https://github.com/thoughtbot/fishery#documentation) for a more detailed API Reference of the exposed factories. diff --git a/packages/lambda-batch-processor/README.md b/packages/lambda-batch-processor/README.md index 7156762..830b02a 100644 --- a/packages/lambda-batch-processor/README.md +++ b/packages/lambda-batch-processor/README.md @@ -13,10 +13,18 @@ Concurrently process batch records with partial failure support. pnpm add @driimus/lambda-batch-processor ``` +### Type hints + +For types to work as expected, `@types/aws-lambda` must be installed: + +```sh +pnpm add --save-dev @types/aws-lambda + +``` + ## Usage -> [!WARNING] -> [`ReportBatchItemFailures`](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting) must be enabled to allow retrying failed messages. +> [!WARNING] > [`ReportBatchItemFailures`](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting) must be enabled to allow retrying failed messages. ```ts import { SQSBatchProcessor } from '@driimus/lambda-batch-processor'; diff --git a/packages/sqs-permanent-failure-dlq/README.md b/packages/sqs-permanent-failure-dlq/README.md index ac4b69e..1c43a6b 100644 --- a/packages/sqs-permanent-failure-dlq/README.md +++ b/packages/sqs-permanent-failure-dlq/README.md @@ -14,6 +14,15 @@ that sends corresponding SQS messages to a dead-letter SQS queue. pnpm add @driimus/lambda-batch-processor @driimus/sqs-permanent-failure-dlq @aws-sdk/client-sqs ``` +### Type hints + +For types to work as expected, `@types/aws-lambda` must be installed: + +```sh +pnpm add --save-dev @types/aws-lambda + +``` + ## Usage ```ts From 0a31207ab901b75627394b028722fbd51b7cd616 Mon Sep 17 00:00:00 2001 From: Cristian Petre Date: Tue, 14 May 2024 19:39:44 +0100 Subject: [PATCH 2/2] fix(aws-event-factory): only ship build artifacts --- .changeset/three-knives-share.md | 5 +++++ packages/aws-event-factory/package.json | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/three-knives-share.md diff --git a/.changeset/three-knives-share.md b/.changeset/three-knives-share.md new file mode 100644 index 0000000..73dce28 --- /dev/null +++ b/.changeset/three-knives-share.md @@ -0,0 +1,5 @@ +--- +"@driimus/aws-event-factory": patch +--- + +fix: only ship build artifacts diff --git a/packages/aws-event-factory/package.json b/packages/aws-event-factory/package.json index 90e61e3..7bddbda 100644 --- a/packages/aws-event-factory/package.json +++ b/packages/aws-event-factory/package.json @@ -29,6 +29,9 @@ "type": "module", "exports": "./dist/index.js", "types": "./dist/index.d.ts", + "files": [ + "./dist" + ], "scripts": { "build": "tsc", "test": "vitest run"