modestbench 0.7.0 → 0.9.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.
- package/CHANGELOG.md +25 -0
- package/README.md +37 -4
- package/dist/adapters/types.d.cts +1 -1
- package/dist/adapters/types.d.cts.map +1 -1
- package/dist/adapters/types.d.ts +1 -1
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cli/commands/run.cjs +93 -49
- package/dist/cli/commands/run.cjs.map +1 -1
- package/dist/cli/commands/run.d.cts +1 -0
- package/dist/cli/commands/run.d.cts.map +1 -1
- package/dist/cli/commands/run.d.ts +1 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +95 -51
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/index.cjs +7 -1
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +7 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/{core → config}/benchmark-schema.cjs +1 -1
- package/dist/config/benchmark-schema.cjs.map +1 -0
- package/dist/config/benchmark-schema.d.cts +913 -0
- package/dist/config/benchmark-schema.d.cts.map +1 -0
- package/dist/config/benchmark-schema.d.ts +913 -0
- package/dist/config/benchmark-schema.d.ts.map +1 -0
- package/dist/{core → config}/benchmark-schema.js +1 -1
- package/dist/config/benchmark-schema.js.map +1 -0
- package/dist/config/schema.cjs +188 -105
- package/dist/config/schema.cjs.map +1 -1
- package/dist/config/schema.d.cts +208 -80
- package/dist/config/schema.d.cts.map +1 -1
- package/dist/config/schema.d.ts +208 -80
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +187 -104
- package/dist/config/schema.js.map +1 -1
- package/dist/constants.cjs +2 -0
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +2 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/core/engine.cjs +50 -45
- package/dist/core/engine.cjs.map +1 -1
- package/dist/core/engine.d.cts.map +1 -1
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/engine.js +50 -45
- package/dist/core/engine.js.map +1 -1
- package/dist/core/output-path-resolver.cjs +15 -1
- package/dist/core/output-path-resolver.cjs.map +1 -1
- package/dist/core/output-path-resolver.d.cts +8 -0
- package/dist/core/output-path-resolver.d.cts.map +1 -1
- package/dist/core/output-path-resolver.d.ts +8 -0
- package/dist/core/output-path-resolver.d.ts.map +1 -1
- package/dist/core/output-path-resolver.js +13 -0
- package/dist/core/output-path-resolver.js.map +1 -1
- package/dist/errors/index.cjs +3 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +1 -1
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/reporter.cjs +45 -1
- package/dist/errors/reporter.cjs.map +1 -1
- package/dist/errors/reporter.d.cts +32 -0
- package/dist/errors/reporter.d.cts.map +1 -1
- package/dist/errors/reporter.d.ts +32 -0
- package/dist/errors/reporter.d.ts.map +1 -1
- package/dist/errors/reporter.js +42 -0
- package/dist/errors/reporter.js.map +1 -1
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/reporters/json.cjs +1 -1
- package/dist/reporters/json.cjs.map +1 -1
- package/dist/reporters/json.js +1 -1
- package/dist/reporters/json.js.map +1 -1
- package/dist/schema/modestbench-config.schema.json +94 -87
- package/dist/services/budget-evaluator.cjs +8 -6
- package/dist/services/budget-evaluator.cjs.map +1 -1
- package/dist/services/budget-evaluator.d.cts +2 -2
- package/dist/services/budget-evaluator.d.cts.map +1 -1
- package/dist/services/budget-evaluator.d.ts +2 -2
- package/dist/services/budget-evaluator.d.ts.map +1 -1
- package/dist/services/budget-evaluator.js +8 -6
- package/dist/services/budget-evaluator.js.map +1 -1
- package/dist/services/budget-resolver.cjs +214 -0
- package/dist/services/budget-resolver.cjs.map +1 -0
- package/dist/services/budget-resolver.d.cts +98 -0
- package/dist/services/budget-resolver.d.cts.map +1 -0
- package/dist/services/budget-resolver.d.ts +98 -0
- package/dist/services/budget-resolver.d.ts.map +1 -0
- package/dist/services/budget-resolver.js +203 -0
- package/dist/services/budget-resolver.js.map +1 -0
- package/dist/services/file-loader.cjs +1 -1
- package/dist/services/file-loader.cjs.map +1 -1
- package/dist/services/file-loader.js +1 -1
- package/dist/services/file-loader.js.map +1 -1
- package/dist/services/reporter-loader.cjs +281 -0
- package/dist/services/reporter-loader.cjs.map +1 -0
- package/dist/services/reporter-loader.d.cts +67 -0
- package/dist/services/reporter-loader.d.cts.map +1 -0
- package/dist/services/reporter-loader.d.ts +67 -0
- package/dist/services/reporter-loader.d.ts.map +1 -0
- package/dist/services/reporter-loader.js +241 -0
- package/dist/services/reporter-loader.js.map +1 -0
- package/dist/types/budgets.d.cts +31 -0
- package/dist/types/budgets.d.cts.map +1 -1
- package/dist/types/budgets.d.ts +31 -0
- package/dist/types/budgets.d.ts.map +1 -1
- package/dist/types/core.cjs.map +1 -1
- package/dist/types/core.d.cts +28 -75
- package/dist/types/core.d.cts.map +1 -1
- package/dist/types/core.d.ts +28 -75
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/core.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/plugin.cjs +9 -0
- package/dist/types/plugin.cjs.map +1 -0
- package/dist/types/plugin.d.cts +179 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.ts +179 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +8 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/utils/package.cjs +66 -5
- package/dist/utils/package.cjs.map +1 -1
- package/dist/utils/package.d.cts +6 -0
- package/dist/utils/package.d.cts.map +1 -1
- package/dist/utils/package.d.ts +6 -0
- package/dist/utils/package.d.ts.map +1 -1
- package/dist/utils/package.js +31 -1
- package/dist/utils/package.js.map +1 -1
- package/dist/utils/reporter-utils.cjs +90 -0
- package/dist/utils/reporter-utils.cjs.map +1 -0
- package/dist/utils/reporter-utils.d.cts +42 -0
- package/dist/utils/reporter-utils.d.cts.map +1 -0
- package/dist/utils/reporter-utils.d.ts +42 -0
- package/dist/utils/reporter-utils.d.ts.map +1 -0
- package/dist/utils/reporter-utils.js +83 -0
- package/dist/utils/reporter-utils.js.map +1 -0
- package/package.json +20 -9
- package/src/adapters/types.ts +1 -1
- package/src/cli/commands/run.ts +140 -69
- package/src/cli/index.ts +8 -1
- package/src/{core → config}/benchmark-schema.ts +1 -1
- package/src/config/schema.ts +379 -302
- package/src/constants.ts +2 -0
- package/src/core/engine.ts +74 -69
- package/src/core/output-path-resolver.ts +14 -0
- package/src/errors/index.ts +2 -0
- package/src/errors/reporter.ts +55 -0
- package/src/index.ts +19 -1
- package/src/reporters/json.ts +1 -1
- package/src/services/budget-evaluator.ts +13 -9
- package/src/services/budget-resolver.ts +254 -0
- package/src/services/file-loader.ts +1 -1
- package/src/services/reporter-loader.ts +323 -0
- package/src/types/budgets.ts +38 -0
- package/src/types/core.ts +64 -99
- package/src/types/index.ts +3 -0
- package/src/types/plugin.ts +197 -0
- package/src/utils/package.ts +32 -1
- package/src/utils/reporter-utils.ts +85 -0
- package/dist/core/benchmark-schema.cjs.map +0 -1
- package/dist/core/benchmark-schema.d.cts +0 -139
- package/dist/core/benchmark-schema.d.cts.map +0 -1
- package/dist/core/benchmark-schema.d.ts +0 -139
- package/dist/core/benchmark-schema.d.ts.map +0 -1
- package/dist/core/benchmark-schema.js.map +0 -1
package/dist/utils/package.cjs
CHANGED
|
@@ -6,13 +6,74 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
12
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.findPackageRoot = void 0;
|
|
43
|
+
exports.findPackageRoot = exports.getPackageVersion = void 0;
|
|
44
|
+
const node_fs_1 = require("node:fs");
|
|
14
45
|
const promises_1 = require("node:fs/promises");
|
|
15
|
-
const node_path_1 =
|
|
46
|
+
const node_path_1 = __importStar(require("node:path"));
|
|
47
|
+
const node_url_1 = require("node:url");
|
|
48
|
+
/**
|
|
49
|
+
* Cached package version, loaded at module initialization
|
|
50
|
+
*
|
|
51
|
+
* NOTE: This relies on package.json being at the same relative path from both
|
|
52
|
+
* src/ and dist/ directories (../../package.json). If the build output
|
|
53
|
+
* structure changes, this will break.
|
|
54
|
+
*/
|
|
55
|
+
const cachedPackageVersion = (() => {
|
|
56
|
+
try {
|
|
57
|
+
const __dirname = (0, node_path_1.dirname)((0, node_url_1.fileURLToPath)(require("url").pathToFileURL(__filename)));
|
|
58
|
+
const pkgPath = (0, node_path_1.join)(__dirname, '..', '..', 'package.json');
|
|
59
|
+
const pkgContent = (0, node_fs_1.readFileSync)(pkgPath, 'utf8');
|
|
60
|
+
const pkg = JSON.parse(pkgContent);
|
|
61
|
+
return pkg.version;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Fallback if package.json cannot be read (shouldn't happen in normal use)
|
|
65
|
+
return 'unknown';
|
|
66
|
+
}
|
|
67
|
+
})();
|
|
68
|
+
/**
|
|
69
|
+
* Get the ModestBench package version
|
|
70
|
+
*
|
|
71
|
+
* @returns The version string from package.json
|
|
72
|
+
*/
|
|
73
|
+
const getPackageVersion = () => {
|
|
74
|
+
return cachedPackageVersion;
|
|
75
|
+
};
|
|
76
|
+
exports.getPackageVersion = getPackageVersion;
|
|
16
77
|
/**
|
|
17
78
|
* Find the nearest package.json and return its directory
|
|
18
79
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAuC;AACvC,+CAA4C;AAC5C,uDAAgD;AAChD,uCAAyC;AAEzC;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE;IACjC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,IAAA,wBAAa,2CAAiB,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,IAAA,sBAAY,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAwB,CAAC;QAC1D,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,2EAA2E;QAC3E,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC;AAEL;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,GAAW,EAAE;IAC5C,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEF;;;;;GAKG;AACI,MAAM,eAAe,GAAG,KAAK,EAAE,QAAgB,EAAmB,EAAE;IACzE,IAAI,UAAU,GAAG,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,mBAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;IAEzC,OAAO,UAAU,KAAK,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAC1D,MAAM,IAAA,mBAAQ,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACrC,OAAO,UAAU,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;YAC9C,UAAU,GAAG,mBAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAED,mDAAmD;IACnD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B"}
|
package/dist/utils/package.d.cts
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Get the ModestBench package version
|
|
10
|
+
*
|
|
11
|
+
* @returns The version string from package.json
|
|
12
|
+
*/
|
|
13
|
+
export declare const getPackageVersion: () => string;
|
|
8
14
|
/**
|
|
9
15
|
* Find the nearest package.json and return its directory
|
|
10
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAiBtE,CAAC"}
|
package/dist/utils/package.d.ts
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Get the ModestBench package version
|
|
10
|
+
*
|
|
11
|
+
* @returns The version string from package.json
|
|
12
|
+
*/
|
|
13
|
+
export declare const getPackageVersion: () => string;
|
|
8
14
|
/**
|
|
9
15
|
* Find the nearest package.json and return its directory
|
|
10
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAEpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAiBtE,CAAC"}
|
package/dist/utils/package.js
CHANGED
|
@@ -5,8 +5,38 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
+
import { readFileSync } from 'node:fs';
|
|
8
9
|
import { readFile } from 'node:fs/promises';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
+
import path, { dirname, join } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
/**
|
|
13
|
+
* Cached package version, loaded at module initialization
|
|
14
|
+
*
|
|
15
|
+
* NOTE: This relies on package.json being at the same relative path from both
|
|
16
|
+
* src/ and dist/ directories (../../package.json). If the build output
|
|
17
|
+
* structure changes, this will break.
|
|
18
|
+
*/
|
|
19
|
+
const cachedPackageVersion = (() => {
|
|
20
|
+
try {
|
|
21
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
const pkgPath = join(__dirname, '..', '..', 'package.json');
|
|
23
|
+
const pkgContent = readFileSync(pkgPath, 'utf8');
|
|
24
|
+
const pkg = JSON.parse(pkgContent);
|
|
25
|
+
return pkg.version;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Fallback if package.json cannot be read (shouldn't happen in normal use)
|
|
29
|
+
return 'unknown';
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
32
|
+
/**
|
|
33
|
+
* Get the ModestBench package version
|
|
34
|
+
*
|
|
35
|
+
* @returns The version string from package.json
|
|
36
|
+
*/
|
|
37
|
+
export const getPackageVersion = () => {
|
|
38
|
+
return cachedPackageVersion;
|
|
39
|
+
};
|
|
10
40
|
/**
|
|
11
41
|
* Find the nearest package.json and return its directory
|
|
12
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE;IACjC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAwB,CAAC;QAC1D,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,2EAA2E;QAC3E,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC;AAEL;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAW,EAAE;IAC5C,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,QAAgB,EAAmB,EAAE;IACzE,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;IAEzC,OAAO,UAAU,KAAK,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAC1D,MAAM,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACrC,OAAO,UAAU,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;YAC9C,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAED,mDAAmD;IACnD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ModestBench Reporter Utilities
|
|
4
|
+
*
|
|
5
|
+
* Formatting functions for benchmark data, exported for use by third-party
|
|
6
|
+
* reporter plugins.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.reporterUtils = exports.formatPercentage = exports.formatOpsPerSecond = exports.formatDuration = exports.formatBytes = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Format bytes in human-readable format
|
|
12
|
+
*
|
|
13
|
+
* @param bytes - Number of bytes
|
|
14
|
+
* @returns Formatted string (e.g., "1.5 GB", "256 MB", "1.2 KB")
|
|
15
|
+
*/
|
|
16
|
+
const formatBytes = (bytes) => {
|
|
17
|
+
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
18
|
+
let size = bytes;
|
|
19
|
+
let unitIndex = 0;
|
|
20
|
+
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
21
|
+
size /= 1024;
|
|
22
|
+
unitIndex++;
|
|
23
|
+
}
|
|
24
|
+
return `${size.toFixed(1)} ${units[unitIndex]}`;
|
|
25
|
+
};
|
|
26
|
+
exports.formatBytes = formatBytes;
|
|
27
|
+
/**
|
|
28
|
+
* Format duration in human-readable format
|
|
29
|
+
*
|
|
30
|
+
* @param nanoseconds - Duration in nanoseconds
|
|
31
|
+
* @returns Formatted string (e.g., "1.23ms", "456.78μs", "789.00ns")
|
|
32
|
+
*/
|
|
33
|
+
const formatDuration = (nanoseconds) => {
|
|
34
|
+
if (nanoseconds < 1000) {
|
|
35
|
+
return `${nanoseconds.toFixed(2)}ns`;
|
|
36
|
+
}
|
|
37
|
+
else if (nanoseconds < 1_000_000) {
|
|
38
|
+
return `${(nanoseconds / 1000).toFixed(2)}μs`;
|
|
39
|
+
}
|
|
40
|
+
else if (nanoseconds < 1_000_000_000) {
|
|
41
|
+
return `${(nanoseconds / 1_000_000).toFixed(2)}ms`;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return `${(nanoseconds / 1_000_000_000).toFixed(2)}s`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.formatDuration = formatDuration;
|
|
48
|
+
/**
|
|
49
|
+
* Format operations per second in human-readable format
|
|
50
|
+
*
|
|
51
|
+
* @param opsPerSecond - Operations per second
|
|
52
|
+
* @returns Formatted string (e.g., "1.2M ops/sec", "456K ops/sec")
|
|
53
|
+
*/
|
|
54
|
+
const formatOpsPerSecond = (opsPerSecond) => {
|
|
55
|
+
if (opsPerSecond < 1000) {
|
|
56
|
+
return `${opsPerSecond.toFixed(2)} ops/sec`;
|
|
57
|
+
}
|
|
58
|
+
else if (opsPerSecond < 1_000_000) {
|
|
59
|
+
return `${(opsPerSecond / 1000).toFixed(2)}K ops/sec`;
|
|
60
|
+
}
|
|
61
|
+
else if (opsPerSecond < 1_000_000_000) {
|
|
62
|
+
return `${(opsPerSecond / 1_000_000).toFixed(2)}M ops/sec`;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return `${(opsPerSecond / 1_000_000_000).toFixed(2)}B ops/sec`;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.formatOpsPerSecond = formatOpsPerSecond;
|
|
69
|
+
/**
|
|
70
|
+
* Format percentage value
|
|
71
|
+
*
|
|
72
|
+
* @param value - Percentage value (e.g., 12.345 for 12.345%)
|
|
73
|
+
* @returns Formatted string (e.g., "12.35%")
|
|
74
|
+
*/
|
|
75
|
+
const formatPercentage = (value) => {
|
|
76
|
+
return `${value.toFixed(2)}%`;
|
|
77
|
+
};
|
|
78
|
+
exports.formatPercentage = formatPercentage;
|
|
79
|
+
/**
|
|
80
|
+
* Reporter utilities object implementing the ReporterUtils interface
|
|
81
|
+
*
|
|
82
|
+
* This object is provided to reporter plugins via the ReporterContext.
|
|
83
|
+
*/
|
|
84
|
+
exports.reporterUtils = {
|
|
85
|
+
formatBytes: exports.formatBytes,
|
|
86
|
+
formatDuration: exports.formatDuration,
|
|
87
|
+
formatOpsPerSecond: exports.formatOpsPerSecond,
|
|
88
|
+
formatPercentage: exports.formatPercentage,
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=reporter-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter-utils.js","sourceRoot":"","sources":["../../src/utils/reporter-utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH;;;;;GAKG;AACI,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE;IACnD,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,IAAI,IAAI,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,IAAI,IAAI,IAAI,CAAC;QACb,SAAS,EAAE,CAAC;IACd,CAAC;IAED,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;AAClD,CAAC,CAAC;AAXW,QAAA,WAAW,eAWtB;AAEF;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC5D,IAAI,WAAW,GAAG,IAAI,EAAE,CAAC;QACvB,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACvC,CAAC;SAAM,IAAI,WAAW,GAAG,SAAS,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;SAAM,IAAI,WAAW,GAAG,aAAa,EAAE,CAAC;QACvC,OAAO,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACxD,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB;AAEF;;;;;GAKG;AACI,MAAM,kBAAkB,GAAG,CAAC,YAAoB,EAAU,EAAE;IACjE,IAAI,YAAY,GAAG,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9C,CAAC;SAAM,IAAI,YAAY,GAAG,SAAS,EAAE,CAAC;QACpC,OAAO,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IACxD,CAAC;SAAM,IAAI,YAAY,GAAG,aAAa,EAAE,CAAC;QACxC,OAAO,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAC,YAAY,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IACjE,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,kBAAkB,sBAU7B;AAEF;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAU,EAAE;IACxD,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAChC,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEF;;;;GAIG;AACU,QAAA,aAAa,GAAkB;IAC1C,WAAW,EAAX,mBAAW;IACX,cAAc,EAAd,sBAAc;IACd,kBAAkB,EAAlB,0BAAkB;IAClB,gBAAgB,EAAhB,wBAAgB;CACjB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModestBench Reporter Utilities
|
|
3
|
+
*
|
|
4
|
+
* Formatting functions for benchmark data, exported for use by third-party
|
|
5
|
+
* reporter plugins.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReporterUtils } from "../types/plugin.cjs";
|
|
8
|
+
/**
|
|
9
|
+
* Format bytes in human-readable format
|
|
10
|
+
*
|
|
11
|
+
* @param bytes - Number of bytes
|
|
12
|
+
* @returns Formatted string (e.g., "1.5 GB", "256 MB", "1.2 KB")
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatBytes: (bytes: number) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Format duration in human-readable format
|
|
17
|
+
*
|
|
18
|
+
* @param nanoseconds - Duration in nanoseconds
|
|
19
|
+
* @returns Formatted string (e.g., "1.23ms", "456.78μs", "789.00ns")
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatDuration: (nanoseconds: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Format operations per second in human-readable format
|
|
24
|
+
*
|
|
25
|
+
* @param opsPerSecond - Operations per second
|
|
26
|
+
* @returns Formatted string (e.g., "1.2M ops/sec", "456K ops/sec")
|
|
27
|
+
*/
|
|
28
|
+
export declare const formatOpsPerSecond: (opsPerSecond: number) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Format percentage value
|
|
31
|
+
*
|
|
32
|
+
* @param value - Percentage value (e.g., 12.345 for 12.345%)
|
|
33
|
+
* @returns Formatted string (e.g., "12.35%")
|
|
34
|
+
*/
|
|
35
|
+
export declare const formatPercentage: (value: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Reporter utilities object implementing the ReporterUtils interface
|
|
38
|
+
*
|
|
39
|
+
* This object is provided to reporter plugins via the ReporterContext.
|
|
40
|
+
*/
|
|
41
|
+
export declare const reporterUtils: ReporterUtils;
|
|
42
|
+
//# sourceMappingURL=reporter-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter-utils.d.ts","sourceRoot":"","sources":["../../src/utils/reporter-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA2B;AAExD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAW3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,KAAG,MAUpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,KAAG,MAUzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,KAAG,MAEhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModestBench Reporter Utilities
|
|
3
|
+
*
|
|
4
|
+
* Formatting functions for benchmark data, exported for use by third-party
|
|
5
|
+
* reporter plugins.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReporterUtils } from "../types/plugin.js";
|
|
8
|
+
/**
|
|
9
|
+
* Format bytes in human-readable format
|
|
10
|
+
*
|
|
11
|
+
* @param bytes - Number of bytes
|
|
12
|
+
* @returns Formatted string (e.g., "1.5 GB", "256 MB", "1.2 KB")
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatBytes: (bytes: number) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Format duration in human-readable format
|
|
17
|
+
*
|
|
18
|
+
* @param nanoseconds - Duration in nanoseconds
|
|
19
|
+
* @returns Formatted string (e.g., "1.23ms", "456.78μs", "789.00ns")
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatDuration: (nanoseconds: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Format operations per second in human-readable format
|
|
24
|
+
*
|
|
25
|
+
* @param opsPerSecond - Operations per second
|
|
26
|
+
* @returns Formatted string (e.g., "1.2M ops/sec", "456K ops/sec")
|
|
27
|
+
*/
|
|
28
|
+
export declare const formatOpsPerSecond: (opsPerSecond: number) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Format percentage value
|
|
31
|
+
*
|
|
32
|
+
* @param value - Percentage value (e.g., 12.345 for 12.345%)
|
|
33
|
+
* @returns Formatted string (e.g., "12.35%")
|
|
34
|
+
*/
|
|
35
|
+
export declare const formatPercentage: (value: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Reporter utilities object implementing the ReporterUtils interface
|
|
38
|
+
*
|
|
39
|
+
* This object is provided to reporter plugins via the ReporterContext.
|
|
40
|
+
*/
|
|
41
|
+
export declare const reporterUtils: ReporterUtils;
|
|
42
|
+
//# sourceMappingURL=reporter-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter-utils.d.ts","sourceRoot":"","sources":["../../src/utils/reporter-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,2BAA2B;AAExD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAW3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,KAAG,MAUpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,KAAG,MAUzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,KAAG,MAEhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModestBench Reporter Utilities
|
|
3
|
+
*
|
|
4
|
+
* Formatting functions for benchmark data, exported for use by third-party
|
|
5
|
+
* reporter plugins.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Format bytes in human-readable format
|
|
9
|
+
*
|
|
10
|
+
* @param bytes - Number of bytes
|
|
11
|
+
* @returns Formatted string (e.g., "1.5 GB", "256 MB", "1.2 KB")
|
|
12
|
+
*/
|
|
13
|
+
export const formatBytes = (bytes) => {
|
|
14
|
+
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
15
|
+
let size = bytes;
|
|
16
|
+
let unitIndex = 0;
|
|
17
|
+
while (size >= 1024 && unitIndex < units.length - 1) {
|
|
18
|
+
size /= 1024;
|
|
19
|
+
unitIndex++;
|
|
20
|
+
}
|
|
21
|
+
return `${size.toFixed(1)} ${units[unitIndex]}`;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Format duration in human-readable format
|
|
25
|
+
*
|
|
26
|
+
* @param nanoseconds - Duration in nanoseconds
|
|
27
|
+
* @returns Formatted string (e.g., "1.23ms", "456.78μs", "789.00ns")
|
|
28
|
+
*/
|
|
29
|
+
export const formatDuration = (nanoseconds) => {
|
|
30
|
+
if (nanoseconds < 1000) {
|
|
31
|
+
return `${nanoseconds.toFixed(2)}ns`;
|
|
32
|
+
}
|
|
33
|
+
else if (nanoseconds < 1_000_000) {
|
|
34
|
+
return `${(nanoseconds / 1000).toFixed(2)}μs`;
|
|
35
|
+
}
|
|
36
|
+
else if (nanoseconds < 1_000_000_000) {
|
|
37
|
+
return `${(nanoseconds / 1_000_000).toFixed(2)}ms`;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return `${(nanoseconds / 1_000_000_000).toFixed(2)}s`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Format operations per second in human-readable format
|
|
45
|
+
*
|
|
46
|
+
* @param opsPerSecond - Operations per second
|
|
47
|
+
* @returns Formatted string (e.g., "1.2M ops/sec", "456K ops/sec")
|
|
48
|
+
*/
|
|
49
|
+
export const formatOpsPerSecond = (opsPerSecond) => {
|
|
50
|
+
if (opsPerSecond < 1000) {
|
|
51
|
+
return `${opsPerSecond.toFixed(2)} ops/sec`;
|
|
52
|
+
}
|
|
53
|
+
else if (opsPerSecond < 1_000_000) {
|
|
54
|
+
return `${(opsPerSecond / 1000).toFixed(2)}K ops/sec`;
|
|
55
|
+
}
|
|
56
|
+
else if (opsPerSecond < 1_000_000_000) {
|
|
57
|
+
return `${(opsPerSecond / 1_000_000).toFixed(2)}M ops/sec`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return `${(opsPerSecond / 1_000_000_000).toFixed(2)}B ops/sec`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Format percentage value
|
|
65
|
+
*
|
|
66
|
+
* @param value - Percentage value (e.g., 12.345 for 12.345%)
|
|
67
|
+
* @returns Formatted string (e.g., "12.35%")
|
|
68
|
+
*/
|
|
69
|
+
export const formatPercentage = (value) => {
|
|
70
|
+
return `${value.toFixed(2)}%`;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Reporter utilities object implementing the ReporterUtils interface
|
|
74
|
+
*
|
|
75
|
+
* This object is provided to reporter plugins via the ReporterContext.
|
|
76
|
+
*/
|
|
77
|
+
export const reporterUtils = {
|
|
78
|
+
formatBytes,
|
|
79
|
+
formatDuration,
|
|
80
|
+
formatOpsPerSecond,
|
|
81
|
+
formatPercentage,
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=reporter-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter-utils.js","sourceRoot":"","sources":["../../src/utils/reporter-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE;IACnD,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,IAAI,IAAI,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,IAAI,IAAI,IAAI,CAAC;QACb,SAAS,EAAE,CAAC;IACd,CAAC;IAED,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;AAClD,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC5D,IAAI,WAAW,GAAG,IAAI,EAAE,CAAC;QACvB,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACvC,CAAC;SAAM,IAAI,WAAW,GAAG,SAAS,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;SAAM,IAAI,WAAW,GAAG,aAAa,EAAE,CAAC;QACvC,OAAO,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACxD,CAAC;AACH,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,YAAoB,EAAU,EAAE;IACjE,IAAI,YAAY,GAAG,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9C,CAAC;SAAM,IAAI,YAAY,GAAG,SAAS,EAAE,CAAC;QACpC,OAAO,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IACxD,CAAC;SAAM,IAAI,YAAY,GAAG,aAAa,EAAE,CAAC;QACxC,OAAO,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAC,YAAY,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC;IACjE,CAAC;AACH,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAU,EAAE;IACxD,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAChC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,gBAAgB;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modestbench",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A full-ass benchmarking framework for Node.js",
|
|
6
6
|
"repository": {
|
|
@@ -94,13 +94,12 @@
|
|
|
94
94
|
"clean": "rm -rf dist",
|
|
95
95
|
"commitlint": "commitlint",
|
|
96
96
|
"dev": "zshy --watch",
|
|
97
|
-
"docs:build": "run-s docs:copy astro:build",
|
|
97
|
+
"docs:build": "run-s build:schema docs:copy astro:build",
|
|
98
98
|
"docs:copy": "tsx scripts/copy-docs.ts",
|
|
99
99
|
"docs:dev": "run-s docs:copy astro:dev",
|
|
100
100
|
"docs:preview": "astro preview --config astro.config.js",
|
|
101
101
|
"fix": "run-s -sl fix:*",
|
|
102
102
|
"fix:eslint": "eslint --fix .",
|
|
103
|
-
"fix:pkg": "npm pkg fix",
|
|
104
103
|
"fix:prettier": "prettier --write . && markdownlint-cli2 --fix \"**/*.md\"",
|
|
105
104
|
"lint": "run-p -sl --aggregate-output lint:*",
|
|
106
105
|
"lint-staged": "lint-staged",
|
|
@@ -136,33 +135,34 @@
|
|
|
136
135
|
"@astrojs/starlight": "0.37.1",
|
|
137
136
|
"@commitlint/cli": "20.2.0",
|
|
138
137
|
"@commitlint/config-conventional": "20.2.0",
|
|
139
|
-
"@eslint/js": "9.39.
|
|
138
|
+
"@eslint/js": "9.39.2",
|
|
140
139
|
"@jest/globals": "30.2.0",
|
|
141
140
|
"@pasqal-io/starlight-client-mermaid": "0.1.0",
|
|
142
141
|
"@stylistic/eslint-plugin": "5.6.1",
|
|
143
142
|
"@types/mocha": "10.0.10",
|
|
144
|
-
"@types/node": "24.10.
|
|
143
|
+
"@types/node": "24.10.4",
|
|
145
144
|
"@types/wallabyjs": "0.0.15",
|
|
146
145
|
"@types/yargs": "17.0.35",
|
|
147
|
-
"asciinema-player": "3.
|
|
146
|
+
"asciinema-player": "3.13.5",
|
|
148
147
|
"astro": "5.16.5",
|
|
149
148
|
"astro-broken-link-checker": "file:./vendor/astro-broken-link-checker",
|
|
150
149
|
"ava": "6.4.1",
|
|
151
150
|
"bupkis": "0.14.0",
|
|
152
151
|
"cspell": "9.4.0",
|
|
153
|
-
"eslint": "9.39.
|
|
152
|
+
"eslint": "9.39.2",
|
|
154
153
|
"eslint-plugin-jsonc": "2.21.0",
|
|
155
154
|
"eslint-plugin-perfectionist": "4.15.1",
|
|
156
155
|
"globals": "16.5.0",
|
|
157
156
|
"husky": "9.1.7",
|
|
158
157
|
"jest": "30.2.0",
|
|
159
|
-
"knip": "5.73.
|
|
158
|
+
"knip": "5.73.4",
|
|
160
159
|
"lint-staged": "16.2.7",
|
|
161
160
|
"markdownlint-cli2": "0.20.0",
|
|
162
161
|
"markdownlint-cli2-formatter-pretty": "0.0.9",
|
|
163
162
|
"mocha": "11.7.5",
|
|
164
163
|
"npm-run-all2": "8.0.4",
|
|
165
164
|
"prettier": "3.7.4",
|
|
165
|
+
"prettier-plugin-astro": "0.14.1",
|
|
166
166
|
"prettier-plugin-jsdoc": "1.8.0",
|
|
167
167
|
"prettier-plugin-pkg": "0.21.2",
|
|
168
168
|
"prettier-plugin-sort-json": "4.1.1",
|
|
@@ -181,7 +181,6 @@
|
|
|
181
181
|
"@types/wallabyjs",
|
|
182
182
|
"@types/mocha",
|
|
183
183
|
"markdownlint-cli2-formatter-pretty",
|
|
184
|
-
"asciinema-player",
|
|
185
184
|
"@astrojs/mdx",
|
|
186
185
|
"astro-broken-link-checker",
|
|
187
186
|
"jest",
|
|
@@ -215,6 +214,9 @@
|
|
|
215
214
|
}
|
|
216
215
|
},
|
|
217
216
|
"lint-staged": {
|
|
217
|
+
"*.{astro,css}": [
|
|
218
|
+
"prettier --write"
|
|
219
|
+
],
|
|
218
220
|
"*.{ts,cts,js,cjs,yml,json5}": [
|
|
219
221
|
"eslint --fix",
|
|
220
222
|
"prettier --write",
|
|
@@ -238,7 +240,16 @@
|
|
|
238
240
|
"prettier": {
|
|
239
241
|
"jsdocCommentLineStrategy": "keep",
|
|
240
242
|
"jsdocPreferCodeFences": true,
|
|
243
|
+
"overrides": [
|
|
244
|
+
{
|
|
245
|
+
"files": "*.astro",
|
|
246
|
+
"options": {
|
|
247
|
+
"parser": "astro"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
],
|
|
241
251
|
"plugins": [
|
|
252
|
+
"prettier-plugin-astro",
|
|
242
253
|
"prettier-plugin-jsdoc",
|
|
243
254
|
"prettier-plugin-pkg",
|
|
244
255
|
"prettier-plugin-sort-json"
|