Skip to content

Conversation

@gaoachao
Copy link
Collaborator

@gaoachao gaoachao commented Sep 24, 2025

Summary by CodeRabbit

  • New Features

    • Added a configurable React Lynx compatibility transform plugin that reads JSON config and applies compatibility transforms.
  • New Features (Types)

    • Introduced TypeScript configuration interfaces for plugin options (target selection, package lists, extra attributes, deprecated toggles, dark mode).
  • Documentation

    • Added JSDoc comments and examples for the configuration surface.
  • Tests

    • Added deserialization tests for target parsing.
  • Chores

    • Updated lint ignores for generated typings, adjusted dependencies, added build configuration, and updated package description.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link

changeset-bot bot commented Sep 24, 2025

🦋 Changeset detected

Latest commit: 57c0baa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

📝 Walkthrough

Walkthrough

Adds lint ignore patterns; adds serde as a dependency and derives Deserialize for several compat types; implements Deserialize for TransformTarget with tests; adds a new swc-plugin-reactlynx-compat plugin entry point, TypeScript config declarations, Turbo build config, and switches some crate dependencies to use the local compat crate.

Changes

Cohort / File(s) Change summary
Repo config and housekeeping
\.changeset/loud-carrots-relate.md, biome.jsonc, eslint.config.js
Added empty changeset file; expanded linter/ESLint ignore patterns to include packages/react/transform/**/index.d.ts.
Shared transform utilities
packages/react/transform/crates/swc_plugins_shared/target.rs
Added Deserialize impl for TransformTarget (string parsing) and unit tests for deserialization/error cases.
Compat crate updates
packages/react/transform/crates/swc_plugin_compat/Cargo.toml, .../lib.rs
Added serde dependency and derived Deserialize for Either, DarkModeConfig, AddComponentElementConfig, and CompatVisitorConfig.
React Lynx compat plugin
packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml, .../src/lib.rs, .../index.d.ts, .../turbo.json, .../package.json
Switched some deps to local swc_plugin_compat; enabled serde derive feature; added process_transform plugin entrypoint (#[plugin_transform]); added TypeScript declarations for plugin config; added Turbo build config; updated package description.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

framework:React

Suggested reviewers

  • upupming
  • colinaaa

Poem

I hop through crates and nibble at the seed,
Serde sprouts leaves for every config need.
A plugin wakes and scurries through the tree,
Types hum LEPUS, JS, MIXED — titles free.
Turbo hums softly, "build it fast," said me 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title follows conventional commit style and clearly summarizes the primary change of the pull request by stating the addition of the new swc-plugin-react-lynx-compat feature; it is concise, specific, and directly reflects the main intent of the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/introduce-swc-plugin-react-lynx-compat

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4aa8e1 and 57c0baa.

📒 Files selected for processing (2)
  • packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml (1 hunks)
  • packages/react/transform/swc-plugin-reactlynx-compat/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1714
File: packages/react/transform/Cargo.toml:19-19
Timestamp: 2025-09-10T11:42:36.855Z
Learning: In packages/react/transform/Cargo.toml, the crate uses serde derive macros (#[derive(Serialize, Deserialize)]) in multiple files including src/esbuild.rs and src/swc_plugin_extract_str/mod.rs, so the "derive" feature is required when migrating to workspace dependencies.
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/package.json
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/package.json
📚 Learning: 2025-09-18T04:43:54.426Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.426Z
Learning: In the lynx-family/lynx-stack repository, the `add_pure_comment` function in packages/react/transform/src/swc_plugin_compat/mod.rs (around lines 478-482) is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/package.json
📚 Learning: 2025-09-10T11:42:36.855Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1714
File: packages/react/transform/Cargo.toml:19-19
Timestamp: 2025-09-10T11:42:36.855Z
Learning: In packages/react/transform/Cargo.toml, the crate uses serde derive macros (#[derive(Serialize, Deserialize)]) in multiple files including src/esbuild.rs and src/swc_plugin_extract_str/mod.rs, so the "derive" feature is required when migrating to workspace dependencies.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: test-rust / Test (Ubuntu)
🔇 Additional comments (2)
packages/react/transform/swc-plugin-reactlynx-compat/package.json (1)

5-5: Description update looks good

Clearer package description matches the new compat plugin work.

packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml (1)

10-13: Serde derive feature and compat path dependency LGTM

Pulling serde from the workspace with the derive feature and wiring in the local swc_plugin_compat crate lines up with the newly shared data structures.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 83.72093% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...t/transform/swc-plugin-reactlynx-compat/src/lib.rs 0.00% 6 Missing ⚠️
...eact/transform/crates/swc_plugins_shared/target.rs 97.22% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 24, 2025

CodSpeed Performance Report

Merging #1824 will degrade performances by 7.53%

Comparing feat/introduce-swc-plugin-react-lynx-compat (57c0baa) with main (9ab108f)

Summary

⚡ 1 improvement
❌ 1 regression
✅ 51 untouched
⏩ 3 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
transform 1000 view elements 41.8 ms 45.2 ms -7.53%
basic-performance-nest-level-100 6.3 ms 5.9 ms +6.53%

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link

relativeci bot commented Sep 24, 2025

Web Explorer

#5515 Bundle Size — 365.44KiB (0%).

57c0baa(current) vs 9ab108f main#5513(baseline)

Bundle metrics  Change 1 change
                 Current
#5515
     Baseline
#5513
No change  Initial JS 145.71KiB 145.71KiB
No change  Initial CSS 32KiB 32KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 220(+0.46%) 219
No change  Duplicate Modules 16 16
No change  Duplicate Code 3.37% 3.37%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#5515
     Baseline
#5513
No change  JS 239.42KiB 239.42KiB
No change  Other 94.02KiB 94.02KiB
No change  CSS 32KiB 32KiB

Bundle analysis reportBranch feat/introduce-swc-plugin-react-...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link

relativeci bot commented Sep 24, 2025

React Example

#5520 Bundle Size — 237.56KiB (0%).

57c0baa(current) vs 9ab108f main#5518(baseline)

Bundle metrics  no changes
                 Current
#5520
     Baseline
#5518
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 166 166
No change  Duplicate Modules 68 68
No change  Duplicate Code 46.81% 46.81%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#5520
     Baseline
#5518
No change  IMG 145.76KiB 145.76KiB
No change  Other 91.8KiB 91.8KiB

Bundle analysis reportBranch feat/introduce-swc-plugin-react-...Project dashboard


Generated by RelativeCIDocumentationReport issue

@gaoachao gaoachao marked this pull request as ready for review September 24, 2025 13:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
packages/react/transform/crates/swc_plugin_compat/lib.rs (4)

29-33: Untyped union deserialization will fail without #[serde(untagged)].

Config expects raw values (e.g., addComponentElement: true or { compilerOnly: true }). Without untagged, serde requires { "A": true } / { "B": { ... } }.

Apply:

-#[derive(Deserialize, Debug, Clone, PartialEq)]
+#[derive(Deserialize, Debug, Clone, PartialEq)]
+#[serde(untagged)]
 pub enum Either<A, B> {

66-71: CamelCase config keys won’t map to Rust fields. Add rename strategy.

TS config uses themeExpr; Rust field is theme_expr. Add rename_all.

-#[derive(Deserialize, Clone, Debug)]
+#[derive(Deserialize, Clone, Debug)]
+#[serde(rename_all = "camelCase")]
 pub struct DarkModeConfig {

75-99: CamelCase config keys won’t map to Rust fields. Add rename strategy.

compilerOnlycompiler_only.

-#[derive(Deserialize, Clone, Debug)]
+#[derive(Deserialize, Clone, Debug)]
+#[serde(rename_all = "camelCase")]
 pub struct AddComponentElementConfig {

103-107: Add serde camelCase + defaults to CompatVisitorConfig (TransformTarget already Deserialize)

  • TS keys use camelCase (componentsPkg, oldRuntimePkg, …); struct lacks #[serde(rename_all = "camelCase")].
  • Many fields are non-optional; add serde defaults (per-field #[serde(default = "...")] or #[serde(default)] + Default impl) so partial plugin configs deserialize.
  • TransformTarget already implements Deserialize (packages/react/transform/crates/swc_plugins_shared/target.rs).

Proposed fixes:

-#[derive(Deserialize, Clone, Debug)]
+#[derive(Deserialize, Clone, Debug)]
+#[serde(rename_all = "camelCase")]
 pub struct CompatVisitorConfig {
   /// @internal
-  pub target: TransformTarget,
+  #[serde(default = "default_target")]
+  pub target: TransformTarget,
@@
-  pub components_pkg: Vec<String>,
+  #[serde(default = "default_components_pkg")]
+  pub components_pkg: Vec<String>,
@@
-  pub old_runtime_pkg: Vec<String>,
+  #[serde(default = "default_old_runtime_pkg")]
+  pub old_runtime_pkg: Vec<String>,
@@
-  pub new_runtime_pkg: String,
+  #[serde(default = "default_new_runtime_pkg")]
+  pub new_runtime_pkg: String,
@@
-  pub add_component_element: Either<bool, AddComponentElementConfig>,
+  #[serde(default = "default_add_component_element")]
+  pub add_component_element: Either<bool, AddComponentElementConfig>,

Add these helpers (near the struct):

fn default_target() -> TransformTarget {
  TransformTarget::LEPUS
}
fn default_components_pkg() -> Vec<String> {
  vec!["@lynx-js/react-components".into()]
}
fn default_old_runtime_pkg() -> Vec<String> {
  vec!["@lynx-js/react-runtime".into()]
}
fn default_new_runtime_pkg() -> String {
  "@lynx-js/react".into()
}
fn default_add_component_element() -> Either<bool, AddComponentElementConfig> {
  Either::A(false)
}

Also applies to: 129-130, 152-153, 175-176, 245-246

🧹 Nitpick comments (6)
packages/react/transform/swc-plugin-reactlynx-compat/turbo.json (1)

1-11: Include Cargo.lock in inputs and consider depending on upstream builds.

This tightens cache correctness and typical Turbo DAG semantics.

Apply:

   "tasks": {
     "build": {
-      "dependsOn": [],
-      "inputs": [".cargo/**", "src/**/*.rs", "Cargo.toml", "build.js"],
+      "dependsOn": ["^build"],
+      "inputs": [".cargo/**", "src/**/*.rs", "Cargo.toml", "Cargo.lock", "build.js"],
       "outputs": ["swc_plugin_reactlynx_compat.wasm"]
     }
   }
packages/react/transform/crates/swc_plugins_shared/target.rs (1)

10-25: Manual Deserialize works; consider derive with renames for brevity.

You can replace the manual impl with derive and per-variant renames.

-use serde::{Deserialize, Deserializer};
+use serde::Deserialize;
@@
-impl<'de> Deserialize<'de> for TransformTarget {
-  fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
-  where
-    D: Deserializer<'de>,
-  {
-    let s = String::deserialize(deserializer)?;
-    match s.as_str() {
-      "LEPUS" => Ok(TransformTarget::LEPUS),
-      "JS" => Ok(TransformTarget::JS),
-      "MIXED" => Ok(TransformTarget::MIXED),
-      _ => Err(serde::de::Error::custom(format!(
-        "value `{s}` does not match any variant of TransformTarget"
-      ))),
-    }
-  }
-}
+#[derive(Deserialize)]
+#[serde(rename_all = "UPPERCASE")]
+pub enum TransformTarget {
+  #[serde(rename = "LEPUS")]
+  LEPUS,
+  #[serde(rename = "JS")]
+  JS,
+  #[serde(rename = "MIXED")]
+  MIXED,
+}

If you adopt this, adjust the error assertion in tests to match Serde’s default message.

packages/react/transform/swc-plugin-reactlynx-compat/src/lib.rs (1)

8-15: Avoid silently swallowing config parse errors; pass comments without as_ref().

Log parse failures and use metadata.comments directly to match CompatVisitor::new generic better.

 pub fn process_transform(program: Program, metadata: TransformPluginProgramMetadata) -> Program {
   let config_json = metadata.get_transform_plugin_config().unwrap_or_default();
-  let config: CompatVisitorConfig = serde_json::from_str(&config_json).unwrap_or_default();
-  let comments = metadata.comments.as_ref();
+  let config: CompatVisitorConfig = if config_json.is_empty() {
+    Default::default()
+  } else {
+    serde_json::from_str(&config_json).unwrap_or_else(|err| {
+      eprintln!("[swc-plugin-reactlynx-compat] Failed to parse config: {err}. Falling back to defaults.");
+      Default::default()
+    })
+  };
+  let comments = metadata.comments;
 
   program.apply(&mut visit_mut_pass(CompatVisitor::new(config, comments)))
 }

Also ensure this crate depends on serde and serde_json.

packages/react/transform/swc-plugin-reactlynx-compat/index.d.ts (3)

44-48: Remove stray docblock not attached to a declaration.

This appears to be orphaned and duplicates prior context.

-/**
- * {@inheritdoc CompatVisitorConfig.addComponentElement}
- * @public
- */
-

12-17: Tighten wording: compilerOnly description.

Minor grammar/clarity fix.

- * Whether to only add component element during compilation
+ * Whether to add the component element only during compilation
@@
- * Note that this only take effects on `Component` imported from {@link CompatVisitorConfig.oldRuntimePkg}.
+ * Note that this only takes effect on `Component` imported from {@link CompatVisitorConfig.oldRuntimePkg}.

186-188: Fix grammar: “take effects” → “takes effect”.

- * Note that this only take effects on `Component` imported from {@link CompatVisitorConfig.oldRuntimePkg}.
+ * Note that this only takes effect on `Component` imported from {@link CompatVisitorConfig.oldRuntimePkg}.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05ae7f3 and c4aa8e1.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .changeset/loud-carrots-relate.md (1 hunks)
  • biome.jsonc (1 hunks)
  • eslint.config.js (1 hunks)
  • packages/react/transform/crates/swc_plugin_compat/Cargo.toml (1 hunks)
  • packages/react/transform/crates/swc_plugin_compat/lib.rs (5 hunks)
  • packages/react/transform/crates/swc_plugins_shared/target.rs (1 hunks)
  • packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml (1 hunks)
  • packages/react/transform/swc-plugin-reactlynx-compat/index.d.ts (1 hunks)
  • packages/react/transform/swc-plugin-reactlynx-compat/src/lib.rs (1 hunks)
  • packages/react/transform/swc-plugin-reactlynx-compat/turbo.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

For contributions, always generate a changeset and commit the resulting markdown file(s)

Files:

  • .changeset/loud-carrots-relate.md
🧠 Learnings (7)
📓 Common learnings
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1714
File: packages/react/transform/Cargo.toml:19-19
Timestamp: 2025-09-10T11:42:36.855Z
Learning: In packages/react/transform/Cargo.toml, the crate uses serde derive macros (#[derive(Serialize, Deserialize)]) in multiple files including src/esbuild.rs and src/swc_plugin_extract_str/mod.rs, so the "derive" feature is required when migrating to workspace dependencies.
📚 Learning: 2025-09-10T11:42:36.855Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1714
File: packages/react/transform/Cargo.toml:19-19
Timestamp: 2025-09-10T11:42:36.855Z
Learning: In packages/react/transform/Cargo.toml, the crate uses serde derive macros (#[derive(Serialize, Deserialize)]) in multiple files including src/esbuild.rs and src/swc_plugin_extract_str/mod.rs, so the "derive" feature is required when migrating to workspace dependencies.

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/target.rs
  • packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml
  • packages/react/transform/crates/swc_plugin_compat/Cargo.toml
  • packages/react/transform/crates/swc_plugin_compat/lib.rs
  • packages/react/transform/swc-plugin-reactlynx-compat/turbo.json
📚 Learning: 2025-07-18T04:27:18.291Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.

Applied to files:

  • biome.jsonc
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml
📚 Learning: 2025-09-18T04:43:54.407Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.407Z
Learning: In packages/react/transform/src/swc_plugin_compat/mod.rs, the `add_pure_comment` function at lines 478-482 is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs. These are two distinct code paths that should be treated differently.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/src/lib.rs
📚 Learning: 2025-09-18T04:43:54.407Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.407Z
Learning: In the lynx-family/lynx-stack repository, the `add_pure_comment` function in packages/react/transform/src/swc_plugin_compat/mod.rs (around lines 478-482) is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx-compat/src/lib.rs
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.

Applied to files:

  • .changeset/loud-carrots-relate.md
🧬 Code graph analysis (1)
packages/react/transform/swc-plugin-reactlynx-compat/src/lib.rs (2)
packages/react/transform/swc-plugin-reactlynx-compat/index.d.ts (1)
  • CompatVisitorConfig (53-323)
packages/react/transform/crates/swc_plugin_compat/lib.rs (1)
  • new (413-425)
🔇 Additional comments (6)
.changeset/loud-carrots-relate.md (1)

1-3: Empty changeset is acceptable here; confirm no user-facing release is needed.

This follows the repo practice for internal-only changes. If any npm/crate packages gain new public surface (e.g., new TS declarations shipped), we should include proper bumps instead of an empty changeset.

Do these changes alter any published package’s public API or behavior? If yes, replace this with a non-empty changeset listing affected packages and bump types.

eslint.config.js (1)

69-72: LGTM: broadened ignore to nested index.d.ts files.

Matches the Biome change and should reduce noisy lint on generated declarations.

biome.jsonc (1)

37-40: LGTM: Biome ignore aligned with ESLint.

Keeps generated nested declarations out of linting.

packages/react/transform/crates/swc_plugin_compat/Cargo.toml (1)

16-16: Ensure serde derive feature is enabled.

Types in this crate derive Deserialize; serde must have features = ["derive"] either at workspace level or here.

If not enabled at workspace level, apply:

-serde = { workspace = true }
+serde = { workspace = true, features = ["derive"] }
packages/react/transform/crates/swc_plugins_shared/target.rs (1)

27-66: Add serde and serde_json to swc_plugins_shared Cargo.toml

Add serde to [dependencies] and serde_json to [dev-dependencies] in packages/react/transform/crates/swc_plugins_shared/Cargo.toml so tests using serde_json and serde derives compile. If serde is provided via workspace.dependencies, enable the "derive" feature (features = ["derive"]).

packages/react/transform/swc-plugin-reactlynx-compat/Cargo.toml (1)

13-13: Approve: no lingering direct deps found in swc-plugin-reactlynx-compat

Search in packages/react/transform/swc-plugin-reactlynx-compat found no matches for convert_case, once_cell, regex, or rustc-hash — switching to swc_plugin_compat is safe.

@gaoachao gaoachao merged commit 6180e11 into main Sep 25, 2025
51 of 52 checks passed
@gaoachao gaoachao deleted the feat/introduce-swc-plugin-react-lynx-compat branch September 25, 2025 13:24
@gaoachao gaoachao changed the title feat: introduce swc-plugin-react-lynx-compat feat: introduce swc-plugin-reactlynx-compat Sep 29, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 30, 2025
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 5, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants