-
Notifications
You must be signed in to change notification settings - Fork 22
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
chore: Exports utils directory for consumption by hawtio-online #397
Conversation
phantomjinx
commented
Jun 30, 2023
- Utilities that were originally provided by hawtio-core are still required in hawtio-online so need to be exported
* Utilities that were originally provided by hawtio-core are still required in hawtio-online so need to be exported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't expose all functions from util. Exposing functions and types from index.ts means exposing them as the API hawtio-next provides. I don't think tiny util functions like isString
are something hawtio-next should provide as API. As far as I can see so far, probably only functions from jolokia.ts
can be justifiable as part of hawtio-next's API.
Also, deciding to keep all such common utils across the hawtio-related components in hawtio-next would make those components unnecessarily tightly-coupled with each other. For example, if we want to change some util function from hawtio-next at hawtio-online, it would require to patch hawtio-next and wait for a next release of the package to finally consume the change at hawtio-online. It's unnecessarily long distance for generic util functions.
So what should we do instead? If we were careless about security issues we would have used common util packages such as lodash. So, for generic util functions which are substitutable with lodash, we can instead just duplicate the same functions at hawtio-online and maintain them in their own project.
I'd like to know what list of util functions from hawtio-next hawtio-online is currently required to depend on? So that we can further examine which utils should be really exposed and which should be just duplicated.
Talking a bit further about |
I'd agree. Duplication is the
So if you're good with duplicating them then I'll close this PR. Does help me since I don't have to keep publishing |
They are small enough to be duplicated at hawtio-online. Please go ahead. |
Closing as discussed. |