-
Notifications
You must be signed in to change notification settings - Fork 390
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(formats): extract formats into separate packages #1536
refactor(formats): extract formats into separate packages #1536
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## next #1536 +/- ##
==========================================
- Coverage 75.19% 75.11% -0.08%
==========================================
Files 79 78 -1
Lines 1963 1961 -2
Branches 515 511 -4
==========================================
- Hits 1476 1473 -3
- Misses 371 376 +5
+ Partials 116 112 -4
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
7b2d0d1
to
4fbc71f
Compare
4fbc71f
to
ee648f1
Compare
@thekip thank you! I don't really like the idea of creating a separate I would suggest here to act in the same way as with the json formatter - control it via the |
unbuild looks interesting, but it also looks not so popular at the moment. We need to be sure that there are no risks in locking on it. |
I want to get rid of it anyway. I will not change here as you asked. This module is an edge case implemented for someone. And probably this "someone" already forgot that implemented it, but we still need to maintain it. And maintaing this one is hard, because code is complicated. This formatter is not recommended anyway because it just doesn't work with lingui properly, only subset of features is supported. |
Every tools i found for library authors are not popular. It's simply because the amount of developers who create libraries vs consume libraries is very diffrent.
|
6279f83
to
dd1ac36
Compare
Reference to original PR - #677 I didn't read all the discussions but I don't think that this should be deprecated at all. It can be an opt-in feature (currently, we can accept the fact that it works not with all Lingui features as you said) |
2a07bfd
to
69b3c1a
Compare
@andrii-bodnar we can ask original author to extract this from the Lingui repository and create a separate package. |
Since it's already in the Lingui repository, we can't just remove a part of the functionality. It should happen carefully. So let's keep it like it is in this PR as a separate package. And then, in one of the future major releases (v5, v6, etc) will think about what to do with that. |
The general idea it not maintainng this as a part of a lingui project. Thanks to custom formatters community now can create new formats by their own. All edge case implementation such as |
Anything else here should be done? |
69b3c1a
to
26cd2d6
Compare
Co-authored-by: Andrii Bodnar <andrii.bodnar@crowdin.com>
26cd2d6
to
0b29f0f
Compare
Description
Extract catalog formats as separate packages inside lingui monorepo:
@lingui/format-csv
@lingui/format-json
with{style: "minimal"}
@lingui/format-json
with{style: "lingui"}
(or rename it to full? TBD)@lingui/format-po
@lingui/format-po-gettext
- this one is an edge case. After release, i want to check how many downloads it has and based on that - deprecate it. This one is pretty hard to support with little value and with new api of custom formatters could be simply implemented on the userland.Second important thing happend here:
I started using
unbuild
(BTW, which is awesome) for packaging in monorepo. I will be moving towards replacing all build pipelines to theunbuild
+ yarn workspaces in next iterations. The two main selling pointunbuild
gives:package.json
exportMigration and deprecations
For the
po
users, no migration is needed. The@lingui/format-po
is listed in the dependencies of@lingui/cli
and enabled by default.For the other formats, the error with helpful message would be thrown, so the users should update theirs config accordingly.