ember-cli / ember-cli-deprecation-workflow

MIT License
165 stars 43 forks source link

[Feature request] Add ability to register a custom handler #108

Open mansona opened 3 years ago

mansona commented 3 years ago

Howdy folks 👋

I've seen a few people suggest custom handlers in issues, and some of them are good ideas but I can understand the reluctance to add more and more entries to a global switch case that has all possible handlers.

I was wondering if you were open to a modification to that code path that allowed you to specify a customHandler so that we could implement our weird and wonderful ideas as either a simple function passed in as the handler value, or some other way that might allow you registerDeprecationHandler in an addon so that it would work automatically?

I can see a few ways that I might implement something like this but I thought it was better to ask before spending any time on it 👍

mixonic commented 3 years ago

@mansona What is an example use case that isn't satisfied by using registerDeprecationHandler to set up your own?

Or perhaps you ran into https://github.com/mixonic/ember-cli-deprecation-workflow/issues/113 ?