chore: remove rimraf from browsers (#9874)

This commit is contained in:
Alex Rudenko 2023-03-17 10:36:22 +01:00 committed by GitHub
parent e3b8321f55
commit de6e6a69a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 9 deletions

2
package-lock.json generated
View File

@ -9138,7 +9138,6 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"
@ -10097,7 +10096,6 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"

View File

@ -75,7 +75,6 @@
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"rimraf": "4.4.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"

View File

@ -14,10 +14,9 @@
* limitations under the License.
*/
import fs from 'fs';
import path from 'path';
import rimraf from 'rimraf';
import {Browser, BrowserPlatform} from './browser-data/browser-data.js';
/**
@ -54,6 +53,10 @@ export class Cache {
}
clear(): void {
rimraf.sync(this.#rootDir);
fs.rmSync(this.#rootDir, {
force: true,
recursive: true,
maxRetries: 5,
});
}
}

View File

@ -19,8 +19,6 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import rimraf from 'rimraf';
import {BrowserPlatform} from '../../lib/cjs/browser-data/browser-data.js';
import {
createProfile,
@ -85,7 +83,11 @@ describe('Firefox', () => {
});
afterEach(() => {
rimraf.sync(tmpDir);
fs.rmSync(tmpDir, {
force: true,
recursive: true,
maxRetries: 5,
});
});
it('should create a profile', async () => {