nightingale-console-output 13.0.0 → 14.0.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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
+ ## [14.0.0](https://github.com/christophehurpeau/nightingale/compare/v13.0.0...v14.0.0) (2023-06-30)
7
+
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * **deps:** require node 18
12
+ * requires node 18
13
+
14
+ ### Features
15
+
16
+ * requires node 18 ([4452b11](https://github.com/christophehurpeau/nightingale/commit/4452b116188e58c293be85e462e04922f7ad51f0))
17
+
18
+
19
+ ### Miscellaneous Chores
20
+
21
+ * **deps:** update dependency @pob/root to v8 ([#760](https://github.com/christophehurpeau/nightingale/issues/760)) ([22dc3cc](https://github.com/christophehurpeau/nightingale/commit/22dc3cceabdfd465d04ee36fec8fdac31febab69))
22
+
23
+
24
+
6
25
  # [13.0.0](https://github.com/christophehurpeau/nightingale/compare/v12.1.4...v13.0.0) (2022-11-19)
7
26
 
8
27
 
@@ -1,3 +1,3 @@
1
1
  import type { LogRecord, Metadata } from 'nightingale-types';
2
- export default function consoleOutput<T extends Metadata>(param: string | string[], record: LogRecord<T>): void;
2
+ export default function consoleOutput<T extends Metadata>(param: string[] | string, record: LogRecord<T>): void;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ,EACtD,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,IAAI,CAON"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ,EACtD,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,IAAI,CAON"}
@@ -1,6 +1,7 @@
1
1
  import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
+
4
5
  function consoleOutput(param, record) {
5
6
  var _console;
6
7
  (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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;AAKe,SAASA,aAAa,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAAA,EAAA,IAAA,QAAA,CAAA;AAKJ,EAAA,CAAA,QAAA,GAAAC,OAAO,EAACD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAA,KAAA,CAAA,QAAA,EAAIL,KAAK,CAAC,CAAA;AAEpE;;;;"}
1
+ {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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","console","level","Level","ERROR","apply"],"mappings":";;AAAA;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAAA,EAAA,IAAAC,QAAA,CAAA;EAKJ,CAAAA,QAAA,GAAAC,OAAO,EAACF,MAAM,CAACG,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAAC,KAAA,CAAAL,QAAA,EAAIF,KAAK,CAAC,CAAA;AAEpE;;;;"}
@@ -1,6 +1,7 @@
1
1
  import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
+
4
5
  function consoleOutput(param, record) {
5
6
  console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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;AAKe,SAASA,aAAa,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC,GAAGL,KAAK,CAAC,CAAA;AAEpE;;;;"}
1
+ {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC,GAAGL,KAAK,CAAC,CAAA;AAEpE;;;;"}
@@ -1,6 +1,7 @@
1
1
  import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
+
4
5
  function consoleOutput(param, record) {
5
6
  {
6
7
  const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
@@ -9,4 +10,4 @@ function consoleOutput(param, record) {
9
10
  }
10
11
 
11
12
  export { consoleOutput as default };
12
- //# sourceMappingURL=index-node16.mjs.map
13
+ //# sourceMappingURL=index-node18.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node16.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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;AAKe,SAASA,aAAa,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AACwB,EAAA;AAC5B,IAAA,MAAMC,MAAM,GAAGD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAChEC,OAAO,CAACJ,MAAM,CAAC,CAACK,KAAK,CAAE,CAAA,EAAEP,KAAgB,CAAA,EAAA,CAAG,CAAC,CAAA;AAC/C,GAAA;AAGF;;;;"}
1
+ {"version":3,"file":"index-node18.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\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;;AAKe,SAASA,aAAaA,CACnCC,KAAwB,EACxBC,MAAoB,EACd;AACwB,EAAA;AAC5B,IAAA,MAAMC,MAAM,GAAGD,MAAM,CAACE,KAAK,IAAIC,KAAK,CAACC,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAChEC,OAAO,CAACJ,MAAM,CAAC,CAACK,KAAK,CAAE,CAAA,EAAEP,KAAgB,CAAA,EAAA,CAAG,CAAC,CAAA;AAC/C,GAAA;AAGF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-console-output",
3
- "version": "13.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -16,16 +16,18 @@
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
17
  "type": "module",
18
18
  "engines": {
19
- "node": ">=16.0.0"
19
+ "node": ">=18.12.0"
20
20
  },
21
- "browserslist": [
22
- "defaults",
23
- "> 0.2%",
24
- "not ie < 12",
25
- "not safari < 10",
26
- "not ios_saf < 10"
27
- ],
28
- "main": "./dist/index-node16.mjs",
21
+ "browserslist": {
22
+ "production": [
23
+ "defaults",
24
+ "> 0.2%",
25
+ "not ie < 12",
26
+ "not safari < 10",
27
+ "not ios_saf < 10"
28
+ ]
29
+ },
30
+ "main": "./dist/index-node18.mjs",
29
31
  "types": "./dist/definitions/index.d.ts",
30
32
  "module": "./dist/index-browser.es.js",
31
33
  "browser": "./dist/index-browser.es.js",
@@ -33,7 +35,7 @@
33
35
  "./package.json": "./package.json",
34
36
  ".": {
35
37
  "node": {
36
- "import": "./dist/index-node16.mjs"
38
+ "import": "./dist/index-node18.mjs"
37
39
  },
38
40
  "browser": {
39
41
  "browser:modern": {
@@ -46,7 +48,7 @@
46
48
  "sideEffects": false,
47
49
  "scripts": {
48
50
  "build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
49
- "build:definitions": "tsc -p",
51
+ "build:definitions": "tsc -p tsconfig.json",
50
52
  "clean": "yarn clean:build",
51
53
  "clean:build": "pob-babel-clean-out dist",
52
54
  "lint": "yarn run lint:eslint",
@@ -58,7 +60,7 @@
58
60
  "babelEnvs": [
59
61
  {
60
62
  "target": "node",
61
- "version": "16"
63
+ "version": "18"
62
64
  },
63
65
  {
64
66
  "target": "browser",
@@ -73,16 +75,15 @@
73
75
  ]
74
76
  },
75
77
  "dependencies": {
76
- "@types/node": ">=16.0.0",
77
- "nightingale-levels": "13.0.0",
78
- "nightingale-types": "13.0.0"
78
+ "@types/node": ">=18.0.0",
79
+ "nightingale-levels": "14.0.0",
80
+ "nightingale-types": "14.0.0"
79
81
  },
80
82
  "devDependencies": {
81
- "@babel/core": "7.20.2",
82
- "@babel/preset-env": "7.20.2",
83
- "babel-preset-modern-browsers": "15.0.2",
84
- "pob-babel": "35.3.0",
85
- "typescript": "4.9.3"
83
+ "@babel/core": "7.22.5",
84
+ "@babel/preset-env": "7.22.5",
85
+ "pob-babel": "36.1.0",
86
+ "typescript": "5.1.6"
86
87
  },
87
- "gitHead": "52cf7e3c8762a07891da9dde497ec03298c15654"
88
+ "gitHead": "bc20e0f093a4fecd4d87f9374f6dbc375c09c25e"
88
89
  }
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ import { Level } from 'nightingale-levels';
4
4
  import type { LogRecord, Metadata } from 'nightingale-types';
5
5
 
6
6
  export default function consoleOutput<T extends Metadata>(
7
- param: string | string[],
7
+ param: string[] | string,
8
8
  record: LogRecord<T>,
9
9
  ): void {
10
10
  if (POB_TARGET !== 'browser') {