Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
chore(devDeps): update rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
10xLaCroixDrinker committed Mar 4, 2024
1 parent f58bd75 commit 9d3a9d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions scripts/build-static-assets-artifact.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const fs = require('fs');
const path = require('path');

const mkdirp = require('mkdirp');
const rimraf = require('rimraf');
const { rimraf } = require('rimraf');

const TEMP_STATIC_PATH = path.resolve(__dirname, '../.tmp-statics');
const FINAL_TAR_DIR = path.resolve(__dirname, '../');
Expand All @@ -33,16 +33,6 @@ if (!DOCKER_IMAGE_LABEL) {
throw new Error('docker image label to copy built static files from is required');
}

function removeDir(dirPath) {
return new Promise((res, rej) => rimraf(dirPath, { disableGlob: true }, (err) => {
if (err) {
rej(err);
} else {
res();
}
}));
}

function promisifySpawn(...args) {
return new Promise((res, rej) => {
const spawnedProcess = spawn(...args);
Expand Down Expand Up @@ -132,6 +122,6 @@ function moveTar(tarPath, finalTarDir) {
console.error('unable to build static assets artifact,', err);
process.exitCode = 1;
} finally {
await removeDir(TEMP_STATIC_PATH);
await rimraf(TEMP_STATIC_PATH, { disableGlob: true });
}
})();
4 changes: 2 additions & 2 deletions scripts/set-dev-endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const os = require('os');
const assert = require('assert');

const { argv } = require('yargs');
const rimraf = require('rimraf');
const { rimrafSync } = require('rimraf');

const PATH_TO_ENDPOINTS = path.resolve(process.cwd(), argv.path || argv._[0]);
const DEV_DIR = path.join(process.cwd(), '.dev');
Expand All @@ -35,7 +35,7 @@ const addDevFolder = () => {
};

const removeExistingEndpointsFile = () => {
rimraf.sync(ENDPOINTS_DIR);
rimrafSync(ENDPOINTS_DIR);
};

const symlinkEndpointsFile = () => {
Expand Down

0 comments on commit 9d3a9d5

Please sign in to comment.