swc-plugin icon indicating copy to clipboard operation
swc-plugin copied to clipboard

feat(macro): Add arg macro support as in babel plugin

Open DeyLak opened this issue 6 months ago • 1 comments

Description

This PR resolves part of the discussed changes in https://github.com/lingui/js-lingui/issues/2279. It adds support for the arg macro for the swc plugin feature parity with the babel one, so it can be properly released

Types of changes

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

Fixes https://github.com/lingui/js-lingui/issues/2279

Checklist

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

DeyLak avatar Jul 22 '25 00:07 DeyLak

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.58%. Comparing base (0e6a523) to head (0193928).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
+ Coverage   92.44%   92.58%   +0.14%     
==========================================
  Files           8        8              
  Lines        1364     1390      +26     
==========================================
+ Hits         1261     1287      +26     
  Misses        103      103              
Flag Coverage Δ
unittests 92.58% <100.00%> (+0.14%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/builder.rs 98.91% <100.00%> (+0.01%) :arrow_up:
src/jsx_visitor.rs 89.30% <100.00%> (+0.54%) :arrow_up:
src/macro_utils.rs 89.00% <100.00%> (+0.82%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 22 '25 07:07 codecov[bot]