Skip to content

Commit

Permalink
refactor: Use scoped pino packages as interim dependencies #1
Browse files Browse the repository at this point in the history
Need to use full NPM packages to support library in use for flatpak and docker images without git. Can remove once PRs are merged.
  • Loading branch information
FoxxMD committed Mar 18, 2024
1 parent 0dda520 commit 32c0891
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 56 deletions.
90 changes: 45 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@foxxmd/logging",
"type": "module",
"version": "0.1.5",
"version": "0.1.6",
"repository": "https://github.com/foxxmd/logging",
"description": "A typed, opinionated, batteries-included, Pino-based logging solution for backend TS/JS projects",
"scripts": {
Expand Down Expand Up @@ -67,9 +67,9 @@
"with-local-tmp-dir": "^5.1.1"
},
"dependencies": {
"pino": "^8.19.0",
"pino-pretty": "github:foxxmd/pino-pretty#additionalFunctionality",
"pino-roll": "github:foxxmd/pino-roll#fileAsFunc"
"@foxxmd/pino-pretty": "^10.3.2",
"@foxxmd/pino-roll": "^1.0.1",
"pino": "^8.19.0"
},
"overrides": {
"with-local-tmp-dir": {
Expand Down
4 changes: 2 additions & 2 deletions src/destinations.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import pinoRoll from 'pino-roll';
import pinoRoll from '@foxxmd/pino-roll';
import {
LogLevelStreamEntry,
LogLevel,
StreamDestination,
FileDestination,
} from "./types.js";
import {DestinationStream, pino, destination} from "pino";
import {build} from "pino-pretty"
import {build} from "@foxxmd/pino-pretty"
import {PRETTY_OPTS_CONSOLE, PRETTY_OPTS_FILE, prettyOptsConsoleFactory, prettyOptsFileFactory} from "./pretty.js";
import {fileOrDirectoryIsWriteable} from "./util.js";
import path from "path";
Expand Down
2 changes: 1 addition & 1 deletion src/pretty.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PrettyOptions} from "pino-pretty";
import {PrettyOptions} from "@foxxmd/pino-pretty";
import {CWD, getLongestStr} from "./util.js";
import {
LOG_LEVEL_NAMES,
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {DestinationStream, Logger as PinoLogger, LoggerOptions, StreamEntry, Level} from 'pino';
import {PrettyOptions} from "pino-pretty";
import {PrettyOptions} from "@foxxmd/pino-pretty";
import {MarkRequired} from "ts-essentials";

export type LogLevel = typeof LOG_LEVEL_NAMES[number];
Expand Down
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const testRollingAppLogger = async (config: LogOptions | object = {}, extras: Lo
stream: rawStream
}
];
const {destinations = [], ...restExtras} = extras;
const logger = await loggerAppRolling({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], ...restExtras});
const {destinations = [], pretty, ...restExtras} = extras;
const logger = await loggerAppRolling({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], pretty, ...restExtras});
return [logger, testStream, rawStream];
}

Expand All @@ -135,7 +135,7 @@ const testAppLogger = (config: LogOptions | object = {}, extras: LoggerAppExtras
},
];

const logger = loggerApp({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], ...pretty, ...restExtras});
const logger = loggerApp({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], pretty, ...restExtras});
return [logger, testStream, rawStream];
}

Expand Down

0 comments on commit 32c0891

Please sign in to comment.