Skip to content

feat(macro): Add arg macro tests, docs and typings#2292

Draft
DeyLak wants to merge 2 commits into
lingui:main-renamedfrom
DeyLak:feat/arg-macro
Draft

feat(macro): Add arg macro tests, docs and typings#2292
DeyLak wants to merge 2 commits into
lingui:main-renamedfrom
DeyLak:feat/arg-macro

Conversation

@DeyLak

@DeyLak DeyLak commented Jul 22, 2025

Copy link
Copy Markdown

Description

This PR resolves part of the discussed changes in #2279. It adds tests, docs and typings for the arg macro that was already available in the babel plugin.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes #2279

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel

vercel Bot commented Jul 22, 2025

Copy link
Copy Markdown

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

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Aug 4, 2025 8:55am

@codecov

codecov Bot commented Jul 22, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main-renamed@36513df). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ckages/babel-plugin-lingui-macro/src/macroJsAst.ts 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##             main-renamed    #2292   +/-   ##
===============================================
  Coverage                ?   77.01%           
===============================================
  Files                   ?       89           
  Lines                   ?     2506           
  Branches                ?      651           
===============================================
  Hits                    ?     1930           
  Misses                  ?      461           
  Partials                ?      115           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timofei-iatsenko

Copy link
Copy Markdown
Collaborator

Regardless of the original conversation we had, i feel that this PR is still quite a valuable contribution for the library, so would like to move this forward.

The PR itself LGTM

@timofei-iatsenko timofei-iatsenko marked this pull request as draft August 4, 2025 08:02
@timofei-iatsenko

Copy link
Copy Markdown
Collaborator

I'd like to do some changes first, than will mark as ready

@timofei-iatsenko timofei-iatsenko marked this pull request as ready for review August 4, 2025 08:53
@timofei-iatsenko

timofei-iatsenko commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

I added support for named placeholders to the arg macro, to be consistent with other places and added type tests for that.

@timofei-iatsenko

Copy link
Copy Markdown
Collaborator

@andrii-bodnar anything else to be done to merge it?

@andrii-bodnar

Copy link
Copy Markdown
Contributor

@timofei-iatsenko I was waiting here for lingui/swc-plugin#161, to release them synchronously

@andrii-bodnar andrii-bodnar marked this pull request as draft January 26, 2026 10:11
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.

Custom formatters for numbers, dates etc.

3 participants