Repository: iamolegga/nestjs-pino
Pull request #23 (2019-10-13 13:49:29)

removed `esModuleInterop` for compatibility with dependents, who did …
…not set it


Patch:
diff --git a/package-lock.json b/package-lock.json
index 34bebb3..4a97930 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "nestjs-pino",
-  "version": "0.3.2",
+  "version": "0.4.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -394,26 +394,26 @@
       }
     },
     "@nestjs/common": {
-      "version": "6.8.3",
-      "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
-      "integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
+      "version": "6.8.2",
+      "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.2.tgz",
+      "integrity": "sha512-dIHT8L6lQbKKPlVdMG/K00o1rZRI8Y9+Tz6vwQi6flBTnbotPerRF7ppcCABvqnpKi3gOzgph8iV7eOCMFdMRw==",
       "dev": true,
       "requires": {
         "axios": "0.19.0",
-        "cli-color": "2.0.0",
+        "cli-color": "1.4.0",
         "uuid": "3.3.3"
       }
     },
     "@nestjs/core": {
-      "version": "6.8.3",
-      "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
-      "integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
+      "version": "6.8.2",
+      "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.2.tgz",
+      "integrity": "sha512-2OzpWLfSEdQuY5ssAz1STfvs1TUam1qIDRMk6ReWThCIkgWdBe87AlkEiahB7qkXZ//M1IVeDdnFs61xCmx7mg==",
       "dev": true,
       "requires": {
         "@nuxtjs/opencollective": "0.2.2",
         "fast-safe-stringify": "2.0.7",
         "iterare": "1.2.0",
-        "object-hash": "2.0.0",
+        "object-hash": "1.3.1",
         "uuid": "3.3.3"
       },
       "dependencies": {
@@ -426,9 +426,9 @@
       }
     },
     "@nestjs/platform-express": {
-      "version": "6.8.3",
-      "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.8.3.tgz",
-      "integrity": "sha512-Zt0JBl6AK1Cl6n88p03J8K8DVVSEQxHvDvq+oQLs9HkeGPmJ5u1xKjsHxdouXjl3RCyizzWdwzGeLZElO3lDlQ==",
+      "version": "6.8.2",
+      "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.8.2.tgz",
+      "integrity": "sha512-6idjB+xrLVNeYV0O3emGM954iGPvuDNHDjqFW1sqi9ZpHPLD+n3MCGdlmhZ65zWfU30rmDQLA9qaeSQw8uTN9Q==",
       "dev": true,
       "requires": {
         "body-parser": "1.19.0",
@@ -438,9 +438,9 @@
       }
     },
     "@nestjs/platform-fastify": {
-      "version": "6.8.3",
-      "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-6.8.3.tgz",
-      "integrity": "sha512-uaLjyl9/dXTmV9bdQD1kwEIG19cYT7u3fYxT1VfvujEkdAaAPQya08NCMxkU/lelmDFX1K3j6WCq6pPWPoRYWA==",
+      "version": "6.8.2",
+      "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-6.8.2.tgz",
+      "integrity": "sha512-VvbHQxG9mhpDi6OR73DDFeuW1Ua5Z1dZMmKO0NBReZ5i9DRZotubSc4dYKBJjZpnyraWEDfAu2AZT6jyQIFipA==",
       "dev": true,
       "requires": {
         "fastify": "2.9.0",
@@ -458,9 +458,9 @@
       }
     },
     "@nestjs/testing": {
-      "version": "6.8.3",
-      "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
-      "integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
+      "version": "6.8.2",
+      "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.2.tgz",
+      "integrity": "sha512-suNHK7Ij933zDdvi+JLe7Y1y4aJ6yhrdw4J7AcX5NiwQgkzgrJxgEs7dgjXO5i0CAVb7yB8hxyQEi+jQOv6ctQ==",
       "dev": true,
       "requires": {
         "optional": "0.1.4"
@@ -1304,17 +1304,17 @@
       }
     },
     "cli-color": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
-      "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
+      "integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
       "dev": true,
       "requires": {
         "ansi-regex": "^2.1.1",
-        "d": "^1.0.1",
-        "es5-ext": "^0.10.51",
+        "d": "1",
+        "es5-ext": "^0.10.46",
         "es6-iterator": "^2.0.3",
         "memoizee": "^0.4.14",
-        "timers-ext": "^0.1.7"
+        "timers-ext": "^0.1.5"
       }
     },
     "cliui": {
@@ -1511,9 +1511,9 @@
       }
     },
     "coveralls": {
-      "version": "3.0.7",
-      "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.7.tgz",
-      "integrity": "sha512-mUuH2MFOYB2oBaA4D4Ykqi9LaEYpMMlsiOMJOrv358yAjP6enPIk55fod2fNJ8AvwoYXStWQls37rA+s5e7boA==",
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.6.tgz",
+      "integrity": "sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA==",
       "dev": true,
       "requires": {
         "growl": "~> 1.10.0",
@@ -1631,9 +1631,9 @@
       "dev": true
     },
     "deepmerge": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.1.1.tgz",
-      "integrity": "sha512-+qO5WbNBKBaZez95TffdUDnGIo4+r5kmsX8aOb7PDHvXsTbghAmleuxjs6ytNaf5Eg4FGBXDS5vqO61TRi6BMg==",
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.1.0.tgz",
+      "integrity": "sha512-tJlmKE535XRVBrzMRMqlm4V2S/l3yO/qr9Ad0MUqgR5jh9epGrALs8Q6+pROMa6ntDieAlnmYM/cDFCtNjp4+Q==",
       "dev": true
     },
     "define-properties": {
@@ -2366,9 +2366,9 @@
       }
     },
     "find-my-way": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.2.1.tgz",
