-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature/async await cleanup 1 #53
base: develop
Are you sure you want to change the base?
Conversation
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.
Could not find anything I would consider questionable.
As far as I'm concerned, merge away, however, I'd like you to publish this under a 0.11.0-alpha
version or whatever the version is, I forget. I'd like to test this out thoroughly before we set it as latest on npm, if you don't mind. I don't expect any issues, but: "Trust, but verify."
Why would I mind, this really needs to be tested before it's released as stable 😄 |
…e eslint to use ecmaVersion 8
In short: I've converted some of the more used filesystem functions to use sync methods.
getPlatformConfig
setPlatformConfig
getPlatformRootDir
getPlatformExtensionsDir
loadExtensionJson
addToExtensionsJs
cache getValue, setValue
clearTokens
authorizeRequests
setHostEnvName
parseCredentials
getLinkedDirectories
setLinkedDirectories
linkExtension
linkDirectory
unlinkDirectory
getAnalyticsVisitor
getCacheFilePath
readJsonFile
writeJsonFile
handleError
containsBuildTask
getPackageJson
savePackageJson
addLocalDependency
linkLocalDependencies
isPlatformDirectory
I've also removed all the redundant
return await
s at function endings.As far as I can tell, there's no upside to using async methods for ~1ms file reading operations in a command line tool running in a single threaded node process. And I believe it also makes the CLI code easier to read and follow.
I'm pretty sure that I didn't remove every await call where it's not needed any more, but it's not a problem since it'll resolve to the same value.
Please comment away :)