Improve documentation for manualPureFunctions#6402
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Documents a known limitation of treeshake.manualPureFunctions: arguments passed to a manually-marked pure function are only checked for direct side effects, not for whether the arguments themselves (e.g. callbacks) might be invoked with side effects. This addresses the confusion described in issue #6399.
Changes:
- Adds a warning callout under the
manualPureFunctionssection explaining that callback arguments are not inspected for side effects. - Provides three short examples illustrating which calls are retained vs. removed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#gh-6399_wrongly_removed_pureNotice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust. or load it into the REPL: |
Performance report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6402 +/- ##
=======================================
Coverage 98.78% 98.78%
=======================================
Files 274 274
Lines 10785 10785
Branches 2882 2882
=======================================
Hits 10654 10654
Misses 89 89
Partials 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
This PR has been released as part of [email protected]. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description