Comparing version 3.0.10 to 4.0.0
{ | ||
"name": "jembadb", | ||
"version": "3.0.10", | ||
"version": "4.0.0", | ||
"description": "Json Embeddable Appendable Database", | ||
@@ -19,3 +19,3 @@ "main": "./src/index.js", | ||
"engines": { | ||
"node": ">=14.4.0" | ||
"node": ">=16.16.0" | ||
}, | ||
@@ -22,0 +22,0 @@ "author": "Book Pauk <bookpauk@gmail.com>", |
@@ -66,3 +66,3 @@ 'use strict'; | ||
await fs.rmdir(destTablePath, { recursive: true }); | ||
await fs.rm(destTablePath, { recursive: true, force: true }); | ||
await fs.mkdir(destTablePath, { recursive: true }); | ||
@@ -202,3 +202,3 @@ | ||
await fs.rmdir(this.tablePath, { recursive: true }); | ||
await fs.rm(this.tablePath, { recursive: true, force: true }); | ||
await fs.rename(tempTablePath, this.tablePath); | ||
@@ -205,0 +205,0 @@ } |
@@ -262,3 +262,3 @@ 'use strict'; | ||
const basePath = `${this.dbPath}/${query.table}`; | ||
await fs.rmdir(basePath, { recursive: true }); | ||
await fs.rm(basePath, { recursive: true, force: true }); | ||
@@ -320,3 +320,3 @@ this.table.delete(query.table); | ||
const toTable = `${table}___temporary_truncating`; | ||
await fs.rmdir(`${this.dbPath}/${toTable}`, { recursive: true }); | ||
await fs.rm(`${this.dbPath}/${toTable}`, { recursive: true, force: true }); | ||
@@ -323,0 +323,0 @@ await this._clone({table, toTable, filter: 'nodata'}); |
@@ -84,3 +84,3 @@ 'use strict'; | ||
async _cloneTable(srcTablePath, destTablePath, cloneSelf = false, noMeta = false, filter) { | ||
await fs.rmdir(destTablePath, { recursive: true }); | ||
await fs.rm(destTablePath, { recursive: true, force: true }); | ||
await fs.mkdir(destTablePath, { recursive: true }); | ||
@@ -163,3 +163,3 @@ | ||
} else { | ||
await fs.rmdir(toTablePath, { recursive: true }); | ||
await fs.rm(toTablePath, { recursive: true, force: true }); | ||
} | ||
@@ -181,3 +181,3 @@ } | ||
await fs.rmdir(this.tablePath, { recursive: true }); | ||
await fs.rm(this.tablePath, { recursive: true, force: true }); | ||
await fs.rename(tempTablePath, this.tablePath); | ||
@@ -371,3 +371,3 @@ } | ||
await fs.rmdir(this._shardTablePath(shardRec.num), { recursive: true }); | ||
await fs.rm(this._shardTablePath(shardRec.num), { recursive: true, force: true }); | ||
} finally { | ||
@@ -410,3 +410,3 @@ shdLock.ret(); | ||
if (isNew) { | ||
await fs.rmdir(query.tablePath, { recursive: true }); | ||
await fs.rm(query.tablePath, { recursive: true, force: true }); | ||
@@ -413,0 +413,0 @@ await table.open(query); |
195169