Skip to content

feat: improve get literal value for conditional expression #6000

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

Merged

Conversation

ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Jun 30, 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:

Description

Improve getLiteralValueAtPath for ConditionalExpression when used branch is unknown, this PR will try to get the literal value of consequent branch and alternate branch, and decide a literal value for ConditionalExpression based on that

Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2025 5:15am

Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (1923218) to head (316b20f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6000   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         270      270           
  Lines       10559    10569   +10     
  Branches     2815     2819    +4     
=======================================
+ Hits        10432    10442   +10     
  Misses         87       87           
  Partials       40       40           

☔ 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.

@lukastaegert lukastaegert enabled auto-merge July 12, 2025 05:14
@lukastaegert lukastaegert added this pull request to the merge queue Jul 12, 2025
Merged via the queue into rollup:master with commit 7be41cb Jul 12, 2025
41 checks passed
Copy link

This PR has been released as part of rollup@4.45.0. 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.

2 participants