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(macro): make code strongly typed #1321

Merged

Conversation

timofei-iatsenko
Copy link
Collaborator

No logic changes. Added types wherever possible and fix issues. Also added few more tests for "black zones".

@vercel
Copy link

vercel bot commented Jan 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
js-lingui ✅ Ready (Inspect) Visit Preview Jan 10, 2023 at 3:51PM (UTC)

@timofei-iatsenko
Copy link
Collaborator Author

@andrii-bodnar FYI

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Base: 82.60% // Head: 82.99% // Increases project coverage by +0.39% 🎉

Coverage data is based on head (82983a6) compared to base (ad9b735).
Patch coverage: 93.75% of modified lines in pull request are covered.

❗ Current head 82983a6 differs from pull request most recent head e383dba. Consider uploading reports for the commit e383dba to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1321      +/-   ##
==========================================
+ Coverage   82.60%   82.99%   +0.39%     
==========================================
  Files          56       66      +10     
  Lines        1799     1805       +6     
  Branches      506      505       -1     
==========================================
+ Hits         1486     1498      +12     
+ Misses        183      178       -5     
+ Partials      130      129       -1     
Impacted Files Coverage Δ
packages/macro/src/utils.ts 100.00% <ø> (ø)
packages/macro/src/macroJsx.ts 90.34% <84.84%> (-0.96%) ⬇️
packages/macro/src/icu.ts 94.87% <94.59%> (-0.26%) ⬇️
packages/macro/src/macroJs.ts 97.87% <97.61%> (+5.20%) ⬆️
packages/macro/src/index.ts 83.60% <100.00%> (ø)
packages/macro/test/js-arg.ts 100.00% <100.00%> (ø)
packages/macro/test/js-defineMessage.ts 100.00% <100.00%> (ø)
packages/macro/test/js-plural.ts 100.00% <100.00%> (ø)
packages/macro/test/js-select.ts 100.00% <100.00%> (ø)
packages/macro/test/js-selectOrdinal.ts 100.00% <100.00%> (ø)
... and 6 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@Martin005 Martin005 left a comment

Choose a reason for hiding this comment

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

Thank you for your pull request!

I have made some suggestions and commented one question.

From the 3 empty lines and no spaces around value names in import's, I believe you are not running Prettier. Please set it up and run it on this PR.

As we have merged your PR #1329 into main, please merge main into your branch as that PR made some changes to the packages/macro/src/index.ts file.

packages/macro/src/icu.ts Outdated Show resolved Hide resolved
packages/macro/src/icu.ts Outdated Show resolved Hide resolved
packages/macro/src/macroJsx.ts Outdated Show resolved Hide resolved
packages/macro/src/macroJsx.ts Outdated Show resolved Hide resolved
packages/macro/src/macroJsx.ts Outdated Show resolved Hide resolved
packages/macro/src/macroJs.ts Show resolved Hide resolved
packages/macro/src/macroJs.ts Show resolved Hide resolved
packages/macro/src/macroJsx.ts Outdated Show resolved Hide resolved
packages/macro/test/jsx-selectOrdinal.ts Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jan 10, 2023

size-limit report 📦

Path Size
./packages/core/build/cjs/core.production.min.js 2.9 KB (0%)
./packages/detect-locale/build/cjs/detect-locale.production.min.js 798 B (0%)
./packages/react/build/cjs/react.production.min.js 4.91 KB (0%)
./packages/remote-loader/build/cjs/remote-loader.production.min.js 92.08 KB (0%)

@timofei-iatsenko
Copy link
Collaborator Author

messed up things with rebase, looking why commits from main is showed as my

@timofei-iatsenko timofei-iatsenko force-pushed the refactoring/strong-typing branch from 160a84f to e383dba Compare January 10, 2023 15:50
@timofei-iatsenko
Copy link
Collaborator Author

Done

@andrii-bodnar
Copy link
Contributor

@thekip @Martin005 is this PR ready to merge?

@timofei-iatsenko
Copy link
Collaborator Author

Nothing to add from my side

@andrii-bodnar andrii-bodnar merged commit 5dedae2 into lingui:main Jan 11, 2023
@timofei-iatsenko timofei-iatsenko deleted the refactoring/strong-typing branch January 11, 2023 10:58
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.

3 participants