Skip to content

Upgrading glob 8 to 9

Breaking8.1.0 → 9.3.5Breaking13Platform1New17Changed12

BreakingUpgrade verdict

13 breaking changes and a platform requirement change.

  • Code listening for events on Glob instances will no longer work.
  • You must pass an options object to the Glob constructor, even if it is empty.
  • The root option and its mount behavior are gone.
  • The stat option is no longer available.
Top 4 of 14 that need code or config changes

Node.js requirement changed in 9.0.1: >=12 → >=16 || 14 >=14.17.

Adds minipass ^4.2.4, path-scurry ^1.6.1.

Drops inflight, inherits, once.

Breaking13
The exported Glob class is no longer an event emitter.
Glob
The Glob class constructor now requires an options argument; pass {} for defaults.
Glob
Removes the root option and mounting behavior.
root
Removes the stat option.
statnodirmark
Removes the silent and strict options; readdir errors are treated as unreadable directories.
silentstrict
Removes the fs option; the module only operates on the real filesystem.
fsPathScurry
Removes support for the nonull:true option.
nonull
Removes support for the nounique:true option; result sets are always unique.
nounique
Removes support for the nosort:true option; result sets are never sorted.
nosort
realpath:true no longer implies absolute:true; relative realpaths are emitted unless absolute is set.
realpathabsolute
This is a full rewrite with significant API and algorithm changes.
Replaces the callback API with a Promise API.
Exported function names and Glob class methods have changed.
Glob
Platform1
Only supports Node.js 16 and higher.