-
Notifications
You must be signed in to change notification settings - Fork 906
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
Fix: cleaning metro cache #2258
Fix: cleaning metro cache #2258
Conversation
bcf6c5a
to
a96ceb3
Compare
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.
Works great on two platforms, LGTM 🙌
glob(directory, {}, (err, foundDirectories) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(foundDirectories); | ||
} | ||
}); |
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.
doesn't glob have its promise interface?
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.
it does, but starting from 9.0, and we are currently using 7.x across the project 😢
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.
Let's upgrade it in a separate PR :D
a96ceb3
to
561d449
Compare
Summary:
fs.rm
function does not expand, so when usingclean
command, Metro files are not removed.This is a follow-up PR to #2161 which solves this problem for Windows, but since
fs.rm
does not expand at all, it still doesn't work properly for macOS. Removing OS check in this solution does not solve the issue, probably becauseconvertPathToPattern
fromfast-glob
modifies the pattern frommetro-*
tometro-\*
. This PR should work correctly on both operating systems.Closes #2161
Test Plan:
os.tmpdir()
)start
command in any CLI appls
in the temp directory to verify anymetro-*
are listedclean
command, selectmetro
option and confirmls
in the temp directory again and verify allmetro-*
are goneChecklist