Skip to content

Option no-sort doesn't seem to work on gulp 5.0.0 #2784

@tallenglish

Description

@tallenglish

What were you expecting to happen?

Only changing between gulp v4.0.2 and v5.0.0 (all other plugins stay the same and latest versions).

Issue is only really a problem for JavaScript files where the order of the files being concat is vital for plugins that depend on others - like jQuery needing to be first.

I am using ESM gulpfile, as required by latest gulp-autoprefixer v9.0.0 now.

Using the following to keep the order of input sources unsorted (mainly required for JavaScript dependencies).

What actually happened?

Works as expected for gulp v4.0.2 with "no-sort" option, however array is still sorted when using v5.0.0 with same option.

Please give us a sample of your gulpfile

return gulp.src(src, { "no-sort": true })
	.pipe(gulp_concat(file))
	.pipe....

In this case the src is an array of files similar to the following, and need to be concat in the same order:

const src = [
	"a.js",
	"b.js",
	"c.js",
	"d.js"
];

Only change needed to break is upgrading from gulp v4.0.2 to v5.0.0

Terminal output / screenshots

None

Please provide the following information:

  • OS & version: Debian Linux bookworm (all latest updates)
  • node version (run node -v): 20.11.0
  • npm version (run npm -v): 10.5.1
  • gulp version (run gulp -v): 5.0.0

Additional information

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions