Skip to content

Conversation

@zombispormedio
Copy link
Contributor

@zombispormedio zombispormedio commented Dec 6, 2025

Upgrading swc_core to 45.0.2 to make the package with the next compat range @40.0.0 - < 46.0.0
(https://plugins.swc.rs/versions/range/426)

In this way, the package will be compatible with Next.js 16

If this is fine, it should be merged after #171

Related to this #170 (comment)

Testing

cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.38s
     Running unittests src/lib.rs (target/debug/deps/lingui_macro_plugin-990f80f6d864b4be)

running 102 tests
test options::lib_tests::test_strip_non_essential_fields_config ... ok
test options::lib_tests::test_config_optional ... ok
test options::lib_tests::test_strip_non_essential_fields_default ... ok
test options::lib_tests::test_config ... ok
test generate_id::tests::test_generate_message_id_with_context ... ok
test generate_id::tests::test_generate_message_id ... ok
test tests::js_define_message::should_expand_values ... ok
test tests::imports::should_add_imports_after_directive_prologues ... ok
test tests::imports::js_should_support_renamed_imports ... ok
test tests::js_define_message::should_kept_only_essential_props ... ok
test tests::js_define_message::should_expand_macros ... ok
test tests::imports::js_should_process_only_elements_imported_from_macro2 ... ok
test tests::js_define_message::define_message_should_support_template_literal ... ok
test tests::imports::js_should_process_only_elements_imported_from_macro ... ok
test tests::js_define_message::should_preserve_custom_id ... ok
test tests::js_define_message::should_transform_define_message ... ok
test tests::js_icu::js_dedup_values_in_icu ... ok
test tests::js_icu::js_icu_nested_in_t ... ok
test tests::js_icu::js_icu_diffrent_object_literal_syntax ... ok
test tests::js_icu::js_choices_may_contain_expressions ... ok
test tests::js_icu::js_icu_nested_in_choices ... ok
test tests::js_icu::js_icu_macro ... ok
test tests::js_icu::js_plural_with_offset_and_exact_matches ... ok
test tests::js_icu::js_plural_with_placeholders ... ok
test tests::js_icu::js_should_not_touch_non_lungui_fns ... ok
test tests::js_icu::js_should_not_treat_offset_in_select ... ok
test tests::js_t::js_continuation_character ... ok
test tests::js_t::js_choice_labels_in_tpl_literal ... ok
test tests::js_t::js_dedup_values_in_tpl_literal ... ok
test tests::js_t::js_newlines_are_preserved ... ok
test tests::js_t::js_should_not_touch_code_if_no_macro_import ... ok
test tests::js_t::js_should_kept_only_essential_props ... ok
test tests::js_t::js_custom_i18n_passed ... ok
test tests::js_t::js_should_not_touch_not_related_tagget_tpls ... ok
test tests::js_t::js_should_work_with_legacy_import ... ok
test tests::js_t::js_explicit_labels_in_tpl_literal ... ok
test tests::js_t::js_ph_labels_in_tpl_literal ... ok
test tests::js_t::js_support_message_descriptor_in_t_fn ... ok
test tests::js_t::js_support_template_strings_in_t_macro_message_with_custom_i18n_instance ... ok
test tests::js_t::js_t_fn_wrapped_in_call_expr ... ok
test tests::js_t::support_id_and_comment_in_t_macro_as_call_expression ... ok
test tests::js_t::should_generate_diffrent_id_when_context_provided ... ok
test tests::js_t::js_substitution_in_tpl_literal ... ok
test tests::js_t::support_id_in_template_literal ... ok
test tests::js_t::unicode_characters_interpreted ... ok
test tests::jsx::elements_without_children ... ok
test tests::jsx::elements_inside_expression_container ... ok
test tests::jsx::ignore_jsx_empty_expression ... ok
test tests::jsx::jsx_explicit_labels_with_as_statement ... ok
test tests::jsx::html_attributes_are_handled ... ok
test tests::jsx::jsx_should_suppor_legacy_import ... ok
test tests::jsx::jsx_preserve_reserved_attrs ... ok
test tests::jsx::jsx_template_literal_in_children ... ok
test tests::jsx::jsx_nested_labels ... ok
test tests::imports::jsx_should_process_only_elements_imported_from_macro2 ... ok
test tests::imports::should_add_not_clashing_imports ... ok
test tests::imports::jsx_should_process_only_elements_imported_from_macro ... ok
test tests::jsx::jsx_with_custom_id ... ok
test tests::imports::jsx_should_support_renamed_imports ... ok
test tests::jsx::jsx_simple_jsx ... ok
test tests::jsx::jsx_with_context ... ok
test tests::jsx::production_only_essential_props_are_kept ... ok
test tests::jsx::jsx_components_interpolation ... ok
test tests::jsx::jsx_expressions_are_converted_to_positional_arguments ... ok
test tests::jsx::jsx_values_dedup ... ok
test tests::jsx::strip_whitespace_around_arguments ... ok
test tests::jsx::use_decoded_html_entities ... ok
test tests::jsx::quoted_jsx_attributes_are_handled ... ok
test tests::jsx::keep_multiple_forced_newlines ... ok
test tests::jsx::normalize_crlf_lf_cr ... ok
test tests::jsx::use_js_plural_in_jsx_attrs ... ok
test tests::jsx_icu::jsx_icu_explicit_id ... ok
test tests::jsx_icu::jsx_icu ... ok
test tests::jsx_icu::jsx_icu_with_template_literal ... ok
test tests::jsx_icu::jsx_plural_preserve_reserved_attrs ... ok
test tests::jsx::use_js_macro_in_jsx_attrs ... ok
test tests::jsx_icu::jsx_select_ordinal_with_offset_and_exact_matches ... ok
test tests::jsx_icu::jsx_plural_with_offset_and_exact_matches ... ok
test tests::jsx::non_breaking_whitespace_handling_2226 ... ok
test tests::jsx::strip_whitespace_around_tags_but_keep_forced_spaces ... ok
test tests::jsx_icu::jsx_select_simple ... ok
test tests::jsx_icu::jsx_select_with_reserved_attrs ... ok
test tests::jsx_icu::jsx_select_with_expressions_in_cases ... ok
test tests::jsx_icu::production_only_essential_props_are_kept ... ok
test tests::runtime_config::should_use_provided_runtime_modules ... ok
test tests::use_lingui::support_nested_macro ... ok
test tests::use_lingui::js_use_lingui_hook ... ok
test tests::jsx::jsx_explicit_labels ... ok
test tests::use_lingui::should_process_macro_with_matching_name_in_correct_scopes ... ok
test tests::use_lingui::support_nested_macro_when_in_arrow_function_issue_2095 ... ok
test tests::jsx_icu::jsx_icu_nested ... ok
test tests::use_lingui::support_passing_t_variable_as_dependency ... ok
test tests::use_lingui::support_renamed_destructuring ... ok
test tests::use_lingui::work_with_components_defined_as_arrow_function ... ok
test tests::use_lingui::work_when_t_is_not_used ... ok
test tests::use_lingui::work_with_existing_use_lingui_statement ... ok
test tests::use_lingui::work_with_multiple_react_components ... ok
test tests::jsx::jsx_ph_labels ... ok
test tests::jsx_icu::multiple_new_lines_with_nbsp_endind ... ok
test tests::jsx::strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers ... ok
test tests::jsx_icu::jsx_trans_inside_plural ... ok
test tests::jsx_icu::jsx_multivelel_nesting ... ok

test result: ok. 102 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s

Copilot AI review requested due to automatic review settings December 6, 2025 16:33
@zombispormedio zombispormedio changed the title feat: update swc_core 45.0.2 feat: upgrade swc_core 45.0.2 Dec 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades swc_core from version 27.0.6 to 45.0.2 to ensure compatibility with Next.js 16. The upgrade allows the plugin to work within the @40.0.0 - < 46.0.0 swc_core compatibility range required by Next.js 16. All 102 tests pass successfully.

Key changes:

  • Updated swc_core dependency to version 45.0.2 in Cargo.toml
  • Added version mapping entries to the README compatibility table
  • Automatic dependency updates in Cargo.lock reflecting the major version bump of swc_core and related packages

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Added two new rows to the version compatibility table documenting swc_core versions 39.0.3 (plugin v5.7.0) and 45.0.2 (plugin v5.8.0)
Cargo.toml Updated swc_core dependency version from 27.0.6 to 45.0.2
Cargo.lock Automatic lock file updates reflecting the major version upgrade of swc_core and all related dependencies (swc_ecma_*, swc_common, etc.)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <[email protected]>
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.45%. Comparing base (329c4a9) to head (f113ae6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #172   +/-   ##
=======================================
  Coverage   92.45%   92.45%           
=======================================
  Files           8        8           
  Lines        1351     1351           
=======================================
  Hits         1249     1249           
  Misses        102      102           
Flag Coverage Δ
unittests 92.45% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@zombispormedio thank you for the contribution! The 5.7.0 version is live. Could you please rebase the current branch so that we can proceed with version 5.8.0 release?

@timofei-iatsenko
Copy link
Collaborator

@andrii-bodnar i resolved the conflicts

@andrii-bodnar andrii-bodnar merged commit 4fed0b7 into lingui:main Dec 8, 2025
3 checks passed
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