Skip to content

Commit a1cdfda

Browse files
filipesilvahansl
authored andcommitted
ci: remove v8-profiler dependency
It was adding 30s-1m to all CircleCI jobs, which is around half the time each take. This way you must manually install the profiler before.
1 parent 4a2861a commit a1cdfda

File tree

3 files changed

+7
-180
lines changed

3 files changed

+7
-180
lines changed

lib/bootstrap-local.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ if (process.env['CODE_COVERAGE'] || process.argv.indexOf('--code-coverage') !==
2222
// Check if we need to profile this CLI run.
2323
let profiler = null;
2424
if (process.env['DEVKIT_PROFILING']) {
25-
profiler = require('v8-profiler');
25+
try {
26+
profiler = require('v8-profiler');
27+
} catch (err) {
28+
throw new Error(`Could not require 'v8-profiler'. You must install it separetely with` +
29+
`'npm install v8-profiler --no-save.\n\nOriginal error:\n\n${err}`);
30+
}
31+
2632
profiler.startProfiling();
2733

2834
function exitHandler(options, _err) {

package-lock.json

Lines changed: 0 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,5 @@
147147
},
148148
"devDependencies": {
149149
"license-checker": "^16.0.0"
150-
},
151-
"optionalDependencies": {
152-
"v8-profiler": "^5.7.0"
153150
}
154151
}

0 commit comments

Comments
 (0)