Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

TrickyPi
Copy link
Member

@TrickyPi TrickyPi commented Sep 5, 2025

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
resolves #6075

Description

By directly assigning the included value of a child node (e.g., element.included = true), the first include logic of that child in includeNode may be bypassed. Therefore, this PR uses childNode.includeNode instead of setting element.included = true directly. In addition, includeNode is also executed on the current node itself in includeDestructuredIfNecessary for the same reason. Finally, this PR fixes incorrect logic in ObjectPattern and simplifies the logic in ArrayPattern.

Copy link

vercel bot commented Sep 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rollup Ready Ready Preview Comment Sep 7, 2025 4:40am

Copy link

github-actions bot commented Sep 5, 2025

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#fix/6075

Notice: 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:
https://rollup-3pikf3oz7-rollup-js.vercel.app/repl/?pr=6090

Copy link

github-actions bot commented Sep 5, 2025

Performance report

  • BUILD: 6998ms, 819 MB
    • initialize: 0ms, 25 MB
    • generate module graph: 2616ms, 629 MB
      • generate ast: 1400ms, 619 MB
    • sort and bind modules: 402ms, 684 MB
    • mark included statements: 3977ms, 819 MB
      • treeshaking pass 1: 2329ms, 817 MB
      • treeshaking pass 2: 466ms, 839 MB
      • treeshaking pass 3: 401ms, 821 MB
      • treeshaking pass 4: 387ms, 844 MB (+3%)
      • treeshaking pass 5: 385ms, 819 MB
  • GENERATE: 983ms (+106ms, +12.1%), 925 MB (-3%)
    • initialize render: 0ms, 912 MB (-2%)
    • generate chunks: 46ms, 903 MB (-2%)
      • optimize chunks: 0ms, 894 MB (-2%)
    • render chunks: 821ms (+115ms, +16.3%), 898 MB (-3%)
    • transform chunks: 19ms, 925 MB (-3%)
    • generate bundle: 0ms, 925 MB (-3%)

Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 53.57143% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.73%. Comparing base (a2744ea) to head (1028adb).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/ast/nodes/ObjectPattern.ts 50.00% 2 Missing and 1 partial ⚠️
src/ast/nodes/ArrayPattern.ts 66.66% 1 Missing and 1 partial ⚠️
src/ast/nodes/AssignmentPattern.ts 50.00% 1 Missing and 1 partial ⚠️
src/ast/nodes/Identifier.ts 50.00% 1 Missing and 1 partial ⚠️
src/ast/nodes/Property.ts 50.00% 1 Missing and 1 partial ⚠️
src/ast/nodes/RestElement.ts 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6090      +/-   ##
==========================================
- Coverage   98.79%   98.73%   -0.06%     
==========================================
  Files         271      271              
  Lines       10622    10624       +2     
  Branches     2840     2841       +1     
==========================================
- Hits        10494    10490       -4     
- Misses         88       89       +1     
- Partials       40       45       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me! One only slightly related comment in order to improve coverage and avoid untested code.

@lukastaegert lukastaegert merged commit 7fb50f9 into master Sep 7, 2025
68 of 72 checks passed
@lukastaegert lukastaegert deleted the fix/6075 branch September 7, 2025 05:47
Copy link

github-actions bot commented Sep 7, 2025

This PR has been released as part of [email protected]. You can test it via npm install rollup.

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.

Treeshaking removed some default value of desctructing (Can not reproduce in some small repos)
2 participants