Skip to content

Commit

Permalink
chore: adjust to del breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Oct 16, 2024
1 parent e1b2afc commit a75d522
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 8 additions & 6 deletions tasks/after-pack/register-archive-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* except in compliance with the MIT License.
*/

const del = require('del').deleteSync;

const archiver = require('archiver');

const fs = require('fs');
Expand Down Expand Up @@ -95,11 +93,9 @@ async function archive(path, archivePath, archiveType) {

console.log(` • re-building file=${archivePath}, archiveType=${archiveType}`);

await del(archivePath);

return new Promise(function(resolve, reject) {

del(archivePath);

var archive,
output;

Expand All @@ -126,4 +122,10 @@ async function archive(path, archivePath, archiveType) {

archive.directory(path, 'camunda-modeler').finalize();
});
}
}

async function del(path) {
const delModule = await import('del');

return delModule.deleteAsync(path);
}
9 changes: 7 additions & 2 deletions tasks/link-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

const fs = require('fs');
const { shellSync: exec } = require('execa');
const { deleteSync: del } = require('del');
const path = require('path');

const customLinkersMap = {
Expand Down Expand Up @@ -75,7 +74,7 @@ async function linkDependencies(dependencies) {
return;
}

del(dependenciesDir);
await del(dependenciesDir);
fs.mkdirSync(dependenciesDir);

for (const dependency of dependencies) {
Expand Down Expand Up @@ -223,3 +222,9 @@ function gitClone(repo) {
function getRepoUrl(repo) {
return `https://github.com/${repo}.git`;
}

async function del(path) {
const delModule = await import('del');

return delModule.deleteAsync(path);
}

0 comments on commit a75d522

Please sign in to comment.