Socket
Socket
Sign inDemoInstall

path-scurry

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-scurry - npm Package Compare versions

Comparing version 1.10.4 to 1.11.0

7

dist/commonjs/index.d.ts

@@ -6,4 +6,4 @@ /// <reference types="node" />

import { posix, win32 } from 'node:path';
import { Minipass } from 'minipass';
import type { Dirent, Stats } from 'node:fs';
import { Minipass } from 'minipass';
/**

@@ -156,2 +156,7 @@ * An object that will be used to override the default `fs`

/**
* boolean indicating that this path is the current working directory
* of the PathScurry collection that contains it.
*/
isCWD: boolean;
/**
* the string or regexp used to split paths. On posix, it is `'/'`, and on

@@ -158,0 +163,0 @@ * windows it is a RegExp matching either `'/'` or `'\\'`

@@ -6,4 +6,4 @@ /// <reference types="node" resolution-mode="require"/>

import { posix, win32 } from 'node:path';
import { Minipass } from 'minipass';
import type { Dirent, Stats } from 'node:fs';
import { Minipass } from 'minipass';
/**

@@ -156,2 +156,7 @@ * An object that will be used to override the default `fs`

/**
* boolean indicating that this path is the current working directory
* of the PathScurry collection that contains it.
*/
isCWD: boolean;
/**
* the string or regexp used to split paths. On posix, it is `'/'`, and on

@@ -158,0 +163,0 @@ * windows it is a RegExp matching either `'/'` or `'\\'`

8

package.json
{
"name": "path-scurry",
"version": "1.10.4",
"version": "1.11.0",
"description": "walk paths fast and efficiently",

@@ -39,2 +39,3 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",

"prettier": {
"experimentalTernaries": true,
"semi": false,

@@ -56,3 +57,3 @@ "printWidth": 75,

"mkdirp": "^3.0.0",
"prettier": "^2.8.3",
"prettier": "^3.2.5",
"rimraf": "^5.0.1",

@@ -65,2 +66,5 @@ "tap": "^18.7.2",

},
"tap": {
"typecheck": true
},
"engines": {

@@ -67,0 +71,0 @@ "node": ">=16 || 14 >=14.17"

@@ -24,5 +24,5 @@ # path-scurry

3. `path.resolve()`, `dirname()`, `basename()`, and other
string-parsing/munging operations are be minimized. This
means it has to track "provisional" child nodes that may not
exist (and if we find that they _don't_ exist, store that
string-parsing/munging operations are be minimized. This means
it has to track "provisional" child nodes that may not exist
(and if we find that they _don't_ exist, store that
information as well, so we don't have to ever check again).

@@ -53,5 +53,5 @@ 4. The API is not limited to use as a stream/iterator/etc. There

As is always the case, doing more means going slower, doing
less means going faster, and there are trade offs between speed
and memory usage.
As is always the case, doing more means going slower, doing less
means going faster, and there are trade offs between speed and
memory usage.

@@ -87,4 +87,4 @@ PathScurry makes heavy use of [LRUCache](http://npm.im/lru-cache)

[@nodelib/fs.walk](http://npm.im/@nodelib/fs.walk), which is the
fastest and most reliable file system walker I could find. As
far as I can tell, it's almost impossible to go much faster in a
fastest and most reliable file system walker I could find. As far
as I can tell, it's almost impossible to go much faster in a
Node.js program, just based on how fast you can push syscalls out

@@ -277,10 +277,10 @@ to the fs thread pool.

prevent the directories themselves from being included in the
results. By default, if no filter is provided, then all
entries are included in the results.
- `walkFilter`: Function `(entry: Path) => boolean`. If
provided, will prevent the traversal of any directory (or in
the case of `follow:true` symbolic links to directories) for
which the function returns false. This will not prevent the
directories themselves from being included in the result set.
Use `filter` for that.
results. By default, if no filter is provided, then all entries
are included in the results.
- `walkFilter`: Function `(entry: Path) => boolean`. If provided,
will prevent the traversal of any directory (or in the case of
`follow:true` symbolic links to directories) for which the
function returns false. This will not prevent the directories
themselves from being included in the result set. Use `filter`
for that.

@@ -293,4 +293,4 @@ Note that TypeScript return types will only be inferred properly

The main interface. Defaults to an appropriate class based on
the current platform.
The main interface. Defaults to an appropriate class based on the
current platform.

@@ -327,4 +327,4 @@ Use `PathScurryWin32`, `PathScurryDarwin`, or `PathScurryPosix`

Return a [Minipass](http://npm.im/minipass) stream that emits
each entry or path string in the walk. Results are made
available asynchronously.
each entry or path string in the walk. Results are made available
asynchronously.

@@ -334,5 +334,5 @@ #### `pw.streamSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`

Return a [Minipass](http://npm.im/minipass) stream that emits
each entry or path string in the walk. Results are made
available synchronously, meaning that the walk will complete in a
single tick if the stream is fully consumed.
each entry or path string in the walk. Results are made available
synchronously, meaning that the walk will complete in a single
tick if the stream is fully consumed.

@@ -362,4 +362,4 @@ #### `pw.cwd`

Significantly faster than `path.resolve()` if called repeatedly
with the same paths. Significantly slower otherwise, as it
builds out the cached Path entries.
with the same paths. Significantly slower otherwise, as it builds
out the cached Path entries.

@@ -463,4 +463,4 @@ To get a `Path` object resolved from the `PathScurry`, use

Note that some `Stats` data (such as `ino`, `dev`, and `mode`) will
not be supplied. For those things, you'll need to call
Note that some `Stats` data (such as `ino`, `dev`, and `mode`)
will not be supplied. For those things, you'll need to call
`fs.lstat` yourself.

@@ -512,4 +512,4 @@

string using the `isNamed` method, and not by directly comparing
this string. Otherwise, unicode path strings that the system
sees as identical will not be properly treated as the same path,
this string. Otherwise, unicode path strings that the system sees
as identical will not be properly treated as the same path,
leading to incorrect behavior and possible security issues.

@@ -529,2 +529,7 @@

#### `path.isCWD`
Set to true if this `Path` object is the current working
directory of the `PathScurry` collection that contains it.
#### `path.getType()`

@@ -531,0 +536,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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc