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

Add "exports-only" option to preserveSignature #3823

Merged
merged 1 commit into from Oct 16, 2020

Conversation

lukastaegert
Copy link
Member

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 #3820

Description

This adds a new exports-only setting to output.preserveSignature that behaves like strict when the entry module has exports, otherwise it behaves like allow-extension.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

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

npm install rollup/rollup#preserve-signature-exports-only

or load it into the REPL:
https://rollupjs.org/repl/?circleci=13238

@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

Merging #3823 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3823   +/-   ##
=======================================
  Coverage   97.06%   97.06%           
=======================================
  Files         184      184           
  Lines        6500     6502    +2     
  Branches     1881     1883    +2     
=======================================
+ Hits         6309     6311    +2     
  Misses        101      101           
  Partials       90       90           
Impacted Files Coverage Δ
src/Chunk.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8cdbc61...55610bf. Read the comment docs.

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

Wondering if we should make it the default? Or is that a major change?

@lukastaegert
Copy link
Member Author

I think it is a major change but I put a note on the 3.0 project board so that it is not forgotten: https://github.com/rollup/rollup/projects/3

@lukastaegert lukastaegert merged commit 4b07a96 into master Oct 16, 2020
@lukastaegert lukastaegert deleted the preserve-signature-exports-only branch October 16, 2020 18:53
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.

preserveEntrySignatures: exports-only
3 participants