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 b34bd44 commit b12ad17
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 29 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"canonical/node",
"canonical/typescript"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"root": true
}
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@
]
},
"bin": {
"roarr": "dist/bin/index.js"
"roarr": "dist/src/bin/index.js"
},
"dependencies": {
"chalk": "^4.1.0",
"chalk": "^4.1.1",
"es6-error": "^4.1.1",
"json5": "^2.1.3",
"json5": "^2.2.0",
"prettyjson": "^1.2.1",
"roarr": "^3.2.0",
"roarr": "^4.2.5",
"searchjs": "^1.1.0",
"socket.io-client": "^4.0.1",
"socket.io-client": "^4.1.1",
"split2": "^3.2.2",
"throttle-debounce": "^3.0.1",
"uuid": "^3.4.0",
"yargs": "^16.2.0"
"uuid": "^8.3.2",
"yargs": "^17.0.1"
},
"description": "A CLI program for Roarr logger.",
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/yargs": "^15.0.12",
"ava": "^3.14.0",
"@types/yargs": "^16.0.1",
"ava": "^3.15.0",
"coveralls": "^3.1.0",
"del-cli": "^3.0.1",
"eslint": "^7.16.0",
"eslint-config-canonical": "^24.4.5",
"husky": "^4.3.6",
"eslint": "^7.26.0",
"eslint-config-canonical": "^26.2.3",
"husky": "^6.0.0",
"nyc": "^15.1.0",
"semantic-release": "^17.3.0",
"semantic-release": "^17.4.3",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
"typescript": "^4.2.4"
},
"engines": {
"node": ">=10"
Expand Down
8 changes: 4 additions & 4 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ const roarrConfigurationPath = findNearestRoarrConfigurationPath();
let filterFunction: FilterFunction | null = null;

if (roarrConfigurationPath) {
/* eslint-disable node/global-require, import/no-dynamic-require, @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
const roarrConfiguration: RoarrConfigurationType = require(roarrConfigurationPath);

/* eslint-enable */
/* eslint-enable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */

if (roarrConfiguration?.filterFunction) {
filterFunction = roarrConfiguration.filterFunction;
Expand All @@ -106,8 +106,8 @@ if (argv['api-key']) {
remoteStream = createRemoteStream(
argv['api-url'],
String(argv['api-key']),
argv.name || '',
argv.tags || '',
argv.name ?? '',
argv.tags ?? '',
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

/* eslint-disable fp/no-class, fp/no-this */
/* eslint-disable fp/no-class */

import ExtendableError from 'es6-error';

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 && configuration.filterFunction(subject)
configuration?.filterFunction(subject)
) {
result = buffer.slice(-1 * lastLinePrinterLinesAgo - 1, -1).join('\n') + '\n' + line.trim();

Expand Down
5 changes: 2 additions & 3 deletions src/factories/createLogFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const createLogFormatter = (configuration: LogFormatterConfigurationType)
formattedMessage += ': ' + message.message + '\n';

if (message.context) {
/* eslint-disable no-unused-vars */
/* eslint-disable @typescript-eslint/no-unused-vars */
const {
application: termporary0,
hostname: termporary1,
Expand All @@ -78,10 +78,9 @@ export const createLogFormatter = (configuration: LogFormatterConfigurationType)
...rest
} = message.context;

/* eslint-enable */
/* eslint-enable @typescript-eslint/no-unused-vars */

if (Object.keys(rest).length) {
// eslint-disable-next-line no-console
formattedMessage += prettyjson.render(rest, {
noColor: !configuration.useColors,
}) + '\n\n';
Expand Down
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import {
import type {
Chalk,
} from 'chalk';
import type {
Expand All @@ -15,14 +15,14 @@ export type RoarrConfigurationType = {

export type LogFilterConfigurationType = {
readonly chalk: Chalk,
readonly filterExpression: null | string,
readonly filterFunction: null | FilterFunction,
readonly filterExpression: string | null,
readonly filterFunction: FilterFunction | null,
readonly head: number,
readonly lag: number,
};

export type LogFormatterConfigurationType = {
readonly chalk: Chalk,
readonly outputFormat: 'pretty' | 'json',
readonly outputFormat: 'json' | 'pretty',
readonly useColors: boolean,
};
2 changes: 1 addition & 1 deletion src/utilities/formatInvalidInputMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
Chalk,
} from 'chalk';

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"node_modules"
],
"include": [
"src"
"src",
"test"
]
}

0 comments on commit b12ad17

Please sign in to comment.