gulpjs / gulp-util

[deprecated] - See https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ecosystem migration

demurgos opened this issue Β· comments

Edit: See README.md and this medium post for details about the deprecation of gulp-util. Please help us submitting pull requests. Please also note that a patch was applied to keep all the plugins using gulp-util working with gul@4. This is only intended to help with the transition and migrating should remain a priority. More info about the Gulp 4 issue and fix

Following the deprecation of gulp-util, thousands of plugins need to be updated. According to npm, there are currently 6752 plugins depending on gulp-util. This issue tracks the progress for some of the most popular packages depending on gulp-util.

The packages listed below are from the first results for packages dependent on gulp-util.

  • Edit 1 (2017-01-01): I extended the list with additional packages that referenced this issue.
  • Edit 2 (2017-01-02): Full list of dependents (some download stats seems to be missing)
  • Edit 3 (2017-01-11): I stopped extending the list because it's getting too long. You can still post comments linking to issues or PRs. I may still add popular packages (I'll just use some arbitrary metric such as >100 stars or >1k monthly downloads).

Legend:

  • πŸ’š Fixed
  • πŸ’› PR, maintainer is aware of the issue
  • πŸ• PR, waiting for maintainer
  • ❌ No PR
  • Unchecked: Fix not on npm
  • Checked: Fix on npm

Progress (last update: 2018-10-14):

Deprecated packages (no need to update?):

Issue template:

Replace deprecated dependency gulp-util

