@zenfs/core 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,6 +60,7 @@ export class IndexFS extends FileSystem {
60
60
  this.index.set(to, inode);
61
61
  await this.write(to, data, 0);
62
62
  }
63
+ await this.remove(oldPath);
63
64
  }
64
65
  renameSync(oldPath, newPath) {
65
66
  for (const { from, to, inode } of this.pathsForRename(oldPath, newPath)) {
@@ -69,6 +70,7 @@ export class IndexFS extends FileSystem {
69
70
  this.index.set(to, inode);
70
71
  this.writeSync(to, data, 0);
71
72
  }
73
+ this.removeSync(oldPath);
72
74
  }
73
75
  async stat(path) {
74
76
  const inode = this.index.get(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/core",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "A filesystem, anywhere",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -66,7 +66,7 @@ suite('Rename', () => {
66
66
  await fs.promises.writeFile(one, 'hey');
67
67
  await fs.promises.rename(one, two);
68
68
 
69
- assert((await fs.promises.readFile(two, 'utf8')) === 'hey');
69
+ assert.equal(await fs.promises.readFile(two, 'utf8'), 'hey');
70
70
  assert(!(await fs.promises.exists(one)));
71
71
  });
72
72