Skip to content
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

Refactor to use make-synchronized #18

Merged
merged 4 commits into from
Jan 22, 2024
Merged

Refactor to use make-synchronized #18

merged 4 commits into from
Jan 22, 2024

Conversation

fisker
Copy link
Member

@fisker fisker commented Jan 21, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1c353f3) 98.52% compared to head (ca8d847) 100.00%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #18      +/-   ##
===========================================
+ Coverage   98.52%   100.00%   +1.47%     
===========================================
  Files           2         1       -1     
  Lines         204        10     -194     
  Branches       16         1      -15     
===========================================
- Hits          201        10     -191     
+ Misses          3         0       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -31,6 +31,31 @@ synchronizedPrettier.format("foo( )", { parser: "babel" });
// => 'foo();\n'
```

This package is a simple wrapper of [`make-synchronized`](https://github.com/fisker/make-synchronized), currently only the functions and primitive values exported from `prettier` is functional, functions not exported directly (eg: `prettier.__debug.parse`) doesn't work, but it can be supported, if you want more functionality, please [open an issue](https://github.com/prettier/prettier-synchronized/issues/new).

For more complex use cases, it more reasonable to extract into a separate file, and run with [`make-synchronized`](https://github.com/fisker/make-synchronized), example
Copy link
Member

@JounQin JounQin Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add the following?

For more even complex use cases like TypeScript or P'n'P support natively, you may also try [`synckit`](https://github.com/un-ts/synckit).

@fisker fisker merged commit 06c7546 into main Jan 22, 2024
4 checks passed
@fisker fisker deleted the make-synchronized branch January 22, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants