overtake 0.0.3 → 0.0.4
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 +2 -17
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env -S node --no-warnings
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import { promisify } from 'util';
|
|
@@ -15,7 +15,7 @@ commands
|
|
|
15
15
|
.argument('[files...]', 'file paths or path patterns to search benchmark scripts')
|
|
16
16
|
.option('-i, --inline [inline]', 'inline code to benchmark', (value, previous) => previous.concat([value]), [])
|
|
17
17
|
.option('-c, --count [count]', 'perform count for inline code', (v) => parseInt(v))
|
|
18
|
-
.action(async (patterns, { count =
|
|
18
|
+
.action(async (patterns, { count = 1, inline }) => {
|
|
19
19
|
Object.assign(globalThis, { benchmark, setup, teardown, measure, perform });
|
|
20
20
|
|
|
21
21
|
const globAsync = promisify(glob);
|
|
@@ -60,18 +60,3 @@ commands.on('--help', () => {
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
commands.parse(process.argv);
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
// (async () => {
|
|
68
|
-
// const files = await globAsync(pattern);
|
|
69
|
-
// const scripts = [];
|
|
70
|
-
// for (const file of files) {
|
|
71
|
-
// const filename = Path.resolve(file);
|
|
72
|
-
// const script = await load(filename);
|
|
73
|
-
// scripts.push(script);
|
|
74
|
-
// }
|
|
75
|
-
//
|
|
76
|
-
// await run(scripts, defaultReporter);
|
|
77
|
-
// })().catch((e) => console.error(e));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overtake",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "NodeJS performance benchmark",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"overtake": "cli.js"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"start": "
|
|
12
|
+
"start": "./cli.js",
|
|
13
13
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --detectOpenHandles",
|
|
14
14
|
"lint": "eslint .",
|
|
15
15
|
"prepare": "husky install"
|