-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
scripts: Don’t remove node_modules from subdirectories of presets in e2e tests #6948
Conversation
Hey @pedrottimark! 👋 I wonder if it might be easier to just write a node script, and execute that before running |
Your thought is welcome, because project config isn’t my strong point. Although I feel bad putting such a complex command in If you need a laugh, you should have seen how much searching and how many false starts for me to write that |
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.
As long as it works I'm cool 👍
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
After
yarn
andyarn jest
the result ofyarn clean-all
is thatgit status
displays:#6185 added these files and made an exception in
.gitignore
but not inpackage.json
file.Y’all are welcome to improve the
find
command in newclean-e2e
script. I wrote it as clear and cross platform as I know how.Test plan
I used
find . -type d \( -name node_modules -prune \) -print
to explorenode_modules
directories:After
git clone
there are 2 under./e2e
and 4 under./packages
After
yarn
there are more, of course./node_modules
./website/node_modules
12 under
./examples
21 under
.packages
including the following 4 related to the preceding 4After
yarn jest
there are 8 more under./e2e
After original version of
yarn clean-all
removed
./node_modules
removed 17 under
./packages
and kept the 4 fromgit clone
removed 4 under
./e2e
including the 2 fromgit clone
that it should have kept but kept the following 6 the it should have removed (but were not because of./e2e/*/*/node_modules
pattern)Repeat steps 1, 2, 3, and then after improved version of
yarn clean-all
./node_modules
./packages
and kept the 4 fromgit clone
./e2e
and kept the 2 fromgit clone
thereforegit status
displaysnothing to commit, working tree clean