Make const reassignments only a warning#6020
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#gh-6018_const_reassignNotice: Ensure you have installed the latest stable 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6020 +/- ##
===========================================
- Coverage 98.79% 21.74% -77.06%
===========================================
Files 270 259 -11
Lines 10575 10214 -361
Branches 2821 2733 -88
===========================================
- Hits 10448 2221 -8227
- Misses 87 7820 +7733
- Partials 40 173 +133 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR has been released as part of rollup@4.45.3. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
While I still think it is useful to detect const reassignments, I agree that it might be enough to warn about these cases and still emit a bundle. After all in browsers, const reassignments are no parse error but runtime errors, so issues in unused code or within try-catch can still be handled.