nightingale-console-output 13.0.0 → 14.0.1
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 +28 -0
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-browser.es.js +1 -0
- package/dist/index-browser.es.js.map +1 -1
- package/dist/index-browsermodern.es.js +1 -0
- package/dist/index-browsermodern.es.js.map +1 -1
- package/dist/{index-node16.mjs → index-node18.mjs} +2 -1
- package/dist/{index-node16.mjs.map → index-node18.mjs.map} +1 -1
- package/package.json +24 -22
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
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.1](https://github.com/christophehurpeau/nightingale/compare/v14.0.0...v14.0.1) (2023-06-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add missing type in exports for latest typescript ([8897fd6](https://github.com/christophehurpeau/nightingale/commit/8897fd6fcbd25975482fd1549277b73ed725e53c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [14.0.0](https://github.com/christophehurpeau/nightingale/compare/v13.0.0...v14.0.0) (2023-06-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* **deps:** require node 18
|
|
21
|
+
* requires node 18
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* requires node 18 ([4452b11](https://github.com/christophehurpeau/nightingale/commit/4452b116188e58c293be85e462e04922f7ad51f0))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Miscellaneous Chores
|
|
29
|
+
|
|
30
|
+
* **deps:** update dependency @pob/root to v8 ([#760](https://github.com/christophehurpeau/nightingale/issues/760)) ([22dc3cc](https://github.com/christophehurpeau/nightingale/commit/22dc3cceabdfd465d04ee36fec8fdac31febab69))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
6
34
|
# [13.0.0](https://github.com/christophehurpeau/nightingale/compare/v12.1.4...v13.0.0) (2022-11-19)
|
|
7
35
|
|
|
8
36
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogRecord, Metadata } from 'nightingale-types';
|
|
2
|
-
export default function consoleOutput<T extends Metadata>(param: string | string
|
|
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,
|
|
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"}
|
package/dist/index-browser.es.js
CHANGED
|
@@ -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
|
|
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 +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
|
|
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-
|
|
13
|
+
//# sourceMappingURL=index-node18.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
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": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Nightingale console output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nightingale",
|
|
@@ -16,24 +16,27 @@
|
|
|
16
16
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=18.12.0"
|
|
20
20
|
},
|
|
21
|
-
"browserslist":
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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",
|
|
32
34
|
"exports": {
|
|
33
35
|
"./package.json": "./package.json",
|
|
34
36
|
".": {
|
|
37
|
+
"type": "./dist/definitions/index.d.ts",
|
|
35
38
|
"node": {
|
|
36
|
-
"import": "./dist/index-
|
|
39
|
+
"import": "./dist/index-node18.mjs"
|
|
37
40
|
},
|
|
38
41
|
"browser": {
|
|
39
42
|
"browser:modern": {
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
"sideEffects": false,
|
|
47
50
|
"scripts": {
|
|
48
51
|
"build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
|
|
49
|
-
"build:definitions": "tsc -p",
|
|
52
|
+
"build:definitions": "tsc -p tsconfig.json",
|
|
50
53
|
"clean": "yarn clean:build",
|
|
51
54
|
"clean:build": "pob-babel-clean-out dist",
|
|
52
55
|
"lint": "yarn run lint:eslint",
|
|
@@ -58,7 +61,7 @@
|
|
|
58
61
|
"babelEnvs": [
|
|
59
62
|
{
|
|
60
63
|
"target": "node",
|
|
61
|
-
"version": "
|
|
64
|
+
"version": "18"
|
|
62
65
|
},
|
|
63
66
|
{
|
|
64
67
|
"target": "browser",
|
|
@@ -73,16 +76,15 @@
|
|
|
73
76
|
]
|
|
74
77
|
},
|
|
75
78
|
"dependencies": {
|
|
76
|
-
"@types/node": ">=
|
|
77
|
-
"nightingale-levels": "
|
|
78
|
-
"nightingale-types": "
|
|
79
|
+
"@types/node": ">=18.0.0",
|
|
80
|
+
"nightingale-levels": "14.0.1",
|
|
81
|
+
"nightingale-types": "14.0.1"
|
|
79
82
|
},
|
|
80
83
|
"devDependencies": {
|
|
81
|
-
"@babel/core": "7.
|
|
82
|
-
"@babel/preset-env": "7.
|
|
83
|
-
"babel
|
|
84
|
-
"
|
|
85
|
-
"typescript": "4.9.3"
|
|
84
|
+
"@babel/core": "7.22.5",
|
|
85
|
+
"@babel/preset-env": "7.22.5",
|
|
86
|
+
"pob-babel": "36.1.0",
|
|
87
|
+
"typescript": "5.1.6"
|
|
86
88
|
},
|
|
87
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "e012fc159ceae0db482198c3f0308e0fc6470ae1"
|
|
88
90
|
}
|
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') {
|