nightingale-types 12.1.3 → 13.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 +33 -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-node16.mjs} +1 -1
- package/dist/index-node16.mjs.map +1 -0
- package/package.json +22 -40
- package/dist/index-browser.cjs.js +0 -10
- package/dist/index-browser.cjs.js.map +0 -1
- package/dist/index-node14.cjs.js +0 -10
- package/dist/index-node14.cjs.js.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,39 @@
|
|
|
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
|
+
# [13.0.0](https://github.com/christophehurpeau/nightingale/compare/v12.1.4...v13.0.0) (2022-11-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* drop node 14 and cjs ([9a8ca06](https://github.com/christophehurpeau/nightingale/commit/9a8ca064449ddc0d69e26543e21c2d522536c50a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* build for node 16 ([30ae3e9](https://github.com/christophehurpeau/nightingale/commit/30ae3e9c455dbad793c2f704b9d860069dc80c32))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* dropped node 14 and cjs
|
|
22
|
+
* drop node 14
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [12.1.4](https://github.com/christophehurpeau/nightingale/compare/v12.1.3...v12.1.4) (2022-02-05)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* cjs build ([2e24ac5](https://github.com/christophehurpeau/nightingale/commit/2e24ac5753ee386c5be9ca56796194ee598f10ff))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [12.1.3](https://github.com/christophehurpeau/nightingale/compare/v12.1.2...v12.1.3) (2022-01-15)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package nightingale-types
|
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-node16.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node16.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Nightingale types for typescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logger"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "
|
|
18
|
+
"node": ">=16.0.0"
|
|
19
19
|
},
|
|
20
20
|
"browserslist": [
|
|
21
21
|
"defaults",
|
|
@@ -24,65 +24,47 @@
|
|
|
24
24
|
"not safari < 10",
|
|
25
25
|
"not ios_saf < 10"
|
|
26
26
|
],
|
|
27
|
-
"main": "./dist/index-
|
|
28
|
-
"types": "./dist/index.d.ts",
|
|
27
|
+
"main": "./dist/index-node16.mjs",
|
|
28
|
+
"types": "./dist/definitions/index.d.ts",
|
|
29
29
|
"module": "./dist/index-browser.es.js",
|
|
30
30
|
"browser": "./dist/index-browser.es.js",
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|
|
33
33
|
".": {
|
|
34
34
|
"node": {
|
|
35
|
-
"import": "./dist/index-
|
|
36
|
-
"require": "./dist/index-node14.cjs.js"
|
|
35
|
+
"import": "./dist/index-node16.mjs"
|
|
37
36
|
},
|
|
38
37
|
"browser": {
|
|
39
38
|
"browser:modern": {
|
|
40
39
|
"import": "./dist/index-browsermodern.es.js"
|
|
41
40
|
},
|
|
42
|
-
"import": "./dist/index-browser.es.js"
|
|
43
|
-
"require": "./dist/index-browser.cjs.js"
|
|
41
|
+
"import": "./dist/index-browser.es.js"
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
},
|
|
47
|
-
"module:node": "./dist/index-node14.mjs",
|
|
48
|
-
"module:modern-browsers": "./dist/index-browsermodern.es.js",
|
|
49
45
|
"sideEffects": false,
|
|
50
46
|
"scripts": {
|
|
51
|
-
"build": "
|
|
52
|
-
"build:definitions": "tsc -p
|
|
53
|
-
"clean": "
|
|
47
|
+
"build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
|
|
48
|
+
"build:definitions": "tsc -p",
|
|
49
|
+
"clean": "yarn clean:build",
|
|
50
|
+
"clean:build": "pob-babel-clean-out dist",
|
|
54
51
|
"lint": "yarn run lint:eslint",
|
|
55
|
-
"lint:eslint": "
|
|
56
|
-
"watch": "
|
|
57
|
-
},
|
|
58
|
-
"prettier": {
|
|
59
|
-
"trailingComma": "all",
|
|
60
|
-
"singleQuote": true,
|
|
61
|
-
"arrowParens": "always"
|
|
52
|
+
"lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-types",
|
|
53
|
+
"watch": "yarn clean:build && rollup --config rollup.config.mjs --watch"
|
|
62
54
|
},
|
|
55
|
+
"prettier": "@pob/root/prettier-config",
|
|
63
56
|
"pob": {
|
|
64
57
|
"babelEnvs": [
|
|
65
58
|
{
|
|
66
59
|
"target": "node",
|
|
67
|
-
"version": "
|
|
68
|
-
"formats": [
|
|
69
|
-
"cjs",
|
|
70
|
-
"es"
|
|
71
|
-
]
|
|
60
|
+
"version": "16"
|
|
72
61
|
},
|
|
73
62
|
{
|
|
74
63
|
"target": "browser",
|
|
75
|
-
"version": "modern"
|
|
76
|
-
"formats": [
|
|
77
|
-
"es"
|
|
78
|
-
]
|
|
64
|
+
"version": "modern"
|
|
79
65
|
},
|
|
80
66
|
{
|
|
81
|
-
"target": "browser"
|
|
82
|
-
"formats": [
|
|
83
|
-
"cjs",
|
|
84
|
-
"es"
|
|
85
|
-
]
|
|
67
|
+
"target": "browser"
|
|
86
68
|
}
|
|
87
69
|
],
|
|
88
70
|
"entries": [
|
|
@@ -90,14 +72,14 @@
|
|
|
90
72
|
]
|
|
91
73
|
},
|
|
92
74
|
"dependencies": {
|
|
93
|
-
"nightingale-levels": "
|
|
75
|
+
"nightingale-levels": "13.0.0"
|
|
94
76
|
},
|
|
95
77
|
"devDependencies": {
|
|
96
|
-
"@babel/core": "7.
|
|
97
|
-
"@babel/preset-env": "7.
|
|
78
|
+
"@babel/core": "7.20.2",
|
|
79
|
+
"@babel/preset-env": "7.20.2",
|
|
98
80
|
"babel-preset-modern-browsers": "15.0.2",
|
|
99
|
-
"pob-babel": "
|
|
100
|
-
"typescript": "4.
|
|
81
|
+
"pob-babel": "35.3.0",
|
|
82
|
+
"typescript": "4.9.3"
|
|
101
83
|
},
|
|
102
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "52cf7e3c8762a07891da9dde497ec03298c15654"
|
|
103
85
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/index-node14.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node14.cjs.js","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,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,oBAAY,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,oBAAY,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;AAChE,oBAAY,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,oBAAY,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"}
|
package/rollup.config.mjs
DELETED