Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 17, 2021
1 parent b12ad17 commit d2cab78
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ node_modules
!.flowconfig
!.github
!.gitignore
!.husky
!.npmignore
!.nycrc
!.README
!.travis.yml
/package-lock.json
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
"engines": {
"node": ">=10"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint && npm run test && npm run build"
}
},
"keywords": [
"log",
"logger",
Expand Down
2 changes: 1 addition & 1 deletion src/factories/createLogFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createLogFilter = (configuration: LogFilterConfigurationType) => {

if (
configuration.filterExpression && matchObject(subject, configuration.filterExpression) ||
configuration?.filterFunction(subject)
configuration.filterFunction?.(subject)
) {
result = buffer.slice(-1 * lastLinePrinterLinesAgo - 1, -1).join('\n') + '\n' + line.trim();

Expand Down
4 changes: 2 additions & 2 deletions src/factories/createLogFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import prettyjson from 'prettyjson';
import type {
MessageType,
Message,
} from 'roarr';
import split from 'split2';
import type {
Expand Down Expand Up @@ -38,7 +38,7 @@ export const createLogFormatter = (configuration: LogFormatterConfigurationType)
return logLevels[logLevel] || 'INFO';
};

const formatMessage = (message: MessageType): string => {
const formatMessage = (message: Message): string => {
let formattedMessage = '';

formattedMessage = '[' + new Date(message.time).toISOString() + ']';
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import type {
Chalk,
} from 'chalk';
import type {
MessageType,
Message,
} from 'roarr';

export type FilterFunction = (message: MessageType) => boolean;
export type FilterFunction = (message: Message) => boolean;

export type RoarrConfigurationType = {
readonly filterFunction: FilterFunction,
Expand Down

0 comments on commit d2cab78

Please sign in to comment.