-
Notifications
You must be signed in to change notification settings - Fork 2
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 generate-chains script to work with Prettier v3 #67
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.
Does watchJsonFiles
also need updating given the calls to the now async mergeJsonFiles
?
I thought it might, but it appears to work just fine without any changes. i.e. I can run both |
I'm merging this so I can release v3.4.0 with a working |
Sounds good to merging. My last thought on the discussion:
When watching, the files are actually merged (not just there is a console message)? I always find it non intuitive as to when functions return vs actually execute |
I'm not sure I understand what you mean here, sorry. Would you mind elaborating a bit? Are you suggesting another change to how the watching is currently setup? For what it's worth, I'm not actually even sure that it's worth having the |
Haha yes, that was vague. I meant that it could be the script looks like it's working because async calls return immediately without await and therefore the files may not be merged, which is akin to what was happening in the comment I linked to. But it could also be working fine 🤷♂️ Sounds like it would also be fine without watch at all though, and I always love less code haha |
Agreed 🤝 I'm going to remove the watch option I don't think the async call functions are an issue, since this script runs in < 1 second (although I get what you mean now, thanks) |
Apologies I missed that upgrading to Prettier v3 broke the
generate-chains
script. I've adjusted the script to be async now that the exposed Prettier functions return promises.