nightingale-types 12.1.4 → 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 +41 -0
- package/README.md +3 -0
- package/dist/{index.d.ts → definitions/index.d.ts} +5 -5
- package/dist/definitions/index.d.ts.map +1 -0
- package/dist/{index-node14.mjs → index-node18.mjs} +1 -1
- package/dist/index-node18.mjs.map +1 -0
- package/package.json +31 -48
- package/dist/index-browser.cjs.js +0 -10
- package/dist/index-browser.cjs.js.map +0 -1
- package/dist/index-node14.cjs +0 -10
- package/dist/index-node14.cjs.map +0 -1
- package/dist/index-node14.mjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/rollup.config.mjs +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
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
|
+
|
|
25
|
+
# [13.0.0](https://github.com/christophehurpeau/nightingale/compare/v12.1.4...v13.0.0) (2022-11-19)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Code Refactoring
|
|
29
|
+
|
|
30
|
+
* drop node 14 and cjs ([9a8ca06](https://github.com/christophehurpeau/nightingale/commit/9a8ca064449ddc0d69e26543e21c2d522536c50a))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* build for node 16 ([30ae3e9](https://github.com/christophehurpeau/nightingale/commit/30ae3e9c455dbad793c2f704b9d860069dc80c32))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### BREAKING CHANGES
|
|
39
|
+
|
|
40
|
+
* dropped node 14 and cjs
|
|
41
|
+
* drop node 14
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
6
47
|
## [12.1.4](https://github.com/christophehurpeau/nightingale/compare/v12.1.3...v12.1.4) (2022-02-05)
|
|
7
48
|
|
|
8
49
|
|
package/README.md
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://npmjs.org/package/nightingale-types"><img src="https://img.shields.io/npm/v/nightingale-types.svg?style=flat-square"></a>
|
|
11
|
+
<a href="https://npmjs.org/package/nightingale-types"><img src="https://img.shields.io/npm/dw/nightingale-types.svg?style=flat-square"></a>
|
|
12
|
+
<a href="https://npmjs.org/package/nightingale-types"><img src="https://img.shields.io/node/v/nightingale-types.svg?style=flat-square"></a>
|
|
13
|
+
<a href="https://npmjs.org/package/nightingale-types"><img src="https://img.shields.io/npm/types/nightingale-types.svg?style=flat-square"></a>
|
|
11
14
|
</p>
|
|
12
15
|
|
|
13
16
|
## Install
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Level } from 'nightingale-levels';
|
|
2
2
|
export { Level } from 'nightingale-levels';
|
|
3
|
-
export
|
|
3
|
+
export type Styles = string[] | undefined;
|
|
4
4
|
export interface Metadata {
|
|
5
5
|
context?: Record<string, unknown>;
|
|
6
6
|
[propName: string]: unknown;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type MetadataStyles<T extends Metadata> = {
|
|
9
9
|
[P in keyof T]?: Styles;
|
|
10
10
|
};
|
|
11
11
|
export interface LogRecord<T extends Metadata> {
|
|
@@ -21,12 +21,12 @@ export interface LogRecord<T extends Metadata> {
|
|
|
21
21
|
styles?: Styles;
|
|
22
22
|
metadataStyles?: MetadataStyles<T>;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type IsHandling = (level: Level, key: string) => boolean;
|
|
25
|
+
export type Handle = <T extends Metadata>(record: Readonly<LogRecord<T>>) => false | void;
|
|
26
26
|
export interface Handler {
|
|
27
27
|
minLevel: Level;
|
|
28
28
|
isHandling?: IsHandling;
|
|
29
29
|
handle: Handle;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type Processor = <T extends Metadata>(record: Readonly<LogRecord<T>>, context?: Record<string, unknown>) => void;
|
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,MAAM,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM;CAAE,CAAC;AAE7E,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,QAAQ;IAC3C,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CACpC;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;AAChE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,QAAQ,EACtC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAE3B,KAAK,GAAG,IAAI,CAAC;AAElB,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,KAAK,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,QAAQ,EACzC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Level } from 'nightingale-levels';
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-node18.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node18.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Nightingale types for typescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logger"
|
|
@@ -15,74 +15,58 @@
|
|
|
15
15
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "
|
|
18
|
+
"node": ">=18.12.0"
|
|
19
19
|
},
|
|
20
|
-
"browserslist":
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
"browserslist": {
|
|
21
|
+
"production": [
|
|
22
|
+
"defaults",
|
|
23
|
+
"> 0.2%",
|
|
24
|
+
"not ie < 12",
|
|
25
|
+
"not safari < 10",
|
|
26
|
+
"not ios_saf < 10"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"main": "./dist/index-node18.mjs",
|
|
30
|
+
"types": "./dist/definitions/index.d.ts",
|
|
29
31
|
"module": "./dist/index-browser.es.js",
|
|
30
32
|
"browser": "./dist/index-browser.es.js",
|
|
31
33
|
"exports": {
|
|
32
34
|
"./package.json": "./package.json",
|
|
33
35
|
".": {
|
|
34
36
|
"node": {
|
|
35
|
-
"import": "./dist/index-
|
|
36
|
-
"require": "./dist/index-node14.cjs"
|
|
37
|
+
"import": "./dist/index-node18.mjs"
|
|
37
38
|
},
|
|
38
39
|
"browser": {
|
|
39
40
|
"browser:modern": {
|
|
40
41
|
"import": "./dist/index-browsermodern.es.js"
|
|
41
42
|
},
|
|
42
|
-
"import": "./dist/index-browser.es.js"
|
|
43
|
-
"require": "./dist/index-browser.cjs.js"
|
|
43
|
+
"import": "./dist/index-browser.es.js"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
"module:node": "./dist/index-node14.mjs",
|
|
48
|
-
"module:modern-browsers": "./dist/index-browsermodern.es.js",
|
|
49
47
|
"sideEffects": false,
|
|
50
48
|
"scripts": {
|
|
51
|
-
"build": "
|
|
52
|
-
"build:definitions": "tsc -p tsconfig.
|
|
53
|
-
"clean": "
|
|
49
|
+
"build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
|
|
50
|
+
"build:definitions": "tsc -p tsconfig.json",
|
|
51
|
+
"clean": "yarn clean:build",
|
|
52
|
+
"clean:build": "pob-babel-clean-out dist",
|
|
54
53
|
"lint": "yarn run lint:eslint",
|
|
55
|
-
"lint:eslint": "
|
|
56
|
-
"watch": "
|
|
57
|
-
},
|
|
58
|
-
"prettier": {
|
|
59
|
-
"trailingComma": "all",
|
|
60
|
-
"singleQuote": true,
|
|
61
|
-
"arrowParens": "always"
|
|
54
|
+
"lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-types",
|
|
55
|
+
"watch": "yarn clean:build && rollup --config rollup.config.mjs --watch"
|
|
62
56
|
},
|
|
57
|
+
"prettier": "@pob/root/prettier-config",
|
|
63
58
|
"pob": {
|
|
64
59
|
"babelEnvs": [
|
|
65
60
|
{
|
|
66
61
|
"target": "node",
|
|
67
|
-
"version": "
|
|
68
|
-
"formats": [
|
|
69
|
-
"cjs",
|
|
70
|
-
"es"
|
|
71
|
-
]
|
|
62
|
+
"version": "18"
|
|
72
63
|
},
|
|
73
64
|
{
|
|
74
65
|
"target": "browser",
|
|
75
|
-
"version": "modern"
|
|
76
|
-
"formats": [
|
|
77
|
-
"es"
|
|
78
|
-
]
|
|
66
|
+
"version": "modern"
|
|
79
67
|
},
|
|
80
68
|
{
|
|
81
|
-
"target": "browser"
|
|
82
|
-
"formats": [
|
|
83
|
-
"cjs",
|
|
84
|
-
"es"
|
|
85
|
-
]
|
|
69
|
+
"target": "browser"
|
|
86
70
|
}
|
|
87
71
|
],
|
|
88
72
|
"entries": [
|
|
@@ -90,14 +74,13 @@
|
|
|
90
74
|
]
|
|
91
75
|
},
|
|
92
76
|
"dependencies": {
|
|
93
|
-
"nightingale-levels": "
|
|
77
|
+
"nightingale-levels": "14.0.0"
|
|
94
78
|
},
|
|
95
79
|
"devDependencies": {
|
|
96
|
-
"@babel/core": "7.
|
|
97
|
-
"@babel/preset-env": "7.
|
|
98
|
-
"babel
|
|
99
|
-
"
|
|
100
|
-
"typescript": "4.5.5"
|
|
80
|
+
"@babel/core": "7.22.5",
|
|
81
|
+
"@babel/preset-env": "7.22.5",
|
|
82
|
+
"pob-babel": "36.1.0",
|
|
83
|
+
"typescript": "5.1.6"
|
|
101
84
|
},
|
|
102
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "bc20e0f093a4fecd4d87f9374f6dbc375c09c25e"
|
|
103
86
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/index-node14.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node14.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node14.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,oBAAY,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,E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