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

fix(typescript): only emit tsbuildinfo file when there is something to emit #771

Merged
merged 2 commits into from
Jan 28, 2021
Merged

fix(typescript): only emit tsbuildinfo file when there is something to emit #771

merged 2 commits into from
Jan 28, 2021

Conversation

cherryblossom000
Copy link
Contributor

@cherryblossom000 cherryblossom000 commented Jan 18, 2021

Rollup Plugin Name: typescript

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no
    I'm still trying to figure out why this test didn't fail before this fix.
    It was because the bundle output wasn't written to disk, so the second run would be identical to the first as TypeScript wouldn't find the existing .tsbuildinfo.

Breaking Changes?

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

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers: #681

Description

Fixes #681

The plugin now checks if TypeScript has emitted a tsbuildinfo file. If and only if it has, the plugin emits the tsbuildinfo file.

This prevents the TypeError from occurring when the plugin used to emit the file even when there was no source for it (emittedFiles.get(tsBuildInfoPath) was undefined).

@cherryblossom000 cherryblossom000 marked this pull request as ready for review January 27, 2021 01:57
@shellscape
Copy link
Collaborator

thanks!

@shellscape shellscape merged commit 2711aa8 into rollup:master Jan 28, 2021
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.

Rollup fails with The "path" argument must be of type string. Received undefined
2 participants