cronometro
Advanced tools
Comparing version 1.0.0-beta.0 to 1.0.0-beta.1
@@ -0,1 +1,5 @@ | ||
### 2021-08-14 / 1.0.0-beta.1 | ||
- feat: Allow main module to export a function. | ||
### 2021-08-14 / 1.0.0-beta.0 | ||
@@ -2,0 +6,0 @@ |
@@ -17,3 +17,2 @@ import { isMainThread, parentPort, workerData } from 'worker_threads'; | ||
} | ||
/* c8 ignore stop */ | ||
// Require the script to set tests | ||
@@ -24,2 +23,10 @@ chain | ||
}) | ||
.then((module) => { | ||
if (typeof module === 'function') { | ||
return module(); | ||
} | ||
else if (typeof module.default === 'function') { | ||
return module.default(); | ||
} | ||
}) | ||
.then(() => { | ||
@@ -29,3 +36,2 @@ // Run the worker | ||
}) | ||
/* c8 ignore start */ | ||
.catch((e) => { | ||
@@ -32,0 +38,0 @@ process.nextTick(() => { |
{ | ||
"name": "cronometro", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.1", | ||
"description": "Simple benchmarking suite powered by HDR histograms.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://sw.cowtech.it/cronometro", |
@@ -42,2 +42,4 @@ # cronometro | ||
If your main module returns a function, cronometro will execute it before running tests. The function can also return a promise and that will be awaited. | ||
## Usage | ||
@@ -44,0 +46,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
30331
555
231
0