nightingale-console-output 11.6.0 → 11.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "root": true,
3
- "extends": ["@pob/eslint-config/root", "@pob/eslint-config-node"],
3
+ "extends": ["@pob/eslint-config/root-commonjs"],
4
4
  "ignorePatterns": ["*.d.ts", "/dist"]
5
5
  }
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
7
+
8
+ **Note:** Version bump only for package nightingale-console-output
9
+
10
+
11
+
12
+
13
+
14
+ ## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
15
+
16
+ **Note:** Version bump only for package nightingale-console-output
17
+
18
+
19
+
20
+
21
+
22
+ ## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * update pob-babel to bring back webpack 4 support ([4887431](https://github.com/christophehurpeau/nightingale/commit/4887431b3b272496511f879af022638723b9056e))
28
+
29
+
30
+
31
+
32
+
33
+ # [11.7.0](https://github.com/christophehurpeau/nightingale/compare/v11.6.0...v11.7.0) (2021-03-29)
34
+
35
+ **Note:** Version bump only for package nightingale-console-output
36
+
37
+
38
+
39
+
40
+
6
41
  # [11.6.0](https://github.com/christophehurpeau/nightingale/compare/v11.5.4...v11.6.0) (2021-03-21)
7
42
 
8
43
 
@@ -2,16 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- var Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
5
+ var nightingaleLevels = require('nightingale-levels');
10
6
 
11
7
  /* eslint-disable no-console */
12
8
  function consoleOutput(param, record) {
13
- console[record.level >= Level__default.ERROR ? 'error' : 'log'](...param);
9
+ var _console;
10
+
11
+ (_console = console)[record.level >= nightingaleLevels.Level.ERROR ? 'error' : 'log'].apply(_console, param);
14
12
  }
15
13
 
16
- exports.default = consoleOutput;
14
+ exports["default"] = consoleOutput;
17
15
  //# sourceMappingURL=index-browser-dev.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1,9 +1,11 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
5
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
5
+ var _console;
6
+
7
+ (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
6
8
  }
7
9
 
8
- export default consoleOutput;
10
+ export { consoleOutput as default };
9
11
  //# sourceMappingURL=index-browser-dev.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -2,16 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- var Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
5
+ var nightingaleLevels = require('nightingale-levels');
10
6
 
11
7
  /* eslint-disable no-console */
12
8
  function consoleOutput(param, record) {
13
- console[record.level >= Level__default.ERROR ? 'error' : 'log'](...param);
9
+ var _console;
10
+
11
+ (_console = console)[record.level >= nightingaleLevels.Level.ERROR ? 'error' : 'log'].apply(_console, param);
14
12
  }
15
13
 
16
- exports.default = consoleOutput;
14
+ exports["default"] = consoleOutput;
17
15
  //# sourceMappingURL=index-browser.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1,9 +1,11 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
5
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
5
+ var _console;
6
+
7
+ (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
6
8
  }
7
9
 
8
- export default consoleOutput;
10
+ export { consoleOutput as default };
9
11
  //# sourceMappingURL=index-browser.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1,9 +1,9 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
5
5
  console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
6
6
  }
7
7
 
8
- export default consoleOutput;
8
+ export { consoleOutput as default };
9
9
  //# sourceMappingURL=index-browsermodern-dev.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browsermodern-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browsermodern-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
@@ -1,9 +1,9 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
5
5
  console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
6
6
  }
7
7
 
8
- export default consoleOutput;
8
+ export { consoleOutput as default };
9
9
  //# sourceMappingURL=index-browsermodern.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
@@ -2,19 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
5
+ const nightingaleLevels = require('nightingale-levels');
10
6
 
11
7
  /* eslint-disable no-console */
12
8
  function consoleOutput(param, record) {
13
9
  {
14
- const outKey = record.level >= Level__default.ERROR ? 'stderr' : 'stdout';
10
+ const outKey = record.level >= nightingaleLevels.Level.ERROR ? 'stderr' : 'stdout';
15
11
  process[outKey].write(`${param}\n`);
16
12
  }
17
13
  }
18
14
 
19
- exports.default = consoleOutput;
15
+ exports["default"] = consoleOutput;
20
16
  //# sourceMappingURL=index-node12-dev.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node12-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
1
+ {"version":3,"file":"index-node12-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1,4 +1,4 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
@@ -8,5 +8,5 @@ function consoleOutput(param, record) {
8
8
  }
9
9
  }
10
10
 
11
- export default consoleOutput;
11
+ export { consoleOutput as default };
12
12
  //# sourceMappingURL=index-node12-dev.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node12-dev.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
