There are security reasons for doing this, as well as multiple modernisation/performance improvements (probably one of the most useful changes for us is the promise support).
Modules affected
[x] adapt-authoring-adaptframework (missing from package)
[x] adapt-authoring-config
[x] adapt-authoring-core
[x] adapt-authoring-docs (missing from package)
[x] adapt-authoring-errors (missing from package)
[x] adapt-authoring-jsonschema
[x] adapt-authoring-lang
[x] adapt-authoring-ui (missing from package)
Changes: 8.0
Only support node v12 and higher
\ is now only used as an escape character, and never as a path separator in glob patterns, so that Windows users have a way to match against filenames containing literal glob pattern characters.
Glob pattern paths must use forward-slashes as path separators, since \ is an escape character to match literal glob pattern characters.
(8.0.2) cwd and root will always be automatically coerced to use / as path separators on Windows, as they cannot contain glob patterns anyway, and are often supplied by path.resolve() and other methods that will use \ path separators by default.
Changes: 9.0
This is a full rewrite, with significant API and algorithm changes.
Only support node 16 and higher.
Promise API instead of callbacks.
Exported function names have changed, as have the methods on the Glob class. See API documentation for details.
Accept pattern as string or array of strings.
Hybrid module distribution.
Full TypeScript support.
Exported Glob class is no longer an event emitter.
Exported Glob class has walk(), walkSync(), stream(), streamSync(), iterate(), iterateSync() methods, and is both an async and sync Generator.
First class support for UNC paths and drive letters on Windows. Note that glob patterns must still use / as a path separator, unless the windowsPathsNoEscape option is set, in which case glob patterns cannot be escaped with \.
Paths are returned in the canonical formatting for the platform in question.
The hasMagic method will return false for patterns that only contain brace expansion, but no other "magic" glob characters.
Patterns ending in / will still be restricted to matching directories, but will not have a / appended in the results. In general, results will be in their default relative or absolute forms, without any extraneous / and . characters, unlike shell matches. (The mark option may still be used to always mark directory matches with a trailing / or \.)
An options argument is required for the Glob class constructor. {} may be provided to accept all default options.
Feature description
There are security reasons for doing this, as well as multiple modernisation/performance improvements (probably one of the most useful changes for us is the promise support).
Modules affected
Changes: 8.0
\
is now only used as an escape character, and never as a path separator in glob patterns, so that Windows users have a way to match against filenames containing literal glob pattern characters.\
is an escape character to match literal glob pattern characters.cwd
androot
will always be automatically coerced to use/
as path separators on Windows, as they cannot contain glob patterns anyway, and are often supplied bypath.resolve()
and other methods that will use\
path separators by default.Changes: 9.0
This is a full rewrite, with significant API and algorithm changes.
Glob
class is no longer an event emitter.Glob
class haswalk()
,walkSync()
,stream()
,streamSync()
,iterate()
,iterateSync()
methods, and is both an async and sync Generator./
as a path separator, unless thewindowsPathsNoEscape
option is set, in which case glob patterns cannot be escaped with\
.hasMagic
method will return false for patterns that only contain brace expansion, but no other "magic" glob characters./
will still be restricted to matching directories, but will not have a/
appended in the results. In general, results will be in their default relative or absolute forms, without any extraneous/
and.
characters, unlike shell matches. (Themark
option may still be used to always mark directory matches with a trailing/
or\
.)Glob
class constructor.{}
may be provided to accept all default options.Changes: 10.0