path-scurry
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -181,2 +181,10 @@ /// <reference types="node" /> | ||
/** | ||
* This property is for compatibility with the Dirent class as of | ||
* Node v20, where Dirent['path'] refers to the path of the directory | ||
* that was passed to readdir. So, somewhat counterintuitively, this | ||
* property refers to the *parent* path, not the path object itself. | ||
* For root entries, it's the path to the entry itself. | ||
*/ | ||
get path(): string; | ||
/** | ||
* Do not create new Path objects directly. They should always be accessed | ||
@@ -183,0 +191,0 @@ * via the PathScurry class or other methods on the Path class. |
@@ -181,2 +181,10 @@ /// <reference types="node" /> | ||
/** | ||
* This property is for compatibility with the Dirent class as of | ||
* Node v20, where Dirent['path'] refers to the path of the directory | ||
* that was passed to readdir. So, somewhat counterintuitively, this | ||
* property refers to the *parent* path, not the path object itself. | ||
* For root entries, it's the path to the entry itself. | ||
*/ | ||
get path(): string; | ||
/** | ||
* Do not create new Path objects directly. They should always be accessed | ||
@@ -183,0 +191,0 @@ * via the PathScurry class or other methods on the Path class. |
@@ -268,2 +268,12 @@ import { LRUCache } from 'lru-cache'; | ||
/** | ||
* This property is for compatibility with the Dirent class as of | ||
* Node v20, where Dirent['path'] refers to the path of the directory | ||
* that was passed to readdir. So, somewhat counterintuitively, this | ||
* property refers to the *parent* path, not the path object itself. | ||
* For root entries, it's the path to the entry itself. | ||
*/ | ||
get path() { | ||
return (this.parent || this).fullpath(); | ||
} | ||
/** | ||
* Do not create new Path objects directly. They should always be accessed | ||
@@ -270,0 +280,0 @@ * via the PathScurry class or other methods on the Path class. |
{ | ||
"name": "path-scurry", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "walk paths fast and efficiently", | ||
@@ -61,3 +61,3 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)", | ||
"@nodelib/fs.walk": "^1.2.8", | ||
"@types/node": "^18.11.18", | ||
"@types/node": "^20.1.4", | ||
"@types/tap": "^15.0.7", | ||
@@ -64,0 +64,0 @@ "c8": "^7.12.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
523733
6159