[`gulp-util`](https://www.npmjs.com/package/gulp-util) has been deprecated recently. Continuing to use this dependency may prevent the use of your library with the recently released version 4 of Gulp, **it is important to replace `gulp-util`**.

The [README.md](https://github.com/gulpjs/gulp-util) lists alternatives for all the components so a simple replacement should be enough.

Your package is popular but still relying on `gulp-util`, it would be good to publish a fixed version to npm as soon as possible.

See:
- https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
- https://github.com/gulpjs/gulp-util/issues/143

This is awesome! Thanks @demurgos

A quick note about fancy-log - once more people are on gulp4 or gulp-cli, it'll need to be replaced by gulplog but we don't want to have people on it yet so logging doesn't get blackholed in the meantime.

Ok,
For the moment I am using fancy-log then.

The biggest issue when going over all these packages was that about half of them hasn't been updated in months even if they are very popular. Even if we sent PRs to all the package overnight, the biggest problem is that maintainers need to actually accept the PR and publish the update to npm. I had some quick answers from some maintainers, so it's a good sign. It would be nice to have @sindresorhus to accept its PRs because he owns many popular plugins.

Another issue related to the lack of regular maintainance is that many packages are still tested against unmaintained Node versions (pre-Node 4). I know that Gulp itself did not switch to Node 4+ but many other dependencies did. With the lack of lock files and transitive dependencies, CI tends to break for many packages so it requires additional maintenance to first get a working package and then drop gulp-util.

Yeah, I noticed that in some PRs. We've landed a temporary fix in vinyl-fs that upgrades the Vinyl objects passing through the stream, so the problem shouldn't be as immediate as it seemed but we will want to get these modules updated.

Thanks a ton for putting your time towards this - I'll go through all of my modules today.

^^ Yeah, thanks alot for compiling this list.

gulp-clean-css has been updated scniro/gulp-clean-css#50

I opened more issues (until I reached my rate limit πŸ˜„) and updated the first post. Also, thanks to @zbennett10 for sending many PRs.

@TheDancingCode
Excellent, I am reviewing it and updating the list.
Please make sure that vinyl is in the devDependencies when it's only used in the tests.

Edit: It seems that vinyl is in the right dependencies except for the first 2-3 PRs, could you update them?

Edit2: I am having a lot of troubles due to rate limits: I can't comment or fork repositories at the moment. Thanks to everyone helping with this.

@shinnn @TheDancingCode
I am not able to comment on the PR for gulp-gh-pages so I'll post it here:

The PR looks good but CI is failing. The last build I see was two years ago so it may be unrelated to the changes but it would be better if it was solved.

I updated the list and sent most of the missing PRs. We almost finished this list. If someone knows how to easily sort the dependent modules by weekly downloads I could update the list to add more plugins.

According to npm, there are now 6726 dependent packages (instead of 6752)

Thanks to @Frank3K and @TheDancingCode

I updated the list according to the issues and PRs you opened. Except for large packages, I'll stop extending the list. You can still open issues but I'll focus more on merging and publishing the already submitted PRs.

Happy new year to everyone πŸŽ‰

Phew. This came unexpected between the holidays. What about very old projects?

Please also note that a patch was applied to keep all the plugins using gulp-util working with gul@4.

I do not fully understand this. Which patch and which packages are meant?

@DanielRuf
gulp-util caused this Gulp 4 issue because it bundled a really old vinyl version. This vinyl version was no longer supported by the vinyl-fs version used by Gulp 4. A fix for vinyl-fs was applied to mitigate the problem but according to the issue I linked, it is "temporary". Still, it allows you to still use your plugins for now but migrating should be a priority.

Regarding old projects, if you still use Gulp 3 you'll get deprecation warnings but it will continue to work. If you are still working on your project, I recommend to stay up to date, review your dependencies and treat unmaintained dependencies as a liability. We try to do our best to help maintainers of popular plugins to migrate. If you have some important plugins, you can help us contact maintainers and send PRs (notify me if you want me to look at some plugins).

Personally I do not understand why this was necessary. Internal checks, new major versions and some code would have been no viable solution?

Regarding old projects, if you still use Gulp 3 you'll get deprecation warnings but it will continue to work.

That was initially not clear. So we can ignore the warning as "^3.*" would break / change nothing?

Gulp 3 will continue to work.

The issue happened during the alpha period of Gulp 4. The fix was applied before the stable release of Gulp 4, so even if breakage was allowed, gulp-util should not break Gulp 4. I agree that it could have been better handled by deprecating gulp-util earlier to leave more time for the migration before the breaking change.

Now that Gulp 4 got a stable release, I personally think that the fix will stay during the lifetime of Gulp 4, but I'd guess that the plan is to remove it with Gulp 5 (or other) to minimize the complexity of the library. Also note that Gulp 4 may have a shorter lifetime.

I mainly help with this migration but have no authority on the vinyl-fs issue or Gulp's longer term plans.
@phated do you want to correct / add something?

Edit: I don't want to spam this thread about this (it should stay about the migration), but I forgot to state the obvious: the deprecation of this library means that it is no longer supported. If you find some new issue with it, it is unlikely that it will be fixed ("unmaintained dependencies are a liability"). We cannot force you to migrate and depending on your situation it may be justified, but you have to be aware of the trade-off. Migration remains important for plugin authors to ensure the health of the ecosystem.

@DanielRuf it's not only for gulp 4 - gulp-util is a terrible pattern that has been up for deprecation for 3+ years. Please stop polluting this thread.

@demurgos

If someone knows how to easily sort the dependent modules by weekly downloads I could update the list to add more plugins.

I used https://github.com/doowb/dependents-cli to fetch a json file of the packages. It takes a really long time to fetch everything though.

commented

@phated

It takes a really long time to fetch everything though.

What's long? Would it be an idea to put a recent list on pastebin (or similar service)?

@phated @Frank3K
I'll take a look at it and try to post a complete list somewhere and eventually expand the list at the top.

The file size is 817K so I can't put on pastebin. I'm not sure the exact time but I left my computer for a couple hours while running it (it does a lot of http calls, I think).

Here's a zip of the json from Dec 22nd - gulp-util.dependents.json.zip

I uploaded your list on Gist (so you get a direct link).

Edit: there is an issue with the download stats. gulp has 0 downloads.

@DanielRuf
Thanks, that's a good idea. Since it's a recent feature it does not seem possible to sort them yet: sorting by stars would have helped to prioritize.
We almost finished the current batch of packages (again, great thanks to @TheDancingCode) so I'll check if the Github API provides this kind of feature or try to workaround the lack of all the download stats in the JSON posted above.

We also have 6667 dependents now, so we're almost 100 packages down since this issue was opened.

@demurgos, gulp-strip-comments@2.5.2 was released, which removes the gulp-util dependency. I didn't see it in the list above.

commented

There is a PR open for gulp-modernizr:
Modernizr/gulp-modernizr#46

gulp-csso fixed and published on npm as 3.0.1

There is a PR open for gulp-jst-concat:
tambourinecoder/gulp-jst-concat#12

commented

Issue for gulp-uglify-es (not automatically linked since it is on GitLab).

commented

I uploaded your list on Gist (so you get a direct link).

I have created a JSFiddle that displays the stats in a readable format. It uses ES6 features, so a modern browser is needed. Feel free to fork.

Hi,
Just a quick update. As most of you I don't have infinite free time so I do my best but can't fix everything. I am still tracking personally the progress for the packages listed in the first post, updating the list and pinging the maintainers.

The plugins in the first post are popular but represent only a fraction of the whole ecosystem. This long tail of remaining plugins will have to do the update itself. You can still reference this issue when submitting issues/PRs or send comments describing your changes. I most likely won't extend the list in the first post anymore unless there are some popular plugins that we missed (>100 Github stars or a few thousands monthly downloads).

You can also still mention me or send messages here if you have a question/want some help.

gulp-babel was fixed and published.

I've opened a PR on gulp-sassvg
MattDiMu/gulp-sassvg#9

I updated the status of most of the remaining projects. There were many merged PRs in the last few weeks and overall it's pretty good. Unfortunately there are also some popular packages where the maintainer seems inactive. I'll probably continue to track this issue during 2018 and close it by the end of the year.

@demurgos Thank you for helping - really appreciate it πŸ‘

commented

Thx for your work @demurgos Seeing that you started a gulp-community is that something where I can I help you with maintaining?

This is a project we (phated and other people from Gulp) created in January to avoid unmaintained projects. We still didn't really figured everything out so we're not promoting it actively right now. The goal is to have a trusted place for packages maintained by the community with the help of gulp contributors. I am not very active on Github lately due to other work, I'll try to spend some time on it this summer.

At the moment, we are simply accepting projects. If you have personal project that you'd like to move to this org, let us know.

commented

I took some projects under my wings in the aftermath of this migration period that got left behind by their maintainers. Happy to transfer them once you get the community thing sorted out, in the meantime I will still keep them updated myself.

gulp-webpack has been renamed to webpack-stream, and gulp-util has been dropped in the new package.

https://www.npmjs.com/package/gulp-webpack

@Umoxfo
Thanks, I moved it to the list of deprecated packages.

gulp-angular-templatecache@2.2.1 entirely removes gulp-util. Published 5/27/18.

gulp-resolve-dependencies doesn't seem to be maintained anymore, so I forked it into https://github.com/adrianosanti/gulp-dependency-directive with the proper updates to ditch gulp-util.

Thanks, I updated the list. Some of them were already marked as fixed (merged PR, green heart) but are still not published to npm.

I have opened a pull request for gulp-filelist: cjroth/gulp-filelist#23

Well, probably my pull request for gulp-filelist was not really important enough to be reported here. I might have been carried away a bit trying to contribute to the gulp ecosystem ;-). Sorry for bothering you.

commented

Thx for your help and PR @chewiebug but as @demurgos mentionedin #143 (comment) he stopped updating the list. Maybe its time for a new issue to be opened to track the remaining plugins?

I still update the statuses, but no longer add new packages. The remaining packages are comparatively small and there's no way to update all of the packages. A simple comment on this thread is enough. According to npm, there are still 6752 packages depending on gulp-util. It means that some people are still releasing new packages using gulp-util: we won't be able to completely remove gulp-util. As mentioned in another comment: I'll keep this issue open until it reaches it's first anniversary and then close it. The main plugins have already been updated.

This issue was super helpful but most of the ecosystem has been migrated. I'm going to close it.

Thanks everyone that helped out!