refactor(dev-infra): use shelljs instead of fs-extra for benchmark utils (#37594)
We added a new dependency on `fs-extra` to the dev-infra package. We can remove this dependency and replace it with `shelljs` that is extensively used in other places already. The motiviation is that we can reduce dependencies needed for for consumption of the shared dev-infra package. PR Close #37594
This commit is contained in:
parent
71f008f906
commit
879a674420
|
@ -9,12 +9,12 @@ ts_library(
|
|||
tsconfig = "//dev-infra/benchmark/component_benchmark:tsconfig-e2e.json",
|
||||
deps = [
|
||||
"//packages/benchpress",
|
||||
"@npm//@types/fs-extra",
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/selenium-webdriver",
|
||||
"@npm//fs-extra",
|
||||
"@npm//@types/shelljs",
|
||||
"@npm//node-uuid",
|
||||
"@npm//protractor",
|
||||
"@npm//selenium-webdriver",
|
||||
"@npm//shelljs",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {mkdir} from 'shelljs';
|
||||
|
||||
export {verifyNoBrowserErrors} from './e2e_util';
|
||||
|
||||
const nodeUuid = require('node-uuid');
|
||||
import * as fs from 'fs-extra';
|
||||
|
||||
import {SeleniumWebDriverAdapter, Options, JsonFileReporter, Validator, RegressionSlopeValidator, ConsoleReporter, SizeValidator, MultiReporter, MultiMetric, Runner, StaticProvider} from '@angular/benchpress';
|
||||
import {openBrowser} from './e2e_util';
|
||||
|
@ -53,7 +54,7 @@ function createBenchpressRunner(): Runner {
|
|||
runId = process.env.GIT_SHA + ' ' + runId;
|
||||
}
|
||||
const resultsFolder = './dist/benchmark_results';
|
||||
fs.ensureDirSync(resultsFolder);
|
||||
mkdir('-p', resultsFolder);
|
||||
const providers: StaticProvider[] = [
|
||||
SeleniumWebDriverAdapter.PROTRACTOR_PROVIDERS,
|
||||
{provide: Options.FORCE_GC, useValue: globalOptions.forceGc},
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
"@bazel/typescript": "<from-root>",
|
||||
"brotli": "<from-root>",
|
||||
"clang-format": "<from-root>",
|
||||
"fs-extra": "<from-root>",
|
||||
"json5": "^1.0.1",
|
||||
"protractor": "<from-root>",
|
||||
"rollup": "<from-root>",
|
||||
|
|
Loading…
Reference in New Issue