logixlysia 2.2.0 → 2.2.2

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
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.2](https://github.com/PunGrumpy/logixlysia/compare/v2.2.1...v2.2.2) (2024-04-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **eslint:** change to use `eslint.config.cjs` instead `.eslintrc.cjs` ([506a33b](https://github.com/PunGrumpy/logixlysia/commit/506a33bc6540614a0b912ddedec109b2215affa3))
9
+ * package.json to reduce vulnerabilities ([f768e88](https://github.com/PunGrumpy/logixlysia/commit/f768e88acd7d7c1faf32dab06a467c2cd6ba8f9c))
10
+
11
+ ## [2.2.1](https://github.com/PunGrumpy/logixlysia/compare/v2.2.0...v2.2.1) (2024-03-19)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **index:** remove `onBeforeHandle` for avoid repeat logging ([4c6f0b9](https://github.com/PunGrumpy/logixlysia/commit/4c6f0b9912a4319ada15ad2a5110a9ed34f08a11))
17
+
18
+
19
+ ### Reverts
20
+
21
+ * **deps:** new come back to old version ([361ac6b](https://github.com/PunGrumpy/logixlysia/commit/361ac6b2821ac897c1a4658cbfa1b5eb1a190804))
22
+
3
23
  ## [2.2.0](https://github.com/PunGrumpy/logixlysia/compare/v2.1.0...v2.2.0) (2024-03-19)
4
24
 
5
25
 
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ env: {
3
+ es2021: true,
4
+ node: true
5
+ },
6
+ extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
7
+ parser: '@typescript-eslint/parser',
8
+ parserOptions: {
9
+ ecmaVersion: 'latest',
10
+ sourceType: 'module'
11
+ },
12
+ plugins: ['@typescript-eslint'],
13
+ rules: {
14
+ '@typescript-eslint/ban-types': 'off',
15
+ '@typescript-eslint/no-explicit-any': 'off',
16
+ 'no-mixed-spaces-and-tabs': 'off',
17
+ '@typescript-eslint/no-non-null-assertion': 'off',
18
+ '@typescript-eslint/no-extra-semi': 'off',
19
+ '@typescript-eslint/ban-ts-comment': 'off',
20
+ '@typescript-eslint/no-namespace': 'off',
21
+ 'no-case-declarations': 'off',
22
+ 'no-extra-semi': 'off'
23
+ },
24
+ ignorePatterns: ['example/*', 'tests/**/*', 'lint-staged.config.js']
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logixlysia",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "🦊 Logixlysia is a logger for Elysia",
5
5
  "type": "module",
6
6
  "module": "src/index.ts",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "license": "MIT",
17
17
  "scripts": {
18
- "lint": "eslint . --ext .ts",
19
- "lint:fix": "eslint . --ext .ts --fix",
18
+ "lint": "eslint **/*.ts --no-warn-ignored",
19
+ "lint:fix": "eslint **/*.ts --fix --no-warn-ignored",
20
20
  "test": "bun test --timeout 5000 --coverage",
21
21
  "test:ci": "bun test --timeout 5000 --coverage",
22
22
  "publish": "npm publish",
@@ -68,18 +68,18 @@
68
68
  "middleware"
69
69
  ],
70
70
  "dependencies": {
71
- "@typescript-eslint/eslint-plugin": "^7.3.1",
72
- "@typescript-eslint/parser": "^7.3.1",
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.57.0"
75
+ "eslint": "^9.0.0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@elysiajs/eden": "^1.0.4",
79
- "bun-types": "^1.0.33",
80
- "husky": "^9.0.11",
81
- "lint-staged": "^15.2.2",
82
- "prettier": "^3.2.5"
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) {