Skip to content

Commit

Permalink
fix: update rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalsadhu committed Aug 1, 2024
1 parent 8d9c939 commit 3e40b11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/publish/package/tasks/cleanup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path';
import fs from 'fs';
import rimraf from 'rimraf';
import { rimrafSync } from 'rimraf';
import Task from './task.js';

export default class Cleanup extends Task {
Expand All @@ -11,7 +11,7 @@ export default class Cleanup extends Task {
if (fs.existsSync(path)) {
fs.readdirSync(path)
.filter((file) => file !== 'integrity.json')
.forEach((file) => rimraf.sync(join(path, file)));
.forEach((file) => rimrafSync(join(path, file)));
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"gzip-size": "7.0.0",
"make-dir": "5.0.0",
"ora": "8.0.1",
"rimraf": "3.0.2",
"rimraf": "6.0.1",
"semver": "7.6.3",
"ssri": "10.0.6",
"tar": "7.4.3",
Expand Down
4 changes: 2 additions & 2 deletions test/tasks/cleanup.test.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { promises as fs } from 'fs';
import { join } from 'path';
import { test, beforeEach, afterEach } from 'tap';
import rimraf from 'rimraf';
import { rimrafSync } from 'rimraf';
import CleanupTask from '../../classes/publish/package/tasks/cleanup.js';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
Expand All @@ -28,7 +28,7 @@ beforeEach(async (t) => {
});

afterEach((t) => {
rimraf.sync(t.context.path);
rimrafSync(t.context.path);
});

test('basic cleanup', async (t) => {
Expand Down

0 comments on commit 3e40b11

Please sign in to comment.