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 |
thymikee
left a comment
There was a problem hiding this comment.
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
yarnandyarn jestthe result ofyarn clean-allis thatgit statusdisplays:#6185 added these files and made an exception in
.gitignorebut not inpackage.jsonfile.Y’all are welcome to improve the
findcommand in newclean-e2escript. I wrote it as clear and cross platform as I know how.Test plan
I used
find . -type d \( -name node_modules -prune \) -printto explorenode_modulesdirectories:After
git clonethere are 2 under./e2eand 4 under./packagesAfter
yarnthere are more, of course./node_modules./website/node_modules12 under
./examples21 under
.packagesincluding the following 4 related to the preceding 4After
yarn jestthere are 8 more under./e2eAfter original version of
yarn clean-allremoved
./node_modulesremoved 17 under
./packagesand kept the 4 fromgit cloneremoved 4 under
./e2eincluding the 2 fromgit clonethat it should have kept but kept the following 6 the it should have removed (but were not because of./e2e/*/*/node_modulespattern)Repeat steps 1, 2, 3, and then after improved version of
yarn clean-all./node_modules./packagesand kept the 4 fromgit clone./e2eand kept the 2 fromgit clonethereforegit statusdisplaysnothing to commit, working tree clean