Skip to content

Commit b387f8c

Browse files
committed
rimraf and get-folder-size at @latest
1 parent 1185df4 commit b387f8c

File tree

7 files changed

+69
-61
lines changed

7 files changed

+69
-61
lines changed

lib/ldp.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import debug from './debug.mjs'
99
import error from './http-error.mjs'
1010
import { stringToStream, serialize, overQuota, getContentType, parse } from './utils.mjs'
1111
import extend from 'extend'
12-
import rimraf from 'rimraf'
12+
import { rimraf } from 'rimraf'
1313
import { exec } from 'child_process'
1414
import * as ldpContainer from './ldp-container.mjs'
1515
import { promisify } from 'util'
@@ -543,7 +543,7 @@ class LDP {
543543

544544
// Delete the directory recursively
545545
try {
546-
await promisify(rimraf)(directory)
546+
await rimraf(directory)
547547
} catch (err) {
548548
throw error(err, 'Failed to delete the container')
549549
}

lib/utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export async function overQuota (root, serverUri) {
289289
* so it needs to be rewritten.
290290
*/
291291
function actualSize (root) {
292-
return util.promisify(getSize)(root)
292+
return getSize(root)
293293
}
294294

295295
function _asyncReadfile (filename) {

package-lock.json

Lines changed: 58 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"extend": "^3.0.2",
8585
"from2": "^2.3.0",
8686
"fs-extra": "^11.3.3",
87-
"get-folder-size": "^2.0.1",
87+
"get-folder-size": "^5.0.0",
8888
"glob": "^13.0.0",
8989
"global-tunnel-ng": "^2.7.1",
9090
"handlebars": "^4.7.8",
@@ -104,7 +104,7 @@
104104
"owasp-password-strength-test": "^1.3.0",
105105
"rdflib": "^2.3.2",
106106
"recursive-readdir": "^2.2.3",
107-
"rimraf": "^3.0.2",
107+
"rimraf": "^6.1.2",
108108
"solid-auth-client": "^2.5.6",
109109
"solid-namespace": "^0.5.4",
110110
"solid-ws": "^0.4.3",

test/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs-extra'
2-
import rimraf from 'rimraf'
2+
import { rimrafSync } from 'rimraf'
33
import path from 'path'
44
import { fileURLToPath } from 'url'
55
import OIDCProvider from '@solid/oidc-op'
@@ -15,7 +15,7 @@ const __dirname = path.dirname(__filename)
1515
const TEST_HOSTS = ['nic.localhost', 'tim.localhost', 'nicola.localhost']
1616

1717
export function rm (file) {
18-
return rimraf.sync(path.normalize(path.join(__dirname, '../resources/' + file)))
18+
return rimrafSync(path.normalize(path.join(__dirname, '../resources/' + file)))
1919
}
2020

2121
export function cleanDir (dirPath) {

test/utils.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'path'
55
import dns from 'dns'
66
import https from 'https'
77
import { createRequire } from 'module'
8-
import rimraf from 'rimraf'
8+
import { rimrafSync } from 'rimraf'
99
import fse from 'fs-extra'
1010
import Provider from '@solid/oidc-op'
1111
import supertest from 'supertest'
@@ -34,7 +34,7 @@ export function getTestRoot () {
3434
}
3535

3636
export function rm (file) {
37-
return rimraf.sync(path.join(TEST_ROOT, file))
37+
return rimrafSync(path.join(TEST_ROOT, file))
3838
}
3939

4040
export function cleanDir (dirPath) {

test/utils/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs-extra'
2-
import rimraf from 'rimraf'
2+
import { rimrafSync } from 'rimraf'
33
import path from 'path'
44
import { fileURLToPath } from 'url'
55
import OIDCProvider from '@solid/oidc-op'
@@ -14,7 +14,7 @@ const __dirname = path.dirname(__filename)
1414
const TEST_HOSTS = ['nic.localhost', 'tim.localhost', 'nicola.localhost']
1515

1616
export function rm (file) {
17-
return rimraf.sync(path.normalize(path.join(__dirname, '../resources/' + file)))
17+
return rimrafSync(path.normalize(path.join(__dirname, '../resources/' + file)))
1818
}
1919

2020
export function cleanDir (dirPath) {

0 commit comments

Comments
 (0)