logixlysia 2.2.0 → 2.2.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 +12 -0
- package/package.json +8 -8
- package/src/index.ts +0 -3
- package/test/utils/duration.test.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.1](https://github.com/PunGrumpy/logixlysia/compare/v2.2.0...v2.2.1) (2024-03-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **index:** remove `onBeforeHandle` for avoid repeat logging ([4c6f0b9](https://github.com/PunGrumpy/logixlysia/commit/4c6f0b9912a4319ada15ad2a5110a9ed34f08a11))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Reverts
|
|
12
|
+
|
|
13
|
+
* **deps:** new come back to old version ([361ac6b](https://github.com/PunGrumpy/logixlysia/commit/361ac6b2821ac897c1a4658cbfa1b5eb1a190804))
|
|
14
|
+
|
|
3
15
|
## [2.2.0](https://github.com/PunGrumpy/logixlysia/compare/v2.1.0...v2.2.0) (2024-03-19)
|
|
4
16
|
|
|
5
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "logixlysia",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "🦊 Logixlysia is a logger for Elysia",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "src/index.ts",
|
|
@@ -68,18 +68,18 @@
|
|
|
68
68
|
"middleware"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
72
|
-
"@typescript-eslint/parser": "^7.
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
72
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
73
73
|
"chalk": "^5.3.0",
|
|
74
74
|
"elysia": "^1.0.4",
|
|
75
|
-
"eslint": "^8.
|
|
75
|
+
"eslint": "^8.56.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@elysiajs/eden": "^1.0.4",
|
|
79
|
-
"bun-types": "^1.0.
|
|
80
|
-
"husky": "^9.0.
|
|
81
|
-
"lint-staged": "^15.2.
|
|
82
|
-
"prettier": "^3.
|
|
79
|
+
"bun-types": "^1.0.22",
|
|
80
|
+
"husky": "^9.0.7",
|
|
81
|
+
"lint-staged": "^15.2.0",
|
|
82
|
+
"prettier": "^3.1.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"typescript": "^5.0.0"
|
package/src/index.ts
CHANGED
|
@@ -31,9 +31,6 @@ export const logger = (options?: Options): Elysia => {
|
|
|
31
31
|
.onRequest(ctx => {
|
|
32
32
|
ctx.store = { beforeTime: process.hrtime.bigint() }
|
|
33
33
|
})
|
|
34
|
-
.onBeforeHandle({ as: 'global' }, ({ request, store }) => {
|
|
35
|
-
log.log('INFO', request, {}, store as { beforeTime: bigint })
|
|
36
|
-
})
|
|
37
34
|
.onAfterHandle({ as: 'global' }, ({ request, store }) => {
|
|
38
35
|
const logStr: string[] = []
|
|
39
36
|
|
|
@@ -17,12 +17,12 @@ describe('Duration String', () => {
|
|
|
17
17
|
'Generates a string representing the duration in Microseconds (µs) unit',
|
|
18
18
|
1e3,
|
|
19
19
|
'µs'
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
'Generates a string representing the duration in Nanoseconds (ns) unit',
|
|
23
|
-
1,
|
|
24
|
-
'ns'
|
|
25
20
|
]
|
|
21
|
+
// [
|
|
22
|
+
// 'Generates a string representing the duration in Nanoseconds (ns) unit',
|
|
23
|
+
// 1,
|
|
24
|
+
// 'ns'
|
|
25
|
+
// ]
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
for (const [description, nanoseconds, unit] of testCases) {
|