-
Notifications
You must be signed in to change notification settings - Fork 6
Implement native react_async_import_lift transformer
#902
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
Implement native react_async_import_lift transformer
#902
Conversation
Hook up transformer using env to enable/disable
Hook up transformer using env to enable/disable
Hook up transformer using env to enable/disable
…aliaser` transformer
Implement new `unused_bindings_remover` transformer Hook up transformers using env to enable/disable
…arios and preserve bindings in tests
Refactor and clean up `unused_bindings_remover` Add a lot more tests
Add import cleaning tests
Small improvements
- Add config cache - Add tests
…nto oscar/js-transformer/react-async-import-lift
🦋 Changeset detectedLatest commit: 24f5fc1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 110 packages
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 |
Rust Package Changeset Check✅ The |
📊 Type Coverage ReportCoverage Comparison
Files with Most Type Issues (Top 15)
This report was generated by the Type Coverage GitHub Action |
|
You've got a bunch of Clippy errors to resolve, and you'll need to merge in |
…nsformer/react-async-import-lift
…nsformer/react-async-import-lift
| @@ -437,7 +436,7 @@ pub fn transform( | |||
| unresolved_mark, | |||
| &config.sync_dynamic_import_config, | |||
| )), | |||
| config.is_tesseract && config.sync_dynamic_import_config.is_some()), | |||
| config.sync_dynamic_import_config.is_some()), | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the config.is_tesseract since I last reviewed removed intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it was from a prior version of Nathan's branch that he later changed, when I merged in main after that Git didn't know that had happened so it and a few other random lines hung around that I have just now realised and removed.
| @@ -124,15 +124,15 @@ impl ReactAsyncImportLift { | |||
| }); | |||
|
|
|||
| // Replace import() with the lifted identifier in the expression tree | |||
| self.replace_import_with_ident(expr, &lifted_id); | |||
| Self::replace_import_with_ident(expr, &lifted_id); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change from self. to Self::? Is it some "method doesn't actually use self so can be static" check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. The &self function params in a few functions were redundant since I had changed how the functions worked but had forgotten to remove them.
📊 Benchmark Results✅ No significant performance changes detected. 📊 Benchmark ResultsOverall Performance
🔍 Detailed Phase AnalysisThree.js Real Repository (JS)
Three.js Real Repository (V3)
💾 Unified Memory AnalysisThree.js Real Repository (JS) Memory Statistics
Sample Counts: JS: 14, Native: 284 Three.js Real Repository (V3) Memory Statistics
Sample Counts: JS: 14, Native: 538 🖥️ Environment
|
Motivation
We are replacing various old Babel transformers with native reimplementations for performance and maintenance reasons.
Changes
react_async_import_lifttransformerlib.rsChecklist
docs/folder