added "@types/node" to "devDependencies"

This commit is contained in:
Anatoly 2018-05-02 03:04:03 +03:00
parent 0172b462fe
commit f18ea4515d
6 changed files with 26 additions and 9 deletions

6
package-lock.json generated
View file

@ -4,6 +4,12 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.0.2.tgz",
"integrity": "sha512-DPbG0qQ5kdvXBK0jGdv1yd8vGN7hwH8sB2Q1z1kGaxtCnXkSxYJ009VccGlcgknYoLeMTYu4TTzOditDJMdP2Q==",
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",

View file

@ -16,13 +16,16 @@
"pg": "^7.4.1",
"pg-copy-streams": "^1.2.0"
},
"devDependencies": {
"@types/node": "^10.0.2",
"tape": "^4.8.0"
},
"scripts": {
"compile_test": "tsc --outDir ./build --module commonjs ./src/*.ts && node ./build/Main.js",
"build": "tsc",
"start": "node src/Main.js",
"test": "node test/Main.test.js"
},
"devDependencies": {
"tape": "^4.8.0"
},
"keywords": [
"database migration",
"copy",

View file

@ -18,9 +18,7 @@
*
* @author Anatoly Khaytovich <anatolyuss@gmail.com>
*/
'use strict';
const fs = require('fs');
import fs from 'fs';
/**
* Outputs given log.
@ -32,10 +30,10 @@ const fs = require('fs');
* @param {String} tableLogPath
* @param {Boolean} isErrorLog
*
* @returns {undefined}
* @returns {void}
*/
module.exports = (self, log, tableLogPath, isErrorLog) => {
const buffer = Buffer.from(log + '\n\n', self._encoding);
export default (self: Conversion, log: string, tableLogPath: string, isErrorLog: boolean): void => {
const buffer: Buffer = Buffer.from(log + '\n\n', self._encoding);
if (!isErrorLog) {
console.log(log);

10
tsconfig.json Normal file
View file

@ -0,0 +1,10 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true
},
"exclude": [
"node_modules"
]
}