-      "integrity": "sha512-pzZA9/PlhDGG5PRzmd4vH4AbKW7FO68RE7q2I3NzjJHcVPukYbDA7bPdArg7ySKfS6pKki+qhrawFoN6aNZfjA==",
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.2.0.tgz",
+      "integrity": "sha512-sta5P6Vv9T1MSAPnSMlpFPhYqy70UX5XIRYX2D7J08xCwW9t26gKVGJoQYvHbfBFigC1CLGPTXeRLj9K/bLFqw==",
       "dev": true,
       "requires": {
         "fast-decode-uri-component": "^1.0.0",
@@ -4669,9 +4669,9 @@
       }
     },
     "object-hash": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
-      "integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA==",
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
+      "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==",
       "dev": true
     },
     "object-inspect": {
@@ -5997,9 +5997,9 @@
       }
     },
     "tiny-lru": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.1.tgz",
-      "integrity": "sha512-BImmnAPNkaN7XjrvmOr4JAT2U6ubLmxiD9iDBMMow3/026OZ+yiuWzM1F0TgECLfq1KO2YkXEIJ2h6sPjXv9XA==",
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.0.tgz",
+      "integrity": "sha512-9/K3P8iGWe7LAbjGit0beF+AXmUvbdxsFt3/wQtuGgIwPf6L1wE3+xgeUFtJgTz/3n13YO6dcpcQbRA5kLvfyw==",
       "dev": true
     },
     "tmpl": {
diff --git a/package.json b/package.json
index d541aee..896718b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "nestjs-pino",
-  "version": "0.3.2",
+  "version": "0.4.0",
   "description": "Pino logger for NestJS",
   "main": "dist/index.js",
   "scripts": {
diff --git a/src/index.ts b/src/index.ts
index 56eb2ff..bc567b0 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -10,9 +10,10 @@ import {
   Inject
 } from "@nestjs/common";
 import { ModuleMetadata, Provider } from "@nestjs/common/interfaces";
-import express from "express";
-import pinoHttp from "pino-http";
-import pino, { LoggerOptions, DestinationStream } from "pino";
+import * as express from "express";
+import * as pinoHttp from "pino-http";
+import * as pino from "pino";
+import { DestinationStream, LoggerOptions } from "pino";
 import { getValue, setValue, middleware as ctxMiddleware } from "express-ctx";
 
 type PassedLogger = { logger: pino.Logger };
diff --git a/tsconfig.json b/tsconfig.json
index 18afdef..da3d80e 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,7 +10,7 @@
     "outDir": "./dist",
     "baseUrl": "./",
     "incremental": true,
-    "esModuleInterop": true,
+    "allowSyntheticDefaultImports": true,
     "strict": true
   },
   "include": ["src", "example", "__tests__"]


Test patch:
diff --git a/__tests__/levels.spec.ts b/__tests__/levels.spec.ts
index 3f74ba9..a79158a 100644
--- a/__tests__/levels.spec.ts
+++ b/__tests__/levels.spec.ts
@@ -1,8 +1,8 @@
 import { NestFactory } from "@nestjs/core";
 import { Module, Controller, Get, Injectable } from "@nestjs/common";
-import MemoryStream from "memorystream";
-import request from "supertest";
-import pino from "pino";
+import MemoryStream = require("memorystream");
+import * as request from "supertest";
+import * as pino from "pino";
 import { Logger, LoggerModule } from "../src";
 import { platforms } from "./utils/platforms";
 import { fastifyExtraWait } from "./utils/fastifyExtraWait";
diff --git a/__tests__/module.spec.ts b/__tests__/module.spec.ts
index 50a9d80..4e30bec 100644
--- a/__tests__/module.spec.ts
+++ b/__tests__/module.spec.ts
@@ -1,7 +1,7 @@
 import { NestFactory } from "@nestjs/core";
 import { Module, Controller, Get, Injectable } from "@nestjs/common";
-import MemoryStream from "memorystream";
-import request from "supertest";
+import MemoryStream = require("memorystream");
+import * as request from "supertest";
 import { Logger, LoggerModule } from "../src";
 import { platforms } from "./utils/platforms";
 import { fastifyExtraWait } from "./utils/fastifyExtraWait";
diff --git a/__tests__/pass-existing.spec.ts b/__tests__/pass-existing.spec.ts
index b416c75..6f6aefd 100644
--- a/__tests__/pass-existing.spec.ts
+++ b/__tests__/pass-existing.spec.ts
@@ -1,8 +1,8 @@
 import { NestFactory } from "@nestjs/core";
 import { Module, Controller, Get, Injectable } from "@nestjs/common";
-import MemoryStream from "memorystream";
-import request from "supertest";
-import pino from "pino";
+import MemoryStream = require("memorystream");
+import * as request from "supertest";
+import * as pino from "pino";
 import { Logger, LoggerModule } from "../src";
 import { platforms } from "./utils/platforms";
 import { fastifyExtraWait } from "./utils/fastifyExtraWait";