Skip to content
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

Allow to pass "true" to InputOptions.cache #4859

Merged
merged 6 commits into from
Feb 16, 2023

Conversation

danielrentz
Copy link
Contributor

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

Vite has changed the default of this option to "false" (vitejs/vite#11454), therefore it is needed to be able to set it to "true" explicitly. This may be useful in other situations too, e.g. extending some defaults options object which contains this option set to "false".

Vite has changed the default of this option to "false" (vitejs/vite#11454), therefore it is needed to be able to set it to "true" explicitly. This may be useful in other situations too, e.g. extending some defaults options object which contains this option set to "false".
@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for rollupjs ready!

Name Link
🔨 Latest commit cf4b450
🔍 Latest deploy log https://app.netlify.com/sites/rollupjs/deploys/63ee92f7a5cc5900087632e2
😎 Deploy Preview https://deploy-preview-4859--rollupjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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.

Yes you are right, that change makes sense. Some additional points, though:

  • Currently, TypeScript tests are failing and Rollup does not build
  • The documentation should be adapted in docs/configuration-options/index.md to change the type for the cache option and note that true is the default.

@danielrentz
Copy link
Contributor Author

@lukastaegert Are the TS tests failing due to my change, or in general? (I have created the PR with the Gitlab inline editor).

@lukastaegert
Copy link
Member

Are the TS tests failing due to my change, or in general? (I have created the PR with the Gitlab inline editor).

Definitely due to your changes. We do not merge PRs if those tests fail, and CI makes sure this is not overlooked. Actually, it was the Netlify deploy that already failed, but you can inspect the test results yourself.

For that reason, I cannot recommend to do any production code changes in the inline editor. If you do not want to download it locally, try StackBlitz https://pr.new/github.com/danielrentz/rollup/tree/patch-1

@danielrentz
Copy link
Contributor Author

I see, thanks for explaining. Will take care.

@danielrentz
Copy link
Contributor Author

danielrentz commented Feb 15, 2023

I decided to leave "NormalizedInputOptions" as-is (type false, not boolean), and to replace option "true" with "undefined" when resolving the option value. This way, all the remaininig code using this option can remain untouched.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #4859 (cf4b450) into master (1ba8d4e) will decrease coverage by 0.02%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #4859      +/-   ##
==========================================
- Coverage   98.98%   98.97%   -0.02%     
==========================================
  Files         219      219              
  Lines        7898     7899       +1     
  Branches     2189     2190       +1     
==========================================
  Hits         7818     7818              
  Misses         26       26              
- Partials       54       55       +1     
Impacted Files Coverage Δ
src/utils/options/normalizeInputOptions.ts 99.03% <50.00%> (-0.97%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert
Copy link
Member

Seems at this point only the markdown linter is complaining, but I can fix that for you.

@lukastaegert lukastaegert enabled auto-merge (squash) February 16, 2023 20:33
@lukastaegert lukastaegert merged commit 96e5118 into rollup:master Feb 16, 2023
@rollup-bot
Copy link
Collaborator

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

None yet

3 participants