1
+ {"version":3,"file":"index-node12-dev.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -2,19 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
5
+ const nightingaleLevels = require('nightingale-levels');
10
6
 
11
7
  /* eslint-disable no-console */
12
8
  function consoleOutput(param, record) {
13
9
  {
14
- const outKey = record.level >= Level__default.ERROR ? 'stderr' : 'stdout';
10
+ const outKey = record.level >= nightingaleLevels.Level.ERROR ? 'stderr' : 'stdout';
15
11
  process[outKey].write(`${param}\n`);
16
12
  }
17
13
  }
18
14
 
19
- exports.default = consoleOutput;
15
+ exports["default"] = consoleOutput;
20
16
  //# sourceMappingURL=index-node12.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node12.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
1
+ {"version":3,"file":"index-node12.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1,4 +1,4 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
@@ -8,5 +8,5 @@ function consoleOutput(param, record) {
8
8
  }
9
9
  }
10
10
 
11
- export default consoleOutput;
11
+ export { consoleOutput as default };
12
12
  //# sourceMappingURL=index-node12.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node12.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport Level from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
1
+ {"version":3,"file":"index-node12.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-console-output",
3
- "version": "11.6.0",
3
+ "version": "11.7.4",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -14,26 +14,23 @@
14
14
  "directory": "packages/nightingale-console-output"
15
15
  },
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
+ "type": "commonjs",
17
18
  "engines": {
18
- "node": ">=12.10.0"
19
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
19
20
  },
20
21
  "browserslist": [
22
+ "defaults",
21
23
  "> 0.2%",
22
- "Firefox ESR",
23
- "last 2 Chrome versions",
24
- "last 2 iOS versions",
25
- "last 2 Edge versions",
26
- "last 2 Safari versions",
27
24
  "not ie < 12",
28
- "not ios_saf < 10",
29
- "not dead",
30
- "not op_mini all"
25
+ "not safari < 10",
26
+ "not ios_saf < 10"
31
27
  ],
32
- "main": "./index.js",
28
+ "main": "./dist/index-node12.cjs.js",
33
29
  "types": "./dist/index.d.ts",
34
30
  "module": "./dist/index-browser.es.js",
35
31
  "browser": "./dist/index-browser.es.js",
36
32
  "exports": {
33
+ "./package.json": "./package.json",
37
34
  ".": {
38
35
  "node": {
39
36
  "development": {
@@ -71,7 +68,7 @@
71
68
  "build:definitions": "tsc -p tsconfig.build.json",
72
69
  "clean": "rm -Rf docs dist test/node6 coverage",
73
70
  "lint": "yarn run lint:eslint",
74
- "lint:eslint": "yarn --cwd ../.. run eslint --ext .js,.mjs,.ts --report-unused-disable-directives --quiet packages/nightingale-console-output",
71
+ "lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-console-output",
75
72
  "watch": "pob-watch"
76
73
  },
77
74
  "prettier": {
@@ -110,27 +107,17 @@
110
107
  },
111
108
  "dependencies": {
112
109
  "@types/node": ">=12.0.0",
113
- "nightingale-levels": "^11.6.0",
114
- "nightingale-types": "^11.6.0"
110
+ "nightingale-levels": "^11.7.2",
111
+ "nightingale-types": "^11.7.4"
115
112
  },
116
113
  "devDependencies": {
117
- "@babel/core": "7.13.10",
118
- "@babel/preset-env": "7.13.10",
119
- "@pob/eslint-config": "43.0.0",
120
- "@pob/eslint-config-node": "43.1.0",
121
- "@pob/eslint-config-typescript": "43.0.0",
122
- "@typescript-eslint/eslint-plugin": "4.18.0",
123
- "@typescript-eslint/parser": "4.18.0",
114
+ "@babel/core": "7.16.0",
115
+ "@babel/preset-env": "7.16.4",
124
116
  "babel-preset-latest-node": "5.5.1",
125
117
  "babel-preset-modern-browsers": "15.0.2",
126
- "eslint": "7.22.0",
127
- "eslint-import-resolver-node": "0.3.4",
128
- "eslint-plugin-import": "2.22.1",
129
- "eslint-plugin-node": "11.1.0",
130
- "eslint-plugin-unicorn": "25.0.1",
131
- "pob-babel": "26.8.0",
132
- "rollup": "2.42.1",
133
- "typescript": "4.2.3"
118
+ "pob-babel": "28.5.0",
119
+ "rollup": "2.60.1",
120
+ "typescript": "4.5.2"
134
121
  },
135
- "gitHead": "56849d6762e917f29c20f932569973046a24f602"
122
+ "gitHead": "70f6b4ba634ff778fc94bef7e2455e8b6a7db06a"
136
123
  }
@@ -0,0 +1,3 @@
1
+ import createRollupConfig from 'pob-babel/createRollupConfig.js';
2
+
3
+ export default createRollupConfig({});
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
 
4
4
  import { POB_TARGET } from 'pob-babel';
5
- import Level from 'nightingale-levels';
5
+ import { Level } from 'nightingale-levels';
6
6
  import type { LogRecord, Metadata } from 'nightingale-types';
7
7
 
8
8
  export default function consoleOutput<T extends Metadata>(
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- /* eslint-disable import/no-dynamic-require */
2
-
3
- 'use strict';
4
-
5
- const production = process.env.NODE_ENV === 'production';
6
- module.exports = require(`./dist/index-node12${production ? '' : '-dev'}.cjs`);