github workflow with customized plugins

Hello everybody,

I probably have a slightly more specific question about a github workflow. I load my jquery plugins via npm from github.

Some plugins are adapted by me for the specific project. Is there a best practice for updating the plugins to a newer version without “overwriting” my specific changes? The changes arent bugs or features, so i cant do a pull request to the origin repository.

Thank you and have a nice weekend benny 

Hi @benschodie,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the How to use Git and GitHub board.

Let us know if you have any questions or if we can help with anything else.


1 Like

Ok, thank you :slight_smile:

So you have some jquery plugins and you:

  1. Want to have different customizations of the plugins per project
  2. Want to be able to update from version X to version Y of the base plugin without breaking any of your customizations

There isn’t a silver bullet here, this is one of the things that makes dependency management so complex. Let’s take a look at a couple scenarios. They’ll all be based on the assumptions:

  • You have a plugin, P
  • P has a function F that takes two parameters and returns some value
  • In this particular project you have a customization, C
  • C customizes the behavior of F to take three parameters and returns some value

What should happen if you update P to some new version that adds a third parameter to function F? The answer is, it depends. Do you want to use the functionality provided by that new third parameter in P.F? If not, maybe you don’t need to do anything. If you do, then you’ll probably have to change the implementation of C and anything that depends on C.F to compensate.

What should happen if you update P to some new version that adds a new function that needs to be customized by C before it is used? Then you’ll have to take the time to provide the new customized function or at least stub it out so that it throws an error if it is used before it is customized.

Essentially, there is no one-size-fits-all solution to the general question you’re asking. There are too many variables and what-ifs and some of them will need to be solved on a case-by-case basis. If your customizations all follow a specific form, then perhaps some mechanism could be constructed but you’d need to supply a lot more details about what it is you’re trying to do.

I hope that helps!