General patches and code clean-up - #21
Conversation
- removed use of `global`(deprecated) with `globalThis` - called `new vorpal()` instead of `require(vorpal)()` - in './commands/sample.js' moved `keys` outside of the `init` function and changed it from `let` to `const`
|
I promise it's not a large PR, just the formatting and removing the .DS_Store makes it look large 😂 |
- fixed detecting already logged in - fixed issue with undefined errors - used async/await instead of returning `new Promise` - removed duplicate loginc in auth.js `init` function and Paystack.js `signIn` function
lucian-duta
left a comment
There was a problem hiding this comment.
Review Feedback:
-
.DS_Store & .gitignore: Excellent initiative in removing system-specific files and ensuring they're not committed in the future.
-
.prettierrc: A thoughtful addition for ensuring consistent code formatting across the project.
-
package.json.preferGlobal: Kudos for staying updated with the latest standards and eliminating deprecated options.
-
Renamed ./lib/Paystack: This is a valuable fix, especially considering it resolves a known issue (#13) with the CLI.
-
Module Conversions: Transitioning from commonjs to ES modules aligns well with modern JavaScript practices. Great move!
-
global to globalThis: It's good to see proactive steps for legacy support.
-
Duplicate Logic: Streamlining code by eliminating repetitive logic always improves maintainability. Well done!
-
Logging Issue: Addressing the "Undefined error" issue (#20) is crucial for clarity during debugging sessions. Thanks for spotting and fixing it.
Overall Feedback:
These changes look impressive and seem to significantly enhance the project's code quality. Even though I don't have approval rights on this repository, if I did, I'd certainly give it a thumbs up. Great work!
+ require ngrok auth token from user
|
@lukman-paystack can you merge please? I've reviewed the changes and we're good to go |
Changes:
.DS_Storeand added it to.gitignore.prettierrcfile for consistent formatting and ran prettier on all the filespackage.json.preferGlobaloption (deprecated as per here)./lib/Paystackto./lib/paystack(fixes CLI failing to start #13)globaltoglobalThis(legacy as per here)undefinedas an error (fixes Undefined error when logging in #20)