halua 2.0.0 → 2.0.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/lib/index.cjs CHANGED
@@ -679,7 +679,7 @@ function NewTextHandler(send, options) {
679
679
  // src/index.ts
680
680
  var logConsole = null;
681
681
  try {
682
- logConsole = "self" in window ? self.console : console;
682
+ logConsole = typeof self !== "undefined" ? self.console : console;
683
683
  } catch (_) {
684
684
  }
685
685
  var halua = new Halua(logConsole ? NewConsoleHandler(logConsole) : []);
package/lib/index.js CHANGED
@@ -649,7 +649,7 @@ function NewTextHandler(send, options) {
649
649
  // src/index.ts
650
650
  var logConsole = null;
651
651
  try {
652
- logConsole = "self" in window ? self.console : console;
652
+ logConsole = typeof self !== "undefined" ? self.console : console;
653
653
  } catch (_) {
654
654
  }
655
655
  var halua = new Halua(logConsole ? NewConsoleHandler(logConsole) : []);
package/package.json CHANGED
@@ -1,48 +1,49 @@
1
1
  {
2
- "name": "halua",
3
- "version": "2.0.0",
4
- "description": "Package that takes control of logging, metrics and other stuff",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "module": "lib/index.mjs",
8
- "types": "lib/index.d.ts",
9
- "files": [
10
- "lib"
11
- ],
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/inshinrei/halua.git"
15
- },
16
- "keywords": [
17
- "logger",
18
- "logging",
19
- "node",
20
- "console",
21
- "web",
22
- "json logs"
23
- ],
24
- "author": "inshinrei",
25
- "license": "MIT",
26
- "bugs": {
27
- "url": "https://github.com/inshinrei/halua/issues"
28
- },
29
- "homepage": "https://github.com/inshinrei/halua#readme",
30
- "devDependencies": {
31
- "@types/node": "^24.9.1",
32
- "prettier": "^3.6.1",
33
- "tinybench": "^5.0.0",
34
- "ts-node": "^10.9.2",
35
- "tsup": "^8.5.0",
36
- "typescript": "^5.8.3",
37
- "vitest": "^3.2.4"
38
- },
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
- "scripts": {
43
- "test": "vitest",
44
- "bench": "node benchmarks/main_bench.js",
45
- "build": "tsup",
46
- "postversion": "git push && git push --tags"
47
- }
48
- }
2
+ "name": "halua",
3
+ "version": "2.0.2",
4
+ "description": "Package that takes control of logging, metrics and other stuff",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "module": "lib/index.cjs",
8
+ "types": "lib/index.d.ts",
9
+ "files": [
10
+ "lib"
11
+ ],
12
+ "scripts": {
13
+ "test": "vitest",
14
+ "bench": "node benchmarks/main_bench.js",
15
+ "build": "tsup",
16
+ "prepare": "pnpm run test run && pnpm run build",
17
+ "postversion": "git push && git push --tags"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/inshinrei/halua.git"
22
+ },
23
+ "keywords": [
24
+ "logger",
25
+ "logging",
26
+ "node",
27
+ "console",
28
+ "web",
29
+ "json logs"
30
+ ],
31
+ "author": "inshinrei",
32
+ "license": "MIT",
33
+ "bugs": {
34
+ "url": "https://github.com/inshinrei/halua/issues"
35
+ },
36
+ "homepage": "https://github.com/inshinrei/halua#readme",
37
+ "devDependencies": {
38
+ "@types/node": "^24.9.1",
39
+ "prettier": "^3.6.1",
40
+ "tinybench": "^5.0.0",
41
+ "ts-node": "^10.9.2",
42
+ "tsup": "^8.5.0",
43
+ "typescript": "^5.8.3",
44
+ "vitest": "^3.2.4"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ }
49
+ }