Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve metadata filler #153

Merged
merged 2 commits into from
May 24, 2024
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
2 changes: 1 addition & 1 deletion packages/amqp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "vitest",
"test:coverage": "npm test -- --coverage",
"test:ci": "npm run docker:start:dev && npm run test:coverage && npm run docker:stop:dev",
"lint": "eslint . --ext .ts",
"lint": "eslint . --ext .ts && tsc --noEmit",
"lint:fix": "prettier --write . && eslint . --ext .ts --fix",
"docker:start:dev": "docker compose up -d",
"docker:stop:dev": "docker compose down",
Expand Down
1 change: 0 additions & 1 deletion packages/amqp/test/utils/testContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export async function registerDependencies(
return new AmqpQueuePublisherManager(dependencies, {
metadataFiller: new CommonMetadataFiller({
serviceId: 'service',
schemaVersion: '1.0.0',
}),
publisherFactory: new CommonAmqpQueuePublisherFactory(),
newPublisherOptions: {
Expand Down
3 changes: 1 addition & 2 deletions packages/core/lib/messages/MetadataFiller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export type TimestampGenerator = () => string

export type MetadataFillerOptions = {
serviceId: string
schemaVersion: string
idGenerator?: IdGenerator
timestampGenerator?: TimestampGenerator
defaultVersion?: string
Expand Down Expand Up @@ -49,7 +48,7 @@ export class CommonMetadataFiller implements MetadataFiller {

produceMetadata(
_currentMessage: PublisherBaseEventType,
eventDefinition: CommonEventDefinition,
eventDefinition: Pick<CommonEventDefinition, 'schemaVersion'>,
precedingMessageMetadata?: MessageMetadataType,
): MessageMetadataType {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@message-queue-toolkit/core",
"version": "13.3.1",
"version": "13.3.2",
"private": false,
"license": "MIT",
"description": "Useful utilities, interfaces and base classes for message queue handling. Supports AMQP and SQS with a common abstraction on top currently",
Expand All @@ -15,7 +15,7 @@
"scripts": {
"build": "del-cli dist && del-cli coverage && tsc",
"build:release": "del-cli dist && del-cli coverage && npm run lint && tsc --project tsconfig.release.json",
"lint": "eslint . --ext .ts",
"lint": "eslint . --ext .ts && tsc --noEmit",
"lint:fix": "prettier --write . && eslint . --ext .ts --fix",
"test": "vitest",
"test:coverage": "npm test -- --coverage",
Expand Down
1 change: 0 additions & 1 deletion packages/sns/test/utils/testContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export async function registerDependencies(
return new SnsPublisherManager(dependencies, {
metadataFiller: new CommonMetadataFiller({
serviceId: 'service',
schemaVersion: '1.0.0',
}),
publisherFactory: new CommonSnsPublisherFactory(),
newPublisherOptions: {
Expand Down
2 changes: 1 addition & 1 deletion packages/sqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "vitest",
"test:coverage": "npm test -- --coverage",
"test:ci": "npm run docker:start:dev && npm run test:coverage && npm run docker:stop:dev",
"lint": "eslint . --ext .ts",
"lint": "eslint . --ext .ts && tsc --noEmit",
"lint:fix": "prettier --write . && eslint . --ext .ts --fix",
"docker:start:dev": "docker compose up -d",
"docker:stop:dev": "docker compose down",
Expand Down
Loading