Skip to content

Add hasDeoptimizedCache flag for ConditionalExpression #6009

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
merged 2 commits into from
Jul 15, 2025

Conversation

TrickyPi
Copy link
Member

@TrickyPi TrickyPi commented Jul 12, 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 #6012
related issue: #5770
related PR: #6000

Description

Copy link

vercel bot commented Jul 12, 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 11:10am

Copy link

github-actions bot commented Jul 12, 2025

Thank you for your contribution! ❤️

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

npm install rollup/rollup#fix/conditional-expression-literal-value

Notice: 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:
https://rollup-9g9uwpn0l-rollup-js.vercel.app/repl/?pr=6009

Copy link

Performance report

  • BUILD: 7044ms, 822 MB
    • initialize: 0ms, 24.7 MB
    • generate module graph: 2641ms, 631 MB
      • generate ast: 1406ms, 620 MB
    • sort and bind modules: 402ms, 685 MB
    • mark included statements: 3997ms, 822 MB
      • treeshaking pass 1: 2331ms, 819 MB
      • treeshaking pass 2: 474ms, 849 MB
      • treeshaking pass 3: 406ms, 823 MB
      • treeshaking pass 4: 390ms, 854 MB
      • treeshaking pass 5: 387ms, 822 MB
  • GENERATE: 894ms (+94ms, +11.7%), 921 MB
    • initialize render: 0ms, 911 MB (+9%)
    • generate chunks: 182ms (+133ms, +268.6%), 832 MB
      • optimize chunks: 0ms, 894 MB (+9%)
    • render chunks: 638ms (-74ms, -10.4%), 895 MB
    • transform chunks: 19ms, 921 MB
    • generate bundle: 0ms, 921 MB

Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (b7c7c11) to head (c037425).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6009   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         270      270           
  Lines       10569    10575    +6     
  Branches     2819     2821    +2     
=======================================
+ Hits        10442    10448    +6     
  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.

@TrickyPi
Copy link
Member Author

Hi @lukastaegert, do you have time to make a patch release? It seems that quite a few people are currently running into this issue.

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.

Damn, really missed this

@lukastaegert lukastaegert added this pull request to the merge queue Jul 15, 2025
Merged via the queue into master with commit 9ff1da5 Jul 15, 2025
42 checks passed
@lukastaegert lukastaegert deleted the fix/conditional-expression-literal-value branch July 15, 2025 12:49
@TrickyPi
Copy link
Member Author

haha 😂

Copy link

This PR has been released as part of rollup@4.45.1. You can test it via npm install rollup.

@nipkai
Copy link

nipkai commented Jul 15, 2025

For me it did not resolve.

When I run a build in my vite app, I still get:

[vite-plugin-pwa:build] [plugin vite-plugin-pwa:build] There was an error during the build:
Cannot add property 0, object is not extensible
Additionally, handling the error in the 'buildEnd' hook caused the following error:
Cannot add property 0, object is not extensible

@TrickyPi
Copy link
Member Author

For me it did not resolve.

When I run a build in my vite app, I still get:

[vite-plugin-pwa:build] [plugin vite-plugin-pwa:build] There was an error during the build:

Cannot add property 0, object is not extensible

Additionally, handling the error in the 'buildEnd' hook caused the following error:

Cannot add property 0, object is not extensible

Could you check which version of Rollup is installed?

@nipkai
Copy link

nipkai commented Jul 15, 2025

For me it did not resolve.
When I run a build in my vite app, I still get:
[vite-plugin-pwa:build] [plugin vite-plugin-pwa:build] There was an error during the build:
Cannot add property 0, object is not extensible
Additionally, handling the error in the 'buildEnd' hook caused the following error:
Cannot add property 0, object is not extensible

Could you check which version of Rollup is installed?

installed is 4.45.0, trying to set it to 4.45.1 in package json resolves to:

npm warn Found: rollup@4.45.0
npm warn node_modules/rollup
npm warn dev rollup@"^4.45.1" from the root project
npm warn 5 more (@rollup/plugin-node-resolve, @rollup/plugin-terser, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional rollup@"2.x || 3.x || 4.x" from rollup-plugin-visualizer@6.0.3
npm warn node_modules/rollup-plugin-visualizer
npm warn dev rollup-plugin-visualizer@"^6.0.3" from the root project
npm error code ETARGET
npm error notarget No matching version found for rollup@^4.45.1.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

@ShaneK
Copy link

ShaneK commented Jul 15, 2025

I've verified this does indeed work again in 4.45.1. Not sure what @nipkai is having issues with, but looks like you couldn't find it when you tried to install it for some reason. Works for me locally, though.
Screenshot-2025-07-15 at 07 39 10

Thanks for resolving this issue for us!

@nipkai
Copy link

nipkai commented Jul 15, 2025

Works now as well! I did not change anything :D

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.

bug from 4.45.0: Cannot add property 0, object is not extensible
4 participants