streamich / memfs

JavaScript file system utilities
http://streamich.github.io/memfs/
Apache License 2.0
1.77k stars 130 forks source link

fix: add `parentPath` to `Dirent` #1058

Closed SoulKa closed 2 months ago

SoulKa commented 2 months ago

Changes

The parentPath property will replace the path property on Dirent in future node versions (see Docs).

References #735

SoulKa commented 2 months ago

I fixed the tests that were broken due to the new parentPath property. You can see in the diff that the property is tested now. Is that enough or do we need new tests? I also changed the one occurrence where Dirent#path was used.

Initially, I wanted to make Dirent#path a getter and act as redirect to Dirent#parentPath, however this also changes the behavior on the property detection. So we will have to keep two separate properties instead of making one a getter.

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 4.11.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: