Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate gulp-util #360

Closed
1 of 5 tasks
yocontra opened this issue Mar 20, 2014 · 34 comments
Closed
1 of 5 tasks

Deprecate gulp-util #360

yocontra opened this issue Mar 20, 2014 · 34 comments

Comments

@yocontra
Copy link
Member

  • Make sure all gulp-util modules are broken into modules
  • Provide logger
  • Update documentation
  • Email prominent blog posts with changes
  • Open issues on relevant plugins to switch to the modular approach

Related: https://github.com/gulpjs/gulp-util/tree/descope

@yocontra yocontra added this to the gulp 4 milestone Mar 20, 2014
@yocontra yocontra self-assigned this Mar 20, 2014
@jasonrhodes
Copy link

Questions:

  1. Do all of the sub-modules in gulp-util need to be broken into their own modules? (Or are there some that aren't used and don't need to be migrated?)
  2. What's the best way to break a sub-module off—in a branch or in a new repo?
  3. Has any of this been started anywhere? I don't see any work started on the gulp-util repo besides @contra's descope branch…

@yocontra
Copy link
Member Author

@jasonrhodes

  1. some are not used or there are already sub-modules. For example, we ditched beep because there was no reason for it to be here and there is already a module (beepbeep) that does the same thing
  2. New repo, new node module
  3. descope branch

@ilanbiala
Copy link

Any progress on this?

@yocontra
Copy link
Member Author

@ilanbiala Have to finish BetterError everything else is already moved out

@dinoboff
Copy link
Contributor

color -> chalk
date -> node-dateformat
linefeed -> '\n'
File -> vinyl
combine -> merge-stream, event-stream, streamqueue?
replaceExtension -> ?
beep -> ?
PluginError -> ?
noop -> ?

@phated
Copy link
Member

phated commented Mar 22, 2015

combine -> https://www.npmjs.com/package/multipipe
replaceExtension -> https://www.npmjs.com/package/replace-ext
beep -> https://www.npmjs.com/package/beeper
PluginError -> https://github.com/wearefractal/BetterError but needs updating
noop -> through2.obj() but we should also release a noop-stream module

Others:
log -> needs to be split out, badly. I started on it as https://github.com/undertakerjs/glogg but not done yet
env -> https://www.npmjs.com/package/minimist
isStream, isBuffer, isNull -> shouldn't be used anymore because they are on the vinyl File object
buffer -> I've seen something before but can't remember what it was called
template -> it doesn't do much, but it does force some settings - should we release this as vinyl-template? @contra

@yocontra
Copy link
Member Author

@phated No I think we set the standard already with templating, we can put in the plugin docs to use lodash.template and that changing the settings is blacklistable

@callumacrae
Copy link
Member

Why not use an existing logging library? There's already a million of them, no need to make a new one.

I like the look of logdown, especially the prefix stuff.

@phated
Copy link
Member

phated commented Apr 2, 2015

@callumacrae we need to support differing versions of the logger without forcing plugins to update. This is supported in glogg through a global instance.

@shinnn
Copy link
Contributor

shinnn commented Jun 25, 2015

PluginError -> https://github.com/wearefractal/BetterError but needs updating

✋ I can update and maintain BetterError module since I know a lot about the PluginError.

@tunnckoCore
Copy link

@shinnn
Copy link
Contributor

shinnn commented Jun 25, 2015

Just an abstraction of what's in gulp-util with minor changes

I don't know what kind of minor changes the plugin-error module includes, but I, and probably a lot of gulp users, want to use just a simple port of gutil.PluginError.

@yocontra
Copy link
Member Author

@shinnn I wanted to make some API changes in BetterError (dropping support for all of the crazy argument overrides) to simplify it. Would love help maintaining it if you're interested!

I'd say use plugin-error if you want a straight port

@shinnn
Copy link
Contributor

shinnn commented Jun 25, 2015

OK, first just copy the PluginError code and paste it to the BetterError. Then, let's discuss API change. I prefer simplicity, too.

@phated
Copy link
Member

phated commented Jul 12, 2015

@shinnn are you still planning to do that? I'm sure @contra will add you to the repo.

@tunnckoCore
Copy link

@shinnn if "you know a lot about the PluginError" you can see it, i cant currently. Code is simliar, readme is good enough for me. Other than code style and better formatting, and use of smaller and faster modules, i cant see.

Just check it out, before start something.

or @jonschlinkert to come and describe what's the exact differences.

@jonschlinkert
Copy link

My goal was just to use PluginError as a standalone module without having to require gulp-util and the other deps that I don't always need.

I'd be more than happy to transfer the repo to gulp (without strings of requiring me to be a maintainer or whatever). Or I'm completely fine with re-starting the plugin-error lib using the code from gulp-util as-is, and adding anyone to the project as maintainers, like shinnn or anyone from the gulp team.

whatever works for you guys. just let me know what I can do to help.

@shinnn
Copy link
Contributor

shinnn commented Jul 13, 2015

I thought @jonschlinkert's plugin-error module does slightly different things from gutil.PluginError, judging from a phrase in the readme, "with minor changes". However, if they actually do the same thing, now I think #360 (comment) is also a good plan.

@jonschlinkert
Copy link

However, if they actually do the same thing

I'm pretty sure that was my goal, fwiw I put this in the actual github project description: "Just an abstraction of what's in gulp-util with minor reformatting". I don't have the best memory these days though :) Either way I think it should not differ from what's here. So let's change it to be the same if it's not.

@shinnn
Copy link
Contributor

shinnn commented Jul 18, 2015

Anyway I submitted a PR to the BetterError repository. yocontra/BetterError#1

Now I totally agree to @contra's comment #360 (comment):

make some API changes in BetterError
...
I'd say use plugin-error if you want a straight port

BetterError and plugin-error seem to be going towards the different goals and it's worth maintaining them separately.

@jonschlinkert
Copy link

Anyway I submitted a PR to the BetterError repository

perfect! makes much more sense

BetterError and plugin-error seem to be going towards the different goals

there's no need for plugin-error now. I'll just deprecate it and use BetterError.

@yocontra
Copy link
Member Author

@jonschlinkert BetterError has totally different goals, if you want a stand-in for PluginError then BetterError isn't it because the API signature and behavior will be totally different.

@jonschlinkert
Copy link

good to know, I'll take some time and look over the code. Either way I'd rather try to make changes in our libs to support BetterError if that's the goal for gulp. I have no interest in supporting any API differences unless I have to for backward compatibility or whatever. thanks

@yocontra
Copy link
Member Author

@jonschlinkert The idea is that existing things can stay on PluginError if they want to, nobody is removing gulp-util from the registry or anything - we just aren't working on it anymore and telling people not to use it. New stuff will use BetterError, and any developers who give a shit about their plugins will switch over after the deprecation is issued

@RehanSaeed
Copy link

Do we have an official/recommended alternative to log yet?

@callumacrae
Copy link
Member

@RehanSaeed See this issue #1208

and https://github.com/gulpjs/gulplog

@Meligy
Copy link

Meligy commented Oct 25, 2015

Is this still a thing? Is https://github.com/gulpjs/gulp-util still planned to be deprecated?

If yes, would it make sense to mention it in the README of the gulp-util project?

@phated
Copy link
Member

phated commented Oct 25, 2015

@Meligy this is definitely happening. We will be publishing a version that has deprecation warnings with alternative library suggestions and then labeling this repo as deprecated

@TrySound
Copy link
Contributor

TrySound commented Jan 5, 2016

@contra Any progress with BetterError? There are many small plugins which load large gulp-util stuff (much bigger now) only for PluginError.

@yocontra
Copy link
Member Author

yocontra commented Jan 5, 2016

@TrySound No progress, if anybody else has time to take a whack at it that would be much appreciated

@shinnn
Copy link
Contributor

shinnn commented Jan 5, 2016

@contra We can't contribute to BetterError project at least if you show us its desired API as you said in yocontra/BetterError#1 (comment).

@yocontra
Copy link
Member Author

yocontra commented Jan 5, 2016

@shinnn There is no project and no desired API - feel free to build anything you want that solves the problem of error display + error prefixing w/ plugin names and do it however you want

@jamen
Copy link

jamen commented Apr 17, 2016

Couldn't replaceExtension ultimately be replaced by vinyl.extname = ... in most scenarios? Although, I tried using it in my gulp plugin and it didn't seem to work, so I'm a bit confused. (perhaps current gulp version uses an older version of vinyl?)

@phated
Copy link
Member

phated commented Dec 31, 2017

gulp-util has been deprecated now - see https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 for more information.

@phated phated closed this as completed Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests