refactor: update dependencies

This commit is contained in:
Rainer Killinger
2020-03-10 10:56:20 +01:00
committed by Rainer Killinger
parent edc6e6fad5
commit 9de064756a
6 changed files with 1426 additions and 775 deletions

2150
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
"contributors": [ "contributors": [
"Anselm Stordeur <anselmstordeur@gmail.com>", "Anselm Stordeur <anselmstordeur@gmail.com>",
"Jovan Krunic <jovan.krunic@gmail.com>", "Jovan Krunic <jovan.krunic@gmail.com>",
"Rainer Killinger<mail-openstapps@killinger.co>" "Rainer Killinger <mail-openstapps@killinger.co>"
], ],
"typings": "./lib/logger.d.ts", "typings": "./lib/logger.d.ts",
"main": "./lib/logger.js", "main": "./lib/logger.js",
@@ -55,31 +55,31 @@
"statements": 95 "statements": 95
}, },
"devDependencies": { "devDependencies": {
"@openstapps/configuration": "0.21.0", "@openstapps/configuration": "0.24.0",
"@types/chai": "4.1.7", "@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.0", "@types/chai-as-promised": "7.1.2",
"@types/chai-spies": "1.0.0", "@types/chai-spies": "1.0.1",
"@types/mocha": "5.2.7", "@types/mocha": "7.0.2",
"chai": "4.2.0", "chai": "4.2.0",
"chai-as-promised": "7.1.1", "chai-as-promised": "7.1.1",
"chai-spies": "1.0.0", "chai-spies": "1.0.0",
"conventional-changelog-cli": "2.0.21", "conventional-changelog-cli": "2.0.31",
"mocha": "6.1.4", "mocha": "7.1.0",
"mocha-typescript": "1.1.17", "mocha-typescript": "1.1.17",
"nyc": "14.1.1", "nyc": "15.0.0",
"prepend-file-cli": "1.0.6", "prepend-file-cli": "1.0.6",
"rimraf": "2.6.3", "rimraf": "3.0.2",
"ts-node": "8.3.0", "ts-node": "8.6.2",
"tslint": "5.18.0", "tslint": "6.0.0",
"typedoc": "0.14.2", "typedoc": "0.16.11",
"typescript": "3.5.3" "typescript": "3.8.3"
}, },
"dependencies": { "dependencies": {
"@types/node": "10.14.12", "@types/node": "10.17.17",
"@types/nodemailer": "6.2.0", "@types/nodemailer": "6.4.0",
"chalk": "2.4.2", "chalk": "3.0.0",
"flatted": "2.0.1", "flatted": "2.0.1",
"moment": "2.24.0", "moment": "2.24.0",
"nodemailer": "6.2.1" "nodemailer": "6.4.4"
} }
} }

View File

@@ -30,7 +30,7 @@ export type RecursivePartial<T> = {
* *
* @param obj Object to delete undefined properties from * @param obj Object to delete undefined properties from
*/ */
export function deleteUndefinedProperties(obj: unknown) { export function deleteUndefinedProperties(obj: unknown): unknown {
// return atomic data types and arrays (recursion anchor) // return atomic data types and arrays (recursion anchor)
if (typeof obj !== 'object' || Array.isArray(obj)) { if (typeof obj !== 'object' || Array.isArray(obj)) {
return obj; return obj;

View File

@@ -205,7 +205,7 @@ export class SMTP extends VerifiableTransport {
const config = { const config = {
...smtpConfig, ...smtpConfig,
// deleting undefined properties so the actual config doesn't get overwritten by undefined values // deleting undefined properties so the actual config doesn't get overwritten by undefined values
...deleteUndefinedProperties(envConfig), ...(deleteUndefinedProperties(envConfig) as object),
} as SMTPConfig; } as SMTPConfig;
if (typeof config.host === 'undefined') { if (typeof config.host === 'undefined') {

View File

@@ -12,10 +12,8 @@
* You should have received a copy of the GNU General Public License along with * You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import * as moment from 'moment';
import {LogLevel} from '../logger'; import {LogLevel} from '../logger';
import {Transformation} from '../transformation'; import {Transformation} from '../transformation';
/** /**
* Transformation that adds a timestamp to output * Transformation that adds a timestamp to output
*/ */
@@ -38,6 +36,7 @@ export class Timestamp implements Transformation {
* @param output Output to add timestamp to * @param output Output to add timestamp to
*/ */
transform(_logLevel: LogLevel, output: string): string { transform(_logLevel: LogLevel, output: string): string {
const moment = require('moment');
const now = moment(); const now = moment();
return `[${now.format(this.format)}] ${output}`; return `[${now.format(this.format)}] ${output}`;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018, 2019 StApps * Copyright (C) 2018, 2020 StApps
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free * under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3. * Software Foundation, version 3.
@@ -12,10 +12,10 @@
* You should have received a copy of the GNU General Public License along with * You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import * as chai from 'chai'; import chai from 'chai';
import {expect} from 'chai'; import {expect} from 'chai';
import * as chaiAsPromised from 'chai-as-promised'; import chaiAsPromised from 'chai-as-promised';
import * as chaiSpies from 'chai-spies'; import chaiSpies from 'chai-spies';
import {suite} from 'mocha-typescript'; import {suite} from 'mocha-typescript';
import {Logger} from '../src/logger'; import {Logger} from '../src/logger';
import {AddLogLevel} from '../src/transformations/add-log-level'; import {AddLogLevel} from '../src/transformations/add-log-level';