mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-23 02:25:07 +00:00
deps: remove rimraf in favor of built-in fs.rm
This commit is contained in:
parent
bbf04e4bdb
commit
e4c53bdad7
4 changed files with 7 additions and 7 deletions
|
|
@ -14,10 +14,12 @@
|
|||
"cors": "^2.8.5",
|
||||
"express": "^4.16.4",
|
||||
"express-session": "^1.15.6",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"rimraf": "^2.6.3"
|
||||
"npm-run-all": "^4.1.5"
|
||||
},
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">=14.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"copy": "cp ../../packages/uppy/dist/uppy.min.css .",
|
||||
"start": "npm-run-all --serial copy --parallel start:*",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const rimraf = require('rimraf')
|
||||
const companion = require('../../packages/@uppy/companion')
|
||||
const app = require('express')()
|
||||
|
||||
|
|
@ -45,7 +44,7 @@ try {
|
|||
fs.mkdirSync(DATA_DIR)
|
||||
}
|
||||
process.on('exit', () => {
|
||||
rimraf.sync(DATA_DIR)
|
||||
fs.rmSync(DATA_DIR, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
app.use(companion.app(options))
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@
|
|||
"replacestream": "^4.0.3",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"resolve": "^1.17.0",
|
||||
"rimraf": "2.7.1",
|
||||
"sass": "1.29.0",
|
||||
"size-limit": "4.5.6",
|
||||
"stringify-object": "3.3.0",
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class StaticServerService {
|
|||
|
||||
const tus = require('tus-node-server')
|
||||
const os = require('os')
|
||||
const rimraf = promisify(require('rimraf'))
|
||||
const fs = require('fs/promises')
|
||||
const { randomBytes } = require('crypto')
|
||||
const http = require('http')
|
||||
const httpProxy = require('http-proxy')
|
||||
|
|
@ -187,7 +187,7 @@ class TusService {
|
|||
const close = promisify(this.server.close.bind(this.server))
|
||||
await close()
|
||||
}
|
||||
await rimraf(this.path)
|
||||
await fs.rm(this.path, { recursive: true, force: true })
|
||||
this.slowServer = null
|
||||
this.tusServer = null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue