Skip to content

.tsbuildinfo not ignored when incremental is false.Β #62565

@Tezra

Description

@Tezra

πŸ”Ž Search Terms

.tsbuildinfo

πŸ•— Version & Regression Information

This changed between versions 5.6 and 5.6.3

⏯ Playground Link

No response

πŸ’» Code

// Your code here

πŸ™ Actual behavior

In 5.6, .tsbuildinfo was changed to always emit, but this was a breaking change. Even with incremental and composite set to false, the .tsbuildinfo is emitted, and prevents the project from recompiling until it is deleted. There is also no option to disable emitting the file to avoid it's side effects. This has led to several (mine, collab) NPM packages being published without latest code updates.

πŸ™‚ Expected behavior

  1. When incremental and composite is false, all files should be recompiled regardless of the existence of a tsbuildinfo file. AKA default build behavior should produce a clean build regardless of file state. (Current workaround is to run clean first but this does not always remove all files)
  2. It should be possible to disable emitting the tsbuildinfo to avoid polluting the dist package for production builds. (current workaround is to either put it in a random folder or add an extra build step to delete the file before publish, or copy in a .npmignore, however this adds extra build complexity)

Additional information about the issue

Closest ticket I could find was this issue which was marked as working as intended, but the default behavior changing, and options to avoid that default behavior are two completely separate things. Even if the default emit is intended, the use case to have an option to disable that is also valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions