Toolkit: use fs-extra instead of fs (#22723)

* use fs-extra instead of fs

* use moveSync instead of renameSync
This commit is contained in:
Martin Brenner
2020-03-11 15:37:31 +01:00
committed by GitHub
parent d11bb2e198
commit 6b61c65b58
3 changed files with 5 additions and 3 deletions

View File

@@ -36,6 +36,7 @@
"@types/command-exists": "^1.2.0",
"@types/execa": "^0.9.0",
"@types/expect-puppeteer": "3.3.1",
"@types/fs-extra": "^8.1.0",
"@types/inquirer": "^6.0.3",
"@types/jest": "24.0.13",
"@types/jest-cli": "^23.6.0",
@@ -66,6 +67,7 @@
"execa": "^1.0.0",
"expect-puppeteer": "4.1.1",
"file-loader": "^4.0.0",
"fs-extra": "^8.1.0",
"globby": "^10.0.1",
"html-loader": "0.5.5",
"html-webpack-plugin": "^3.2.0",

View File

@@ -8,7 +8,7 @@ import { PluginMeta } from '@grafana/data';
// @ts-ignore
import execa = require('execa');
import path = require('path');
import fs from 'fs';
import fs from 'fs-extra';
import { getPackageDetails, findImagesInFolder, getGrafanaVersions, readGitLog } from '../../plugins/utils';
import {
job,
@@ -57,7 +57,7 @@ const buildPluginRunner: TaskRunner<PluginCIOptions> = async ({ finish }) => {
for (const name of ['dist', 'coverage']) {
const dir = path.resolve(process.cwd(), name);
if (fs.existsSync(dir)) {
fs.renameSync(dir, path.resolve(workDir, name));
fs.moveSync(dir, path.resolve(workDir, name));
}
}
writeJobStats(start, workDir);