We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 683f585 commit 9ddf705Copy full SHA for 9ddf705
benchmarks/runner.ts
@@ -22,8 +22,8 @@ export async function initializeBenchmark(version?: string) {
22
const { version: resolvedVersion, packagePath } = await VersionManager.getPackageVersion(version);
23
console.log(`Using cron-parser version ${resolvedVersion} for comparison`);
24
25
- const parser = require(packagePath);
26
- oldParseExpression = parser.parseExpression as ParseExpressionFn;
+ const module = require(packagePath);
+ oldParseExpression = (module.default?.parse as ParseExpressionFn) ?? (module.parseExpression as ParseExpressionFn);
27
}
28
29
interface BenchmarkStats {
0 commit comments