Upgrading gulp 4 to 5
Breaking4.0.2 → 5.0.1Breaking16Security1Platform2Deprecated1New8Changed4Fixed10Other2
BreakingUpgrade verdict
16 breaking changes and 2 platform requirement changes and a security fix.
In plain terms
- Streams now assume UTF-8 text encoding by default instead of leaving encoding unset.
- Glob patterns no longer preserve order; if you need files in a specific order, use the ordered-read-stream package.
- gulp-cli no longer works with the old alpha versions of gulp 4.
- The --verify command line flag is gone.
Must act Top 5 of 20 that need code or config changes
Node.js requirement changed in 5.0.0: >= 0.10 → >=10.13.0.
Installs 143 packages in all (was 332).
What you must change
Breaking16
Defaults stream encoding to UTF-8.
Removes support for ordered globs; use ordered-read-stream if ordering is needed.
ordered-read-streamRemoves support for alpha releases of v4 from gulp-cli.
gulp-cliRemoves the --verify flag.
--verifyRenames the --require flag to --preload to avoid conflicting with Node.js flags.
--require--preloadRemoves many legacy and deprecated loaders.
Clones Vinyl objects with stream contents using teex but no longer waits for all streams to flow before clones receive data.
VinylteexStops using process.umask() to make directories and falls back to Node's default mode.
process.umask()Drops support of Node.js snake_case flags.
Standardizes on the anymatch library for globbing paths so globs behave the same in src and watch.
srcwatchanymatchNormalizes all globs and paths to unix-like filepaths.
Only allows JS variants for .gulp.* config files.
.gulp.*Throws on non-function, non-string option coercers.
Uses a Symbol for attaching the gulplog namespace to the store.
gulplogUses a Symbol for attaching the gulplog store to the global.
gulplogUses sha256 to hash the v8flags cache into a filename.
v8flagsSecurity1
Resolves some reported ReDoS CVEs and improves performance in glob-parent.
glob-parentPlatform2
Drops support for Node.js versions below 10.13.
Normalizes the repository and drops support for Node versions below 10.13.
Deprecations to plan for
Deprecated1
Upgrades gulplog to v2; messages logged via v1 also display a deprecated warning, and plugins should update to v2.
gulplog