Skip to content

Commit a77283c

Browse files
authored
fix startup benchmark (#5120)
Some dependencies don't work correctly with `require` anymore.
1 parent dd63953 commit a77283c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

benchmark/sirun/startup/startup-test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ if (Number(process.env.USE_TRACER)) {
77
if (Number(process.env.EVERYTHING)) {
88
const json = require('../../../package.json')
99
for (const pkg in json.dependencies) {
10-
require(pkg)
10+
try {
11+
require(pkg)
12+
} catch {}
1113
}
1214
for (const devPkg in json.devDependencies) {
1315
if (devPkg !== '@types/node') {
14-
require(devPkg)
16+
try {
17+
require(devPkg)
18+
} catch {}
1519
}
1620
}
1721
}

0 commit comments

Comments
 (0)