@matterbridge/utils 3.11.1-dev-20261025-9f9c3fa → 3.11.1-dev-20261026-17739eb

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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
4
- [![npm downloads](https://img.shields.io/npm/dt/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
4
+ [![npm downloads](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Luligu/b21088ab9c9f2b119b42c33f0fef218d/raw/npm.json)](https://www.npmjs.com/package/matterbridge)
5
5
  [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
6
- [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
6
+ [![Docker Pulls](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Luligu/b21088ab9c9f2b119b42c33f0fef218d/raw/docker.json)](https://hub.docker.com/r/luligu/matterbridge)
7
7
  ![Node.js CI](https://github.com/Luligu/matterbridge/actions/workflows/build.yml/badge.svg)
8
8
  ![CodeQL](https://github.com/Luligu/matterbridge/actions/workflows/codeql.yml/badge.svg)
9
9
  [![Codecov](https://codecov.io/gh/Luligu/matterbridge/branch/main/graph/badge.svg)](https://codecov.io/gh/Luligu/matterbridge)
@@ -26,9 +26,7 @@ export function bunAvailable() {
26
26
  }
27
27
  }
28
28
  export function getBunVersion() {
29
- if (HAS_BUN_GLOBAL)
30
- return Bun.version;
31
- return process?.versions?.bun;
29
+ return HAS_BUN_GLOBAL ? Bun.version : process?.versions?.bun;
32
30
  }
33
31
  export async function getBunLatestVersion() {
34
32
  try {
@@ -65,14 +63,10 @@ export function getGlobalBunModules() {
65
63
  return path.join(bunInstall, 'install', 'global', 'node_modules');
66
64
  }
67
65
  export function nanoseconds() {
68
- if (HAS_BUN_GLOBAL)
69
- return Bun.nanoseconds();
70
- return Number(process.hrtime.bigint());
66
+ return HAS_BUN_GLOBAL ? Bun.nanoseconds() : Number(process.hrtime.bigint());
71
67
  }
72
68
  export async function sleep(ms) {
73
- if (HAS_BUN_GLOBAL)
74
- return Bun.sleep(ms);
75
- return delay(ms);
69
+ return HAS_BUN_GLOBAL ? Bun.sleep(ms) : delay(ms);
76
70
  }
77
71
  export function which(command) {
78
72
  return HAS_BUN_GLOBAL ? Bun.which(command) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matterbridge/utils",
3
- "version": "3.11.1-dev-20261025-9f9c3fa",
3
+ "version": "3.11.1-dev-20261026-17739eb",
4
4
  "description": "Matterbridge utils library",
5
5
  "author": "https://github.com/Luligu",
6
6
  "homepage": "https://matterbridge.io/",