-
Notifications
You must be signed in to change notification settings - Fork 1
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: Changes required for @prettier/sync v0.5.2 #151
Comments
Thank you for your detailed report. Since prettier is used for formatting purposes, any library that achieves the desired formatting will be acceptable. I will review the changes and consider updating to the new version, incorporating make-synchronized, and adapting the imports as needed. Additionally, I will also explore whether biome can be used for formatting as an alternative. Thank you again for bringing this to our attention. Your input is valuable as we work to address these issues. |
Thanks. Hmm, I said we cannot update to prettier/sync v0.5.2 yet because of this issue: prettier/prettier-synchronized#22. However, I'm running that version now with the changes I provided above. Since the only problem is with running in debug mode, and we already have that problem with the current version anyway, maybe it's OK to update and then just update again when a new version is available with that one fix. Sorry about the verbosity and confusion ... I'm learning these details as I'm working with the code... |
I've modified the code to use asynchronous prettier format function. Both during actual execution and while debugging, it seems to be working without any issues. Thank you for bringing this to my attention! |
We can't update from @prettier/sync v0.3.0 to the current 0.5.2 yet because of an issue noted in #150. These notes are only relevant when that package has been updated.
That package has changed its interfaces. Code in formatByPrettier.ts should be changed from this:
To something like this ref ReadMe :
The package 'make-synchronized' will need to be added as a direct dependency in mysql-to-zod.
That will also require imports to be changed to something like this:
import formatByPrettier from "./formatByPrettier";
and code that uses that functionality might need to be modified:
const formatted = await formatByPrettier(schemaRawText);
Yes, I know the intent of using the "/sync" code is that the functionality needs to be synchronized (does it really?) but it seems async code must be wrapped in the synchronization process.
I don't understand all of this yet, I'm just reporting what I'm finding. :)
The text was updated successfully, but these errors were encountered: