Socket
Socket
Sign inDemoInstall

glob

Package Overview
Dependencies
8
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.3 to 8.1.0

8

common.js

@@ -60,2 +60,8 @@ exports.setopts = setopts

self.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||
options.allowWindowsEscape === false
if (self.windowsPathsNoEscape) {
pattern = pattern.replace(/\\/g, '/')
}
self.silent = !!options.silent

@@ -116,4 +122,2 @@ self.pattern = pattern

options.nocomment = true
// always treat \ in patterns as escapes, not path separators
options.allowWindowsEscape = true

@@ -120,0 +124,0 @@ self.minimatch = new Minimatch(pattern, options)

@@ -5,3 +5,3 @@ {

"description": "a little globber",
"version": "8.0.3",
"version": "8.1.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -213,6 +213,22 @@ # Glob

* `cwd` The current working directory in which to search. Defaults
to `process.cwd()`.
to `process.cwd()`. This option is always coerced to use
forward-slashes as a path separator, because it is not tested
as a glob pattern, so there is no need to escape anything.
* `root` The place where patterns starting with `/` will be mounted
onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
systems, and `C:\` or some such on Windows.)
systems, and `C:\` or some such on Windows.) This option is
always coerced to use forward-slashes as a path separator,
because it is not tested as a glob pattern, so there is no need
to escape anything.
* `windowsPathsNoEscape` Use `\\` as a path separator _only_, and
_never_ as an escape character. If set, all `\\` characters
are replaced with `/` in the pattern. Note that this makes it
**impossible** to match against paths containing literal glob
pattern characters, but allows matching with patterns constructed
using `path.join()` and `path.resolve()` on Windows platforms,
mimicking the (buggy!) behavior of Glob v7 and before on
Windows. Please use with caution, and be mindful of [the caveat
below about Windows paths](#windows). (For legacy reasons,
this is also set if `allowWindowsEscape` is set to the exact
value `false`.)
* `dot` Include `.dot` files in normal matches and `globstar` matches.

@@ -336,2 +352,7 @@ Note that an explicit dot in a portion of the pattern will always

To automatically coerce all `\` characters to `/` in pattern
strings, **thus making it impossible to escape literal glob
characters**, you may set the `windowsPathsNoEscape` option to
`true`.
## Race Conditions

@@ -338,0 +359,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc