@naturalcycles/bench-lib 4.6.0 → 4.7.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.
@@ -1,5 +1,4 @@
1
1
  import { _arrayFilled } from '@naturalcycles/js-lib/array/range.js';
2
- import { formatNumber } from './bench.util.js';
3
2
  import { asciiColor, asciiPlot } from './vendor/asciichart.js';
4
3
  const colors = [
5
4
  asciiColor.blue,
@@ -38,3 +37,6 @@ function colored(char, color) {
38
37
  return char;
39
38
  return color + char + asciiColor.reset;
40
39
  }
40
+ function formatNumber(n) {
41
+ return Math.round(n).toLocaleString('en-US');
42
+ }
@@ -7,4 +7,3 @@ export declare function runBenchScript(opt: RunBenchOptions): void;
7
7
  * Only DeferredFunctions are allowed, because of: https://github.com/bestiejs/benchmark.js/issues/111
8
8
  */
9
9
  export declare function runBench(opt: RunBenchOptions): Promise<HertzMap>;
10
- export declare function formatNumber(n: number): string;
@@ -137,7 +137,7 @@ function printComparisonTable(avg, baselineName) {
137
137
  }
138
138
  console.log();
139
139
  }
140
- export function formatNumber(n) {
140
+ function formatNumber(n) {
141
141
  return Math.round(n).toLocaleString('en-US');
142
142
  }
143
143
  function formatTime(hz) {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from './bench.model.js';
1
+ export type * from './bench.model.js';
2
2
  export * from './bench.profles.js';
3
3
  export * from './bench.util.js';
4
- export * from './cannon.model.js';
4
+ export type * from './cannon.model.js';
5
5
  export * from './cannon.profiles.js';
6
6
  export * from './cannon.util.js';
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
- export * from './bench.model.js';
2
1
  export * from './bench.profles.js';
3
2
  export * from './bench.util.js';
4
- export * from './cannon.model.js';
5
3
  export * from './cannon.profiles.js';
6
4
  export * from './cannon.util.js';
@@ -7,7 +7,6 @@ Adapted for typescript.
7
7
 
8
8
  Super-experimental!
9
9
  */
10
- // oxlint-disable no-new-array -- vendored ASCII chart relies on Array constructors
11
10
  export const asciiColor = {
12
11
  black: '\u001B[30m',
13
12
  red: '\u001B[31m',
package/package.json CHANGED
@@ -14,11 +14,12 @@
14
14
  "@types/cors": "^2",
15
15
  "@types/express": "^5",
16
16
  "@types/node": "^25",
17
+ "@typescript/native-preview": "7.0.0-dev.20260401.1",
17
18
  "express": "^5",
18
19
  "fastify": "^5",
19
20
  "helmet": "^8",
20
21
  "nanoid": "^5",
21
- "@naturalcycles/dev-lib": "20.20.0"
22
+ "@naturalcycles/dev-lib": "20.42.0"
22
23
  },
23
24
  "exports": {
24
25
  ".": "./dist/index.js"
@@ -39,7 +40,7 @@
39
40
  "engines": {
40
41
  "node": ">=24.10.0"
41
42
  },
42
- "version": "4.6.0",
43
+ "version": "4.7.0",
43
44
  "description": "Benchmarking library, based on Benchmark.js and Autocannon",
44
45
  "author": "Natural Cycles Team",
45
46
  "license": "MIT",