-
Notifications
You must be signed in to change notification settings - Fork 10
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
http
Fix typo in util functions
#888
Conversation
http
separate helpers from util functions
@@ -148,7 +8,7 @@ export { | |||
* @param {string} data - The string to be encoded. | |||
* @returns {string} - The Base64 encoded string. | |||
* @example <caption>Encode a string</caption> | |||
* const encoded = Util.encode('Hello World'); | |||
* const encoded = util.encode('Hello World'); |
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.
Good catch!
@mtuchi I'm not so sure about this I don't really like helpers.js as a file name - it doesn't mean anything. The internal helpers like I don't really mind mixing public and private functions in js files. We do it in Adaptor.js anyway and I have no problem doing it in utils.js either. And besides, does it really matter if a util function is aimed at job code or other adaptors? Aside from documentation I don't think it does. |
Fair point. I wish there was a better way of doing this because if i add documentation to any function in util i have to add Write now even though Let me revert and fix the typo only for this PR so that we can get #865 released |
http
separate helpers from util functionshttp
Fix typo in util functions
Wait are you sure? My understanding (and I've written a lot of code around this stuff, but I can definitely be wrong) is that a function needs Because we DO use private internal functions. So I think things should be private by default, and only made public when someone's made the effort to properly document them. I'll have to take a look at this to be certain before moving on. |
The docgen in tools says this:
Let me assert that access is |
Edited
Fix typo in jsdoc for util functions and remove export for
addAuth()
OLD SUMMARY
Summary
I have separated helpers that are used in
Adaptor.js
fromutil
functions which are exported inindex.js
.helper.js
addAuth()
helperThis PR is addition to #865
Details
The current implementation exports all util functions which is wrong because we shouldn't have access to
util.request()
,util.addAuth()
orutil.xmlParser()
. These are helpers intended to be used inAdaptor.js
functions. I have separated helpers function from util function so that we only exportencode, decode, uuid
fromutil.js
and use the helpers only in Adaptor.js fileAI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
dev only changes don't need a changeset.