Open
Conversation
Definitely-Not-Vlad
previously approved these changes
Apr 12, 2019
Contributor
Definitely-Not-Vlad
left a comment
There was a problem hiding this comment.
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."
Contributor
Author
Why would I mind, this really needs to be tested before it's released as stable 😄 |
…e eslint to use ecmaVersion 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 awaits 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 :)