overtake 0.0.6 → 0.0.7
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/cli.js +6 -11
- package/index.js +1 -1
- package/package.json +9 -10
package/cli.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
|
-
import { promisify } from 'util';
|
|
5
4
|
import Path from 'path';
|
|
6
5
|
import glob from 'glob';
|
|
7
6
|
import { load, createScript, benchmark, setup, teardown, measure, perform, run, defaultReporter } from './index.js';
|
|
@@ -18,16 +17,12 @@ commands
|
|
|
18
17
|
.action(async (patterns, { count = 1, inline }) => {
|
|
19
18
|
Object.assign(globalThis, { benchmark, setup, teardown, measure, perform });
|
|
20
19
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.map((filename) => Path.resolve(filename))
|
|
28
|
-
.filter(Boolean)
|
|
29
|
-
),
|
|
30
|
-
];
|
|
20
|
+
const foundFiles = await glob(patterns);
|
|
21
|
+
if (!foundFiles.length) {
|
|
22
|
+
console.error(`No files found with patterns ${patterns.join(', ')}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const files = [...new Set(foundFiles.map((filename) => Path.resolve(filename)).filter(Boolean))];
|
|
31
26
|
|
|
32
27
|
const scripts = [];
|
|
33
28
|
if (inline.length) {
|
package/index.js
CHANGED
|
@@ -97,7 +97,7 @@ export const run = async (scripts, reporter) => {
|
|
|
97
97
|
for (const perform of suite.performs) {
|
|
98
98
|
await suiteTest.test('perform', perform.title, async (performTest) => {
|
|
99
99
|
for (const measure of suite.measures) {
|
|
100
|
-
await performTest.test('measure', measure.title, async (measureTest) => {
|
|
100
|
+
await performTest.test('measure', perform.count + ' ' + measure.title, async (measureTest) => {
|
|
101
101
|
const result = await runWorker({
|
|
102
102
|
setup: suite.setup,
|
|
103
103
|
teardown: suite.teardown,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overtake",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "NodeJS performance benchmark",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"start": "./cli.js",
|
|
13
13
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --detectOpenHandles",
|
|
14
|
-
"lint": "eslint .",
|
|
15
14
|
"prepare": "husky install"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
@@ -31,16 +30,16 @@
|
|
|
31
30
|
},
|
|
32
31
|
"homepage": "https://github.com/3axap4eHko/overtake#readme",
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@jest/globals": "^
|
|
35
|
-
"@types/jest": "^
|
|
36
|
-
"husky": "^
|
|
37
|
-
"jest": "^
|
|
38
|
-
"prettier": "^2.
|
|
33
|
+
"@jest/globals": "^29.5.0",
|
|
34
|
+
"@types/jest": "^29.5.0",
|
|
35
|
+
"husky": "^8.0.3",
|
|
36
|
+
"jest": "^29.5.0",
|
|
37
|
+
"prettier": "^2.8.4",
|
|
39
38
|
"pretty-quick": "^3.1.3"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"commander": "^
|
|
43
|
-
"conode": "^0.1.
|
|
44
|
-
"glob": "^
|
|
41
|
+
"commander": "^10.0.0",
|
|
42
|
+
"conode": "^0.1.23",
|
|
43
|
+
"glob": "^9.3.0"
|
|
45
44
|
}
|
|
46
45
|
}
|