From 0bb4e0c8cc77e04473062e44262ac195a9a79a13 Mon Sep 17 00:00:00 2001 From: Jay McDoniel Date: Wed, 23 Oct 2024 09:01:53 -0700 Subject: [PATCH 1/2] fix: explicitly set the styler type This fixes an issue where the build procecss auto adds and `import` statement that fails in other environments when the package gets installed. --- packages/nestjs-module/src/ogma.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nestjs-module/src/ogma.service.ts b/packages/nestjs-module/src/ogma.service.ts index 9286deef..5486f68f 100644 --- a/packages/nestjs-module/src/ogma.service.ts +++ b/packages/nestjs-module/src/ogma.service.ts @@ -1,6 +1,7 @@ import { Injectable, LoggerService, Optional } from '@nestjs/common'; import { LogLevel, OgmaWritableLevel } from '@ogma/common'; import { Ogma } from '@ogma/logger'; +import type { Styler } from '@ogma/styler'; import { InjectOgma, InjectOgmaContext, InjectTraceMethod } from './decorators'; import { OgmaServiceMeta } from './interfaces'; @@ -47,7 +48,7 @@ export class OgmaService implements LoggerService { * instance that the logger uses for custom coloring without needing * to manage a new styler instance */ - public get style() { + public get style(): Styler { return this.ogma.style; } From 48dbd4df56d2fb061cf102827424cbd6d8e903f4 Mon Sep 17 00:00:00 2001 From: Jay McDoniel Date: Wed, 23 Oct 2024 09:02:19 -0700 Subject: [PATCH 2/2] chore: changeset for styler type --- .changeset/violet-steaks-applaud.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/violet-steaks-applaud.md diff --git a/.changeset/violet-steaks-applaud.md b/.changeset/violet-steaks-applaud.md new file mode 100644 index 00000000..44d389d4 --- /dev/null +++ b/.changeset/violet-steaks-applaud.md @@ -0,0 +1,5 @@ +--- +'@ogma/nestjs-module': patch +--- + +Explicitly set the styler type